Towels
This commit is contained in:
@@ -1633,7 +1633,7 @@
|
||||
/obj/item/caution,
|
||||
/obj/item/storage/bag/trash,
|
||||
/obj/item/reagent_containers/spray/cleaner,
|
||||
/obj/item/reagent_containers/glass/rag,
|
||||
/obj/item/reagent_containers/rag,
|
||||
/obj/item/grenade/chem_grenade/cleaner,
|
||||
/obj/item/grenade/chem_grenade/cleaner,
|
||||
/obj/item/grenade/chem_grenade/cleaner,
|
||||
@@ -1666,7 +1666,7 @@
|
||||
contains = list(/obj/item/caution,
|
||||
/obj/item/caution,
|
||||
/obj/item/caution,
|
||||
/obj/item/reagent_containers/glass/rag,
|
||||
/obj/item/reagent_containers/rag,
|
||||
/obj/item/reagent_containers/glass/bottle/ammonia,
|
||||
/obj/item/reagent_containers/glass/bottle/ammonia,
|
||||
/obj/item/reagent_containers/spray/drying_agent)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
slot_flags = ITEM_SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
var/transfer_prints = FALSE
|
||||
var/transfer_blood = 0
|
||||
strip_delay = 20
|
||||
equip_delay_other = 40
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/datum/crafting_recipe/molotov
|
||||
name = "Molotov"
|
||||
result = /obj/item/reagent_containers/food/drinks/bottle/molotov
|
||||
reqs = list(/obj/item/reagent_containers/glass/rag = 1,
|
||||
reqs = list(/obj/item/reagent_containers/rag = 1,
|
||||
/obj/item/reagent_containers/food/drinks/bottle = 1)
|
||||
parts = list(/obj/item/reagent_containers/food/drinks/bottle = 1)
|
||||
time = 40
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
|
||||
/mob
|
||||
var/bloody_hands = 0
|
||||
|
||||
/obj/item/clothing/gloves
|
||||
var/transfer_blood = 0
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
item_flags = NOBLUDGEON
|
||||
reagent_flags = OPENCONTAINER
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
var/log_object = "a damp rag containing [reagentlist]"
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, reagents.total_volume)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_combat(user, C, "smothered", log_object)
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
log_combat(user, C, "touched", log_object)
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
@@ -91,7 +91,7 @@
|
||||
else
|
||||
return initial(pixel_x)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_permeability_protection()
|
||||
/mob/living/carbon/alien/humanoid/get_permeability_protection(list/target_zones)
|
||||
return 0.8
|
||||
|
||||
/mob/living/carbon/alien/humanoid/alien_evolve(mob/living/carbon/alien/humanoid/new_xeno)
|
||||
|
||||
@@ -634,6 +634,18 @@
|
||||
else
|
||||
. += INFINITY
|
||||
|
||||
/mob/living/carbon/get_permeability_protection(list/target_zones = list(HANDS,CHEST,GROIN,LEGS,FEET,ARMS,HEAD))
|
||||
var/list/tally = list()
|
||||
for(var/obj/item/I in get_equipped_items())
|
||||
for(var/zone in target_zones)
|
||||
if(I.body_parts_covered & zone)
|
||||
tally["[zone]"] = max(1 - I.permeability_coefficient, target_zones["[zone]"])
|
||||
var/protection = 0
|
||||
for(var/key in tally)
|
||||
protection += tally[key]
|
||||
protection *= INVERSE(target_zones.len)
|
||||
return protection
|
||||
|
||||
//this handles hud updates
|
||||
/mob/living/carbon/update_damage_hud()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
for(var/bp in body_parts)
|
||||
if(!bp)
|
||||
continue
|
||||
if(bp && istype(bp , /obj/item/clothing))
|
||||
if(istype(bp, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & def_zone.body_part)
|
||||
protection += C.armor.getRating(d_type)
|
||||
|
||||
@@ -111,26 +111,6 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/get_permeability_protection()
|
||||
var/list/prot = list("hands"=0, "chest"=0, "groin"=0, "legs"=0, "feet"=0, "arms"=0, "head"=0)
|
||||
for(var/obj/item/I in get_equipped_items())
|
||||
if(I.body_parts_covered & HANDS)
|
||||
prot["hands"] = max(1 - I.permeability_coefficient, prot["hands"])
|
||||
if(I.body_parts_covered & CHEST)
|
||||
prot["chest"] = max(1 - I.permeability_coefficient, prot["chest"])
|
||||
if(I.body_parts_covered & GROIN)
|
||||
prot["groin"] = max(1 - I.permeability_coefficient, prot["groin"])
|
||||
if(I.body_parts_covered & LEGS)
|
||||
prot["legs"] = max(1 - I.permeability_coefficient, prot["legs"])
|
||||
if(I.body_parts_covered & FEET)
|
||||
prot["feet"] = max(1 - I.permeability_coefficient, prot["feet"])
|
||||
if(I.body_parts_covered & ARMS)
|
||||
prot["arms"] = max(1 - I.permeability_coefficient, prot["arms"])
|
||||
if(I.body_parts_covered & HEAD)
|
||||
prot["head"] = max(1 - I.permeability_coefficient, prot["head"])
|
||||
var/protection = (prot["head"] + prot["arms"] + prot["feet"] + prot["legs"] + prot["groin"] + prot["chest"] + prot["hands"])/7
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/can_use_guns(obj/item/G)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@
|
||||
dropItemToGround(r_store, TRUE) //Again, makes sense for pockets to drop.
|
||||
if(l_store)
|
||||
dropItemToGround(l_store, TRUE)
|
||||
if(wear_id)
|
||||
if(wear_id && !CHECK_BITFIELD(wear_id.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
dropItemToGround(wear_id)
|
||||
if(belt)
|
||||
if(belt && !CHECK_BITFIELD(belt.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
dropItemToGround(belt)
|
||||
w_uniform = null
|
||||
update_suit_sensors()
|
||||
|
||||
@@ -1019,13 +1019,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(SLOT_BELT)
|
||||
if(H.belt)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_BELT))
|
||||
return
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
@@ -1062,12 +1061,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(SLOT_WEAR_ID)
|
||||
if(H.wear_id)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_ID) )
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
|
||||
@@ -152,15 +152,6 @@
|
||||
|
||||
return threatcount
|
||||
|
||||
/mob/living/carbon/monkey/get_permeability_protection()
|
||||
var/protection = 0
|
||||
if(head)
|
||||
protection = 1 - head.permeability_coefficient
|
||||
if(wear_mask)
|
||||
protection = max(1 - wear_mask.permeability_coefficient, protection)
|
||||
protection = protection/7 //the rest of the body isn't covered.
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/monkey/IsVocal()
|
||||
if(!getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return 0
|
||||
|
||||
@@ -813,7 +813,7 @@
|
||||
return 1
|
||||
|
||||
//used in datum/reagents/reaction() proc
|
||||
/mob/living/proc/get_permeability_protection()
|
||||
/mob/living/proc/get_permeability_protection(list/target_zones)
|
||||
return 0
|
||||
|
||||
/mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
var/active_hand_index = 1
|
||||
var/list/held_items = list() //len = number of hands, eg: 2 nulls is 2 empty hands, 1 item and 1 null is 1 full hand and 1 empty hand.
|
||||
//held_items[active_hand_index] is the actively held item, but please use get_active_held_item() instead, because OOP
|
||||
var/bloody_hands = 0
|
||||
|
||||
var/datum/component/storage/active_storage = null//Carbon
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/obj/item/reagent_containers/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
item_flags = NOBLUDGEON
|
||||
reagent_flags = OPENCONTAINER
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
var/wipe_sound
|
||||
var/soak_efficiency = 1
|
||||
var/extinguish_efficiency = 0
|
||||
|
||||
/obj/item/reagent_containers/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
var/log_object = "a damp rag containing [reagentlist]"
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, 5)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_combat(user, C, "smothered", log_object)
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.remove_all(5)
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
log_combat(user, C, "touched", log_object)
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user,30, target = A))
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/rag/pre_altattackby(mob/living/M, mob/living/user, params)
|
||||
if(istype(M) && user.a_intent == INTENT_HELP)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.on_fire)
|
||||
user.visible_message("<span class='warning'>\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!</span>")
|
||||
if(hitsound)
|
||||
playsound(M, hitsound, 25, 1)
|
||||
M.adjust_fire_stacks(-extinguish_efficiency)
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts drying [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src]...</span>")
|
||||
if(do_mob(user, M, 3 SECONDS))
|
||||
user.visible_message("<span class='notice'>\The [user] dries [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src].</span>")
|
||||
if(wipe_sound)
|
||||
playsound(M, wipe_sound, 25, 1)
|
||||
M.adjust_fire_stacks(-soak_efficiency)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/rag/towel
|
||||
name = "towel"
|
||||
desc = "A soft cotton towel."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "towel"
|
||||
item_state = "towel"
|
||||
slot_flags = ITEM_SLOT_HEAD | ITEM_SLOT_BELT | ITEM_SLOT_OCLOTHING
|
||||
obj_flags = NO_UNIFORM_REQUIRED //so it can be worn on the belt slot even with no uniform.
|
||||
force = 1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("whipped")
|
||||
hitsound = 'sound/items/towelwhip.ogg'
|
||||
volume = 10
|
||||
total_mass = 2
|
||||
wipe_sound = 'sound/items/towelwipe.ogg'
|
||||
soak_efficiency = 2
|
||||
extinguish_efficiency = 2
|
||||
var/flat_icon = "towel_flat"
|
||||
var/folded_icon = "towel"
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack(mob/living/M, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
DISABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
. = TRUE
|
||||
..()
|
||||
if(.)
|
||||
ENABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/equipped(mob/living/user, slot)
|
||||
. = ..()
|
||||
switch(slot)
|
||||
if(SLOT_BELT)
|
||||
body_parts_covered = GROIN|LEGS
|
||||
if(SLOT_WEAR_SUIT)
|
||||
body_parts_covered = CHEST|GROIN|LEGS
|
||||
if(SLOT_HEAD)
|
||||
body_parts_covered = HEAD
|
||||
flags_inv = HIDEHAIR
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/dropped(mob/user)
|
||||
. = ..()
|
||||
body_parts_covered = NONE
|
||||
flags_inv = NONE
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack_self(mob/user)
|
||||
if(!user.CanReach(src) || !user.dropItemToGround(src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You lay out \the [src] flat on the ground.</span>")
|
||||
icon_state = flat_icon
|
||||
layer = BELOW_OBJ_LAYER
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/pickup(mob/living/user)
|
||||
. = ..()
|
||||
icon_state = folded_icon
|
||||
layer = initial(layer)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/random/Initialize()
|
||||
. = ..()
|
||||
add_atom_colour(pick("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"), FIXED_COLOUR_PRIORITY)
|
||||
@@ -110,22 +110,15 @@
|
||||
return 0.5
|
||||
|
||||
|
||||
/proc/get_location_accessible(mob/M, location)
|
||||
/proc/get_location_accessible(mob/living/M, location)
|
||||
var/covered_locations = 0 //based on body_parts_covered
|
||||
var/face_covered = 0 //based on flags_inv
|
||||
var/eyesmouth_covered = 0 //based on flags_cover
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/obj/item/clothing/I in list(C.back, C.wear_mask, C.head))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.ears))
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
for(var/A in M.get_equipped_items())
|
||||
var/obj/item/I = A
|
||||
covered_locations |= I.body_parts_covered
|
||||
face_covered |= I.flags_inv
|
||||
eyesmouth_covered |= I.flags_cover
|
||||
|
||||
switch(location)
|
||||
if(BODY_ZONE_HEAD)
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
/obj/item/clothing/suit/apron/purple_bartender = 2,
|
||||
/obj/item/clothing/head/soft/black = 4,
|
||||
/obj/item/clothing/shoes/sneakers/black = 4,
|
||||
/obj/item/reagent_containers/glass/rag = 4,
|
||||
/obj/item/reagent_containers/rag = 4,
|
||||
/obj/item/storage/box/beanbag = 1,
|
||||
/obj/item/clothing/suit/armor/vest/alt = 1,
|
||||
/obj/item/circuitboard/machine/dish_drive = 1,
|
||||
@@ -227,7 +227,7 @@
|
||||
/obj/item/clothing/suit/toggle/chef = 2,
|
||||
/obj/item/clothing/under/rank/chef = 2,
|
||||
/obj/item/clothing/head/chefhat = 2,
|
||||
/obj/item/reagent_containers/glass/rag = 3)
|
||||
/obj/item/reagent_containers/rag = 3)
|
||||
refill_canister = /obj/item/vending_refill/wardrobe/chef_wardrobe
|
||||
|
||||
/obj/item/vending_refill/wardrobe/chef_wardrobe
|
||||
|
||||
Reference in New Issue
Block a user