Further improvements.

This commit is contained in:
Ghommie
2019-07-21 11:58:58 +02:00
parent 5504fb6a6a
commit ce4e86279c
@@ -13,6 +13,8 @@
var/wipe_sound
var/soak_efficiency = 1
var/extinguish_efficiency = 0
var/action_speed = 3 SECONDS
var/damp_threshold = 0.5
/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>")
@@ -44,7 +46,7 @@
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))
if(do_after(user, action_speed, 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
@@ -58,17 +60,25 @@
playsound(M, hitsound, 25, 1)
M.adjust_fire_stacks(-min(extinguish_efficiency, M.fire_stacks))
else
if(reagents.total_volume)
if(reagents.total_volume > (volume * damp_threshold))
to_chat(user, "<span class='warning'>\The [src] is too drenched to be used to dry [user == M ? "yourself" : "\the [M]"] off.</span>")
return TRUE
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))
if(do_mob(user, M, action_speed))
if(reagents.total_volume > (volume * damp_threshold))
return
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)
if(M.fire_stacks)
var/minus_plus = M.fire_stacks < 0 ? 1 : -1
M.adjust_fire_stacks(minus_plus * min(abs(M.fire_stacks), soak_efficiency))
var/amount = min(abs(M.fire_stacks), soak_efficiency)
var/r_id = "fuel"
if(M.fire_stacks < 0)
id = "water"
reagents.add_reagent(r_id, amount * 0.3)
M.adjust_fire_stacks(minus_plus * amount)
M.wash_cream()
return TRUE
return ..()
@@ -76,7 +86,7 @@
. = ..()
if(reagents.total_volume && user.canUseTopic(src, BE_CLOSE))
to_chat(user, "<span class='notice'>You start squeezing the liquids out of \the [src]...</span>")
if(do_after(user, 30, TRUE, src))
if(do_after(user, action_speed, TRUE, src))
to_chat(user, "<span class='notice'>You squeeze \the [src] dry.</span>")
var/atom/react_loc = get_turf(src)
if(ismob(react_loc))
@@ -100,8 +110,8 @@
volume = 10
total_mass = 2
wipe_sound = 'sound/items/towelwipe.ogg'
soak_efficiency = 2
extinguish_efficiency = 2
soak_efficiency = 4
extinguish_efficiency = 3
var/flat_icon = "towel_flat"
var/folded_icon = "towel"
var/list/possible_colors
@@ -158,4 +168,10 @@
desc = "Truly a weapon of mass destruction."
possible_colors = list("#DD1A1A", "#DB4325", "#E02700")
force = 4
volume = 20
armour_penetration = 10
volume = 20
soak_efficiency = 6
extinguish_efficiency = 5
action_speed = 15
damp_threshold = 0.8
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.