mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Adds equip/unequip times to rigid suits
Also stops helmets being worn without the rigid suit already on the mob.
This commit is contained in:
@@ -152,11 +152,47 @@
|
||||
if(!src.canremove)
|
||||
return 0
|
||||
else
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(src, /obj/item/clothing/suit/space/rig)) // If the item to unequip item is a rigid suit
|
||||
if(! istype(H.head, /obj/item/clothing/head/helmet/space/rig)) // If the person is NOT wearing a rigid suit helmet
|
||||
var/tempX = H.x
|
||||
var/tempY = H.y
|
||||
H << "\blue You unfastening the seals and clambering out of the [src]. (This will take a while)."
|
||||
var/obj/item/clothing/head/helmet/space/rig/this_rig = src
|
||||
var/equip_time = round(this_rig.equip_time/10)
|
||||
var/i
|
||||
for(i=1; i<=equip_time; i++)
|
||||
sleep (10) // Check if they've moved every 10 time units
|
||||
if ((tempX != usr.x) || (tempY != usr.y))
|
||||
H << "\red \The [src] is too fiddly to remove whilst moving."
|
||||
return 0
|
||||
H << "\blue You finish removing the [src]."
|
||||
else
|
||||
H << "\red You must remove \the [H.head] first."
|
||||
return 0
|
||||
|
||||
if(istype(src, /obj/item/clothing/head/helmet/space/rig)) // If the item to unequip is a rigid suit helmet
|
||||
var/tempX = H.x
|
||||
var/tempY = H.y
|
||||
H << "\blue You start unfastening the [src]. (This will take a while)."
|
||||
var/obj/item/clothing/suit/space/rig/this_helmet = src
|
||||
var/equip_time = round(this_helmet.equip_time/10)
|
||||
var/i
|
||||
for(i=1; i<=equip_time; i++)
|
||||
sleep (10) // Check if they've moved every 10 time units
|
||||
if ((tempX != usr.x) || (tempY != usr.y))
|
||||
H << "\red \The [src] is too fiddly to remove whilst moving."
|
||||
return 0
|
||||
H << "\blue You finish removing the [src]."
|
||||
|
||||
user.u_equip(src)
|
||||
else
|
||||
if(isliving(src.loc))
|
||||
return 0
|
||||
user.next_move = max(user.next_move+2,world.time + 2)
|
||||
|
||||
src.pickup(user)
|
||||
add_fingerprint(user)
|
||||
user.put_in_active_hand(src)
|
||||
|
||||
Reference in New Issue
Block a user