fix
This commit is contained in:
@@ -157,6 +157,9 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
BM.overmind = null
|
||||
BM.update_icons()
|
||||
GLOB.overminds -= src
|
||||
blob_mobs = null
|
||||
resource_blobs = null
|
||||
blobs_legit = null
|
||||
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
|
||||
|
||||
@@ -70,16 +70,10 @@
|
||||
O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm."
|
||||
objectives += O
|
||||
if(4) //flavor
|
||||
if(helping_station)
|
||||
var/datum/objective/flavor/ninja_helping/O = new /datum/objective/flavor/ninja_helping
|
||||
O.owner = owner
|
||||
O.forge_objective()
|
||||
objectives += O
|
||||
else
|
||||
var/datum/objective/flavor/ninja_syndie/O = new /datum/objective/flavor/ninja_helping
|
||||
O.owner = owner
|
||||
O.forge_objective()
|
||||
objectives += O
|
||||
var/datum/objective/flavor/O = helping_station ? new /datum/objective/flavor/ninja_helping : new /datum/objective/flavor/ninja_syndie
|
||||
O.owner = owner
|
||||
O.forge_objective()
|
||||
objectives += O
|
||||
else
|
||||
break
|
||||
var/datum/objective/O = new /datum/objective/survive()
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //alien immune to tox damage
|
||||
return FALSE
|
||||
|
||||
/* CIT CHANGE - Pffffffffffffhahahahahhaha-- No.
|
||||
//aliens are immune to stamina damage.
|
||||
/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_health = 1)
|
||||
/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/setStaminaLoss(amount, updating_health = 1)
|
||||
/mob/living/carbon/alien/setStaminaLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
return
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,12 @@
|
||||
. = ..()
|
||||
if(!HAS_TRAIT(src, TRAIT_AUTO_CATCH_ITEM) && !skip_throw_mode_check && !in_throw_mode)
|
||||
return
|
||||
if(get_active_held_item() || restrained())
|
||||
if(incapacitated())
|
||||
return
|
||||
if (get_active_held_item())
|
||||
if (HAS_TRAIT_FROM(src, TRAIT_AUTO_CATCH_ITEM,RISING_BASS_TRAIT))
|
||||
visible_message("<span class='warning'>[src] chops [I] out of the air!</span>")
|
||||
return TRUE
|
||||
return
|
||||
I.attack_hand(src)
|
||||
if(get_active_held_item() == I) //if our attack_hand() picks up the item...
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
. += 6 - 3*get_num_arms() //crawling is harder with fewer arms
|
||||
if(legcuffed)
|
||||
. += legcuffed.slowdown
|
||||
if(stat == SOFT_CRIT)
|
||||
. += SOFTCRIT_ADD_SLOWDOWN
|
||||
|
||||
/mob/living/carbon/slip(knockdown_amount, obj/O, lube)
|
||||
if(movement_type & FLYING && !(lube & FLYING_DOESNT_HELP))
|
||||
|
||||
@@ -49,9 +49,14 @@
|
||||
if (mind.martial_art && mind.martial_art.dodge_chance)
|
||||
if(!lying && dna && !dna.check_mutation(HULK))
|
||||
if(prob(mind.martial_art.dodge_chance))
|
||||
var/dodgemessage = pick("dodges under the projectile!","dodges to the right of the projectile!","jumps over the projectile!")
|
||||
visible_message("<span class='danger'>[src] [dodgemessage]</span>", "<span class='userdanger'>You dodge the projectile!</span>")
|
||||
return BULLET_ACT_BLOCK
|
||||
var/static/dodgemessages = list("dodges under",0,-4,"dodges to the right of",-4,0,"dodges to the left of",4,0,"jumps over",0,4)
|
||||
var/pick = pick(1,4,7,10)
|
||||
var/oldx = pixel_x
|
||||
var/oldy = pixel_y
|
||||
animate(src,pixel_x = pixel_x + dodgemessages[pick+1],pixel_y = pixel_y + dodgemessages[pick+2],time=3)
|
||||
animate(src,pixel_x = oldx,pixel_y = oldy,time=2)
|
||||
visible_message("<span class='danger'>[src] [dodgemessages[pick]] the projectile!</span>", "<span class='userdanger'>You dodge the projectile!</span>")
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
if(mind.martial_art && !incapacitated(FALSE, TRUE) && mind.martial_art.can_use(src) && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
|
||||
if(prob(mind.martial_art.deflection_chance))
|
||||
if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
H.vomit(0, FALSE, FALSE, 2, TRUE)
|
||||
var/obj/effect/decal/cleanable/vomit/V = locate() in pos
|
||||
if(V)
|
||||
H.reagents.trans_id_to(V, chem, chem.volume)
|
||||
H.reagents.trans_id_to(V, chem.type, chem.volume)
|
||||
playsound(pos, 'sound/effects/splat.ogg', 50, 1)
|
||||
H.visible_message("<span class='danger'>[H] vomits on the floor!</span>", \
|
||||
"<span class='userdanger'>You throw up on the floor!</span>")
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
var/start_open = TRUE // unless this var is set to 1
|
||||
var/icon_state_closed = "laptop-closed"
|
||||
var/w_class_open = WEIGHT_CLASS_BULKY
|
||||
var/slowdown_open = TRUE
|
||||
|
||||
/obj/item/modular_computer/laptop/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -92,11 +91,9 @@
|
||||
/obj/item/modular_computer/laptop/proc/toggle_open(mob/living/user=null)
|
||||
if(screen_on)
|
||||
to_chat(user, "<span class='notice'>You close \the [src].</span>")
|
||||
slowdown = initial(slowdown)
|
||||
w_class = initial(w_class)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You open \the [src].</span>")
|
||||
slowdown = slowdown_open
|
||||
w_class = w_class_open
|
||||
|
||||
screen_on = !screen_on
|
||||
|
||||
@@ -303,6 +303,8 @@
|
||||
if(R.overdose_threshold)
|
||||
if(R.volume > R.overdose_threshold && !R.overdosed)
|
||||
R.overdosed = 1
|
||||
var/turf/CT = get_turf(C)
|
||||
log_reagent("OVERDOSE START: [key_name(C)] at [AREACOORD(CT)] started overdosing on [R.volume] units of [R].")
|
||||
need_mob_update += R.overdose_start(C)
|
||||
if(R.addiction_threshold)
|
||||
if(R.volume > R.addiction_threshold && !is_type_in_list(R, cached_addictions))
|
||||
@@ -347,6 +349,9 @@
|
||||
/datum/reagents/proc/remove_addiction(datum/reagent/R)
|
||||
to_chat(my_atom, "<span class='notice'>You feel like you've gotten over your need for [R.name].</span>")
|
||||
SEND_SIGNAL(my_atom, COMSIG_CLEAR_MOOD_EVENT, "[R.type]_overdose")
|
||||
if(ismob(my_atom))
|
||||
var/turf/T = get_turf(my_atom)
|
||||
log_reagent("OVERDOSE STOP: [key_name(my_atom)] at [AREACOORD(T)] got over their need for [R].")
|
||||
addiction_list.Remove(R)
|
||||
qdel(R)
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
current_cycle++
|
||||
if(holder)
|
||||
holder.remove_reagent(type, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
//called when a mob processes chems when dead.
|
||||
/datum/reagent/proc/on_mob_dead(mob/living/carbon/M)
|
||||
@@ -87,15 +86,15 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
current_cycle++
|
||||
if(holder)
|
||||
holder.remove_reagent(type, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
// Called when this reagent is first added to a mob
|
||||
/datum/reagent/proc/on_mob_add(mob/living/L, amount)
|
||||
if(!iscarbon(L))
|
||||
return
|
||||
var/mob/living/carbon/M = L
|
||||
var/turf/T = get_turf(M)
|
||||
log_reagent("MOB ADD: on_mob_add(): [key_name(M)] at [AREACOORD(T)] - [volume] of [type] with [purity] purity")
|
||||
if (purity == 1)
|
||||
log_game("CHEM: [L] ckey: [L.key] has ingested [volume]u of [type]")
|
||||
return
|
||||
if(cached_purity == 1)
|
||||
cached_purity = purity
|
||||
@@ -112,20 +111,18 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
R.name = name//Negative effects are hidden
|
||||
if(R.chemical_flags & REAGENT_INVISIBLE)
|
||||
R.chemical_flags |= (REAGENT_INVISIBLE)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [inverse_chem]")
|
||||
return
|
||||
log_reagent("MOB ADD: on_mob_add() (impure): merged [volume] of [inverse_chem]")
|
||||
else if (impure_chem)
|
||||
var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
|
||||
if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
|
||||
M.reagents.remove_reagent(type, (impureVol), FALSE)
|
||||
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [type]")
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [impure_chem]")
|
||||
return
|
||||
log_reagent("MOB ADD: on_mob_add() (mixed purity): merged [volume - impureVol] of [type] and [volume] of [impure_chem]")
|
||||
|
||||
// Called when this reagent is removed while inside a mob
|
||||
/datum/reagent/proc/on_mob_delete(mob/living/L)
|
||||
return
|
||||
var/turf/T = get_turf(L)
|
||||
log_reagent("MOB DELETE: on_mob_delete: [key_name(L)] at [AREACOORD(T)] - [type]")
|
||||
|
||||
// Called when this reagent first starts being metabolized by a liver
|
||||
/datum/reagent/proc/on_mob_metabolize(mob/living/L)
|
||||
@@ -146,8 +143,9 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
/datum/reagent/proc/on_merge(data, amount, mob/living/carbon/M, purity)
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
var/turf/T = get_turf(M)
|
||||
log_reagent("MOB ADD: on_merge(): [key_name(M)] at [AREACOORD(T)] - [volume] of [type] with [purity] purity")
|
||||
if (purity == 1)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [type]")
|
||||
return
|
||||
cached_purity = purity //purity SHOULD be precalculated from the add_reagent, update cache.
|
||||
if (purity < 0)
|
||||
@@ -163,16 +161,13 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
R.name = name//Negative effects are hidden
|
||||
if(R.chemical_flags & REAGENT_INVISIBLE)
|
||||
R.chemical_flags |= (REAGENT_INVISIBLE)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [inverse_chem]")
|
||||
return
|
||||
log_reagent("MOB ADD: on_merge() (impure): merged [volume] of [inverse_chem]")
|
||||
else if (impure_chem) //SPLIT
|
||||
var/impureVol = amount * (1 - purity)
|
||||
if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
|
||||
M.reagents.remove_reagent(type, impureVol, FALSE)
|
||||
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [type]")
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [impure_chem]")
|
||||
return
|
||||
log_reagent("MOB ADD: on_merge() (mixed purity): merged [volume - impureVol] of [type] and [volume] of [impure_chem]")
|
||||
|
||||
/datum/reagent/proc/on_update(atom/A)
|
||||
return
|
||||
@@ -188,31 +183,26 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
/datum/reagent/proc/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You feel like you took too much of [name]!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/overdose, name)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage1(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/withdrawal_light, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like having some [name] right about now.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage2(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/withdrawal_medium, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like you need [name]. You just can't get enough.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage3(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/withdrawal_severe, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='danger'>You have an intense craving for [name].</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage4(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/withdrawal_critical, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='boldannounce'>You're not feeling good at all! You really need some [name].</span>")
|
||||
return
|
||||
|
||||
/proc/pretty_string_from_reagent_list(list/reagent_list)
|
||||
//Convert reagent list to a printable string for logging etc
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
else
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[1]
|
||||
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
@@ -123,28 +122,34 @@
|
||||
if(thrown)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = target
|
||||
var/R
|
||||
var/R = reagents.log_list()
|
||||
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += "[A.type] ([A.volume]),"
|
||||
|
||||
if(thrownby)
|
||||
var/turf/TT = get_turf(target)
|
||||
var/throwerstring
|
||||
if(thrownby && thrown)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
|
||||
log_reagent("SPLASH: [src] mob SplashReagents() onto [key_name(target)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
|
||||
else if(bartender_check(target) && thrown)
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
transform = initial(transform)
|
||||
addtimer(CALLBACK(src, .proc/ForceResetRotation), 1)
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "in [AREACOORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [AREACOORD(target)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [ADMIN_VERBOSEJMP(target)].")
|
||||
var/turf/T = get_turf(target)
|
||||
var/throwerstring
|
||||
if(thrownby && thrown)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] ([AREACOORD(AT)])"
|
||||
log_reagent("SPLASH - [src] object SplashReagents() onto [target] at [T] ([AREACOORD(T)])[throwerstring] - [reagents.log_list()]")
|
||||
visible_message("<span class='notice'>[src] spills its contents all over [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -29,20 +29,30 @@
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
log_combat(user, M, "splashed", R)
|
||||
var/turf/UT = get_turf(user)
|
||||
var/turf/MT = get_turf(M)
|
||||
var/turf/OT = get_turf(target)
|
||||
log_reagent("SPLASH: attack(target mob [key_name(M)] at [AREACOORD(MT)], from user [key_name(user)] at [AREACOORD(UT)], target object [target] at [AREACOORD(OT)]) - [R]")
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
var/self_fed = M == user
|
||||
if(!self_fed)
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
|
||||
log_combat(user, M, "is attempting to feed", reagents.log_list())
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
var/turf/UT = get_turf(user) // telekenesis memes
|
||||
var/turf/MT = get_turf(M)
|
||||
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
log_reagent("INGESTION: FED BY: [key_name(user)] (loc [user.loc] at [AREACOORD(UT)]) -> [key_name(M)] (loc [M.loc] at [AREACOORD(MT)]) - [reagents.log_list()]")
|
||||
else
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
log_reagent("INGESTION: SELF: [key_name(user)] (loc [user.loc] at [AREACOORD(T)]) - [reagents.log_list()]")
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5, null, null, null, self_fed? "self swallowed" : "fed by [user]"), 5)
|
||||
@@ -325,6 +335,8 @@
|
||||
if (slot == SLOT_HEAD)
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
|
||||
var/R = reagents.log_list()
|
||||
log_reagent("SPLASH: [user] splashed [src] on their head via bucket/equipped(self, SLOT_HEAD) - [R]")
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
reagent_flags = NONE
|
||||
|
||||
Reference in New Issue
Block a user