Merge pull request #393 from Bone-White/master

Diona speed fix
This commit is contained in:
ZomgPonies
2014-08-18 19:19:05 -04:00
4 changed files with 76 additions and 4 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)
@@ -1,10 +1,6 @@
/mob/living/carbon/human/movement_delay()
var/tally = 0
if(species && species.flags & IS_SLOW)
tally = 5
//Bone White - added additional slow for wearing a rig suit. Does not stack with having IS_SLOW flag (Diona)
if(wear_suit)
if(wear_suit.slowdown > 0)
var/datum/gas_mixture/environment = loc.return_air()
@@ -21,6 +17,9 @@
tally = min(wear_suit.slowdown, tally) // Initial slow will never get more powerful than the slowdown on the suit.
if(species && species.flags & IS_SLOW) //Bone White - added additional slow for wearing a rig suit. Species who have IS_SLOW (Diona) do not gain a speed buff now
tally = 5
//if(wear_suit) // These two lines are now redundant due to comment above
// tally += wear_suit.slowdown