Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into APC
Browse files Browse the repository at this point in the history
  • Loading branch information
Gboster-0 committed Nov 17, 2023
2 parents 0bb4ceb + e9a5a21 commit 629e337
Show file tree
Hide file tree
Showing 95 changed files with 141,751 additions and 5,258 deletions.
297 changes: 218 additions & 79 deletions _maps/map_files/generic/CentCom.dmm

Large diffs are not rendered by default.

9,754 changes: 4,852 additions & 4,902 deletions _maps/map_files/tramstation/tramstation.dmm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/controllers/subsystem/traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUBSYSTEM_DEF(traitor)
var/configuration_data = list()

/// The coefficient multiplied by the current_global_progression for new joining traitors to calculate their progression
var/newjoin_progression_coeff = 0.6
var/newjoin_progression_coeff = 1
/// The current progression that all traitors should be at in the round
var/current_global_progression = 0
/// The amount of deviance from the current global progression before you start getting 2x the current scaling or no scaling at all
Expand Down
1 change: 1 addition & 0 deletions code/game/area/areas/station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
name = "Station Areas"
icon = 'icons/area/areas_station.dmi'
icon_state = "station"
area_flags = UNIQUE_AREA //TEMP EDIT FOR TM, DO NOT KEEP

//Maintenance

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

/datum/dynamic_ruleset/latejoin/infiltrator
name = "Syndicate Infiltrator"
antag_datum = /datum/antagonist/traitor
antag_datum = /datum/antagonist/traitor/infiltrator
antag_flag = ROLE_SYNDICATE_INFILTRATOR
antag_flag_override = ROLE_TRAITOR
protected_roles = list(
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
/datum/dynamic_ruleset/midround/from_living/autotraitor
name = "Syndicate Sleeper Agent"
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
antag_datum = /datum/antagonist/traitor
antag_datum = /datum/antagonist/traitor/infiltrator/sleeper_agent
antag_flag = ROLE_SLEEPER_AGENT
antag_flag_override = ROLE_TRAITOR
protected_roles = list(
Expand Down Expand Up @@ -257,7 +257,7 @@
var/mob/M = pick(candidates)
assigned += M
candidates -= M
var/datum/antagonist/traitor/newTraitor = new
var/datum/antagonist/traitor/infiltrator/sleeper_agent/newTraitor = new
M.mind.add_antag_datum(newTraitor)
message_admins("[ADMIN_LOOKUPFLW(M)] was selected by the [name] ruleset and has been made into a midround traitor.")
log_dynamic("[key_name(M)] was selected by the [name] ruleset and has been made into a midround traitor.")
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/objective_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@

/datum/objective_item/steal/documents
name = "any set of secret documents of any organization"
valid_containers = list(/obj/item/folder)
targetitem = /obj/item/documents
exists_on_map = TRUE

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/poster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
icon = 'icons/obj/poster.dmi'
force = 0
resistance_flags = FLAMMABLE
w_class = WEIGHT_CLASS_SMALL
var/poster_type
var/obj/structure/sign/poster/poster_structure

Expand Down
29 changes: 15 additions & 14 deletions code/modules/antagonists/brainwashing/brainwashing.dm
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
/proc/brainwash(mob/living/L, directives)
if(!L.mind)
/proc/brainwash(mob/living/brainwash_victim, directives)
if(!brainwash_victim.mind)
return
if(!islist(directives))
directives = list(directives)
var/datum/mind/M = L.mind
var/datum/antagonist/brainwashed/B = M.has_antag_datum(/datum/antagonist/brainwashed)
if(B)
var/datum/mind/brainwash_mind = brainwash_victim.mind
var/datum/antagonist/brainwashed/brainwashed_datum = brainwash_mind.has_antag_datum(/datum/antagonist/brainwashed)
if(brainwashed_datum)
for(var/O in directives)
var/datum/objective/brainwashing/objective = new(O)
B.objectives += objective
B.greet()
brainwashed_datum.objectives += objective
brainwashed_datum.greet()
else
B = new()
brainwashed_datum = new()
for(var/O in directives)
var/datum/objective/brainwashing/objective = new(O)
B.objectives += objective
M.add_antag_datum(B)
brainwashed_datum.objectives += objective
brainwash_mind.add_antag_datum(brainwashed_datum)

var/begin_message = " has been brainwashed with the following objectives: "
var/obj_message = english_list(directives)
var/end_message = "."
var/rendered = begin_message + obj_message + end_message
deadchat_broadcast(rendered, "<b>[L]</b>", follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_ANNOUNCEMENT)
var/rendered = begin_message + obj_message
if(!(rendered[length(rendered)] in list(",",":",";",".","?","!","\'","-")))
rendered += "." //Good punctuation is important :)
deadchat_broadcast(rendered, "<b>[brainwash_victim]</b>", follow_target = brainwash_victim, turf_target = get_turf(brainwash_victim), message_type=DEADCHAT_ANNOUNCEMENT)
if(check_holidays(APRIL_FOOLS))
// Note: most of the time you're getting brainwashed you're unconscious
L.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in. (April Fools)")
brainwash_victim.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in. (April Fools)")

/datum/antagonist/brainwashed
name = "\improper Brainwashed Victim"
Expand Down
6 changes: 5 additions & 1 deletion code/modules/antagonists/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Runes can either be invoked by one's self or with many different cultists. Each
/// The actual keyword for the rune
var/keyword

/// can non-cultists use this rune? used for the tramstation beer rune. Monkestation - addition
var/cult_override = FALSE

/obj/effect/rune/Initialize(mapload, set_keyword)
. = ..()
if(set_keyword)
Expand All @@ -96,7 +99,8 @@ Runes can either be invoked by one's self or with many different cultists. Each
. = ..()
if(.)
return
if(!IS_CULTIST(user))
// if(!IS_CULTIST(user)) // monkestation change, original code
if(!IS_CULTIST(user) && !cult_override) // monkestation change, cult override added
to_chat(user, span_warning("You aren't able to understand the words of [src]."))
return
var/list/invokers = can_invoke(user)
Expand Down
19 changes: 16 additions & 3 deletions code/modules/antagonists/traitor/datum_traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
suicide_cry = "FOR THE SYNDICATE!!"
preview_outfit = /datum/outfit/traitor
var/give_objectives = TRUE
/// Whether to give secondary objectives to the traitor, which aren't necessary but can be completed for a progression and TC boost.
var/give_secondary_objectives = TRUE
var/should_give_codewords = TRUE
///give this traitor an uplink?
var/give_uplink = TRUE
Expand Down Expand Up @@ -42,6 +44,16 @@
///the final objective the traitor has to accomplish, be it escaping, hijacking, or just martyrdom.
var/datum/objective/ending_objective

/datum/antagonist/traitor/infiltrator
// Used to denote traitors who have joined midround and therefore have no access to secondary objectives.
// Progression elements are best left to the roundstart antagonists
// There will still be a timelock on uplink items
name = "\improper Infiltrator"
give_secondary_objectives = TRUE // Changed from FALSE to TRUE - MONKEYSTATION EDIT CHANGE

/datum/antagonist/traitor/infiltrator/sleeper_agent
name = "\improper Syndicate Sleeper Agent"

/datum/antagonist/traitor/New(give_objectives = TRUE)
. = ..()
src.give_objectives = give_objectives
Expand All @@ -64,8 +76,9 @@
uplink_handler.has_progression = TRUE
SStraitor.register_uplink_handler(uplink_handler)

uplink_handler.has_objectives = TRUE
uplink_handler.generate_objectives()
if(give_secondary_objectives)
uplink_handler.has_objectives = TRUE
uplink_handler.generate_objectives()

if(uplink_handler.progression_points < SStraitor.current_global_progression)
uplink_handler.progression_points = SStraitor.current_global_progression * SStraitor.newjoin_progression_coeff
Expand Down Expand Up @@ -106,7 +119,7 @@
else
string += ", [to_display.telecrystal_reward] TC"
string += ", [to_display.progression_reward] PR"
if(to_display.objective_state == OBJECTIVE_STATE_ACTIVE)
if(to_display.objective_state == OBJECTIVE_STATE_ACTIVE && !istype(to_display, /datum/traitor_objective/ultimate))
string += " <a href='?src=[REF(owner)];fail_objective=[REF(to_display)]'>Fail this objective</a>"
string += " <a href='?src=[REF(owner)];succeed_objective=[REF(to_display)]'>Succeed this objective</a>"
if(to_display.objective_state == OBJECTIVE_STATE_INACTIVE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
. = ..()
handler.maximum_potential_objectives = 0
for(var/datum/traitor_objective/objective as anything in handler.potential_objectives)
if(objective == src)
continue
objective.fail_objective()
user.playsound_local(get_turf(user), 'sound/traitor/final_objective.ogg', vol = 100, vary = FALSE, channel = CHANNEL_TRAITOR)
handler.final_objective = name
Expand Down
3 changes: 2 additions & 1 deletion code/modules/antagonists/traitor/objectives/kidnapping.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/traitor_objective/target_player/kidnapping
name = "Kidnap %TARGET% the %JOB TITLE% and deliver them to %AREA%"
description = "%TARGET% holds extremely important information regarding secret NT projects - and you'll need to kidnap and deliver them to %AREA%, where our transport pod will be waiting. \
You'll get additional reward if %TARGET% is delivered alive."
If %TARGET% is delivered alive, you will be rewarded with an additional %TC% telecrystals."

abstract_type = /datum/traitor_objective/target_player/kidnapping

Expand Down Expand Up @@ -168,6 +168,7 @@
replace_in_name("%TARGET%", target_mind.name)
replace_in_name("%JOB TITLE%", target_mind.assigned_role.title)
replace_in_name("%AREA%", initial(dropoff_area.name))
replace_in_name("%TC%", alive_bonus)
return TRUE

/datum/traitor_objective/target_player/kidnapping/ungenerate_objective()
Expand Down
22 changes: 10 additions & 12 deletions code/modules/antagonists/traitor/objectives/sabotage_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han
var/bonus_tc = 2
/// Bonus progression to grant if you booby trap successfully
var/bonus_progression = 5 MINUTES
/// The trap device we give out
var/obj/item/traitor_machine_trapper/tool
/// Have we given out a traitor trap item?
var/traitor_trapper_given = FALSE

/datum/traitor_objective/sabotage_machinery/trap/generate_objective(datum/mind/generating_for, list/possible_duplicates)
. = ..()
Expand All @@ -122,17 +122,18 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han

/datum/traitor_objective/sabotage_machinery/trap/generate_ui_buttons(mob/user)
var/list/buttons = list()
if(!tool)
if(!traitor_trapper_given)
buttons += add_ui_button("", "Pressing this will materialize an explosive trap in your hand, which you can conceal within the target machine", "wifi", "summon_gear")
return buttons

/datum/traitor_objective/sabotage_machinery/trap/ui_perform_action(mob/living/user, action)
. = ..()
switch(action)
if("summon_gear")
if(tool)
if(traitor_trapper_given)
return
tool = new(user.drop_location())
traitor_trapper_given = TRUE
var/obj/item/traitor_machine_trapper/tool = new(user.drop_location())
user.put_in_hands(tool)
tool.balloon_alert(user, "a booby trap materializes in your hand")
tool.target_machine_path = applicable_jobs[chosen_job]
Expand All @@ -159,17 +160,13 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han
. += span_notice("This device must be placed by <b>clicking on a [initial(target_machine_path.name)]</b> with it. It can be removed with a screwdriver.")
. += span_notice("Remember, you may leave behind fingerprints on the device. Wear <b>gloves</b> when handling it to be safe!")

/obj/item/traitor_machine_trapper/afterattack(atom/movable/target, mob/user, proximity_flag, click_parameters)
/obj/item/traitor_machine_trapper/pre_attack(atom/target, mob/living/user, params)
. = ..()
if(!user.Adjacent(target))
if (. || !istype(target, target_machine_path))
return
if(!istype(target, target_machine_path))
balloon_alert(user, "invalid target!")
return
. |= AFTERATTACK_PROCESSED_ITEM
balloon_alert(user, "planting device...")
if(!do_after(user, delay = deploy_time, target = src, interaction_key = DOAFTER_SOURCE_PLANTING_DEVICE))
return
return TRUE
target.AddComponent(\
/datum/component/interaction_booby_trap,\
additional_triggers = list(COMSIG_ORM_COLLECTED_ORE),\
Expand All @@ -178,6 +175,7 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han
)
RegisterSignal(target, COMSIG_PARENT_QDELETING, GLOBAL_PROC_REF(qdel), src)
moveToNullspace()
return TRUE

/// Called when applied trap is triggered, mark success
/obj/item/traitor_machine_trapper/proc/on_triggered(atom/machine)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@
"The Captain is a lizardperson.",
"Nanotrasen isn't real.",
"They put something in the food to make you forget.",
"You are the only real person on the station."
"You are the only real person on the station.",
"Things would be a lot better on the station if more people were screaming, someone should do something about that.",
"The people in charge around here have only ill intentions for the crew.",
"Help the crew? What have they ever done for you anyways?",
"Does your bag feel lighter? I bet those guys in Security stole something from it. Go get it back.",
"Command is incompetent, someone with some REAL authority should take over around here.",
"The cyborgs and the AI are stalking you. What are they planning?",
)

/datum/surgery_step/brainwash/sleeper_agent/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Runs the event
return
message_admins("[key_name_admin(usr)] force scheduled event [src.name].")
log_admin_private("[key_name(usr)] force scheduled event [src.name].")
SSgamemode.forced_next_events[src.track] += src
SSgamemode.forced_next_events[src.track] = src

//monkestation addition ends - STORYTELLERS

Expand Down
20 changes: 10 additions & 10 deletions code/modules/mapping/mapping_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@
log_mapping("[src] spawned outside of mapload!")
return

var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in (offset_dir ? get_step(src, offset_dir) : loc) //monkestation edit: adds offset_dir check
if(!airlock)
log_mapping("[src] failed to find an airlock at [AREACOORD(src)]")
else
payload(airlock)

/obj/effect/mapping_helpers/airlock/LateInitialize()
. = ..()
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in (offset_dir ? get_step(src, offset_dir) : loc) //monkestation edit: adds offset_dir check
if(!airlock)
qdel(src)
return
Expand Down Expand Up @@ -257,18 +257,18 @@
log_mapping("[src] spawned outside of mapload!")
return INITIALIZE_HINT_QDEL

var/obj/machinery/power/apc/target = locate(/obj/machinery/power/apc) in loc
var/obj/machinery/power/apc/target = locate(/obj/machinery/power/apc) in (offset_dir ? get_step(src, offset_dir) : loc) //monkestation edit: adds offset_dir check
if(isnull(target))
var/area/target_area = get_area(target)
log_mapping("[src] failed to find an apc at [AREACOORD(src)] ([target_area.type]).")
else
payload(target)

return INITIALIZE_HINT_LATELOAD

/obj/effect/mapping_helpers/apc/LateInitialize()
. = ..()
var/obj/machinery/power/apc/target = locate(/obj/machinery/power/apc) in loc
var/obj/machinery/power/apc/target = locate(/obj/machinery/power/apc) in (offset_dir ? get_step(src, offset_dir) : loc) //monkestation edit: adds offset_dir check

if(isnull(target))
qdel(src)
Expand Down Expand Up @@ -408,7 +408,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
/obj/effect/mapping_helpers/atom_injector/LateInitialize()
if(!check_validity())
return
var/turf/target_turf = get_turf(src)
var/turf/target_turf = (offset_dir ? get_turf(get_step(src, offset_dir)) : get_turf(src)) //monkestation edit: adds offset_dir check
var/matches_found = 0
for(var/atom/atom_on_turf as anything in target_turf.get_all_contents())
if(atom_on_turf == src)
Expand Down Expand Up @@ -848,7 +848,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
var/note_path //if you already have something wrote up in a paper subtype, put the path here

/obj/effect/mapping_helpers/airlock_note_placer/LateInitialize()
var/turf/turf = get_turf(src)
var/turf/turf = (offset_dir ? get_turf(get_step(src, offset_dir)) : get_turf(src)) //monkestation edit: adds offset_dir check
if(note_path && !istype(note_path, /obj/item/paper)) //don't put non-paper in the paper slot thank you
log_mapping("[src] at [x],[y] had an improper note_path path, could not place paper note.")
qdel(src)
Expand Down Expand Up @@ -892,7 +892,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
icon_state = "trapdoor"

/obj/effect/mapping_helpers/trapdoor_placer/LateInitialize()
var/turf/component_target = get_turf(src)
var/turf/component_target = (offset_dir ? get_turf(get_step(src, offset_dir)) : get_turf(src)) //monkestation edit: adds offset_dir check
component_target.AddComponent(/datum/component/trapdoor, starts_open = FALSE, conspicuous = FALSE)
qdel(src)

Expand Down Expand Up @@ -977,7 +977,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
return INITIALIZE_HINT_LATELOAD

/obj/effect/mapping_helpers/broken_floor/LateInitialize()
var/turf/open/floor/floor = get_turf(src)
var/turf/open/floor/floor = (offset_dir ? get_turf(get_step(src, offset_dir)) : get_turf(src)) //monkestation edit: adds offset_dir check
floor.break_tile()
qdel(src)

Expand All @@ -993,6 +993,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
return INITIALIZE_HINT_LATELOAD

/obj/effect/mapping_helpers/burnt_floor/LateInitialize()
var/turf/open/floor/floor = get_turf(src)
var/turf/open/floor/floor = (offset_dir ? get_turf(get_step(src, offset_dir)) : get_turf(src)) //monkestation edit: adds offset_dir check
floor.burn_tile()
qdel(src)
Loading

0 comments on commit 629e337

Please sign in to comment.