mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Merge pull request #432 from Bone-White/master
Hardsuit equip time reversion
This commit is contained in:
@@ -151,51 +151,9 @@
|
||||
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
|
||||
if(!src.canremove)
|
||||
return 0
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(istype(src, /obj/item/clothing/suit/space/rig)) // If the item to be unequipped is a rigid suit
|
||||
if(user.delay_clothing_u_equip(src) == 0)
|
||||
return 0
|
||||
else
|
||||
user.u_equip(src)
|
||||
else
|
||||
user.u_equip(src)
|
||||
|
||||
/*
|
||||
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]."
|
||||
*/
|
||||
else
|
||||
if(isliving(src.loc))
|
||||
return 0
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/obj/item/clothing
|
||||
name = "clothing"
|
||||
var/list/species_restricted = null //Only these species can wear this kit.
|
||||
var/equip_time = 0
|
||||
var/equipping = 0
|
||||
var/rig_restrict_helmet = 0 // Stops the user from equipping a rig helmet without attaching it to the suit first.
|
||||
|
||||
//BS12: Species-restricted clothing check.
|
||||
/obj/item/clothing/mob_can_equip(M as mob, slot)
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
rig_restrict_helmet = 1
|
||||
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
|
||||
@@ -115,8 +114,7 @@
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
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
|
||||
slowdown = 1
|
||||
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)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
@@ -374,7 +372,6 @@
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | ONESIZEFITSALL
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 80)
|
||||
sprite_sheets = null
|
||||
slowdown = 2
|
||||
|
||||
//Singuloth armor
|
||||
/obj/item/clothing/head/helmet/space/rig/singuloth
|
||||
@@ -441,7 +438,7 @@
|
||||
name = "blood-red hardsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_hardsuit"
|
||||
slowdown = 2
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/device/suit_cooling_unit)
|
||||
|
||||
@@ -146,28 +146,6 @@
|
||||
update_icons()
|
||||
return
|
||||
|
||||
/mob/proc/delay_clothing_u_equip(obj/item/clothing/X as obj) // Bone White - delays unequipping by parameter. Requires W to be /obj/item/clothing/
|
||||
|
||||
if(!istype(X)) return 0
|
||||
|
||||
if(X.equipping == 1) return 0 // Item is already being (un)equipped
|
||||
|
||||
var/tempX = usr.x
|
||||
var/tempY = usr.y
|
||||
usr << "\blue You start unequipping the [X]."
|
||||
X.equipping = 1
|
||||
var/equip_time = round(X.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))
|
||||
src << "\red \The [X] is too fiddly to unequip whilst moving."
|
||||
X.equipping = 0
|
||||
return 0
|
||||
u_equip(X)
|
||||
usr << "\blue You have finished unequipping the [X]."
|
||||
X.equipping = 0
|
||||
|
||||
/mob/proc/u_equip(W as obj)
|
||||
if (W == r_hand)
|
||||
r_hand = null
|
||||
|
||||
@@ -1,28 +1,9 @@
|
||||
/mob/living/carbon/human/movement_delay()
|
||||
var/tally = 0
|
||||
|
||||
if(wear_suit)
|
||||
if(wear_suit.slowdown > 0)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/local_pressure = environment.return_pressure()
|
||||
switch (local_pressure)
|
||||
if(20 to 40)
|
||||
tally = min(1,wear_suit.slowdown)
|
||||
if(40 to 60)
|
||||
tally = min(2,wear_suit.slowdown)
|
||||
if(60 to 80)
|
||||
tally = min(3,wear_suit.slowdown)
|
||||
if(80 to INFINITY)
|
||||
tally = min(4,wear_suit.slowdown)
|
||||
|
||||
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
|
||||
if(species && species.flags & IS_SLOW)
|
||||
tally = 5
|
||||
|
||||
//if(wear_suit) // These two lines are now redundant due to comment above
|
||||
// tally += wear_suit.slowdown
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
if(embedded_flag)
|
||||
@@ -43,6 +24,8 @@
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
if(wear_suit)
|
||||
tally += wear_suit.slowdown
|
||||
|
||||
if(!buckled || (buckled && !istype(buckled, /obj/structure/stool/bed/chair/wheelchair)))
|
||||
if(shoes)
|
||||
|
||||
@@ -10,17 +10,6 @@
|
||||
H << "<span class='notice'>You are not holding anything to equip.</span>"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/clothing/head/helmet/space/rig)) // If the item to be equipped is a rigid suit helmet
|
||||
src << "\red You must fasten the helmet to a hardsuit first. (Target the head)" // Stop eva helms equipping.
|
||||
return 0
|
||||
|
||||
|
||||
if(istype(I, /obj/item/clothing/suit/space/rig)) // If the item to be equipped is a rigid suit
|
||||
var/obj/item/clothing/suit/space/rig/J = I
|
||||
if(J.equip_time > 0)
|
||||
delay_clothing_equip_to_slot_if_possible(J, 13) // 13 = suit slot
|
||||
return 0
|
||||
|
||||
if(H.equip_to_appropriate_slot(I))
|
||||
if(hand)
|
||||
update_inv_l_hand(0)
|
||||
|
||||
+2
-36
@@ -105,21 +105,8 @@
|
||||
/mob/proc/attack_ui(slot)
|
||||
var/obj/item/W = get_active_hand()
|
||||
|
||||
//if(istype(W))
|
||||
// equip_to_slot_if_possible(W, slot)
|
||||
|
||||
if(istype(W))
|
||||
if (istype(W, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = W
|
||||
if(C.rig_restrict_helmet)
|
||||
src << "\red You must fasten the helmet to a hardsuit first. (Target the head)" // Stop eva helms equipping.
|
||||
else
|
||||
if(C.equip_time > 0)
|
||||
delay_clothing_equip_to_slot_if_possible(C, slot)
|
||||
else
|
||||
equip_to_slot_if_possible(C, slot)
|
||||
else
|
||||
equip_to_slot_if_possible(W, slot)
|
||||
equip_to_slot_if_possible(W, slot)
|
||||
|
||||
if(ishuman(src) && W == src:head)
|
||||
src:update_hair()
|
||||
@@ -131,30 +118,9 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//This is a SAFE proc. Use this instead of equip_to_splot()!
|
||||
/mob/proc/delay_clothing_equip_to_slot_if_possible(obj/item/clothing/X as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1, delay_time = 0)
|
||||
if(!istype(X)) return 0
|
||||
|
||||
if(X.equipping == 1) return 0 // Item is already being equipped
|
||||
|
||||
var/tempX = usr.x
|
||||
var/tempY = usr.y
|
||||
usr << "\blue You start equipping the [X]."
|
||||
X.equipping = 1
|
||||
var/equip_time = round(X.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))
|
||||
src << "\red \The [X] is too fiddly to fasten whilst moving."
|
||||
X.equipping = 0
|
||||
return 0
|
||||
equip_to_slot_if_possible(X, slot)
|
||||
usr << "\blue You have finished equipping the [X]."
|
||||
X.equipping = 0
|
||||
|
||||
|
||||
//This is a SAFE proc. Use this instead of equip_to_splot()!
|
||||
//This is a SAFE proc. Use this instead of equip_to_slot()!
|
||||
//set del_on_fail to have it delete W if it fails to equip
|
||||
//set disable_warning to disable the 'you are unable to equip that' warning.
|
||||
//unset redraw_mob to prevent the mob from being redrawn at the end.
|
||||
|
||||
@@ -1122,7 +1122,8 @@ datum
|
||||
// 1 volume = ~2% chance
|
||||
// 10 volume = ~17% chance
|
||||
// 30 volume = ~38% chance
|
||||
if (rand(0, 50+volume) > 50 && ishuman(M))
|
||||
//if (rand(0, 50+volume) > 50 && ishuman(M))
|
||||
if (volume >= 1 && ishuman(M))
|
||||
for(var/block=1;block<=DNA_SE_LENGTH;block++)
|
||||
M.dna.SetSEState(block,0)
|
||||
genemutcheck(M,block,null,MUTCHK_FORCED)
|
||||
|
||||
Reference in New Issue
Block a user