Merge branch 'master' into master

This commit is contained in:
Thalpy
2019-07-21 01:50:41 +01:00
committed by GitHub
115 changed files with 1351 additions and 473 deletions
@@ -44,6 +44,7 @@
var/DoNotSplit = FALSE // If impurity is handled within the main chem itself
var/OnMobMergeCheck = FALSE //Call on_mob_life proc when reagents are merging.
var/metabolizing = FALSE
var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers.
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
. = ..()
@@ -323,7 +323,7 @@
victim.blind_eyes(2)
victim.confused = max(M.confused, 3)
victim.damageoverlaytemp = 60
victim.Knockdown(60, override_stamdmg = min(reac_volume * 3, 15))
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 3, 15))
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim.blur_eyes(3)
@@ -336,7 +336,7 @@
victim.blind_eyes(3)
victim.confused = max(M.confused, 6)
victim.damageoverlaytemp = 75
victim.Knockdown(100, override_stamdmg = min(reac_volume * 5, 25))
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 5, 25))
victim.update_damage_hud()
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
@@ -1993,3 +1993,41 @@
P.length += added_length
P.update()
..()
/datum/reagent/changeling_string
name = "UNKNOWN"
id = "changeling_sting_real"
description = "404: Chemical not found."
metabolization_rate = REAGENTS_METABOLISM
color = "#0000FF"
can_synth = FALSE
var/datum/dna/original_dna
var/reagent_ticks = 0
invisible = TRUE
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
if(C && C.dna && data["desired_dna"])
original_dna = new C.dna.type
C.dna.copy_dna(original_dna)
var/datum/dna/new_dna = data["desired_dna"]
new_dna.copy_dna(C.dna)
C.real_name = new_dna.real_name
C.updateappearance(mutcolor_update=1)
C.update_body()
C.domutcheck()
C.regenerate_icons()
..()
/datum/reagent/changeling_string/on_mob_end_metabolize(mob/living/carbon/C)
if(original_dna)
original_dna.copy_dna(C.dna)
C.real_name = original_dna.real_name
C.updateappearance(mutcolor_update=1)
C.update_body()
C.domutcheck()
C.regenerate_icons()
..()
/datum/reagent/changeling_string/Destroy()
qdel(original_dna)
return ..()
@@ -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
item_flags = NOBLUDGEON | 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)