Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed May 26, 2024
2 parents 2803c97 + 1cbf6af commit 7692ec0
Show file tree
Hide file tree
Showing 32 changed files with 102 additions and 1,200 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,9 @@ GLOBAL_LIST_INIT(layers_to_offset, list(
/// Types of bullets that mining mobs take full damage from
#define MINING_MOB_PROJECTILE_VULNERABILITY list(BRUTE)

/// Helper macro that determines if the mob is at the threshold to start vomitting due to high toxin levels
#define AT_TOXIN_VOMIT_THRESHOLD(mob) (mob.getToxLoss() > 45 && mob.nutrition > 20)

/// The duration of the flip emote animation
#define FLIP_EMOTE_DURATION 0.7 SECONDS

Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#define ROLE_OPERATIVE_MIDROUND "Operative (Midround)"
#define ROLE_PARADOX_CLONE "Paradox Clone"
#define ROLE_REV_HEAD "Head Revolutionary"
#define ROLE_SENTIENT_DISEASE "Sentient Disease"
#define ROLE_SLEEPER_AGENT "Syndicate Sleeper Agent"
#define ROLE_SPACE_DRAGON "Space Dragon"
#define ROLE_SPIDER "Spider"
Expand Down Expand Up @@ -150,7 +149,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_OPERATIVE_MIDROUND = 14,
ROLE_PARADOX_CLONE = 0,
ROLE_REVENANT = 0,
ROLE_SENTIENT_DISEASE = 0,
ROLE_SLEEPER_AGENT = 0,
ROLE_SPACE_DRAGON = 0,
ROLE_SPIDER = 0,
Expand Down
20 changes: 0 additions & 20 deletions code/controllers/subsystem/dynamic/dynamic_rulesets_midround.dm
Original file line number Diff line number Diff line change
Expand Up @@ -756,26 +756,6 @@
log_game("[key_name(revenant)] was spawned as a revenant by the midround ruleset.")
return revenant

/// Midround Sentient Disease Ruleset (From Ghosts)
/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease
name = "Sentient Disease"
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_datum = /datum/antagonist/disease
antag_flag = ROLE_SENTIENT_DISEASE
required_candidates = 1
minimum_players = 25
weight = 4
cost = 8
repeatable = TRUE

/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease/generate_ruleset_body(mob/applicant)
var/mob/camera/disease/virus = new /mob/camera/disease(SSmapping.get_station_center())
virus.key = applicant.key
INVOKE_ASYNC(virus, TYPE_PROC_REF(/mob/camera/disease, pick_name))
message_admins("[ADMIN_LOOKUPFLW(virus)] has been made into a sentient disease by the midround ruleset.")
log_game("[key_name(virus)] was spawned as a sentient disease by the midround ruleset.")
return virus

/// Midround Space Pirates Ruleset (From Ghosts)
/datum/dynamic_ruleset/midround/pirates
name = "Space Pirates"
Expand Down
3 changes: 0 additions & 3 deletions code/datums/components/infective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
RegisterSignal(parent, COMSIG_GLASS_DRANK, PROC_REF(try_infect_drink))
if(isorgan(parent))
RegisterSignal(parent, COMSIG_ORGAN_IMPLANTED, PROC_REF(on_organ_insertion))
else if(istype(parent, /obj/effect/decal/cleanable/blood/gibs))
RegisterSignal(parent, COMSIG_GIBS_STREAK, PROC_REF(try_infect_streak))

/datum/component/infective/proc/on_organ_insertion(obj/item/organ/target, mob/living/carbon/receiver)
SIGNAL_HANDLER
Expand Down Expand Up @@ -180,6 +178,5 @@
COMSIG_ITEM_EQUIPPED,
COMSIG_GLASS_DRANK,
COMSIG_ORGAN_IMPLANTED,
COMSIG_GIBS_STREAK,
))
qdel(GetComponent(/datum/component/connect_loc_behalf))
23 changes: 23 additions & 0 deletions code/datums/status_effects/debuffs/tox_vomit.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// Simple status effect applied when a mob has high toxins and starts to vomit regularly
/datum/status_effect/tox_vomit
id = "vomitting_from_toxins"
tick_interval = 2 SECONDS
alert_type = null
/// Has a chance to count up every tick, until it reaches a threshold, which causes the mob to vomit and resets
VAR_PRIVATE/puke_counter = 0

/datum/status_effect/tox_vomit/tick(seconds_between_ticks)
if(!AT_TOXIN_VOMIT_THRESHOLD(owner))
qdel(src)
return

if(owner.stat == DEAD || HAS_TRAIT(owner, TRAIT_STASIS))
return

puke_counter += SPT_PROB(30, seconds_between_ticks)
if(puke_counter < 50) // This is like 150 seconds apparently according to old comments
return

var/mob/living/carbon/human/sick_guy = owner
sick_guy.vomit(VOMIT_CATEGORY_DEFAULT, lost_nutrition = 20)
puke_counter = 0
8 changes: 2 additions & 6 deletions code/game/objects/effects/decals/cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,13 @@
drydesc = "They look bloody and gruesome while some terrible smell fills the air."
decal_reagent = /datum/reagent/consumable/liquidgibs
reagent_amount = 5
///Information about the diseases our streaking spawns
var/list/streak_diseases

/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
. = ..()
AddElement(/datum/element/squish_sound)
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, PROC_REF(on_pipe_eject))

/obj/effect/decal/cleanable/blood/gibs/Destroy()
LAZYNULL(streak_diseases)
return ..()

/obj/effect/decal/cleanable/blood/gibs/replace_decal(obj/effect/decal/cleanable/C)
Expand All @@ -147,8 +144,7 @@
streak(dirs)

/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions, mapload=FALSE)
LAZYINITLIST(streak_diseases)
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, streak_diseases)
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions)
var/direction = pick(directions)
var/delay = 2
var/range = pick(0, 200; 1, 150; 2, 50; 3, 17; 50) //the 3% chance of 50 steps is intentional and played for laughs.
Expand All @@ -170,7 +166,7 @@
SIGNAL_HANDLER
if(NeverShouldHaveComeHere(loc))
return
new /obj/effect/decal/cleanable/blood/splatter(loc, streak_diseases)
new /obj/effect/decal/cleanable/blood/splatter(loc)

/obj/effect/decal/cleanable/blood/gibs/up
icon_state = "gibup1"
Expand Down
1 change: 0 additions & 1 deletion code/modules/admin/sql_ban_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@
ROLE_REV,
ROLE_REVENANT,
ROLE_REV_HEAD,
ROLE_SENTIENT_DISEASE,
ROLE_SPIDER,
ROLE_SPY,
ROLE_SYNDICATE,
Expand Down
Loading

0 comments on commit 7692ec0

Please sign in to comment.