diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 470fd21ee3c..1389e9b17dd 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -18,12 +18,14 @@ src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() src.ion_trail.set_up(src) -/obj/item/weapon/tank/jetpack/examine(mob/user) - if(!..(user, 0)) - return +/obj/item/weapon/tank/jetpack/Destroy() + qdel(ion_trail) + ..() - if(air_contents.gas["oxygen"] < 10) - user << text("The meter on \the [src] indicates you are almost out of air!") +/obj/item/weapon/tank/jetpack/examine(mob/user) + . = ..() + if(air_contents.total_moles < 5) + user << "The meter on \the [src] indicates you are almost out of gas!" playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/jetpack/verb/toggle_rockets() @@ -102,21 +104,9 @@ /obj/item/weapon/tank/jetpack/carbondioxide/New() ..() - src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() - src.ion_trail.set_up(src) - //src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) return -/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user) - if(!..(0)) - return - - if(air_contents.gas["carbon_dioxide"] < 10) - user << text("The meter on \the [src] indicates you are almost out of carbon dioxide!") - playsound(user, 'sound/effects/alert.ogg', 50, 1) - return - /obj/item/weapon/tank/jetpack/rig name = "jetpack" var/obj/item/weapon/rig/holder diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 43f40b4c23f..b8e6fc6ecb1 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -44,39 +44,24 @@ ..() /obj/item/weapon/tank/examine(mob/user) - var/obj/icon = src - if (istype(src.loc, /obj/item/assembly)) - icon = src.loc - if (!in_range(src, user)) - if (icon == src) user << "It's \a \icon[icon][src]! If you want any more information you'll need to get closer." - return - - var/celsius_temperature = src.air_contents.temperature-T0C - var/descriptive - var/status - - if (celsius_temperature < 20) - descriptive = "cold" - status = "warning" - else if (celsius_temperature < 40) - descriptive = "room temperature" - status = "notice" - else if (celsius_temperature < 80) - descriptive = "lukewarm" - status = "warning" - else if (celsius_temperature < 100) - descriptive = "warm" - status = "warning" - else if (celsius_temperature < 300) - descriptive = "hot" - status = "danger" - else - descriptive = "furiously hot" - status = "danger" - - user << "\The \icon[icon][src] feels [descriptive]" - - return + . = ..(user, 0) + if(.) + var/celsius_temperature = air_contents.temperature - T0C + var/descriptive + switch(celsius_temperature) + if(300 to INFINITY) + descriptive = "furiously hot" + if(100 to 300) + descriptive = "hot" + if(80 to 100) + descriptive = "warm" + if(40 to 80) + descriptive = "lukewarm" + if(20 to 40) + descriptive = "room temperature" + else + descriptive = "cold" + user << "\The [src] feels [descriptive]." /obj/item/weapon/tank/blob_act() if(prob(50)) diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 9086453be2e..ffa143a9f5c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -75,7 +75,7 @@ set_dir(direction) if(pulling) // Driver if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert! - pulling.loc = T + pulling.forceMove(T) else spawn(0) if(get_dist(src, pulling) > 1) // We are too far away? Losing control. @@ -107,7 +107,7 @@ pulling = null else if (occupant && (src.loc != occupant.loc)) - src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving + src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving /obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob) if (pulling) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 50d02edca6c..ba00a930b39 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -536,7 +536,7 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("[key_name_admin(src)] has created a command report", 1) feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in world) +/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view()) set category = "Admin" set name = "Delete" diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index 533a5d616e5..ed6ea158526 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -234,7 +234,7 @@ if(target) var/obj/item/firing = new fabrication_type() - firing.loc = get_turf(src) + firing.forceMove(get_turf(src)) H.visible_message("[H] launches \a [firing]!") firing.throw_at(target,fire_force,fire_distance) else @@ -242,7 +242,7 @@ H << "Your hands are full." else var/obj/item/new_weapon = new fabrication_type() - new_weapon.loc = H + new_weapon.forceMove(H) H << "You quickly fabricate \a [new_weapon]." H.put_in_hands(new_weapon) diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 975f6dfc7c6..11d551ace00 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -68,9 +68,9 @@ if(!verb_holder) verb_holder = new(src) if(integrated_ai) - verb_holder.loc = integrated_ai + verb_holder.forceMove(integrated_ai) else - verb_holder.loc = src + verb_holder.forceMove(src) /obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user) @@ -179,7 +179,7 @@ else if(user) user.put_in_hands(ai_card) else - ai_card.loc = get_turf(src) + ai_card.forceMove(get_turf(src)) ai_card = null integrated_ai = null update_verb_holder() @@ -209,7 +209,7 @@ return 0 else user.drop_from_inventory(ai) - ai.loc = src + ai.forceMove(src) ai_card = ai ai_mob << "You have been transferred to \the [holder]'s [src]." user << "You load [ai_mob] into \the [holder]'s [src]." diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index 778c30dedea..b8244a0a8a2 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -123,13 +123,13 @@ H << "You cannot teleport to a location with solid objects." phase_out(H,get_turf(H)) - H.loc = T + H.forceMove(T) phase_in(H,get_turf(H)) for(var/obj/item/weapon/grab/G in H.contents) if(G.affecting) phase_out(G.affecting,get_turf(G.affecting)) - G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z) + G.affecting.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)) phase_in(G.affecting,get_turf(G.affecting)) return 1 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index a47f38d3d97..119f2d814aa 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -629,7 +629,11 @@ if(check_slot) H << "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way." else - H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." + use_obj.forceMove(H) + if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0)) + use_obj.forceMove(src) + else + H << "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly." if(piece == "helmet" && helmet) helmet.update_light(H) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 0017c45f9ed..8faff35a296 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -58,7 +58,7 @@ user.drop_from_inventory(W) air_supply = W - W.loc = src + W.forceMove(src) user << "You slot [W] into [src] and tighten the connecting valve." return @@ -87,7 +87,7 @@ user << "You install \the [mod] into \the [src]." user.drop_from_inventory(mod) installed_modules |= mod - mod.loc = src + mod.forceMove(src) mod.installed(src) update_icon() return 1 @@ -96,7 +96,7 @@ user << "You jack \the [W] into \the [src]'s battery mount." user.drop_from_inventory(W) - W.loc = src + W.forceMove(src) src.cell = W return @@ -107,7 +107,7 @@ return if(user.r_hand && user.l_hand) - air_supply.loc = get_turf(user) + air_supply.forceMove(get_turf(user)) else user.put_in_hands(air_supply) user << "You detach and remove \the [air_supply]." @@ -139,9 +139,9 @@ for(var/obj/item/rig_module/module in installed_modules) module.deactivate() if(user.r_hand && user.l_hand) - cell.loc = get_turf(user) + cell.forceMove(get_turf(user)) else - cell.loc = user.put_in_hands(cell) + cell.forceMove(user.put_in_hands(cell)) cell = null else user << "There is nothing loaded in that mount." @@ -164,7 +164,7 @@ var/obj/item/rig_module/removed = possible_removals[removal_choice] user << "You detatch \the [removed] from \the [src]." - removed.loc = get_turf(src) + removed.forceMove(get_turf(src)) removed.removed() installed_modules -= removed update_icon() diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 250350bf465..7924bd21296 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -78,13 +78,13 @@ var/list/slot_equipment_priority = list( \ if(istype(src.back,/obj/item/weapon/storage)) var/obj/item/weapon/storage/backpack = src.back if(backpack.contents.len < backpack.storage_slots) - newitem.loc = src.back + newitem.forceMove(src.back) return 1 // Try to place it in any item that can store stuff, on the mob. for(var/obj/item/weapon/storage/S in src.contents) if (S.contents.len < S.storage_slots) - newitem.loc = S + newitem.forceMove(S) return 1 return 0 @@ -106,7 +106,7 @@ var/list/slot_equipment_priority = list( \ if(lying) return 0 if(!istype(W)) return 0 if(!l_hand) - W.loc = src //TODO: move to equipped? + W.forceMove(src) //TODO: move to equipped? l_hand = W W.layer = 20 //TODO: move to equipped? // l_hand.screen_loc = ui_lhand @@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \ if(lying) return 0 if(!istype(W)) return 0 if(!r_hand) - W.loc = src + W.forceMove(src) r_hand = W W.layer = 20 // r_hand.screen_loc = ui_rhand @@ -157,7 +157,7 @@ var/list/slot_equipment_priority = list( \ update_inv_r_hand() return 1 else - W.loc = get_turf(src) + W.forceMove(get_turf(src)) W.layer = initial(W.layer) W.dropped() return 0 @@ -250,7 +250,7 @@ var/list/slot_equipment_priority = list( \ O.screen_loc = null if(istype(O, /obj/item)) var/obj/item/I = O - I.loc = src.loc + I.forceMove(src.loc) I.dropped(src) return 1 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d34d5cceea9..97f4842b29f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -87,8 +87,8 @@ default behaviour is: if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around! var/turf/oldloc = loc - loc = tmob.loc - tmob.loc = oldloc + forceMove(tmob.loc) + tmob.forceMove(oldloc) now_pushing = 0 for(var/mob/living/carbon/slime/slime in view(1,tmob)) if(slime.Victim == tmob) @@ -605,7 +605,7 @@ default behaviour is: src << "You wriggle out of [M]'s grip!" else if(istype(H.loc,/obj/item)) src << "You struggle free of [H.loc]." - H.loc = get_turf(H) + H.forceMove(get_turf(H)) if(istype(M)) for(var/atom/A in M.contents) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 14f19b62901..648b1b28155 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -966,7 +966,7 @@ mob/proc/yank_out_object() var/mob/living/carbon/human/human_user = U human_user.bloody_hands(H) - selection.loc = get_turf(src) + selection.forceMove(get_turf(src)) if(!(U.l_hand && U.r_hand)) U.put_in_hands(selection) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 837a0f93fc9..d8b8778f420 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -176,7 +176,7 @@ if(!mob.control_object) return mob.control_object.dir = direct else - mob.control_object.loc = get_step(mob.control_object,direct) + mob.control_object.forceMove(get_step(mob.control_object,direct)) return @@ -382,7 +382,7 @@ mob << "You cannot get past holy grounds while you are in this plane of existence!" return else - mob.loc = get_step(mob, direct) + mob.forceMove(get_step(mob, direct)) mob.dir = direct if(2) if(prob(50)) @@ -411,7 +411,7 @@ return else return - mob.loc = locate(locx,locy,mobloc.z) + mob.forceMove(locate(locx,locy,mobloc.z)) spawn(0) var/limit = 2//For only two trailing shadows. for(var/turf/T in getline(mobloc, mob.loc)) @@ -422,7 +422,7 @@ else spawn(0) anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir) - mob.loc = get_step(mob, direct) + mob.forceMove(get_step(mob, direct)) mob.dir = direct // Crossed is always a bit iffy for(var/obj/S in mob.loc) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index de977e5c0d2..e31c0096770 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -57,9 +57,9 @@ user.visible_message("[user] forces [M] to swallow \the [src].") var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [user.name] ([user.ckey]) Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Fed [name] by [M.name] ([M.ckey]) Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [key_name(user)] Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Fed [name] to [key_name(M)] Reagents: [contained]") + msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") if(reagents.total_volume) reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)