81ce777ec2
- I renamed some vars of datum/hud to be more selfexplanatory
- Moved all datum/hud mob code into the hud folder.
- fixed alien's zone selection button not using the correct sprites.
- I removed the update_hud() proc (that needed to be removed).
- Fixed a typo in /mob/living/carbon/ContractDisease , using "internals" instead of "internal" (very different things)
- Fixed doTeleport() calling Entered() twice on the destination area.
- To reference a mob's selected zone, you now use a direct mob var ("H.zone_selected" instead of "H.zone_sel.selecting")
- mobs lose certain screen objects var ("healths", "zone_sel", "internals", etc) which are now vars of the mob's datum/hud instead.
- the Blind spell is now done via the blind mutation instead of the blind disabilities.
- Give to mobs a version of forceMove(), so the mob is always properly unbuckled, his pull stopped, his vision updated, etc.
- The "user" var of mob/camera/aiEye/remote is renamed to "eye_user" to avoid confusion.
- reset_view() is replaced by reset_perspective(). Now all changes to client.eye and client.perspective are done with this proc.
- I reworked /obj/machinery/computer/security code, changing camera is instantaneous now, as well as cancelling.
- I reworked /obj/machinery/computer/camera_advanced code as well.
- I changed /obj/item/mecha_parts/mecha_equipment/mining_scanner's meson view to be constant instead of by intermittent.
- Fixes not being able to use /obj/item/device/camera_bug while buckled.
- removed admin_forcemove() proc, admin force moving now uses forceMove() simply.
- Removed the client var "adminobs"
- Added var/vision_correction to glasses.
- Added a thermal_overload() proc for glasses, to remove copypasta in emp_act code.
- Remove the hal_crit mob var
- We no longer delete the mob's hud everytime he logs in.
- Added a stat == dead check in mob's metabolize() so we immediately stop metabolizing if one of the chem kills the mob.
- Being inside disposal bin lowers your vision, like wearing a welding helmet.
- removed the remote_view mob var.
- I changed advanced camera EYE, some fixes, removed unnecessary code when the eye moves, now the mob client eye properly follows the camera mob.
- fixes mob var "machine" not being nullified on logout.
- larva/death() was calling two "living_mob_list -= src"
- I made the Blind screen objects into a global_hud instead of giving one to each mob (like damage overlay).
- I untied tint and eye_blind, TINT_BLIND doesn't give you eye_blind=1.
- gave a visual overlay when inside locker (vimpaired)
- when inside disposal/gas pipes you get sight |= (BLIND|SEE_TURFS)
- glasses toggling updates (atmos meson toggle): DONE
- The new adjust procs serve to properly change eye_blind etc and call vision update procs when needed.
- I added an on_unset_machine() proc to handle perspective reset for camera consoles.
- I moved consequences of eye_check fail inside eye_check() procs themselves.
- I fixed vision updates being fucked by forceMove, especially pipe vision.
- I decided that damage overlay not appearing when dead.
- mob's hud_used is no longer deleted on each login()
- I refactored mob huds a bit, creating subtypes for each mob (/datum/hud/human)
- f12's hud toggling is now available to all mobs
- gave borgs a low_power_mode var so unpowered borg do not use stat= UNCONSCIOUS (which made things weird since you were unconscious but not blind)
- Fixed double Area entering when forced teleporting.
- I fixed larva pulling not being broken when cuffing them, and larva not seeing handcuff alert (and they can resist by clicking it)
- I removed pull updates from life() since it onyl checked for puller's incapacitation.
- I renamed camera/deactivate() to toggle_cam() to be more accurate.
- I fixed mmi brain being immortal (by removing the brain and putting it back)
- I simplified mmi brain emp damage.
140 lines
4.8 KiB
Plaintext
140 lines
4.8 KiB
Plaintext
|
|
// Drill, Diamond drill, Mining scanner
|
|
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/drill
|
|
name = "exosuit drill"
|
|
desc = "Equipment for engineering and combat exosuits. This is the drill that'll pierce the heavens!"
|
|
icon_state = "mecha_drill"
|
|
equip_cooldown = 30
|
|
energy_drain = 10
|
|
force = 15
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/drill/action(atom/target)
|
|
if(!action_checks(target))
|
|
return
|
|
if(istype(target, /turf) && !istype(target, /turf/simulated))
|
|
return
|
|
if(isobj(target))
|
|
var/obj/target_obj = target
|
|
if(target_obj.unacidable)
|
|
return
|
|
target.visible_message("<span class='warning'>[chassis] starts to drill [target].</span>", \
|
|
"<span class='userdanger'>[chassis] starts to drill [target]...</span>", \
|
|
"<span class='italics'>You hear drilling.</span>")
|
|
|
|
if(do_after_cooldown(target))
|
|
if(istype(target, /turf/simulated/wall/r_wall))
|
|
if(istype(src , /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
|
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
|
|
log_message("Drilled through [target]")
|
|
target.ex_act(3)
|
|
else
|
|
occupant_message("<span class='danger'>[target] is too durable to drill through.</span>")
|
|
else if(istype(target, /turf/simulated/mineral))
|
|
for(var/turf/simulated/mineral/M in range(chassis,1))
|
|
if(get_dir(chassis,M)&chassis.dir)
|
|
M.gets_drilled(chassis.occupant)
|
|
log_message("Drilled through [target]")
|
|
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment)
|
|
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
|
if(ore_box)
|
|
for(var/obj/item/weapon/ore/ore in range(1, chassis))
|
|
if(get_dir(chassis,ore)&chassis.dir)
|
|
ore.Move(ore_box)
|
|
else if(istype(target, /turf/simulated/floor/plating/asteroid))
|
|
for(var/turf/simulated/floor/plating/asteroid/M in range(1, chassis))
|
|
if(get_dir(chassis,M)&chassis.dir)
|
|
M.gets_dug()
|
|
log_message("Drilled through [target]")
|
|
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment)
|
|
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
|
if(ore_box)
|
|
for(var/obj/item/weapon/ore/ore in range(1, chassis))
|
|
if(get_dir(chassis,ore)&chassis.dir)
|
|
ore.Move(ore_box)
|
|
else
|
|
log_message("Drilled through [target]")
|
|
if(isliving(target))
|
|
if(istype(src , /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
|
drill_mob(target, chassis.occupant, 120)
|
|
else
|
|
drill_mob(target, chassis.occupant)
|
|
else
|
|
target.ex_act(2)
|
|
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M as obj)
|
|
if(..())
|
|
if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
|
|
return 1
|
|
return 0
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user, var/drill_damage=80)
|
|
target.visible_message("<span class='danger'>[chassis] drills [target] with [src].</span>", \
|
|
"<span class='userdanger'>[chassis] drills [target] with [src].</span>")
|
|
add_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
|
if(ishuman(target))
|
|
var/mob/living/carbon/human/H = target
|
|
var/obj/item/organ/limb/affecting = H.get_organ("chest")
|
|
affecting.take_damage(drill_damage)
|
|
H.update_damage_overlays(0)
|
|
else
|
|
target.take_organ_damage(drill_damage)
|
|
if(target)
|
|
target.Paralyse(10)
|
|
target.updatehealth()
|
|
|
|
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
|
|
name = "diamond-tipped exosuit drill"
|
|
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
|
|
icon_state = "mecha_diamond_drill"
|
|
origin_tech = "materials=4;engineering=3"
|
|
equip_cooldown = 20
|
|
force = 15
|
|
|
|
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/mining_scanner
|
|
name = "exosuit mining scanner"
|
|
desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals."
|
|
icon_state = "mecha_analyzer"
|
|
origin_tech = "materials=3;engineering=2"
|
|
equip_cooldown = 30
|
|
var/scanning = 0
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
|
|
SSobj.processing |= src
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
|
|
..()
|
|
M.occupant_sight_flags |= SEE_TURFS
|
|
if(M.occupant)
|
|
M.occupant.update_sight()
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
|
|
chassis.occupant_sight_flags &= ~SEE_TURFS
|
|
if(chassis.occupant)
|
|
chassis.occupant.update_sight()
|
|
return ..()
|
|
|
|
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
|
|
if(!loc)
|
|
SSobj.processing.Remove(src)
|
|
qdel(src)
|
|
if(scanning)
|
|
return
|
|
if(istype(loc,/obj/mecha/working))
|
|
var/obj/mecha/working/mecha = loc
|
|
if(!mecha.occupant)
|
|
return
|
|
var/list/L = list(mecha.occupant)
|
|
scanning = 1
|
|
mineral_scan_pulse(L,get_turf(loc))
|
|
spawn(equip_cooldown)
|
|
scanning = 0
|
|
|
|
|