Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions _maps/RandomRuins/SpaceRuins/garbagetruck2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@
"kp" = (
/obj/structure/safe,
/obj/item/stamp/syndicate,
/obj/item/traitor_bug,
/obj/item/eyesnatcher,
/obj/item/stack/spacecash/c1000,
/turf/open/floor/plating,
/area/ruin/space/has_grav/garbagetruck/medicalwaste)
Expand Down
11 changes: 9 additions & 2 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ GLOBAL_LIST_INIT(ai_employers, list(

/// Checks if the given mob is a wizard
#define IS_WIZARD(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/wizard))
/// Checks if the given mob is a wizard apprentice
#define IS_WIZARD_APPRENTICE(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/wizard/apprentice))

/// Checks if the given mob is a revolutionary. Will return TRUE for rev heads as well.
#define IS_REVOLUTIONARY(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/rev))
Expand Down Expand Up @@ -282,6 +284,8 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list(
#define DESTROY_AI_PROB(denominator) (100 / denominator)
/// If the destroy AI objective doesn't roll, chance that we'll get a maroon instead. If this prob fails, they will get a generic assassinate objective instead.
#define MAROON_PROB 30
/// Probability that any job related objective is picked
#define JOB_PROB 40

/// How many telecrystals a normal traitor starts with
#define TELECRYSTALS_DEFAULT 20
Expand Down Expand Up @@ -342,8 +346,11 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list(
#define ANTAG_GROUP_CREW "Deviant Crew"


// This flag disables certain checks that presume antagonist datums mean 'baddie'.
#define FLAG_FAKE_ANTAG (1 << 0)
/// Used to denote an antag datum that either isn't necessarily "evil" (like Valentines)
/// or isn't necessarily a "real" antag (like Ashwalkers)
#define ANTAG_FAKE (1 << 0)
/// Antag is not added to the global list of antags
#define ANTAG_SKIP_GLOBAL_LIST (1 << 1)

#define HUNTER_PACK_COPS "Spacepol Fugitive Hunters"
#define HUNTER_PACK_RUSSIAN "Russian Fugitive Hunters"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_global_object.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// signals from globally accessible objects

///from SSJob when DivideOccupations is called
///from SSJob when divide_occupations is called
#define COMSIG_OCCUPATIONS_DIVIDED "occupations_divided"

///from SSsun when the sun changes position : (azimuth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

///Applied preferences to a human
#define COMSIG_HUMAN_PREFS_APPLIED "human_prefs_applied"
///Whenever EquipRanked is called, called after job is set
///Whenever equip_ranked is called, called after job is set
#define COMSIG_JOB_RECEIVED "job_received"
///from /datum/species/handle_fire. Called when the human is set on fire and burning clothes and stuff
#define COMSIG_HUMAN_BURNING "human_burning"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
#define COMSIG_MOB_MIND_TRANSFERRED_OUT_OF "mob_mind_transferred_out_of"
/// From /mob/proc/ghostize() Called when a mob sucessfully ghosts
#define COMSIG_MOB_GHOSTIZED "mob_ghostized"
/// can_roll_midround(datum/antagonist/antag_type) from certain midround rulesets, (mob/living/source, datum/mind/mind, datum/antagonist/antagonist)
#define COMSIG_MOB_MIND_BEFORE_MIDROUND_ROLL "mob_mind_before_midround_roll"
#define CANCEL_ROLL (1<<1)

///signal sent when a mob has their holy role set. Sent to the mob having their role changed.
#define COMSIG_MOB_MIND_SET_HOLY_ROLE "mob_mind_set_holy_role"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@
#define COMSIG_ITEM_ATTEMPT_TC_REIMBURSE "item_attempt_tc_reimburse"
///Called when a holoparasite/guardiancreator is used.
#define COMSIG_TRAITOR_ITEM_USED(type) "traitor_item_used_[type]"
/// Called after an item is refunded
#define COMSIG_ITEM_TC_REIMBURSED "item_tc_reimbursed"

// /obj/item/clothing signals

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@
#define COMSIG_ADDED_POINT_OF_INTEREST "added_point_of_interest"
/// Sent from base of /datum/controller/subsystem/points_of_interest/proc/on_poi_element_removed : (atom/old_poi)
#define COMSIG_REMOVED_POINT_OF_INTEREST "removed_point_of_interest"

/// Send after config is loaded but before picking roundstart rulesets
#define COMSIG_DYNAMIC_PRE_ROUNDSTART "dynamic_pre_roundstart"
25 changes: 0 additions & 25 deletions code/__DEFINES/dcs/signals/signals_traitor.dm
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
/// Called when the hack_comm_console objective is completed.
#define COMSIG_GLOB_TRAITOR_OBJECTIVE_COMPLETED "!traitor_objective_completed"

/// Called whenever the uplink handler receives any sort of update. Used by uplinks to update their UI. No arguments passed
#define COMSIG_UPLINK_HANDLER_ON_UPDATE "uplink_handler_on_update"
/// Sent from the uplink handler when the traitor uses the syndicate uplink beacon to order a replacement uplink.
#define COMSIG_UPLINK_HANDLER_REPLACEMENT_ORDERED "uplink_handler_replacement_ordered"

/// Called before the traitor objective is generated
#define COMSIG_TRAITOR_OBJECTIVE_PRE_GENERATE "traitor_objective_pre_generate"
#define COMPONENT_TRAITOR_OBJECTIVE_ABORT_GENERATION (1<<0)
/// Called whenever the traitor objective is completed
#define COMSIG_TRAITOR_OBJECTIVE_COMPLETED "traitor_objective_completed"
/// Called whenever the traitor objective is failed
#define COMSIG_TRAITOR_OBJECTIVE_FAILED "traitor_objective_failed"

/// Called when a traitor bug is planted in an area
#define COMSIG_TRAITOR_BUG_PLANTED_GROUND "traitor_bug_planted_area"
/// Called when a traitor bug is planted
#define COMSIG_TRAITOR_BUG_PLANTED_OBJECT "traitor_bug_planted_object"
/// Called before a traitor bug is planted, where it can still be overrided
#define COMSIG_TRAITOR_BUG_PRE_PLANTED_OBJECT "traitor_bug_planted_pre_object"
#define COMPONENT_FORCE_PLACEMENT (1<<0)
#define COMPONENT_FORCE_FAIL_PLACEMENT (1<<1)

/// Called when a machine a traitor has booby trapped triggers its payload
#define COMSIG_TRAITOR_MACHINE_TRAP_TRIGGERED "traitor_machine_trap_triggered"

/// Called when a device a traitor has planted effects someone's mood. Pass the mind of the viewer.
#define COMSIG_DEMORALISING_EVENT "traitor_demoralise_event"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_transform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
#define COMSIG_TRANSFORMING_ON_TRANSFORM "transforming_on_transform"
/// Return COMPONENT_NO_DEFAULT_MESSAGE to prevent the transforming component from displaying the default transform message / sound.
#define COMPONENT_NO_DEFAULT_MESSAGE (1<<0)

/// From /datum/component/transforming/proc/on_transform_end(obj/item/source, mob/user): (mob/source, obj/item/transforming, active)
#define COMSIG_MOB_TRANSFORMING_ITEM "mob_transforming_item"
40 changes: 0 additions & 40 deletions code/__DEFINES/dynamic.dm

This file was deleted.

6 changes: 5 additions & 1 deletion code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
#define JOB_ANNOUNCE_ARRIVAL (1<<0)
/// Whether the mob is added to the crew manifest.
#define JOB_CREW_MANIFEST (1<<1)
/// Whether the mob is equipped through SSjob.EquipRank() on spawn.
/// Whether the mob is equipped through SSjob.equip_rank() on spawn.
#define JOB_EQUIP_RANK (1<<2)
/// Whether the job is considered a regular crew member of the station. Equipment such as AI and cyborgs not included.
#define JOB_CREW_MEMBER (1<<3)
Expand All @@ -213,6 +213,10 @@
#define JOB_LATEJOIN_ONLY (1<<11)
/// This job is a head of staff.
#define JOB_HEAD_OF_STAFF (1<<12)
/// This job will NEVER be selected as an antag role
#define JOB_ANTAG_BLACKLISTED (1<<13)
/// This job will never be selected as an antag role IF config `protect_roles_from_antagonist` is set
#define JOB_ANTAG_PROTECTED (1<<14)

/// Combination flag for jobs which are considered regular crew members of the station.
#define STATION_JOB_FLAGS (JOB_ANNOUNCE_ARRIVAL|JOB_CREW_MANIFEST|JOB_EQUIP_RANK|JOB_CREW_MEMBER|JOB_NEW_PLAYER_JOINABLE|JOB_REOPEN_ON_ROUNDSTART_LOSS|JOB_ASSIGN_QUIRKS|JOB_CAN_BE_INTERN)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
#define LOG_CATEGORY_GAME_TRAITOR "game-traitor"
#define LOG_CATEGORY_GAME_VOTE "game-vote"
#define LOG_CATEGORY_GAME_WHISPER "game-whisper"
#define LOG_CATEGORY_GAME_GHOST_POLLS "game-ghost-polls"

// HREF categories
#define LOG_CATEGORY_HREF "href"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#define TGUI_LAYOUT_LIST "list"

//Job preferences levels
#define JP_ANY 0
#define JP_LOW 1
#define JP_MEDIUM 2
#define JP_HIGH 3
Expand Down
54 changes: 4 additions & 50 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define ROLE_NINJA "Space Ninja"
#define ROLE_OBSESSED "Obsessed"
#define ROLE_OPERATIVE_MIDROUND "Operative (Midround)"
#define ROLE_CLOWN_OPERATIVE_MIDROUND "Clown Operative (Midround)"
#define ROLE_PARADOX_CLONE "Paradox Clone"
#define ROLE_REV_HEAD "Head Revolutionary"
#define ROLE_SENTIENT_DISEASE "Sentient Disease"
Expand Down Expand Up @@ -64,18 +65,20 @@
#define ROLE_REV "Revolutionary"
#define ROLE_REVENANT "Revenant"
#define ROLE_SENTIENCE "Sentience Potion Spawn"
#define ROLE_EVIL_CLONE "Evil Clone"
/// This flag specifically is used as a generic catch-all antag ban
#define ROLE_SYNDICATE "Syndicate"

#define ROLE_CLOWN_OPERATIVE "Clown Operative"
#define ROLE_FREE_GOLEM "Free Golem"
#define ROLE_MORPH "Morph"
#define ROLE_NUCLEAR_OPERATIVE "Nuclear Operative"
#define ROLE_POSITRONIC_BRAIN "Positronic Brain"
#define ROLE_SANTA "Santa"
#define ROLE_SERVANT_GOLEM "Servant Golem"
#define ROLE_SLAUGHTER_DEMON "Slaughter Demon"
#define ROLE_WIZARD_APPRENTICE "apprentice"
#define ROLE_SYNDICATE_MONKEY "Syndicate Monkey Agent"
#define ROLE_CONTRACTOR_SUPPORT "Contractor Support Unit"

//Spawner roles
#define ROLE_ANCIENT_CREW "Ancient Crew"
Expand Down Expand Up @@ -112,55 +115,6 @@
#define ROLE_CYBER_TAC "Cyber Tac"
#define ROLE_NETGUARDIAN "NetGuardian Prime"

/// This defines the antagonists you can operate with in the settings.
/// Keys are the antagonist, values are the number of days since the player's
/// first connection in order to play.
GLOBAL_LIST_INIT(special_roles, list(
// Roundstart
ROLE_BROTHER = 0,
ROLE_CHANGELING = 0,
ROLE_CLOWN_OPERATIVE = 14,
ROLE_CULTIST = 14,
ROLE_HERETIC = 0,
ROLE_MALF = 0,
ROLE_OPERATIVE = 14,
ROLE_REV_HEAD = 14,
ROLE_TRAITOR = 0,
ROLE_WIZARD = 14,

// Midround
ROLE_ABDUCTOR = 0,
ROLE_ALIEN = 0,
ROLE_BLOB = 0,
ROLE_BLOB_INFECTION = 0,
ROLE_CHANGELING_MIDROUND = 0,
ROLE_FUGITIVE = 0,
ROLE_LONE_OPERATIVE = 14,
ROLE_MALF_MIDROUND = 0,
ROLE_NIGHTMARE = 0,
ROLE_NINJA = 0,
ROLE_OBSESSED = 0,
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,
ROLE_WIZARD_MIDROUND = 14,

// Latejoin
ROLE_HERETIC_SMUGGLER = 0,
ROLE_PROVOCATEUR = 14,
ROLE_SYNDICATE_INFILTRATOR = 0,
ROLE_STOWAWAY_CHANGELING = 0,

// I'm not too sure why these are here, but they're not moving.
ROLE_GLITCH = 0,
ROLE_PAI = 0,
ROLE_SENTIENCE = 0,
))

//Job defines for what happens when you fail to qualify for any job during job selection
#define BEOVERFLOW 1
#define BERANDOMJOB 2
Expand Down
18 changes: 16 additions & 2 deletions code/__DEFINES/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,19 @@
/// This item is purchasable to clown ops
#define UPLINK_CLOWN_OPS (1 << 2)

/// This item is purchasable to infiltrators (midround traitors)
#define UPLINK_INFILTRATORS (1 << 3)
/// Can be randomly given to spies for their bounties
#define UPLINK_SPY (1 << 3)

#define UPLINK_LONE_OP (1 << 4)

/// A blanket define for an item being purchasable by all types of nukie
#define UPLINK_ALL_SYNDIE_OPS (UPLINK_NUKE_OPS | UPLINK_LONE_OP | UPLINK_CLOWN_OPS)

/// A blanket define for an item being purchasable by all operatives that spawn at the nukie firebase
#define UPLINK_FIREBASE_OPS (UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS)

/// A define that excludes clown ops from the regular nukeop gear lineup
#define UPLINK_SERIOUS_OPS (UPLINK_NUKE_OPS | UPLINK_LONE_OP)

/// Progression gets turned into a user-friendly form. This is just an abstract equation that makes progression not too large.
#define DISPLAY_PROGRESSION(time) round(time/60, 0.01)
Expand All @@ -31,3 +42,6 @@

/// Minimal cost for an item to be eligible for a discount
#define TRAITOR_DISCOUNT_MIN_PRICE 4

/// The standard minimum player count for "don't spawn this item on low population rounds"
#define TRAITOR_POPULATION_LOWPOP 20
8 changes: 4 additions & 4 deletions code/__HELPERS/_string_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ GLOBAL_VAR(string_filename_current_key)
CRASH("strings list not found: [STRING_DIRECTORY]/[filepath], index=[key]")

/proc/strings(filepath as text, key as text, directory = STRING_DIRECTORY)
if(IsAdminAdvancedProcCall())
return
// if(IsAdminAdvancedProcCall())
// return

filepath = sanitize_filepath(filepath)
load_strings_file(filepath, directory)
Expand All @@ -34,8 +34,8 @@ GLOBAL_VAR(string_filename_current_key)
return pick_list(GLOB.string_filename_current_key, group1)

/proc/load_strings_file(filepath, directory = STRING_DIRECTORY)
if(IsAdminAdvancedProcCall())
return
// if(IsAdminAdvancedProcCall())
// return

GLOB.string_filename_current_key = filepath
if(filepath in GLOB.string_cache)
Expand Down
2 changes: 0 additions & 2 deletions code/__HELPERS/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
possible_spawns += spawn_turf

if(!length(possible_spawns))
message_admins("No valid generic_maintenance_landmark landmarks found, aborting...")
return null

return pick(possible_spawns)
Expand All @@ -44,7 +43,6 @@
possible_spawns += get_turf(spawn_location)

if(!length(possible_spawns))
message_admins("No valid carpspawn landmarks found, aborting...")
return null

return pick(possible_spawns)
Expand Down
15 changes: 9 additions & 6 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,9 @@
return

///Get active players who are playing in the round
/proc/get_active_player_count(alive_check = FALSE, afk_check = FALSE, human_check = FALSE)
var/active_players = 0
for(var/i = 1; i <= GLOB.player_list.len; i++)
var/mob/player_mob = GLOB.player_list[i]
/proc/get_active_player_list(alive_check = FALSE, afk_check = FALSE, human_check = FALSE)
var/list/active_players = list()
for(var/mob/player_mob as anything in GLOB.player_list)
if(!player_mob?.client)
continue
if(alive_check && player_mob.stat)
Expand All @@ -171,17 +170,21 @@
var/mob/dead/observer/ghost_player = player_mob
if(ghost_player.started_as_observer) // Exclude people who started as observers
continue
active_players++
active_players += player_mob
return active_players

///Counts active players who are playing in the round
/proc/get_active_player_count(alive_check = FALSE, afk_check = FALSE, human_check = FALSE)
return length(get_active_player_list(alive_check, afk_check, human_check))

///Uses stripped down and bastardized code from respawn character
/proc/make_body(mob/dead/observer/ghost_player)
if(!ghost_player || !ghost_player.key)
return

//First we spawn a dude.
var/mob/living/carbon/human/new_character = new//The mob being spawned.
SSjob.SendToLateJoin(new_character)
SSjob.send_to_late_join(new_character)

ghost_player.client.prefs.safe_transfer_prefs_to(new_character)
new_character.dna.update_dna_identity()
Expand Down
5 changes: 0 additions & 5 deletions code/__HELPERS/logging/dynamic.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/// Log to dynamic and message admins
/datum/controller/subsystem/dynamic/proc/log_dynamic_and_announce(text)
message_admins("DYNAMIC: [text]")
log_dynamic("[text]")

/// Logging for dynamic procs
/proc/log_dynamic(text, list/data)
logger.Log(LOG_CATEGORY_DYNAMIC, text, data)
Loading