diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 9ec56f1fc9..fc3ec4668c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -220,7 +220,7 @@ BLIND // can't see anything allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen) slowdown = 3 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) - flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL + flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.9 @@ -252,7 +252,7 @@ BLIND // can't see anything if(hastie) hastie.attackby(I, user) return - + if(!hastie && istype(I, /obj/item/clothing/tie)) user.drop_item() hastie = I @@ -265,7 +265,7 @@ BLIND // can't see anything return ..() - + /obj/item/clothing/under/attack_hand(mob/user as mob) //only forward to the attached accessory if the clothing is equipped (not in a storage) if(hastie && src.loc == user) @@ -279,7 +279,7 @@ BLIND // can't see anything //makes sure that the clothing is equipped so that we can't drag it into our hand from miles away. if (!(src.loc == usr)) return - + if (!( usr.restrained() ) && !( usr.stat )) switch(over_object.name) if("r_hand") @@ -307,10 +307,7 @@ BLIND // can't see anything if(hastie) usr << "\A [hastie] is clipped to it." -/obj/item/clothing/under/verb/toggle() - set name = "Toggle Suit Sensors" - set category = "Object" - set src in usr +/obj/item/clothing/under/proc/set_sensors(mob/usr as mob) var/mob/M = usr if (istype(M, /mob/dead/)) return if (usr.stat) return @@ -323,17 +320,41 @@ BLIND // can't see anything var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon") var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes + if(get_dist(usr, src) > 1) + usr << "You have moved too far away." + return sensor_mode = modes.Find(switchMode) - 1 - switch(sensor_mode) - if(0) - usr << "You disable your suit's remote sensing equipment." - if(1) - usr << "Your suit will now report whether you are live or dead." - if(2) - usr << "Your suit will now report your vital lifesigns." - if(3) - usr << "Your suit will now report your vital lifesigns as well as your coordinate position." + if (src.loc == usr) + switch(sensor_mode) + if(0) + usr << "You disable your suit's remote sensing equipment." + if(1) + usr << "Your suit will now report whether you are live or dead." + if(2) + usr << "Your suit will now report your vital lifesigns." + if(3) + usr << "Your suit will now report your vital lifesigns as well as your coordinate position." + else if (istype(src.loc, /mob)) + switch(sensor_mode) + if(0) + for(var/mob/V in viewers(usr, 1)) + V.show_message("\red [usr] disables [src.loc]'s remote sensing equipment.", 1) + if(1) + for(var/mob/V in viewers(usr, 1)) + V.show_message("[usr] turns [src.loc]'s remote sensors to binary.", 1) + if(2) + for(var/mob/V in viewers(usr, 1)) + V.show_message("[usr] sets [src.loc]'s sensors to track vitals.", 1) + if(3) + for(var/mob/V in viewers(usr, 1)) + V.show_message("[usr] sets [src.loc]'s sensors to maximum.", 1) + +/obj/item/clothing/under/verb/toggle() + set name = "Toggle Suit Sensors" + set category = "Object" + set src in usr + set_sensors(usr) ..() /obj/item/clothing/under/verb/rollsuit() @@ -354,7 +375,7 @@ BLIND // can't see anything /obj/item/clothing/under/proc/remove_accessory(mob/user as mob) if(!hastie) return - + hastie.on_removed(user) hastie = null diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9f5289c43f..62d2f4d976 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -398,6 +398,9 @@ /mob/living/carbon/human/show_inv(mob/user as mob) + var/obj/item/clothing/under/suit = null + if (istype(w_uniform, /obj/item/clothing/under)) + suit = w_uniform user.set_machine(src) var/dat = {" @@ -412,21 +415,22 @@
Right Ear: [(r_ear ? r_ear : "Nothing")]
Head: [(head ? head : "Nothing")]
Shoes: [(shoes ? shoes : "Nothing")] -
Belt: [(belt ? belt : "Nothing")] -
Uniform: [(w_uniform ? w_uniform : "Nothing")] +
Belt: [(belt ? belt : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
Uniform: [(w_uniform ? w_uniform : "Nothing")] [(suit) ? ((suit.has_sensor == 1) ? text(" Sensors", src) : "") :]
(Exo)Suit: [(wear_suit ? wear_suit : "Nothing")]
Back: [(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")]
ID: [(wear_id ? wear_id : "Nothing")] -
Suit Storage: [(s_store ? s_store : "Nothing")] +
Suit Storage: [(s_store ? s_store : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")]
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(legcuffed ? text("Legcuffed") : text(""))] +
[(suit) ? ((suit.hastie) ? text(" Remove Accessoire", src) : "") :]
[(internal ? text("Remove Internal") : "")]
Remove Splints
Empty Pockets
Refresh
Close
"} - user << browse(dat, text("window=mob[name];size=340x480")) + user << browse(dat, text("window=mob[name];size=340x540")) onclose(user, "mob[name]") return diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 64d1ff64ef..8e3e42a39c 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -388,11 +388,14 @@ if(count == 0) del(src) return + if("sensor") + if (! target.w_uniform ) + del(src) if("internal") if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal ))) del(src) - var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel") + var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel", "sensor", "internal", "tie") if ((item && !( L.Find(place) ))) if(isrobot(source) && place != "handcuff") del(src) @@ -508,6 +511,17 @@ return else message = "\red [source] is trying to take off \a [target.w_uniform] from [target]'s body!" + if("tie") + var/obj/item/clothing/under/suit = target.w_uniform + target.attack_log += text("\[[time_stamp()]\] Has had their accessoire ([suit.hastie]) removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) accessoire ([suit.hastie])") + if(istype(suit.hastie, /obj/item/clothing/tie/holobadge) || istype(suit.hastie, /obj/item/clothing/tie/medal)) + for(var/mob/M in viewers(target, null)) + M.show_message("\red [source] tears off \the [suit.hastie] from [target]'s suit!" , 1) + done() + return + else + message = "\red [source] is trying to take off \a [suit.hastie] from [target]'s suit!" if("s_store") target.attack_log += text("\[[time_stamp()]\] Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])") @@ -537,6 +551,14 @@ message = "\red [source] is trying to set on [target]'s internals." if("splints") message = text("\red [] is trying to remove []'s splints!", source, target) + if("sensor") + target.attack_log += text("\[[time_stamp()]\] Has had their sensors toggled by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to toggle [target.name]'s ([target.ckey]) sensors") + var/obj/item/clothing/under/suit = target.w_uniform + if (suit.has_sensor >= 2) + source << "The controls are locked." + return + message = "\red [source] is trying to set [target]'s suit sensors!" for(var/mob/M in viewers(target, null)) M.show_message(message, 1) @@ -624,6 +646,19 @@ It can still be worn/put on as normal. slot_to_process = slot_wear_suit if (target.wear_suit && target.wear_suit.canremove) strip_item = target.wear_suit + if("tie") + var/obj/item/clothing/under/suit = target.w_uniform + //var/obj/item/clothing/tie/tie = suit.hastie + /*if(tie) + if (istype(tie,/obj/item/clothing/tie/storage)) + var/obj/item/clothing/tie/storage/W = tie + if (W.hold) + W.hold.close(usr) + usr.put_in_hands(tie) + suit.hastie = null*/ + suit.hastie.on_removed(usr) + suit.hastie = null + target.update_inv_w_uniform() if("id") slot_to_process = slot_wear_id if (target.wear_id) @@ -675,8 +710,20 @@ It can still be worn/put on as normal. O.show_message("\red [source] injects [target] with the DNA Injector!", 1) S.inuse = 0 if("pockets") - slot_to_process = slot_l_store - strip_item = target.l_store //We'll do both + if (!item || (target.l_store && target.r_store)) // Only empty pockets when hand is empty or both pockets are full + slot_to_process = slot_l_store + strip_item = target.l_store //We'll do both + else if (target.l_store) + slot_to_process = slot_r_store + else + slot_to_process = slot_l_store + if("sensor") + var/obj/item/clothing/under/suit = target.w_uniform + if (suit) + if(suit.has_sensor >= 2) + source << "The controls are locked." + else + suit.set_sensors(source) if("internal") if (target.internal) target.internal.add_fingerprint(source)