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:
Bone White
2014-08-18 08:16:06 +01:00
parent 9ec8db00f6
commit d2129341b9
3 changed files with 73 additions and 0 deletions
+35
View File
@@ -5,6 +5,41 @@
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(src, /obj/item/clothing/head/helmet/space/rig)) // If the item to be equipped is a rigid suit helmet
if(istype(H.wear_suit, /obj/item/clothing/suit/space/rig)) // If the person is wearing a rigid suit
var/tempX = H.x
var/tempY = H.y
H << "\blue You start securing the [src] to your suit. (This will take a while)."
var/obj/item/clothing/head/helmet/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 fasten whilst moving. \..."
return 0
H << "\blue \The [src] clicks into place, sealing the suit to be space-proof."
else
M << "\red \The [src] is too heavy too wear without a rigid suit to support it. \..."
return 0
if(istype(src, /obj/item/clothing/suit/space/rig)) // If the equipped item is a rigid suit
var/tempX = H.x
var/tempY = H.y
M << "\blue You start climbing into the [src] and fasten the seals."
var/obj/item/clothing/suit/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 fasten whilst moving. \..."
return 0
M << "\blue You have finished fastening the [src]'s seals."
//if we can equip the item anyway, don't bother with species_restricted (aslo cuts down on spam)
if (!..())
return 0
+2
View File
@@ -57,6 +57,7 @@
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "rig0-engineering"
item_state = "eng_helm"
var/equip_time = 60 // Bone White - time to equip/unequip. see /obj/item/attack_hand (items.dm) and /obj/item/clothing/mob_can_equip (clothing.dm)
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
allowed = list(/obj/item/device/flashlight)
var/brightness_on = 4 //luminosity when on
@@ -102,6 +103,7 @@
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "rig-engineering"
item_state = "eng_hardsuit"
var/equip_time = 100 // Bone White - time to equip/unequip. see /obj/item/attack_hand (items.dm) and /obj/item/clothing/mob_can_equip (clothing.dm)
slowdown = 4
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)