Skip to content

Commit

Permalink
Merge branch 'Skyrat-SS13:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
xXPawnStarrXx authored Jun 1, 2024
2 parents ead7f4c + aa3a94d commit d8f3d72
Show file tree
Hide file tree
Showing 60 changed files with 5,614 additions and 4,473 deletions.
1,408 changes: 705 additions & 703 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm

Large diffs are not rendered by default.

7,836 changes: 4,310 additions & 3,526 deletions _maps/map_files/MetaStation/MetaStation.dmm

Large diffs are not rendered by default.

322 changes: 164 additions & 158 deletions _maps/map_files/tramstation/tramstation.dmm

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions code/__DEFINES/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@
#define RULESET_FORCE_ENABLED "force enabled"
/// Ruleset should not run regardless of population and threat available
#define RULESET_FORCE_DISABLED "force disabled"

// Flavor ruletypes, used by station traits
/// Rulesets selected by dynamic at default
#define RULESET_CATEGORY_DEFAULT (1 << 0)
/// Rulesets not including crew antagonists, non-witting referring to antags like obsessed which aren't really enemies of the station
#define RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS (1 << 1)
5 changes: 5 additions & 0 deletions code/__DEFINES/fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@

///Fluff. The name of the aquarium company shown in the fish catalog
#define AQUARIUM_COMPANY "Aquatech Ltd."

/// how long between electrogenesis zaps
#define ELECTROGENESIS_DURATION 40 SECONDS
/// a random range the electrogenesis cooldown varies by
#define ELECTROGENESIS_VARIANCE (rand(-10 SECONDS, 10 SECONDS))
5 changes: 5 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Allows you to hear speech through walls
#define TRAIT_XRAY_HEARING "xray_hearing"

/// This mob can not enter or move on a shuttle
#define TRAIT_BLOCK_SHUTTLE_MOVEMENT "block_shuttle_movement"

/// Lets us scan reagents
#define TRAIT_REAGENT_SCANNER "reagent_scanner"
/// Lets us scan machine parts and tech unlocks
Expand Down Expand Up @@ -906,6 +909,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_FISH_NO_HUNGER "fish_no_hunger"
///It comes from a fish case. Relevant for bounties so far.
#define TRAIT_FISH_FROM_CASE "fish_from_case"
///Fish will also occasionally fire weak tesla zaps
#define TRAIT_FISH_ELECTROGENESIS "fish_electrogenesis"

/// Trait given to angelic constructs to let them purge cult runes
#define TRAIT_ANGELIC "angelic"
Expand Down
4 changes: 3 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE,
"TRAIT_BEING_BLADE_SHIELDED" = TRAIT_BEING_BLADE_SHIELDED,
"TRAIT_BLOB_ALLY" = TRAIT_BLOB_ALLY,
"TRAIT_BLOCK_SHUTTLE_MOVEMENT" = TRAIT_BLOCK_SHUTTLE_MOVEMENT,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES,
"TRAIT_BLOODY_MESS" = TRAIT_BLOODY_MESS,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_BONSAI" = TRAIT_BONSAI,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,
Expand Down Expand Up @@ -563,6 +564,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FISH_NO_MATING" = TRAIT_FISH_NO_MATING,
"TRAIT_FISH_SELF_REPRODUCE" = TRAIT_FISH_SELF_REPRODUCE,
"TRAIT_FISH_TOXIN_IMMUNE" = TRAIT_FISH_TOXIN_IMMUNE,
"TRAIT_FISH_ELECTROGENESIS" = TRAIT_FISH_ELECTROGENESIS,
"TRAIT_RESIST_EMULSIFY" = TRAIT_RESIST_EMULSIFY,
"TRAIT_YUCKY_FISH" = TRAIT_YUCKY_FISH,
),
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_BADTOUCH" = TRAIT_BADTOUCH,
"TRAIT_BALD" = TRAIT_BALD,
"TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE,
"TRAIT_BLOCK_SHUTTLE_MOVEMENT" = TRAIT_BLOCK_SHUTTLE_MOVEMENT,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
Expand Down
6 changes: 5 additions & 1 deletion code/controllers/subsystem/dynamic/dynamic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
GLOBAL_LIST_EMPTY(dynamic_station_traits)
/// Rulesets which have been forcibly enabled or disabled
GLOBAL_LIST_EMPTY(dynamic_forced_rulesets)
/// Bitflags used during init by Dynamic to determine which rulesets we're allowed to use, used by station traits for gamemode-esque experiences
GLOBAL_VAR_INIT(dynamic_ruleset_categories, RULESET_CATEGORY_DEFAULT)

SUBSYSTEM_DEF(dynamic)
name = "Dynamic"
Expand Down Expand Up @@ -646,7 +648,6 @@ SUBSYSTEM_DEF(dynamic)
log_admin(concatenated_message)
to_chat(GLOB.admins, concatenated_message)


/// Initializes the internal ruleset variables
/datum/controller/subsystem/dynamic/proc/setup_rulesets()
midround_rules = init_rulesets(/datum/dynamic_ruleset/midround)
Expand All @@ -664,6 +665,9 @@ SUBSYSTEM_DEF(dynamic)
if (initial(ruleset_type.weight) == 0)
continue

if(!(initial(ruleset_type.ruleset_category) & GLOB.dynamic_ruleset_categories))
continue

var/ruleset = new ruleset_type
configure_ruleset(ruleset)
rulesets += ruleset
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/dynamic/dynamic_rulesets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@

/// A list, or null, of templates that the ruleset depends on to function correctly
var/list/ruleset_lazy_templates
/// In what categories is this ruleset allowed to run? Used by station traits
var/ruleset_category = RULESET_CATEGORY_DEFAULT

/datum/dynamic_ruleset/New()
// Rulesets can be instantiated more than once, such as when an admin clicks
Expand Down
17 changes: 16 additions & 1 deletion code/controllers/subsystem/dynamic/dynamic_rulesets_midround.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
antag_datum = /datum/antagonist/wizard
antag_flag = ROLE_WIZARD_MIDROUND
antag_flag_override = ROLE_WIZARD
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 1
Expand Down Expand Up @@ -377,6 +378,7 @@
antag_flag = ROLE_OPERATIVE_MIDROUND
antag_flag_override = ROLE_OPERATIVE
antag_datum = /datum/antagonist/nukeop
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
enemy_roles = list(
JOB_AI,
JOB_CYBORG,
Expand Down Expand Up @@ -431,6 +433,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_datum = /datum/antagonist/blob
antag_flag = ROLE_BLOB
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
minimum_round_time = 35 MINUTES
Expand All @@ -450,6 +453,7 @@
antag_datum = /datum/antagonist/blob/infection
antag_flag = ROLE_BLOB_INFECTION
antag_flag_override = ROLE_BLOB
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
protected_roles = list(
JOB_CAPTAIN,
JOB_DETECTIVE,
Expand Down Expand Up @@ -502,6 +506,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_datum = /datum/antagonist/xeno
antag_flag = ROLE_ALIEN
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
minimum_round_time = 40 MINUTES
Expand Down Expand Up @@ -550,6 +555,7 @@
antag_datum = /datum/antagonist/nightmare
antag_flag = ROLE_NIGHTMARE
antag_flag_override = ROLE_ALIEN
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 3
Expand Down Expand Up @@ -585,7 +591,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_datum = /datum/antagonist/space_dragon
antag_flag = ROLE_SPACE_DRAGON
antag_flag_override = ROLE_SPACE_DRAGON
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 4
Expand Down Expand Up @@ -625,6 +631,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
antag_datum = /datum/antagonist/abductor
antag_flag = ROLE_ABDUCTOR
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 2
required_applicants = 2
Expand Down Expand Up @@ -662,6 +669,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_datum = /datum/antagonist/ninja
antag_flag = ROLE_NINJA
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 4
Expand Down Expand Up @@ -701,6 +709,7 @@
name = "Spiders"
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
antag_flag = ROLE_SPIDER
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_type = /mob/dead/observer
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 0
Expand All @@ -718,6 +727,7 @@
/datum/dynamic_ruleset/midround/from_ghosts/revenant
name = "Revenant"
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
antag_datum = /datum/antagonist/revenant
antag_flag = ROLE_REVENANT
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
Expand Down Expand Up @@ -768,6 +778,7 @@
/datum/dynamic_ruleset/midround/pirates
name = "Space Pirates"
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
antag_flag = "Space Pirates"
required_type = /mob/dead/observer
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
Expand All @@ -790,6 +801,7 @@
/datum/dynamic_ruleset/midround/dangerous_pirates
name = "Dangerous Space Pirates"
midround_ruleset_style = MIDROUND_RULESET_STYLE_HEAVY
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
antag_flag = "Space Pirates"
required_type = /mob/dead/observer
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
Expand All @@ -814,6 +826,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
antag_datum = /datum/antagonist/obsessed
antag_flag = ROLE_OBSESSED
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
restricted_roles = list(
JOB_AI,
JOB_CYBORG,
Expand Down Expand Up @@ -857,6 +870,7 @@
antag_datum = /datum/antagonist/changeling/space
antag_flag = ROLE_CHANGELING_MIDROUND
antag_flag_override = ROLE_CHANGELING
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_type = /mob/dead/observer
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
Expand All @@ -877,6 +891,7 @@
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
antag_datum = /datum/antagonist/paradox_clone
antag_flag = ROLE_PARADOX_CLONE
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
enemy_roles = list(
JOB_CAPTAIN,
JOB_DETECTIVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
name = "Wizard"
antag_flag = ROLE_WIZARD
antag_datum = /datum/antagonist/wizard
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
flags = HIGH_IMPACT_RULESET
minimum_required_age = 14
restricted_roles = list(
Expand Down Expand Up @@ -395,6 +396,7 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
/datum/dynamic_ruleset/roundstart/nuclear
name = "Nuclear Emergency"
antag_flag = ROLE_OPERATIVE
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
antag_datum = /datum/antagonist/nukeop
var/datum/antagonist/antag_leader_datum = /datum/antagonist/nukeop/leader
minimum_required_age = 14
Expand Down Expand Up @@ -618,6 +620,7 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
antag_datum = /datum/antagonist/nukeop/clownop
antag_flag = ROLE_CLOWN_OPERATIVE
antag_flag_override = ROLE_OPERATIVE
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
antag_leader_datum = /datum/antagonist/nukeop/leader/clownop
requirements = list(101,101,101,101,101,101,101,101,101,101)
required_role = ROLE_CLOWN_OPERATIVE
Expand Down
2 changes: 0 additions & 2 deletions code/datums/brain_damage/imaginary_friend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
var/mob/living/owner
var/bubble_icon = "default"



/mob/camera/imaginary_friend/Login()
. = ..()
if(!. || !client)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/aquarium_content.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


/// Icon used for in aquarium sprite
var/icon = 'icons/obj/aquarium.dmi'
var/icon = 'icons/obj/aquarium/fish.dmi'
/// If this is set this icon state will be used for the holder while icon_state will only be used for item/catalog. Transformation from source_width/height WON'T be applied.
var/icon_state
/// Applied to vc object only for use with greyscaled icons.
Expand Down Expand Up @@ -61,7 +61,7 @@
var/animation_update_signals


/datum/component/aquarium_content/Initialize(animation_getter, animation_update_signals)
/datum/component/aquarium_content/Initialize(icon, animation_getter, animation_update_signals)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE

Expand Down
3 changes: 2 additions & 1 deletion code/datums/mapgen/Cavegens/IcemoonCaves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/turf/closed/mineral/gibtonite/ice/icemoon = 4,
)


weighted_mob_spawn_list = list(
/mob/living/basic/mining/goldgrub = 10,
/mob/living/basic/mining/legion/snow = 50,
Expand All @@ -16,13 +15,15 @@
/obj/structure/spawner/ice_moon = 3,
/obj/structure/spawner/ice_moon/polarbear = 3,
)

weighted_flora_spawn_list = list(
/obj/structure/flora/ash/chilly = 2,
/obj/structure/flora/grass/both/style_random = 6,
/obj/structure/flora/rock/icy/style_random = 2,
/obj/structure/flora/rock/pile/icy/style_random = 2,
/obj/structure/flora/tree/pine/style_random = 2,
)

///Note that this spawn list is also in the lavaland generator
weighted_feature_spawn_list = list(
/obj/structure/geyser/hollowwater = 10,
Expand Down
4 changes: 4 additions & 0 deletions code/datums/station_traits/_station_trait.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)
var/dynamic_threat_id
/// If ran during dynamic, do we reduce the total threat? Will be overriden by config if set
var/threat_reduction = 0
/// Which ruleset flags to allow dynamic to use. null to disregard
var/dynamic_category = null
/// Trait should not be instantiated in a round if its type matches this type
var/abstract_type = /datum/station_trait

Expand All @@ -45,6 +47,8 @@ GLOBAL_LIST_EMPTY(lobby_station_traits)

if(threat_reduction)
GLOB.dynamic_station_traits[src] = threat_reduction
if(dynamic_category)
GLOB.dynamic_ruleset_categories = dynamic_category
if(sign_up_button)
GLOB.lobby_station_traits += src
if(trait_processes)
Expand Down
12 changes: 12 additions & 0 deletions code/datums/station_traits/neutral_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -562,3 +562,15 @@
#undef SKUB_IDFC
#undef RANDOM_SKUB

/// Crew don't ever spawn as enemies of the station. Obsesseds, blob infection, space changelings etc can still happen though
/datum/station_trait/background_checks
name = "Station-Wide Background Checks"
report_message = "We replaced the intern doing your crew's background checks with a trained screener for this shift! That said, our enemies may just find another way to infiltrate the station, so be careful."
trait_type = STATION_TRAIT_NEUTRAL
weight = 1
show_in_report = TRUE
can_revert = FALSE

dynamic_category = RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
threat_reduction = 15
dynamic_threat_id = "Background Checks"
7 changes: 3 additions & 4 deletions code/datums/station_traits/positive_traits.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#define PARTY_COOLDOWN_LENGTH_MIN (6 MINUTES)
#define PARTY_COOLDOWN_LENGTH_MAX (12 MINUTES)


/datum/station_trait/lucky_winner
name = "Lucky winner"
trait_type = STATION_TRAIT_POSITIVE
Expand Down Expand Up @@ -31,6 +30,9 @@
new /obj/item/reagent_containers/cup/glass/bottle/beer(toLaunch)
new /obj/effect/pod_landingzone(T, toLaunch)

#undef PARTY_COOLDOWN_LENGTH_MIN
#undef PARTY_COOLDOWN_LENGTH_MAX

/datum/station_trait/galactic_grant
name = "Galactic grant"
trait_type = STATION_TRAIT_POSITIVE
Expand Down Expand Up @@ -369,6 +371,3 @@
trait_to_give = STATION_TRAIT_ASSISTANT_GIMMICKS
show_in_report = TRUE
blacklist = list(/datum/station_trait/colored_assistants)

#undef PARTY_COOLDOWN_LENGTH_MIN
#undef PARTY_COOLDOWN_LENGTH_MAX
13 changes: 8 additions & 5 deletions code/game/objects/items/devices/lightreplacer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,14 @@
return TRUE
return FALSE

/obj/item/lightreplacer/proc/Charge(mob/user)
charge += 1
if(charge > 3)
add_uses(1)
charge = 1
#define LIGHT_CHARGE_COEFF 30000
/obj/item/lightreplacer/proc/Charge(mob/user, coeff)
charge += coeff
if(charge > LIGHT_CHARGE_COEFF)
add_uses(floor(charge / LIGHT_CHARGE_COEFF))
charge = charge % LIGHT_CHARGE_COEFF

#undef LIGHT_CHARGE_COEFF

/obj/item/lightreplacer/proc/replace_light(obj/machinery/light/target, mob/living/user)
//Confirm that it's a light we're testing, because afterattack runs this for everything on a given turf and will runtime
Expand Down
Loading

0 comments on commit d8f3d72

Please sign in to comment.