diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm index b1e8f101202..3e6c7e5c478 100644 --- a/_maps/map_files/Delta/delta.dmm +++ b/_maps/map_files/Delta/delta.dmm @@ -1274,12 +1274,6 @@ icon_state = "floor3" }, /area/shuttle/administration) -"acV" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/administration) "acW" = ( /turf/simulated/shuttle/floor{ icon_state = "floor3" @@ -6079,10 +6073,6 @@ /obj/machinery/light/spot, /turf/simulated/shuttle/floor4/vox, /area/shuttle/vox) -"anf" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor4/vox, -/area/shuttle/vox) "ang" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/machinery/door/firedoor, @@ -93584,7 +93574,6 @@ /area/medical/medbay) "dll" = ( /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ dir = 2; icon_state = "whitebluecorner"; @@ -93598,7 +93587,7 @@ dir = 1; network = list("SS13") }, -/obj/machinery/body_scanconsole, +/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ dir = 2; icon_state = "whitepurplecorner" @@ -96747,7 +96736,6 @@ pixel_x = 0; pixel_y = -32 }, -/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ icon_state = "dark" }, @@ -96760,7 +96748,7 @@ pixel_y = 0; req_access_txt = "0" }, -/obj/machinery/body_scanconsole, +/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ icon_state = "dark" }, @@ -145341,7 +145329,7 @@ aaa aaa acA acN -acV +acW acW acW acW @@ -176978,7 +176966,7 @@ akm alU ams akn -anf +akn anD aok aaa diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index c8adf5615c2..41beb0d3a35 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -5504,10 +5504,6 @@ icon_state = "vault" }, /area/security/hos) -"ajA" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor4/vox, -/area/shuttle/vox) "ajB" = ( /turf/simulated/wall/r_wall, /area/maintenance/auxsolarport) @@ -69143,7 +69139,6 @@ }, /area/medical/exam_room) "cok" = ( -/obj/machinery/body_scanconsole, /obj/machinery/light/small{ dir = 1 }, @@ -69156,20 +69151,6 @@ icon_state = "whiteblue" }, /area/medical/exam_room) -"col" = ( -/obj/machinery/light/small{ - dir = 1 - }, -/obj/machinery/camera{ - c_tag = "Medbay Surgery 1 North"; - network = list("SS13") - }, -/obj/machinery/body_scanconsole, -/turf/simulated/floor/plasteel{ - dir = 1; - icon_state = "whiteblue" - }, -/area/medical/exam_room) "com" = ( /obj/structure/cable/yellow{ d1 = 2; @@ -74937,12 +74918,6 @@ icon_state = "white" }, /area/medical/surgery1) -"cxn" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/floor/plasteel{ - icon_state = "white" - }, -/area/medical/surgery1) "cxo" = ( /obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ @@ -80670,12 +80645,6 @@ /area/medical/research{ name = "Research Division" }) -"cGE" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/floor/plasteel{ - icon_state = "white" - }, -/area/medical/surgery2) "cGF" = ( /obj/machinery/atmospherics/unary/portables_connector, /obj/effect/decal/warning_stripes/south, @@ -116444,7 +116413,7 @@ crE crE cvb crE -cxo +crE cyo czs czU @@ -116452,7 +116421,7 @@ cAT cCM czs cEZ -cGO +cGo cGo cKc cGo @@ -116701,7 +116670,7 @@ crV ctX cva cvS -cxn +cxo cyo czu cBl @@ -116709,7 +116678,7 @@ cCu cAU cEj cEZ -cGE +cGO cFw cKb cKH @@ -118493,7 +118462,7 @@ ceQ chH cdT cmX -col +cok cpb crg csN @@ -148746,7 +148715,7 @@ aeF agJ ahv aeG -ajA +aeG akq all aaa diff --git a/_maps/map_files/RandomZLevels/terrorspiders.dmm b/_maps/map_files/RandomZLevels/terrorspiders.dmm index e03bfab5397..ad3ff6b12eb 100644 --- a/_maps/map_files/RandomZLevels/terrorspiders.dmm +++ b/_maps/map_files/RandomZLevels/terrorspiders.dmm @@ -12136,13 +12136,6 @@ icon_state = "whitecorner" }, /area/awaymission/UO71/medical) -"wQ" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/floor/plasteel{ - dir = 1; - icon_state = "whitehall" - }, -/area/awaymission/UO71/medical) "wR" = ( /obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ @@ -20566,7 +20559,7 @@ qa vr qJ qJ -wQ +wT qa ab ab diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 16ae46b48d7..2162c77926e 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -3961,12 +3961,6 @@ icon_state = "floor4" }, /area/shuttle/syndicate) -"ahx" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor{ - icon_state = "floor4" - }, -/area/shuttle/syndicate) "ahy" = ( /obj/structure/shuttle/engine/heater, /obj/structure/window/reinforced{ @@ -5332,10 +5326,6 @@ /obj/machinery/light/spot, /turf/simulated/shuttle/floor4/vox, /area/shuttle/vox) -"ajI" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor4/vox, -/area/shuttle/vox) "ajJ" = ( /obj/structure/sign/poster/official/random{ pixel_x = 0; @@ -45995,7 +45985,6 @@ }, /area/medical/morgue) "bHL" = ( -/obj/machinery/body_scanconsole, /obj/machinery/alarm{ dir = 1; pixel_y = -25 @@ -58771,20 +58760,13 @@ dir = 1; pixel_y = -22 }, -/obj/machinery/body_scanconsole, +/obj/machinery/bodyscanner, /turf/simulated/floor/plasteel{ dir = 6; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)" }, /area/medical/sleeper) -"ccw" = ( -/obj/machinery/bodyscanner, -/turf/simulated/floor/plasteel{ - tag = "icon-whiteblue"; - icon_state = "whiteblue" - }, -/area/medical/sleeper) "ccx" = ( /obj/machinery/light, /obj/machinery/disposal, @@ -61169,12 +61151,6 @@ icon_state = "floor3" }, /area/shuttle/administration) -"cgx" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/administration) "cgy" = ( /obj/machinery/door/poddoor{ id_tag = "ToxinsVenting"; @@ -63837,7 +63813,6 @@ /turf/simulated/floor/plating, /area/maintenance/asmaint) "ckU" = ( -/obj/machinery/body_scanconsole, /obj/machinery/camera{ c_tag = "Medbay Surgery West"; dir = 1; @@ -63979,7 +63954,6 @@ }, /area/medical/surgery2) "clf" = ( -/obj/machinery/body_scanconsole, /obj/machinery/camera{ c_tag = "Medbay Surgery East"; dir = 1; @@ -72124,7 +72098,6 @@ pixel_y = -3 }, /obj/item/circuitboard/bodyscanner, -/obj/item/circuitboard/bodyscanner_console, /obj/item/circuitboard/sleeper{ pixel_x = 3 }, @@ -106627,7 +106600,7 @@ bRA bPI cdo ceR -cgx +ceR cii ckf clE @@ -107567,7 +107540,7 @@ abV abV agF ahg -ahx +abV ahy ahP aaa @@ -133098,7 +133071,7 @@ bXG bZi cgM caI -ccw +ccu ceg cfI cho @@ -154860,7 +154833,7 @@ agZ ail aiL aha -ajI +aha ajY akp aaa diff --git a/_maps/map_files/shuttles/admin_admin.dmm b/_maps/map_files/shuttles/admin_admin.dmm index bad43283b9b..6e494e0b85b 100644 --- a/_maps/map_files/shuttles/admin_admin.dmm +++ b/_maps/map_files/shuttles/admin_admin.dmm @@ -540,12 +540,6 @@ icon_state = "floor3" }, /area/shuttle/administration) -"bj" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/administration) "bk" = ( /obj/structure/window/plasmareinforced{ color = "#FF0000"; @@ -847,7 +841,7 @@ am ac bc bg -bj +bg bo bt bz diff --git a/_maps/map_files/shuttles/admin_hospital.dmm b/_maps/map_files/shuttles/admin_hospital.dmm index c9a41d69463..9e3b48a11c7 100644 --- a/_maps/map_files/shuttles/admin_hospital.dmm +++ b/_maps/map_files/shuttles/admin_hospital.dmm @@ -947,12 +947,6 @@ icon_state = "floor3" }, /area/shuttle/administration) -"bS" = ( -/obj/machinery/body_scanconsole, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/administration) "bT" = ( /obj/machinery/light, /obj/structure/closet/crate/can, @@ -1494,7 +1488,7 @@ aw aw aw aw -bS +aw ac "} (11,1,1) = {" @@ -1569,12 +1563,12 @@ ac bx aw aw -bS +aw ac bx aw aw -bS +aw Kq "} (15,1,1) = {" diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index ef4873b5f58..b26e2570944 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -259,7 +259,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) if(!direction || !(direction in cardinal)) //cant go this way. return - if(buckled_mob == user) + if(user in buckled_mobs)// fixes buckle ventcrawl edgecase fuck bug return var/obj/machinery/atmospherics/target_move = findConnecting(direction) diff --git a/code/ATMOSPHERICS/pipes/pipe.dm b/code/ATMOSPHERICS/pipes/pipe.dm index 569c1dd57bd..0b7e3a34723 100644 --- a/code/ATMOSPHERICS/pipes/pipe.dm +++ b/code/ATMOSPHERICS/pipes/pipe.dm @@ -9,8 +9,8 @@ var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called //Buckling - can_buckle = 1 - buckle_requires_restraints = 1 + can_buckle = TRUE + buckle_requires_restraints = TRUE buckle_lying = -1 /obj/machinery/atmospherics/pipe/New() diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm index 654ee16ea98..35df3c60d23 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm @@ -10,7 +10,7 @@ thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT color = "#404040" - buckle_lying = 1 + buckle_lying = TRUE var/icon_temperature = T20C //stop small changes in temperature causing icon refresh resistance_flags = LAVA_PROOF | FIRE_PROOF @@ -51,10 +51,12 @@ animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING) //burn any mobs buckled based on temperature - if(buckled_mob) + if(has_buckled_mobs()) var/heat_limit = 1000 if(pipe_air.temperature > heat_limit + 1) - buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest") + for(var/m in buckled_mobs) + var/mob/living/buckled_mob = m + buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest") /obj/machinery/atmospherics/pipe/simple/heat_exchanging/New() diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 3bb6b742a04..744b8b86a9a 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -1,12 +1,3 @@ -/proc/dopage(src,target) - var/href_list - var/href - href_list = params2list("src=[src:UID()]&[target]=1") - href = "src=[src:UID()];[target]=1" - src:temphtml = null - src:Topic(href, href_list) - return null - /proc/get_area(atom/A) if(isarea(A)) return A diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 8ce4d64911b..d49c0ee59eb 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -557,6 +557,7 @@ so as to remain in compliance with the most up-to-date laws." /obj/screen/alert/restrained/buckled name = "Buckled" desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed." + icon_state = "buckled" /obj/screen/alert/restrained/handcuffed name = "Handcuffed" @@ -570,6 +571,15 @@ so as to remain in compliance with the most up-to-date laws." if(isliving(usr)) var/mob/living/L = usr return L.resist() + +/obj/screen/alert/restrained/buckled/Click() + var/mob/living/L = usr + if(!istype(L) || !L.can_resist()) + return + L.changeNext_move(CLICK_CD_RESIST) + if(L.last_special <= world.time) + return L.resist_buckle() + // PRIVATE = only edit, use, or override these if you're editing the system as a whole // Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index bd06e0eb13d..65e188512d5 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -139,7 +139,7 @@ if(isliving(teleatom)) var/mob/living/L = teleatom if(L.buckled) - L.buckled.unbuckle_mob() + L.buckled.unbuckle_mob(L, force = TRUE) destarea.Entered(teleatom) diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index 70825f5195e..023939c2747 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -56,7 +56,7 @@ return if(target && target.buckled) - target.buckled.unbuckle_mob() + target.buckled.unbuckle_mob(target, force = TRUE) var/list/tempL = L var/attempt = null diff --git a/code/datums/spells/devil.dm b/code/datums/spells/devil.dm index 925b54d5e3c..12e2a44a8c1 100644 --- a/code/datums/spells/devil.dm +++ b/code/datums/spells/devil.dm @@ -131,14 +131,6 @@ playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1) var/obj/effect/dummy/slaughter/s_holder = new(loc) ExtinguishMob() - if(buckled) - buckled.unbuckle_mob(src,force=1) - if(has_buckled_mobs()) - unbuckle_mob() - if(pulledby) - pulledby.stop_pulling() - if(pulling) - stop_pulling() forceMove(s_holder) holder = s_holder notransform = FALSE diff --git a/code/datums/weather/weather_types/floor_is_lava.dm b/code/datums/weather/weather_types/floor_is_lava.dm index 72f49ad5057..9f98a481dbf 100644 --- a/code/datums/weather/weather_types/floor_is_lava.dm +++ b/code/datums/weather/weather_types/floor_is_lava.dm @@ -26,8 +26,10 @@ /datum/weather/floor_is_lava/weather_act(mob/living/L) if(issilicon(L)) return + if(istype(L.buckled, /obj/structure/bed)) + return for(var/obj/structure/O in L.loc) - if(O.density || O.buckled_mob && istype(O, /obj/structure/bed)) + if(O.density) return if(L.loc.density) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index c9463301602..6ff1c35e6db 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -41,6 +41,7 @@ . = ..() /atom/movable/Destroy() + unbuckle_all_mobs(force = TRUE) if(loc) loc.handle_atom_del(src) for(var/atom/movable/AM in contents) @@ -109,7 +110,7 @@ log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.") stop_pulling() return - if(pulling.anchored) + if(pulling.anchored || pulling.move_resist > move_force) stop_pulling() return if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //separated from our puller and not in the middle of a diagonal move. @@ -123,6 +124,7 @@ if(force < (move_resist * MOVE_FORCE_PULL_RATIO)) return FALSE return TRUE + // Used in shuttle movement and AI eye stuff. // Primarily used to notify objects being moved by a shuttle/bluespace fuckup. /atom/movable/proc/setLoc(var/T, var/teleported=0) @@ -200,7 +202,7 @@ src.move_speed = world.time - src.l_move_time src.l_move_time = world.time - if(. && buckled_mob && !handle_buckled_mob_movement(loc, direct)) //movement failed due to buckled mob + if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc, direct)) //movement failed due to buckled mob . = 0 // Called after a successful Move(). By this point, we've already moved @@ -270,8 +272,10 @@ /mob/living/forceMove(atom/destination) if(buckled) addtimer(CALLBACK(src, .proc/check_buckled), 1, TIMER_UNIQUE) - if(buckled_mob) - addtimer(CALLBACK(buckled_mob, .proc/check_buckled), 1, TIMER_UNIQUE) + if(has_buckled_mobs()) + for(var/m in buckled_mobs) + var/mob/living/buckled_mob = m + addtimer(CALLBACK(buckled_mob, .proc/check_buckled), 1, TIMER_UNIQUE) if(pulling) addtimer(CALLBACK(src, .proc/check_pull), 1, TIMER_UNIQUE) . = ..() @@ -423,12 +427,14 @@ return TRUE /atom/movable/proc/handle_buckled_mob_movement(newloc,direct) - if(!buckled_mob.Move(newloc, direct)) - loc = buckled_mob.loc - last_move = buckled_mob.last_move - inertia_dir = last_move - buckled_mob.inertia_dir = last_move - return 0 + for(var/m in buckled_mobs) + var/mob/living/buckled_mob = m + if(!buckled_mob.Move(newloc, direct)) + forceMove(buckled_mob.loc) + last_move = buckled_mob.last_move + inertia_dir = last_move + buckled_mob.inertia_dir = last_move + return 0 return 1 /atom/movable/proc/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) @@ -448,7 +454,7 @@ return FALSE /atom/movable/CanPass(atom/movable/mover, turf/target, height=1.5) - if(buckled_mob == mover) + if(mover in buckled_mobs) return 1 return ..() diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index 55ea0adddaa..ab54f6991b1 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -35,8 +35,6 @@ animation.dir = dir ExtinguishMob() - if(buckled) - buckled.unbuckle_mob() if(pulling && bloodcrawl == BLOODCRAWL_EAT) if(istype(pulling, /mob/living/)) var/mob/living/victim = pulling @@ -50,8 +48,9 @@ kidnapped = victim stop_pulling() flick("jaunt",animation) - loc = holder - holder = holder + + src.holder = holder + forceMove(holder) if(kidnapped) to_chat(src, "You begin to feast on [kidnapped]. You can not move while you are doing this.") diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 276f8d2eb1f..1671c4a03b0 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -45,14 +45,14 @@ if(M in view_or_range(range, user, "view")) targets += M - + if(!targets.len) //doesn't waste the spell revert_cast(user) return perform(targets, user = user) return - + /obj/effect/proc_holder/spell/targeted/glare/cast(list/targets, mob/user = usr) for(var/mob/living/carbon/human/target in targets) @@ -139,8 +139,6 @@ target.ExtinguishMob() var/turf/T = get_turf(target) target.forceMove(T) //to properly move the mob out of a potential container - if(target.buckled) - target.buckled.unbuckle_mob() if(target.pulledby) target.pulledby.stop_pulling() target.stop_pulling() @@ -543,7 +541,7 @@ to_chat(user, "You must stand next to an APC to drain it!") charge_counter = charge_max return - + if(target_apc.cell?.charge == 0) to_chat(user, "APC must have a power to drain!") charge_counter = charge_max diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 7e1a375f15d..7db238533be 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -424,8 +424,6 @@ var/jaunt_duration = 50 //in deciseconds /obj/effect/proc_holder/spell/vampire/self/jaunt/cast(list/targets, mob/user = usr) - if(user.buckled) - user.buckled.unbuckle_mob() spawn(0) var/mob/living/U = user var/originalloc = get_turf(user.loc) @@ -439,8 +437,6 @@ animation.layer = 5 animation.master = holder U.ExtinguishMob() - if(user.buckled) - user.buckled.unbuckle_mob() flick("liquify", animation) user.forceMove(holder) user.client.eye = holder @@ -513,8 +509,6 @@ perform(turfs, user = user) /obj/effect/proc_holder/spell/vampire/shadowstep/cast(list/targets, mob/user = usr) - if(usr.buckled) - user.buckled.unbuckle_mob() spawn(0) var/turf/picked = pick(targets) @@ -522,8 +516,6 @@ return var/mob/living/U = user U.ExtinguishMob() - if(user.buckled) - user.buckled.unbuckle_mob() var/atom/movable/overlay/animation = new /atom/movable/overlay(get_turf(user)) animation.name = user.name animation.density = 0 diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index a247fa6810b..e4bb22b28af 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -286,9 +286,14 @@ var/obj/item/organ/internal/cyberimp/brain/clown_voice/implant = new implant.insert(H) - H.mutations.Add(CLUMSY) + H.dna.SetSEState(CLUMSYBLOCK, TRUE) + genemutcheck(H, CLUMSYBLOCK, null, MUTCHK_FORCED) + H.dna.default_blocks.Add(CLUMSYBLOCK) if(!ismachine(H)) - H.mutations.Add(COMIC) + H.dna.SetSEState(COMICBLOCK, TRUE) + genemutcheck(H, COMICBLOCK, null, MUTCHK_FORCED) + H.dna.default_blocks.Add(COMICBLOCK) + H.check_mutations = TRUE //action given to antag clowns /datum/action/innate/toggle_clumsy diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index c0e92f54634..fcbab26d675 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -12,7 +12,7 @@ var/strapped = 0.0 var/obj/machinery/computer/operating/computer = null - buckle_lying = 90 + buckle_lying = -1 var/no_icon_updates = 0 //set this to 1 if you don't want the icons ever changing var/list/injected_reagents = list() var/reagent_target_amount = 1 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index b8e4b67db07..e1d15657bdc 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -7,17 +7,12 @@ anchored = TRUE idle_power_usage = 1250 active_power_usage = 2500 - light_color = "#00FF00" - var/obj/machinery/body_scanconsole/console = null - var/mob/living/carbon/occupant = null - var/locked + var/mob/living/carbon/human/occupant + var/known_implants = list(/obj/item/implant/chem, /obj/item/implant/death_alarm, /obj/item/implant/mindshield, /obj/item/implant/tracking, /obj/item/implant/health) /obj/machinery/bodyscanner/Destroy() go_out() - if(console) - console.connected = null - console = null return ..() /obj/machinery/bodyscanner/power_change() @@ -44,16 +39,6 @@ component_parts += new /obj/item/stack/cable_coil(null, 2) RefreshParts() -/obj/machinery/bodyscanner/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/bodyscanner(null) - component_parts += new /obj/item/stock_parts/scanning_module/phasic(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stack/cable_coil(null, 2) - RefreshParts() - /obj/machinery/bodyscanner/attackby(obj/item/I, mob/user) if(isscrewdriver(I)) if(occupant) @@ -87,7 +72,7 @@ if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(!ismob(TYPECAST_YOUR_SHIT.affecting)) + if(!ishuman(TYPECAST_YOUR_SHIT.affecting)) return if(occupant) to_chat(user, "The scanner is already occupied!") @@ -96,7 +81,7 @@ if(M.Victim == TYPECAST_YOUR_SHIT.affecting) to_chat(user, "[TYPECAST_YOUR_SHIT.affecting.name] has a fucking slime attached to [TYPECAST_YOUR_SHIT.affecting.p_them()], deal with that first.") return - var/mob/M = TYPECAST_YOUR_SHIT.affecting + var/mob/living/carbon/human/M = TYPECAST_YOUR_SHIT.affecting if(M.abiotic()) to_chat(user, "Subject cannot have abiotic items on.") return @@ -110,47 +95,62 @@ return ..() -/obj/machinery/bodyscanner/MouseDrop_T(mob/living/carbon/human/O, mob/user as mob) - if(!istype(O)) - return 0 //not a mob +/obj/machinery/bodyscanner/MouseDrop_T(mob/living/carbon/human/H, mob/user) + if(!istype(H)) + return FALSE //not human if(user.incapacitated()) - return 0 //user shouldn't be doing things - if(O.anchored) - return 0 //mob is anchored??? - if(get_dist(user, src) > 1 || get_dist(user, O) > 1) - return 0 //doesn't use adjacent() to allow for non-cardinal (fuck my life) + return FALSE //user shouldn't be doing things + if(H.anchored) + return FALSE //mob is anchored??? + if(get_dist(user, src) > 1 || get_dist(user, H) > 1) + return FALSE //doesn't use adjacent() to allow for non-cardinal (fuck my life) if(!ishuman(user) && !isrobot(user)) - return 0 //not a borg or human + return FALSE //not a borg or human if(panel_open) to_chat(user, "Close the maintenance panel first.") - return 0 //panel open + return FALSE //panel open if(occupant) to_chat(user, "[src] is already occupied.") - return 0 //occupied - - if(O.buckled) - return 0 - if(O.abiotic()) + return FALSE //occupied + if(H.buckled) + return FALSE + if(H.abiotic()) to_chat(user, "Subject cannot have abiotic items on.") - return 0 - for(var/mob/living/carbon/slime/M in range(1, O)) - if(M.Victim == O) - to_chat(user, "[O] has a fucking slime attached to [O.p_them()], deal with that first.") - return 0 + return FALSE + for(var/mob/living/carbon/slime/M in range(1, H)) + if(M.Victim == H) + to_chat(user, "[H] has a fucking slime attached to [H.p_them()], deal with that first.") + return FALSE - if(O == user) + if(H == user) visible_message("[user] climbs into [src].") else - visible_message("[user] puts [O] into the body scanner.") + visible_message("[user] puts [H] into the body scanner.") - O.forceMove(src) - occupant = O + H.forceMove(src) + occupant = H icon_state = "bodyscanner" add_fingerprint(user) -/obj/machinery/bodyscanner/relaymove(mob/user as mob) +/obj/machinery/bodyscanner/attack_ai(user) + return attack_hand(user) + +/obj/machinery/bodyscanner/attack_ghost(user) + return attack_hand(user) + +/obj/machinery/bodyscanner/attack_hand(user) + if(stat & (NOPOWER|BROKEN)) + return + + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + + ui_interact(user) + +/obj/machinery/bodyscanner/relaymove(mob/user) if(user.incapacitated()) - return 0 //maybe they should be able to get out with cuffs, but whatever + return FALSE //maybe they should be able to get out with cuffs, but whatever go_out() /obj/machinery/bodyscanner/verb/eject() @@ -164,7 +164,7 @@ add_fingerprint(usr) /obj/machinery/bodyscanner/proc/go_out() - if(!occupant || locked) + if(!occupant) return occupant.forceMove(loc) occupant = null @@ -175,22 +175,22 @@ /obj/machinery/bodyscanner/ex_act(severity) switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) + if(1) + for(var/atom/movable/A in src) A.forceMove(loc) A.ex_act(severity) qdel(src) return - if(2.0) + if(2) if(prob(50)) - for(var/atom/movable/A as mob|obj in src) + for(var/atom/movable/A in src) A.forceMove(loc) A.ex_act(severity) qdel(src) return - if(3.0) + if(3) if(prob(25)) - for(var/atom/movable/A as mob|obj in src) + for(var/atom/movable/A in src) A.forceMove(loc) A.ex_act(severity) qdel(src) @@ -200,140 +200,27 @@ new /obj/effect/gibspawner/generic(get_turf(loc)) //I REPLACE YOUR TECHNOLOGY WITH FLESH! qdel(src) -/obj/machinery/body_scanconsole - name = "Body Scanner Console" - icon = 'icons/obj/cryogenic2.dmi' - icon_state = "bodyscannerconsole" - density = 1 - anchored = 1 - dir = WEST - idle_power_usage = 250 - active_power_usage = 500 - var/obj/machinery/bodyscanner/connected = null - var/delete - var/temphtml - var/printing = null - var/printing_text = null - var/known_implants = list(/obj/item/implant/chem, /obj/item/implant/death_alarm, /obj/item/implant/mindshield, /obj/item/implant/tracking, /obj/item/implant/health) - -/obj/machinery/body_scanconsole/power_change() - if(stat & BROKEN) - icon_state = "bodyscannerconsole-p" - else if(powered() && !panel_open) - icon_state = initial(icon_state) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - icon_state = "bodyscannerconsole-p" - stat |= NOPOWER - -/obj/machinery/body_scanconsole/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/bodyscanner_console(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stack/cable_coil(null, 2) - RefreshParts() - findscanner() - -/obj/machinery/body_scanconsole/Destroy() - if(connected) - connected.console = null - connected = null - return ..() - -/obj/machinery/body_scanconsole/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - qdel(src) - return - if(2.0) - if(prob(50)) - //SN src = null - qdel(src) - -/obj/machinery/body_scanconsole/proc/findscanner() - for(dir in list(NORTH,EAST,SOUTH,WEST)) - // Try to find a scanner in that direction - var/temp = locate(/obj/machinery/bodyscanner, get_step(src, dir)) - if(temp) - connected = temp - connected.console = src - break - - -/obj/machinery/body_scanconsole/attackby(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "bodyscannerconsole-p", "bodyscannerconsole", I)) - return - - if(iswrench(I)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - if(dir == EAST) - setDir(WEST) - else - setDir(EAST) - playsound(loc, I.usesound, 50, 1) - return - - if(exchange_parts(user, I)) - return - - if(default_deconstruction_crowbar(I)) - return - else - return ..() - -/obj/machinery/body_scanconsole/attack_ai(user) - return attack_hand(user) - -/obj/machinery/body_scanconsole/attack_ghost(user) - return attack_hand(user) - -/obj/machinery/body_scanconsole/attack_hand(user) - if(stat & (NOPOWER|BROKEN)) - return - - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - - if(!connected) - findscanner() - - ui_interact(user) - - -/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) +/obj/machinery/bodyscanner/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600) ui.open() ui.set_auto_update(1) -/obj/machinery/body_scanconsole/ui_data(mob/user, datum/topic_state/state) +/obj/machinery/bodyscanner/ui_data(mob/user, datum/topic_state/state) var/data[0] - data["connected"] = connected ? 1 : 0 - - if(!connected) - return data - - data["occupied"] = connected.occupant ? 1 : 0 + data["occupied"] = occupant ? 1 : 0 var/occupantData[0] - if(connected.occupant) - var/mob/living/carbon/human/H = connected.occupant - occupantData["name"] = H.name - occupantData["stat"] = H.stat - occupantData["health"] = H.health - occupantData["maxHealth"] = H.maxHealth + if(occupant) + occupantData["name"] = occupant.name + occupantData["stat"] = occupant.stat + occupantData["health"] = occupant.health + occupantData["maxHealth"] = occupant.maxHealth var/found_disease = FALSE - for(var/thing in H.viruses) + for(var/thing in occupant.viruses) var/datum/disease/D = thing if(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC) continue @@ -341,34 +228,34 @@ break occupantData["hasVirus"] = found_disease - occupantData["bruteLoss"] = H.getBruteLoss() - occupantData["oxyLoss"] = H.getOxyLoss() - occupantData["toxLoss"] = H.getToxLoss() - occupantData["fireLoss"] = H.getFireLoss() + occupantData["bruteLoss"] = occupant.getBruteLoss() + occupantData["oxyLoss"] = occupant.getOxyLoss() + occupantData["toxLoss"] = occupant.getToxLoss() + occupantData["fireLoss"] = occupant.getFireLoss() - occupantData["radLoss"] = H.radiation - occupantData["cloneLoss"] = H.getCloneLoss() - occupantData["brainLoss"] = H.getBrainLoss() - occupantData["paralysis"] = H.paralysis - occupantData["paralysisSeconds"] = round(H.paralysis / 4) - occupantData["bodyTempC"] = H.bodytemperature-T0C - occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32) + occupantData["radLoss"] = occupant.radiation + occupantData["cloneLoss"] = occupant.getCloneLoss() + occupantData["brainLoss"] = occupant.getBrainLoss() + occupantData["paralysis"] = occupant.paralysis + occupantData["paralysisSeconds"] = round(occupant.paralysis * 0.25) + occupantData["bodyTempC"] = occupant.bodytemperature-T0C + occupantData["bodyTempF"] = (((occupant.bodytemperature-T0C) * 1.8) + 32) - occupantData["hasBorer"] = H.has_brain_worms() + occupantData["hasBorer"] = occupant.has_brain_worms() var/bloodData[0] bloodData["hasBlood"] = 0 - if(ishuman(H) && !(NO_BLOOD in H.dna.species.species_traits)) + if(!(NO_BLOOD in occupant.dna.species.species_traits)) bloodData["hasBlood"] = 1 - bloodData["volume"] = H.blood_volume - bloodData["percent"] = round(((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)) - bloodData["pulse"] = H.get_pulse(GETPULSE_TOOL) - bloodData["bloodLevel"] = H.blood_volume - bloodData["bloodMax"] = H.max_blood + bloodData["volume"] = occupant.blood_volume + bloodData["percent"] = round(((occupant.blood_volume / BLOOD_VOLUME_NORMAL)*100)) + bloodData["pulse"] = occupant.get_pulse(GETPULSE_TOOL) + bloodData["bloodLevel"] = occupant.blood_volume + bloodData["bloodMax"] = occupant.max_blood occupantData["blood"] = bloodData var/implantData[0] - for(var/obj/item/implant/I in H) + for(var/obj/item/implant/I in occupant) if(I.implanted && is_type_in_list(I, known_implants)) var/implantSubData[0] implantSubData["name"] = sanitize(I.name) @@ -377,7 +264,7 @@ occupantData["implant_len"] = implantData.len var/extOrganData[0] - for(var/obj/item/organ/external/E in H.bodyparts) + for(var/obj/item/organ/external/E in occupant.bodyparts) var/organData[0] organData["name"] = E.name organData["open"] = E.open @@ -411,7 +298,7 @@ organData["status"] = organStatus - if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured()) + if(istype(E, /obj/item/organ/external/chest) && occupant.is_lung_ruptured()) organData["lungRuptured"] = 1 if(E.internal_bleeding) @@ -422,7 +309,7 @@ occupantData["extOrgan"] = extOrganData var/intOrganData[0] - for(var/obj/item/organ/internal/I in H.internal_organs) + for(var/obj/item/organ/internal/I in occupant.internal_organs) var/organData[0] organData["name"] = I.name organData["desc"] = I.desc @@ -438,199 +325,189 @@ occupantData["intOrgan"] = intOrganData - occupantData["blind"] = (H.disabilities & BLIND) - occupantData["colourblind"] = (H.disabilities & COLOURBLIND) - occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED) + occupantData["blind"] = (occupant.disabilities & BLIND) + occupantData["colourblind"] = (occupant.disabilities & COLOURBLIND) + occupantData["nearsighted"] = (occupant.disabilities & NEARSIGHTED) data["occupant"] = occupantData return data -/obj/machinery/body_scanconsole/Topic(href, href_list) +/obj/machinery/bodyscanner/Topic(href, href_list) if(..()) return 1 if(href_list["ejectify"]) - connected.eject() + eject() if(href_list["print_p"]) - generate_printing_text() + visible_message("[src] rattles and prints out a sheet of paper.") + var/obj/item/paper/P = new /obj/item/paper(loc) + playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) + P.info = "
| Organ | " + dat += "Burn Damage | " + dat += "Brute Damage | " + dat += "Other Wounds | " + dat += "||||
|---|---|---|---|---|---|---|---|
| Organ | " - dat += "Burn Damage | " - dat += "Brute Damage | " - dat += "Other Wounds | " + var/AN = "" + var/open = "" + var/infected = "" + var/robot = "" + var/imp = "" + var/bled = "" + var/splint = "" + var/internal_bleeding = "" + var/lung_ruptured = "" + if(e.internal_bleeding) + internal_bleeding = "[e.name] | [e.burn_dam] | [e.brute_dam] | [robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured] | " dat += "
| [e.name] | [e.burn_dam] | [e.brute_dam] | [robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured] | " - dat += "||||
| [i.name] | N/A | [i.damage] | [infection]:[mech] | " - dat += " |