Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions code/__DEFINES/~darkpack/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
*/

// CITY_TRAITS
#define STATION_TRAIT_RED_STAR "station_trait_red_star"
#define STATION_TRAIT_WILD_MASQUERADE "station_trait_wild_masquerade"
#define STATION_TRAIT_BLACKOUT "station_trait_blackout"
#define STATION_TRAIT_COSPLAY_CONVENTION "station_trait_cosplay_convention"
#define STATION_TRAIT_INFESTATION "station_trait_infestation"
#define STATION_TRAIT_PEST_CONTROL "station_trait_pest_control"
#define STATION_TRAIT_RED_STAR "station_trait_red_star"
#define STATION_TRAIT_STRAY_MIGRATION "station_trait_stray_migration"
#define STATION_TRAIT_COSPLAY_CONVENTION "station_trait_cosplay_convention"
#define STATION_TRAIT_WILD_MASQUERADE "station_trait_wild_masquerade"

// Mob traits

Expand Down
7 changes: 4 additions & 3 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"STATION_TRAIT_UNNATURAL_ATMOSPHERE" = STATION_TRAIT_UNNATURAL_ATMOSPHERE,
"STATION_TRAIT_SPIKED_DRINKS" = STATION_TRAIT_SPIKED_DRINKS,
"STATION_TRAIT_SPAWN_WEAKPOINTS" = STATION_TRAIT_SPAWN_WEAKPOINTS,
"STATION_TRAIT_RED_STAR" = STATION_TRAIT_RED_STAR, // DARKPACK EDIT ADD START - CITY_TRAITS
"STATION_TRAIT_WILD_MASQUERADE" = STATION_TRAIT_WILD_MASQUERADE,
"STATION_TRAIT_BLACKOUT" = STATION_TRAIT_BLACKOUT, // DARKPACK EDIT ADD START - CITY_TRAITS
"STATION_TRAIT_COSPLAY_CONVENTION" = STATION_TRAIT_COSPLAY_CONVENTION,
"STATION_TRAIT_INFESTATION" = STATION_TRAIT_INFESTATION,
"STATION_TRAIT_PEST_CONTROL" = STATION_TRAIT_PEST_CONTROL,
"STATION_TRAIT_RED_STAR" = STATION_TRAIT_RED_STAR,
"STATION_TRAIT_STRAY_MIGRATION" = STATION_TRAIT_STRAY_MIGRATION,
"STATION_TRAIT_COSPLAY_CONVENTION" = STATION_TRAIT_COSPLAY_CONVENTION, // DARKPACK EDIT ADD END
"STATION_TRAIT_WILD_MASQUERADE" = STATION_TRAIT_WILD_MASQUERADE, // DARKPACK EDIT ADD END
),
/datum/deathmatch_lobby = list(
"TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS" = TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

/datum/station_trait/thunder_storm/on_round_start()
. = ..()
SSweather.run_weather(/datum/weather/rain_storm/endless)
SSweather.run_weather(/datum/weather/particle/rain_storm/endless)

/datum/weather/rain_storm/endless
/datum/weather/particle/rain_storm/endless
name = "endless rain"
probability = 0
target_trait = ZTRAIT_STATION
Expand All @@ -36,6 +36,9 @@
trait_type = STATION_TRAIT_NEGATIVE
can_revert = FALSE
darkpack_allowed = TRUE
trait_to_give = STATION_TRAIT_BLACKOUT
newspaper_message = "We continue to recive delays from city officals on estimates when power will be returned city-wide."
newspaper_chance = 60

/datum/station_trait/faulty_power_grid/on_round_start()
. = ..()
Expand Down
20 changes: 18 additions & 2 deletions modular_darkpack/modules/events/code/blackout_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
typepath = /datum/round_event/blackout
weight = 6
min_players = 5
max_occurrences = 2
max_occurrences = 1
earliest_start = 10 MINUTES
category = EVENT_CATEGORY_ENGINEERING
description = "A cascading failure in the city's power grid."
darkpack_allowed = TRUE

/datum/round_event_control/darkpack/blackout/can_spawn_event(players_amt, allow_magic)
. = ..()
if(HAS_TRAIT(SSstation, STATION_TRAIT_BLACKOUT))
return FALSE // Dont piss in my soup twice.
if(!round_has_engineers())
return FALSE

/datum/round_event/blackout
start_when = 1
announce_when = 5
Expand All @@ -26,5 +33,14 @@
for(var/obj/fusebox/F in GLOB.fuseboxes)
if(prob(50))
continue
F.take_damage(101)
F.take_damage(rand(75,200))
F.power_off()

/// Check for if anyone is around to repair damage done to the city.
/proc/round_has_engineers()
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(!H.mind)
continue
if(istype(H.mind.assigned_role, /datum/job/vampire/janitor) && !considered_afk(H.mind)) // IF we add an engieneer role make it that.
return TRUE
return FALSE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
typepath = /datum/round_event/szlachta
weight = 3
min_players = 10
max_occurrences = 2
max_occurrences = 1
earliest_start = 90 MINUTES
category = EVENT_CATEGORY_INVASION
description = "Roving, loose szlachta have found their way into the city."
Expand Down
Loading