Skip to content

Commit

Permalink
Stuff for things (#3969)
Browse files Browse the repository at this point in the history
* basic storyteller

* hm

* conflicts

* pain

* i think it compiles?

* still not perfect but it works

* spit, stomach acid, legs

* commit sprites and explode

* me when i explode the iron floor

* conflict time

* no more zombies_buttons

* icons

* ughhh

* tank speed runner health

* fix tank speed

* equal

* icon changes to buttons and zombies

* tank bloody hands

* PLEASE WORK

* go go go

* commit

* error gone

* remove debug info

* disable melt wall

* shitty fix

* Update bloater.dm

* Update zombie_meteor_storm.dm

* some nerfs and fixes

* Update _traits.dm

* jank

* t

* r

* m

* screenshots

---------

Co-authored-by: RikuTheKiller <[email protected]>
Co-authored-by: Shoddd <[email protected]>
Co-authored-by: Cannibal Hunter <[email protected]>
  • Loading branch information
4 people authored Nov 3, 2024
1 parent c50c46e commit 8863df2
Show file tree
Hide file tree
Showing 39 changed files with 790 additions and 134 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@
#define SPECIES_VAMPIRE "vampire"
#define SPECIES_ZOMBIE "zombie"
#define SPECIES_ZOMBIE_INFECTIOUS "memezombie"
#define SPECIES_ZOMBIE_INFECTIOUS_RUNNER "runnerzombie" //Monkestation Addition
#define SPECIES_ZOMBIE_INFECTIOUS_TANK "tankzombie" //monkestation edit
#define SPECIES_ZOMBIE_INFECTIOUS_SPITTER "spitterzombie" //monkestation edit
#define SPECIES_ZOMBIE_INFECTIOUS_BLOATER "bloaterzombie" //monkestation edit
#define SPECIES_ZOMBIE_KROKODIL "krokodil_zombie"
#define SPECIES_OOZELING "oozeling"
#define SPECIES_IPC "ipc"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/monkestation/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
#define TRAIT_GHOST_CRITTER "ghost_critter"
/// This mob is *currently* being flashed by someone with CAN_BYPASS_INNATE_FLASH_RESISTANCE returning TRUE. Used to make IPCs not immune to rev and bb conversions.
#define TRAIT_CONVERSION_FLASHED "conversion_flashed"
/// For when a mob has been consumed by a zombie
#define TRAIT_ZOMBIE_CONSUMED "zombie_consumed"

// /datum/mind + /mob/living
/// Prevents the user from casting spells using sign language. Works on both /datum/mind and /mob/living.
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/monkestation/sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@
#define FRENZY_TRAIT "frenzy_trait"
/// Source trait for slashers.
#define TRAIT_SLASHER "slasher_trait"
/// Source trait for zombies
#define ZOMBIE_TRAIT "zombie_trait"
3 changes: 3 additions & 0 deletions code/__DEFINES/~monkestation/dcs/signals/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
#define COMSIG_CHECK_TURF_CLOCKWORK "check_turf_clockwork"

#define COMSIG_ITEM_DAMAGE_MULTIPLIER "damage_multi_item"

///Sent by a tumor when its removed
#define COMSIG_ZOMBIE_TUMOR_REMOVED "zombie_tumor_removed"
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@

/// Initiates a nightmare snuff check (eats dim lights on everything within 2 tiles) with the given args. (turf/start_turf)
#define COMSIG_NIGHTMARE_SNUFF_CHECK "nightmare_snuff_check"

/// From base of /datum/species/zombie/infectious/proc/set_consumed_flesh(): (new_amount, old_amount)
#define COMSIG_ZOMBIE_FLESH_ADJUSTED "zombie_flesh_adjusted"
4 changes: 2 additions & 2 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ GLOBAL_LIST_INIT(round_end_images, world.file2list("data/image_urls.txt")) // MO
/datum/controller/subsystem/ticker/proc/build_roundend_report()
var/list/parts = list()

//might want to make this a full section
parts += "<div class='panel stationborder'><span class='header'>[("Storyteller: [SSgamemode.storyteller ? SSgamemode.storyteller.name : "N/A"]")]</span></div>" //monkestation edit
//might want to make this a full section, monkestation edit
parts += "<div class='panel stationborder'><span class='header'>[("Storyteller: [SSgamemode.current_storyteller ? SSgamemode.current_storyteller.name : "N/A"]")]</span></div>"

//AI laws
parts += law_report()
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_XENO_IMMUNE" = TRAIT_XENO_IMMUNE,
"TRAIT_XRAY_VISION" = TRAIT_XRAY_VISION,
"TRAIT_COLD_BLOODED" = TRAIT_COLD_BLOODED,
"TRAIT_ZOMBIE_CONSUMED" = TRAIT_ZOMBIE_CONSUMED,
/* "TRAIT_ADAMANTINE_EXTRACT_ARMOR" = TRAIT_ADAMANTINE_EXTRACT_ARMOR, */
/* "TRAIT_ALWAYS_WANTED" = TRAIT_ALWAYS_WANTED, */
/* "TRAIT_ANOSMIA" = TRAIT_ANOSMIA, */
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUBSYSTEM_DEF(events)
continue
var/datum/round_event_control/event = new event_type
if(!event.valid_for_map())
qdel(event)
qdel(event) //highly iffy on this as it does cause issues for admins sometimes
continue
control += event //add it to the list of all events (controls)
reschedule()
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SUBSYSTEM_DEF(statpanels)
global_data = list(
"Map: [SSmapping.config?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null,
"Storyteller: [!SSgamemode.secret_storyteller && SSgamemode.storyteller ? SSgamemode.storyteller.name : "Secret"]", //monkestation addition
"Storyteller: [!SSgamemode.secret_storyteller && SSgamemode.current_storyteller ? SSgamemode.current_storyteller.name : "Secret"]", //monkestation addition
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]",
"Round Time: [ROUND_TIME()]",
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ SUBSYSTEM_DEF(ticker)

/datum/controller/subsystem/ticker/proc/PostSetup()
set waitfor = FALSE
SSgamemode.storyteller.process(STORYTELLER_WAIT_TIME * 0.1) // we want this asap
SSgamemode.storyteller.round_started = TRUE
SSgamemode.current_storyteller.process(STORYTELLER_WAIT_TIME * 0.1) // we want this asap
SSgamemode.current_storyteller.round_started = TRUE
mode.post_setup()
GLOB.start_state = new /datum/station_state()
GLOB.start_state.count()
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/dynamic/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if(ruleset.weight <= 0 || ruleset.cost <= 0)
continue
min_threat = min(ruleset.cost, min_threat)
var/greenshift = SSgamemode.storyteller.disable_distribution //|| (threat_level < min_threat && shown_threat < min_threat) //if both shown and real threat are below any ruleset, its extended time //monkestation edit: Makes it so greenshift is based on the storyteller
var/greenshift = SSgamemode.current_storyteller.disable_distribution //|| (threat_level < min_threat && shown_threat < min_threat) //if both shown and real threat are below any ruleset, its extended time //monkestation edit: Makes it so greenshift is based on the storyteller

generate_station_goals(greenshift)
. += generate_station_goal_report()
Expand Down
24 changes: 13 additions & 11 deletions code/modules/events/_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@
/datum/round_event_control/proc/can_spawn_event(players_amt, allow_magic = FALSE, fake_check = FALSE)
SHOULD_CALL_PARENT(TRUE)
// monkestation start: event groups and storyteller stuff
if(SSgamemode.current_storyteller?.disable_distribution || SSgamemode.halted_storyteller)
return FALSE
if(event_group && !GLOB.event_groups[event_group].can_run())
return FALSE
if(roundstart && ((SSticker.round_start_time && (world.time - SSticker.round_start_time) >= 2 MINUTES) || (SSgamemode.ran_roundstart && !fake_check)))
if(roundstart && (!SSgamemode.can_run_roundstart || (SSgamemode.ran_roundstart && !fake_check && !SSgamemode.current_storyteller?.ignores_roundstart)))
return FALSE
// monkestation end
if(occurrences >= max_occurrences)
Expand All @@ -123,9 +125,8 @@
return FALSE
if(!check_enemies())
return FALSE
if(allowed_storytellers && ((islist(allowed_storytellers) && !is_type_in_list(SSgamemode.storyteller, allowed_storytellers)) || SSgamemode.storyteller.type != allowed_storytellers))
return FALSE
if(SSgamemode.storyteller.disable_distribution || SSgamemode.halted_storyteller)
if(allowed_storytellers && SSgamemode.current_storyteller && ((islist(allowed_storytellers) && \
!is_type_in_list(SSgamemode.current_storyteller, allowed_storytellers)) || SSgamemode.current_storyteller.type != allowed_storytellers))
return FALSE
// monkestation end

Expand All @@ -149,12 +150,13 @@
message_admins("Random Event triggering in [DisplayTimeText(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)]: [name]. (<a href='byond://?src=[REF(src)];cancel=1'>CANCEL</a>)")
if(!roundstart)
sleep(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)
var/players_amt = get_active_player_count(alive_check = TRUE, afk_check = TRUE, human_check = TRUE)
if(!can_spawn_event(players_amt, fake_check = TRUE) && !forced)
message_admins("Second pre-condition check for [name] failed, skipping...")
return EVENT_INTERRUPTED
if(!can_spawn_event(players_amt, fake_check = TRUE) && forced)
message_admins("Second pre-condition check for [name] failed, but event forced, running event regardless this may have issues...")

if(!can_spawn_event(get_active_player_count(alive_check = TRUE, afk_check = TRUE, human_check = TRUE), fake_check = TRUE) && !forced)
if(!forced)
message_admins("Second pre-condition check for [name] failed, skipping...")
return EVENT_INTERRUPTED
else if(forced)
message_admins("Second pre-condition check for [name] failed, but event forced, running event regardless this may have issues...")

if(!triggering)
return EVENT_CANCELLED //admin cancelled
Expand Down Expand Up @@ -346,7 +348,7 @@ Runs the event
if("schedule")
message_admins("[key_name_admin(usr)] scheduled event [src.name].")
log_admin_private("[key_name(usr)] scheduled [src.name].")
SSgamemode.storyteller.buy_event(src, src.track)
SSgamemode.current_storyteller.buy_event(src, src.track)
if("force_next")
if(length(src.admin_setup))
for(var/datum/event_admin_setup/admin_setup_datum in src.admin_setup)
Expand Down
14 changes: 13 additions & 1 deletion code/modules/mob/living/carbon/human/species_types/zombies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,23 @@

/datum/species/zombie/infectious/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
C.AddComponent(/datum/component/mutant_hands, mutant_hand_path = /obj/item/mutant_hand/zombie)
C.AddComponent(/datum/component/mutant_hands, mutant_hand_path = hand_path) //monkestation edit: replaces the original mutant_hand_path with hand_path
//monkestation edit start
for(var/datum/action/granted_action as anything in granted_action_types)
granted_action = new granted_action
granted_action.Grant(C)
granted_actions += granted_action
//monkestation edit end

/datum/species/zombie/infectious/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
. = ..()
qdel(C.GetComponent(/datum/component/mutant_hands))
//monkestation edit start
for(var/datum/action/removed_action in granted_actions)
granted_actions -= removed_action
removed_action.Remove(C)
qdel(removed_action)
//monkestation edit end

/datum/species/zombie/infectious/check_roundstart_eligible()
return FALSE
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions code/modules/zombie/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
if(!proximity_flag)
return
else if(isliving(target))
var/mob/living/living_target = target
if(!highly_infecious && living_target.stat != DEAD)
return
if(ishuman(target))
try_to_zombie_infect(target, user, user.zone_selected)
else
/*else monkestation temp removal
. |= AFTERATTACK_PROCESSED_ITEM
check_feast(target, user)
check_feast(target, user)*/

/proc/try_to_zombie_infect(mob/living/carbon/human/target, mob/living/user, def_zone = BODY_ZONE_CHEST)
CHECK_DNA_AND_SPECIES(target)
Expand Down Expand Up @@ -84,3 +87,10 @@
user.updatehealth()
user.adjustOrganLoss(ORGAN_SLOT_BRAIN, -hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!"
user.set_nutrition(min(user.nutrition + hp_gained, NUTRITION_LEVEL_FULL))
//monkestation edit start
if(iszombie(user))
var/mob/living/carbon/carbon_user = user
var/datum/species/zombie/infectious/zombie_datum = carbon_user.dna.species
zombie_datum.consumed_flesh += hp_gained
//monkestation edit end

Binary file modified icons/mob/actions/backgrounds.dmi
Binary file not shown.
9 changes: 9 additions & 0 deletions monkestation/code/modules/antagonists/zombies/items.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/obj/item/mutant_hand/zombie
///can we infect living people or not
var/highly_infecious = TRUE

/obj/item/mutant_hand/zombie/low_infection
highly_infecious = FALSE

/obj/item/mutant_hand/zombie/low_infection/weak
force = 17
109 changes: 109 additions & 0 deletions monkestation/code/modules/antagonists/zombies/zombie_meteor_storm.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
//this is its own event type due to having a bunch of unique logic
/datum/round_event_control/zombie_meteor_wave
name = "Meteor Wave: Zombies"
typepath = /datum/round_event/zombie_meteor_wave
weight = 0
max_occurrences = 0
category = EVENT_CATEGORY_SPACE
description = "Spawn a wave of meteors containing zombies."
admin_setup = list(/datum/event_admin_setup/input_number/zombie_meteor_count)

/datum/round_event/zombie_meteor_wave
start_when = 1
end_when = 3
var/meteor_count = 3

/datum/round_event/zombie_meteor_wave/start()
. = ..()
generate_meteors(meteor_count)

/datum/round_event/zombie_meteor_wave/proc/generate_meteors(count = 1)
if(!count)
return

var/list/candidates = SSpolling.poll_ghost_candidates("Would you like to be considered for a zombie meteor?", poll_time = 30 SECONDS)
if(!length(candidates))
return

for(var/i in 1 to count)
var/mob/dead/selected = pick_n_take(candidates)
var/datum/mind/player_mind = new(selected.key)
player_mind.active = TRUE

var/turf/picked_start
if (SSmapping.is_planetary())
var/list/possible_start = list()
for(var/obj/effect/landmark/carpspawn/spawn_point in GLOB.landmarks_list)
possible_start += get_turf(spawn_point)
picked_start = pick(possible_start)
else
var/start_z = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
var/start_side = pick(GLOB.cardinals)
picked_start = spaceDebrisStartLoc(start_side, start_z)

if (!picked_start)
stack_trace("No valid spawn location for zombie meteor")

var/mob/living/carbon/human/new_mob = new
var/obj/effect/meteor/meaty/zombie/zombie_meteor = new(picked_start, get_random_station_turf())
new_mob.set_species(/datum/species/zombie/infectious)
new_mob.forceMove(zombie_meteor)
player_mind.transfer_to(new_mob, TRUE)
SEND_SOUND(new_mob, 'sound/magic/mutate.ogg')
message_admins("[ADMIN_LOOKUPFLW(new_mob)] has been made into a zombie by an event.")
new_mob.log_message("was spawned as a zombie by an event.", LOG_GAME)
if(!length(candidates))
break

/datum/event_admin_setup/input_number/zombie_meteor_count
input_text = "How many meteors would you like?"
default_value = 3

/datum/event_admin_setup/input_number/zombie_meteor_count/apply_to_event(datum/round_event/zombie_meteor_wave/event)
event.meteor_count = chosen_value

/obj/effect/meteor/meaty/zombie
name = "rotting meaty meteor"
desc = "A loosely packed knit of flesh and skin, pulsating with unlife."
color = "#5EFF00"
heavy = FALSE
hits = 1 //Instantly splatters apart when it hits anything.
hitpwr = EXPLODE_LIGHT
threat = 100
signature = "rotting lifesign" //In the extremely unlikely one-in-a-million chance that one of these gets reported by the stray meteor event
///Where we want our zombie to, by whatever means, end up at.
var/atom/landing_target

/obj/effect/meteor/meaty/zombie/Initialize(mapload, turf/target)
. = ..()
landing_target = target

/obj/effect/meteor/meaty/zombie/meteor_effect()
..()
for(var/atom/movable/child in contents)
child.forceMove(get_turf(src))

/obj/effect/meteor/meaty/zombie/ram_turf()
return //So we don't instantly smash into our occupant upon unloading them.

/obj/effect/meteor/meaty/zombie/shield_defense(obj/machinery/satellite/meteor_shield/defender)
landing_target = defender
return TRUE

//If the meteor misses the station and deletes itself, we make absolutely sure the changeling reaches the station.
/obj/effect/meteor/meaty/zombie/handle_stopping()
if(!landing_target)
//If our destination turf is gone for some reason, we chuck them at the observer_start landmark (usually at the center of the station) as a last resort.
landing_target = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list

for(var/atom/movable/zombie in contents)
zombie.forceMove(get_turf(src))
zombie.throw_at(landing_target, 2, 2)
zombie.visible_message(span_warning("[zombie] is launched out from inside of the [name]"), \
span_warning("Sensing that something is terribly wrong, we forcibly eject ourselves from the [name]!"))
playsound(zombie, 'sound/effects/splat.ogg', 50, pressure_affected = FALSE)

return ..()

/obj/effect/meteor/meaty/zombie/check_examine_award(mob/user) //We don't want this to be a free achievement that comes with the role.
return
Loading

0 comments on commit 8863df2

Please sign in to comment.