Merge branch 'pr/20'

This commit is contained in:
Fermi
2019-07-28 23:28:19 +01:00
82 changed files with 1119 additions and 497 deletions
@@ -350,10 +350,10 @@
return
var/amount_full = 0
var/vol_part = min(reagents.total_volume, 30)
var/vol_part = min(reagents.total_volume, 60)
if(text2num(many))
amount_full = round(reagents.total_volume / 30)
vol_part = reagents.total_volume % 30
amount_full = round(reagents.total_volume / 60)
vol_part = reagents.total_volume % 60
var/name = stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
return
@@ -363,7 +363,7 @@
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
P.name = trim("[name] hypovial")
adjust_item_drop_location(P)
reagents.trans_to(P, 30)
reagents.trans_to(P, 60)
if(vol_part)
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
@@ -437,4 +437,4 @@
condi = TRUE
#undef PILL_STYLE_COUNT
#undef RANDOM_PILL_STYLE
#undef RANDOM_PILL_STYLE
@@ -13,11 +13,18 @@
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>")
return (OXYLOSS)
/obj/item/reagent_containers/rag/examine(mob/user)
. = ..()
if(reagents.total_volume)
to_chat(user, "<span class='notice'>Alt-Click to squeeze the liquids out of it.</span>")
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
. = ..()
if(!proximity)
@@ -39,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
@@ -51,17 +58,43 @@
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)
M.adjust_fire_stacks(-min(extinguish_efficiency, M.fire_stacks))
else
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)
M.adjust_fire_stacks(-soak_efficiency)
if(M.fire_stacks)
var/minus_plus = M.fire_stacks < 0 ? 1 : -1
var/amount = min(abs(M.fire_stacks), soak_efficiency)
var/r_id = "fuel"
if(M.fire_stacks < 0)
r_id = "water"
reagents.add_reagent(r_id, amount * 0.3)
M.adjust_fire_stacks(minus_plus * amount)
M.wash_cream()
return TRUE
return ..()
/obj/item/reagent_containers/rag/AltClick(mob/user)
. = ..()
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, 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))
react_loc = react_loc.loc
if(react_loc)
reagents.reaction(react_loc, TOUCH)
reagents.clear_reagents()
/obj/item/reagent_containers/rag/towel
name = "towel"
desc = "A soft cotton towel."
@@ -77,10 +110,16 @@
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
/obj/item/reagent_containers/rag/towel/Initialize()
. = ..()
if(possible_colors)
add_atom_colour(pick(possible_colors), FIXED_COLOUR_PRIORITY)
/obj/item/reagent_containers/rag/towel/attack(mob/living/M, mob/living/user)
if(user.a_intent == INTENT_HARM)
@@ -112,13 +151,27 @@
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)
/obj/item/reagent_containers/rag/towel/on_reagent_change(changetype)
force = initial(force) + round(reagents.total_volume * 0.5)
/obj/item/reagent_containers/rag/towel/random
possible_colors = list("#FF0000","#FF7F00","#FFFF00","#00FF00","#0000FF","#4B0082","#8F00FF")
/obj/item/reagent_containers/rag/towel/syndicate
name = "syndicate towel"
desc = "Truly a weapon of mass destruction."
possible_colors = list("#DD1A1A", "#DB4325", "#E02700")
force = 4
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.