Files
Aurora.3/code/game/objects/items/weapons/towel.dm
T
FluffyandGitHub b8902e2e16 Runtime map now loads in ~11 seconds instead of ~40, sped up various other things (#19957)
Runtime map now has a bunch of new areas / items with often-tested
stuffs, and some hard-to-put-at-runtime stuffs.
Runtime map jobs now are positioned to make it faster to reach the
aforementioned often-tested stuffs.
Runtime map doesn't generate an overmap anymore by default, which speeds
up the process.
Runtime map now loads in ~11 seconds instead of ~40 seconds as it was
before.
Updated the maploader to be faster in parsing maps.
Bapi is not engaged anymore if we're only measuring the map size, which
speeds up the process.
In fastboot we do not generate the codexes anymore, which speeds up the
process.
In fastboot and if exoplanets and away sites are not enabled, we do not
parse the map templates anymore, which speeds up the process.
Updated the icon smoothing to be faster.
Optimized cargo area code.
Other optimizations.
2024-10-06 21:31:01 +00:00

65 lines
2.0 KiB
Plaintext

/obj/item/towel
name = "towel"
desc = "A soft cotton towel."
icon = 'icons/obj/weapons.dmi'
icon_state = "towel"
slot_flags = SLOT_HEAD | SLOT_BELT | SLOT_OCLOTHING
sprite_sheets = list(
BODYTYPE_VAURCA_BULWARK = 'icons/mob/species/bulwark/suit.dmi'
)
force = 1
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("whipped")
hitsound = 'sound/weapons/towelwhip.ogg'
drop_sound = 'sound/items/drop/cloth.ogg'
pickup_sound = 'sound/items/pickup/cloth.ogg'
/obj/item/towel/attack_self(mob/living/user)
attack(user, user)
/obj/item/towel/attack(mob/living/target_mob, mob/living/user, target_zone)
var/mob/living/carbon/human/M = target_mob
if(istype(M) && user.a_intent == I_HELP)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(user.on_fire)
user.visible_message(SPAN_WARNING("\The [user] uses \the [src] to pat out \the [M]'s flames with \the [src]!"))
playsound(M, 'sound/weapons/towelwhip.ogg', 25, 1)
M.ExtinguishMob(-1)
else
user.visible_message(SPAN_NOTICE("\The [user] starts drying \the [M] off with \the [src]..."))
if(do_mob(user, M, 3 SECONDS))
user.visible_message(SPAN_NOTICE("\The [user] dries \the [M] off with \the [src]."))
playsound(M, 'sound/weapons/towelwipe.ogg', 25, 1)
M.adjust_fire_stacks(-clamp(M.fire_stacks,-1.5,1.5))
return
. = ..()
/obj/item/towel/random/Initialize()
. = ..()
color = get_random_colour(1)
/obj/item/towel/verb/lay_out()
set name = "Lay Out Towel"
set category = "Object"
set src in usr
to_chat(usr, SPAN_NOTICE("You lay out \the [src] flat on the ground."))
var/obj/item/towel_flat/T = new /obj/item/towel_flat(usr.loc)
T.color = src.color
qdel(src)
/obj/item/towel_flat
name = "towel"
desc = "A soft cotton towel."
icon = 'icons/obj/weapons.dmi'
icon_state = "towel_flat"
/obj/item/towel_flat/attack_hand(mob/user as mob)
to_chat(user, SPAN_NOTICE("You pick up and fold \the [src]."))
var/obj/item/towel/T = new /obj/item/towel(user)
T.color = src.color
user.put_in_hands(T)
qdel(src)