Files
kiwistation/code/game/machinery/transformer.dm
T
phil235 81ce777ec2 - you now only see turfs when inside gas pipes.
- 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.
2016-02-04 00:33:16 +01:00

106 lines
3.0 KiB
Plaintext

/obj/machinery/transformer
name = "\improper Automatic Robotic Factory 5000"
desc = "A large metallic machine with an entrance and an exit. A sign on the side reads, 'human go in, robot come out', human must be lying down and alive. Has to cooldown between each use."
icon = 'icons/obj/recycling.dmi'
icon_state = "separator-AO1"
layer = MOB_LAYER+1 // Overhead
anchored = 1
density = 0
var/transform_dead = 0
var/transform_standing = 0
var/cooldown_duration = 600 // 1 minute
var/cooldown = 0
var/robot_cell_charge = 5000
/obj/machinery/transformer/New()
// On us
..()
new /obj/machinery/conveyor/auto(loc, WEST)
/obj/machinery/transformer/power_change()
..()
update_icon()
/obj/machinery/transformer/update_icon()
..()
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
icon_state = "separator-AO0"
else
icon_state = initial(icon_state)
/obj/machinery/transformer/Bumped(atom/movable/AM)
if(cooldown == 1)
return
// Crossed didn't like people lying down.
if(ishuman(AM))
// Only humans can enter from the west side, while lying down.
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
if((transform_standing || H.lying) && move_dir == EAST)// || move_dir == WEST)
AM.loc = src.loc
do_transform(AM)
/obj/machinery/transformer/CanPass(atom/movable/mover, turf/target, height=0)
if(!ishuman(mover)) // Allows items to go through, to stop them from blocking the conveyour belt.
var/dir = get_dir(src, mover)
if(dir == EAST)
return ..()
return 0
/obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H)
if(stat & (BROKEN|NOPOWER))
return
if(cooldown == 1)
return
if(!transform_dead && H.stat == DEAD)
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
// Activate the cooldown
cooldown = 1
update_icon()
spawn(cooldown_duration)
cooldown = 0
update_icon()
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
H.emote("scream") // It is painful
H.adjustBruteLoss(max(0, 80 - H.getBruteLoss())) // Hurt the human, don't try to kill them though.
// Sleep for a couple of ticks to allow the human to see the pain
sleep(5)
use_power(5000) // Use a lot of power.
var/mob/living/silicon/robot/R = H.Robotize(1) // Delete the items or they'll all pile up in a single tile and lag
R.cell.maxcharge = robot_cell_charge
R.cell.charge = robot_cell_charge
// So he can't jump out the gate right away.
R.SetLockdown()
spawn(50)
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
sleep(30)
if(R)
R.SetLockdown(0)
R.notify_ai(1)
/obj/machinery/transformer/conveyor/New()
..()
var/turf/T = loc
if(T)
// Spawn Conveyour Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(east, WEST)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(west, WEST)