Merge pull request #1683 from Citadel-Station-13/upstream-merge-28583
[MIRROR] Adds framework for equip delays and adds it to the straight jacket
This commit is contained in:
@@ -197,7 +197,7 @@
|
||||
icon_state = "earmuffs"
|
||||
item_state = "earmuffs"
|
||||
strip_delay = 15
|
||||
put_on_delay = 25
|
||||
equip_delay_other = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/clothing/ears/earmuffs/Initialize(mapload)
|
||||
@@ -221,7 +221,7 @@
|
||||
var/list/icon/current = list() //the current hud icons
|
||||
var/vision_correction = 0 //does wearing these glasses correct some of our vision defects?
|
||||
strip_delay = 20
|
||||
put_on_delay = 25
|
||||
equip_delay_other = 25
|
||||
resistance_flags = 0
|
||||
/*
|
||||
SEE_SELF // can see self, no matter what
|
||||
@@ -246,7 +246,7 @@ BLIND // can't see anything
|
||||
attack_verb = list("challenged")
|
||||
var/transfer_prints = FALSE
|
||||
strip_delay = 20
|
||||
put_on_delay = 40
|
||||
equip_delay_other = 40
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE)
|
||||
@@ -301,7 +301,7 @@ BLIND // can't see anything
|
||||
body_parts_covered = NECK
|
||||
slot_flags = SLOT_NECK
|
||||
strip_delay = 40
|
||||
put_on_delay = 40
|
||||
equip_delay_other = 40
|
||||
|
||||
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
@@ -320,7 +320,7 @@ BLIND // can't see anything
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
strip_delay = 40
|
||||
put_on_delay = 40
|
||||
equip_delay_other = 40
|
||||
var/mask_adjusted = 0
|
||||
var/adjusted_flags = null
|
||||
|
||||
@@ -487,7 +487,7 @@ BLIND // can't see anything
|
||||
max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT
|
||||
flash_protect = 2
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
resistance_flags = 0
|
||||
|
||||
@@ -510,7 +510,7 @@ BLIND // can't see anything
|
||||
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
|
||||
strip_delay = 80
|
||||
put_on_delay = 80
|
||||
equip_delay_other = 80
|
||||
resistance_flags = 0
|
||||
|
||||
//Under clothing
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Because you really needed another excuse to punch your crewmates."
|
||||
icon_state = "boxing"
|
||||
item_state = "boxing"
|
||||
put_on_delay = 60
|
||||
equip_delay_other = 60
|
||||
species_exception = list(/datum/species/golem) // now you too can be a golem boxing champion
|
||||
|
||||
/obj/item/clothing/gloves/boxing/green
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
item_color = null //So they don't wash.
|
||||
transfer_prints = TRUE
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
item_color = null //So they don't wash.
|
||||
transfer_prints = TRUE
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
body_parts_covered = ARMS
|
||||
cold_protection = ARMS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "chef"
|
||||
desc = "The commander in chef's head wear."
|
||||
strip_delay = 10
|
||||
put_on_delay = 10
|
||||
equip_delay_other = 10
|
||||
dog_fashion = /datum/dog_fashion/head/chef
|
||||
|
||||
/obj/item/clothing/head/chefhat/suicide_act(mob/user)
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
icon_state = "medical"
|
||||
item_state = "m_mask"
|
||||
permeability_coefficient = 0.01
|
||||
put_on_delay = 10
|
||||
equip_delay_other = 10
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
flags_cover = MASKCOVERSMOUTH
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
|
||||
/obj/item/clothing/mask/muzzle/attack_paw(mob/user)
|
||||
if(iscarbon(user))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/slowdown_active = 2
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
strip_delay = 70
|
||||
put_on_delay = 70
|
||||
equip_delay_other = 70
|
||||
resistance_flags = FIRE_PROOF
|
||||
origin_tech = "materials=3;magnets=4;engineering=4"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
name = "sandals"
|
||||
icon_state = "wizard"
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
|
||||
/obj/item/clothing/shoes/sandal/marisa
|
||||
desc = "A pair of magic black shoes."
|
||||
@@ -55,7 +55,7 @@
|
||||
flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
resistance_flags = 0
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 40, acid = 75)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
item_state = "jackboots"
|
||||
item_color = "hosred"
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
resistance_flags = 0
|
||||
pockets = /obj/item/weapon/storage/internal/pocket/shoes
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
icon_state = "workboots"
|
||||
item_state = "jackboots"
|
||||
strip_delay = 40
|
||||
put_on_delay = 40
|
||||
equip_delay_other = 40
|
||||
pockets = /obj/item/weapon/storage/internal/pocket/shoes
|
||||
|
||||
/obj/item/clothing/shoes/workboots/mining
|
||||
@@ -154,7 +154,7 @@
|
||||
name = "laceup shoes"
|
||||
desc = "The height of fashion, and they're pre-polished!"
|
||||
icon_state = "laceups"
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
|
||||
/obj/item/clothing/shoes/roman
|
||||
name = "roman sandals"
|
||||
@@ -162,7 +162,7 @@
|
||||
icon_state = "roman"
|
||||
item_state = "roman"
|
||||
strip_delay = 100
|
||||
put_on_delay = 100
|
||||
equip_delay_other = 100
|
||||
|
||||
/obj/item/clothing/shoes/griffin
|
||||
name = "griffon boots"
|
||||
@@ -212,10 +212,10 @@
|
||||
name = "yellow performer's boots"
|
||||
desc = "These boots were made for dancing."
|
||||
icon_state = "ysing"
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
|
||||
/obj/item/clothing/shoes/singerb
|
||||
name = "blue performer's boots"
|
||||
desc = "These boots were made for dancing."
|
||||
icon_state = "bsing"
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
|
||||
@@ -124,7 +124,7 @@ Contains:
|
||||
armor = list(melee = 30, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 60, acid = 75)
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
flags_cover = HEADCOVERSEYES
|
||||
|
||||
/obj/item/clothing/suit/space/pirate
|
||||
@@ -138,7 +138,7 @@ Contains:
|
||||
slowdown = 0
|
||||
armor = list(melee = 30, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 60, acid = 75)
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
|
||||
//Emergency Response Team suits
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
heat_protection = CHEST|GROIN
|
||||
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
|
||||
strip_delay = 60
|
||||
put_on_delay = 40
|
||||
equip_delay_other = 40
|
||||
obj_integrity = 250
|
||||
max_integrity = 250
|
||||
resistance_flags = 0
|
||||
@@ -107,7 +107,7 @@
|
||||
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
|
||||
strip_delay = 80
|
||||
put_on_delay = 60
|
||||
equip_delay_other = 60
|
||||
|
||||
/obj/item/clothing/suit/armor/bone
|
||||
name = "bone armor"
|
||||
@@ -126,7 +126,7 @@
|
||||
blood_overlay_type = "armor"
|
||||
armor = list(melee = 15, bullet = 60, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
strip_delay = 70
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
|
||||
/obj/item/clothing/suit/armor/laserproof
|
||||
name = "reflector vest"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20, fire = 30, acid = 100)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
strip_delay = 70
|
||||
put_on_delay = 70
|
||||
equip_delay_other = 70
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
//Standard biosuit, orange stripe
|
||||
@@ -85,4 +85,4 @@
|
||||
icon_state = "plaguedoctor"
|
||||
item_state = "bio_suit"
|
||||
strip_delay = 40
|
||||
put_on_delay = 20
|
||||
equip_delay_other = 20
|
||||
|
||||
@@ -317,6 +317,7 @@
|
||||
item_state = "straight_jacket"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
equip_delay_self = 50
|
||||
strip_delay = 60
|
||||
breakouttime = 3000
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
|
||||
strip_delay = 60
|
||||
put_on_delay = 60
|
||||
equip_delay_other = 60
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/clothing/suit/fire/firefighter
|
||||
@@ -64,7 +64,7 @@
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT
|
||||
strip_delay = 70
|
||||
put_on_delay = 70
|
||||
equip_delay_other = 70
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
resistance_flags = 0
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
|
||||
strip_delay = 70
|
||||
put_on_delay = 70
|
||||
equip_delay_other = 70
|
||||
resistance_flags = 0
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100, fire = 30, acid = 30)
|
||||
strip_delay = 60
|
||||
put_on_delay = 60
|
||||
equip_delay_other = 60
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
|
||||
resistance_flags = 0
|
||||
|
||||
@@ -130,6 +130,6 @@
|
||||
slowdown = 1.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100, fire = 30, acid = 30)
|
||||
strip_delay = 60
|
||||
put_on_delay = 60
|
||||
equip_delay_other = 60
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
resistance_flags = 0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20, fire = 100, acid = 100)
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
dog_fashion = /datum/dog_fashion/head/blue_wizard
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
allowed = list(/obj/item/weapon/teleportation_scroll)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
strip_delay = 50
|
||||
put_on_delay = 50
|
||||
equip_delay_other = 50
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/clothing/suit/wizrobe/red
|
||||
|
||||
@@ -362,6 +362,9 @@
|
||||
if(M.equip_to_appropriate_slot(src))
|
||||
M.update_inv_hands()
|
||||
return TRUE
|
||||
else
|
||||
if(equip_delay_self)
|
||||
return
|
||||
|
||||
if(M.s_active && M.s_active.can_be_inserted(src,1)) //if storage active insert there
|
||||
M.s_active.handle_item_insertion(src)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = 0)
|
||||
return dna.species.can_equip(I, slot, disable_warning, src)
|
||||
/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
|
||||
return dna.species.can_equip(I, slot, disable_warning, src, bypass_equip_delay_self)
|
||||
|
||||
// Return the item currently in the slot ID
|
||||
/mob/living/carbon/human/get_item_by_slot(slot_id)
|
||||
|
||||
@@ -765,7 +765,7 @@
|
||||
// handles the equipping of species-specific gear
|
||||
return
|
||||
|
||||
/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H)
|
||||
/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE)
|
||||
if(slot in no_equip)
|
||||
if(!I.species_exception || !is_type_in_list(src, I.species_exception))
|
||||
return 0
|
||||
@@ -785,7 +785,7 @@
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_neck)
|
||||
if(H.wear_neck)
|
||||
return 0
|
||||
@@ -797,13 +797,13 @@
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_BACK) )
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_wear_suit)
|
||||
if(H.wear_suit)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_OCLOTHING) )
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_gloves)
|
||||
if(H.gloves)
|
||||
return 0
|
||||
@@ -811,7 +811,7 @@
|
||||
return 0
|
||||
if(num_arms < 2)
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_shoes)
|
||||
if(H.shoes)
|
||||
return 0
|
||||
@@ -823,7 +823,7 @@
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>The footwear around here isn't compatible with your feet!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_belt)
|
||||
if(H.belt)
|
||||
return 0
|
||||
@@ -833,7 +833,7 @@
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_BELT) )
|
||||
return
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_glasses)
|
||||
if(H.glasses)
|
||||
return 0
|
||||
@@ -841,7 +841,7 @@
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_head)
|
||||
if(H.head)
|
||||
return 0
|
||||
@@ -849,7 +849,7 @@
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_ears)
|
||||
if(H.ears)
|
||||
return 0
|
||||
@@ -857,13 +857,13 @@
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_w_uniform)
|
||||
if(H.w_uniform)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_ICLOTHING) )
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_wear_id)
|
||||
if(H.wear_id)
|
||||
return 0
|
||||
@@ -873,7 +873,7 @@
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_ID) )
|
||||
return 0
|
||||
return 1
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_l_store)
|
||||
if(I.flags & NODROP) //Pockets aren't visible, so you can't move NODROP items into them.
|
||||
return 0
|
||||
@@ -945,6 +945,12 @@
|
||||
return 0
|
||||
return 0 //Unsupported slot
|
||||
|
||||
/datum/species/proc/equip_delay_self_check(obj/item/I, mob/living/carbon/human/H, bypass_equip_delay_self)
|
||||
if(!I.equip_delay_self || bypass_equip_delay_self)
|
||||
return TRUE
|
||||
H.visible_message("<span class='notice'>[H] start putting on [I]...</span>", "<span class='notice'>You start putting on [I]...</span>")
|
||||
return do_after(H, I.equip_delay_self, target = H)
|
||||
|
||||
/datum/species/proc/before_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>[src] tries to put [what] on [who].</span>")
|
||||
if(do_mob(src, who, what.put_on_delay))
|
||||
if(do_mob(src, who, what.equip_delay_other))
|
||||
if(what && Adjacent(who) && what.mob_can_equip(who, src, final_where, TRUE))
|
||||
if(temporarilyRemoveItemFromInventory(what))
|
||||
if(where_list)
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
//set qdel_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.
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = 0, disable_warning = 0, redraw_mob = 1)
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE)
|
||||
if(!istype(W)) return 0
|
||||
if(!W.mob_can_equip(src, null, slot, disable_warning))
|
||||
if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self))
|
||||
if(qdel_on_fail)
|
||||
qdel(W)
|
||||
else
|
||||
@@ -217,8 +217,9 @@
|
||||
return
|
||||
|
||||
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
|
||||
//Also bypasses equip delay checks, since the mob isn't actually putting it on.
|
||||
/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
|
||||
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
|
||||
return equip_to_slot_if_possible(W, slot, 1, 1, 0, 1)
|
||||
|
||||
//puts the item "W" into an appropriate slot in a human's inventory
|
||||
//returns 0 if it cannot, 1 if successful
|
||||
|
||||
Reference in New Issue
Block a user