Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into spooktober-update
Browse files Browse the repository at this point in the history
  • Loading branch information
ariaworld committed Nov 25, 2023
2 parents 23ea012 + 2f67f2c commit 2288ab9
Show file tree
Hide file tree
Showing 61 changed files with 14,575 additions and 11,744 deletions.
467 changes: 247 additions & 220 deletions _maps/RandomRuins/LavaRuins/lavaland_surface_seed_vault.dmm

Large diffs are not rendered by default.

2,543 changes: 1,772 additions & 771 deletions _maps/map_files/SpookyStation/SpookyStation.dmm

Large diffs are not rendered by default.

1,747 changes: 1,002 additions & 745 deletions _maps/map_files/debug/runtimestation.dmm

Large diffs are not rendered by default.

16,952 changes: 8,586 additions & 8,366 deletions _maps/map_files/generic/CentCom.dmm

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions code/datums/elements/flavor_text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
/datum/element/flavor_text/proc/borged_update_flavor_text(mob/new_character, client/C)
C = C || GET_CLIENT(new_character)
if(!C)
LAZYREMOVE(texts_by_atom, new_character)
LAZYSET(texts_by_atom, new_character, "")
return
var/datum/preferences/P = C.prefs
if(!P)
LAZYREMOVE(texts_by_atom, new_character)
LAZYSET(texts_by_atom, new_character, "")
return
if(P.custom_names["cyborg"] == new_character.real_name)
LAZYSET(texts_by_atom, new_character, P.features[save_key])
else
LAZYREMOVE(texts_by_atom, new_character)
LAZYSET(texts_by_atom, new_character, "")

//subtypes with additional hooks for DNA and preferences.
/datum/element/flavor_text/carbon
Expand Down
25 changes: 15 additions & 10 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
A.power_light = FALSE
A.power_equip = FALSE
A.power_environ = FALSE
INVOKE_ASYNC(A, .proc/power_change)
A.power_change()
STOP_PROCESSING(SSobj, src)
return ..()

Expand Down Expand Up @@ -579,15 +579,20 @@ GLOBAL_LIST_EMPTY(teleportlocs)
// called when power status changes

/area/proc/power_change()
for(var/obj/machinery/M in src) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
if(sub_areas)
for(var/i in sub_areas)
var/area/A = i
A.power_light = power_light
A.power_equip = power_equip
A.power_environ = power_environ
INVOKE_ASYNC(A, .proc/power_change)
SHOULD_NOT_SLEEP(TRUE)
if(contents.len < GLOB.machines.len) // it would be faster to loop over contents
for(var/obj/machinery/M in src) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
else // it would be faster to loop over the machines list
for(var/obj/machinery/M as anything in GLOB.machines) // for each machine
if(get_area(M) != src) // in the area
continue
M.power_change() // reverify power status (to update icons etc.)
for(var/area/A as anything in sub_areas)
A.power_light = power_light
A.power_equip = power_equip
A.power_environ = power_environ
A.power_change()
update_appearance()

/area/proc/usage(chan)
Expand Down
102 changes: 81 additions & 21 deletions code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
var/restrict_ghost_roles = TRUE
/// What mob type the ruleset is restricted to.
var/required_type = /mob/living/carbon/human
var/should_use_midround_pref = TRUE
var/list/living_players = list()
var/list/living_antags = list()
var/list/dead_players = list()
Expand All @@ -23,6 +24,7 @@
/datum/dynamic_ruleset/midround/from_ghosts
weight = 0
required_type = /mob/dead/observer
should_use_midround_pref = FALSE
/// Whether the ruleset should call generate_ruleset_body or not.
var/makeBody = TRUE
/// The rule needs this many applicants to be properly executed.
Expand All @@ -43,6 +45,9 @@
if (!M.client) // Are they connected?
trimmed_list.Remove(M)
continue
if(should_use_midround_pref && !(M.client.prefs.toggles & MIDROUND_ANTAG))
trimmed_list.Remove(M)
continue
if(!mode.check_age(M.client, minimum_required_age))
trimmed_list.Remove(M)
continue
Expand Down Expand Up @@ -106,10 +111,10 @@
return
message_admins("Polling [possible_volunteers.len] players to apply for the [name] ruleset.")
log_game("DYNAMIC: Polling [possible_volunteers.len] players to apply for the [name] ruleset.")
var/flag = antag_flag_override ? antag_flag_override : antag_flag
candidates = pollGhostCandidates("The mode is looking for volunteers to become [antag_flag] for [name]", flag, be_special_flag = flag, ignore_category = antag_flag, poll_time = 300)

candidates = pollGhostCandidates("The mode is looking for volunteers to become [antag_flag] for [name]", antag_flag, be_special_flag = antag_flag_override ? antag_flag_override : antag_flag, poll_time = 300)

if(!candidates || candidates.len <= 0)
if(!length(candidates))
mode.dynamic_log("The ruleset [name] received no applications.")
mode.executed_rules -= src
attempt_replacement()
Expand Down Expand Up @@ -164,19 +169,10 @@
/datum/dynamic_ruleset/midround/from_ghosts/proc/setup_role(datum/antagonist/new_role)
return

/// Fired when there are no valid candidates. Will spawn a sleeper agent or latejoin traitor.
/// Fired when there are no valid candidates. Will try to roll again in a minute.
/datum/dynamic_ruleset/midround/from_ghosts/proc/attempt_replacement()
var/datum/dynamic_ruleset/midround/autotraitor/sleeper_agent = new

// Otherwise, it has a chance to fail. We don't want that, since this is already pretty unlikely.
sleeper_agent.has_failure_chance = FALSE

mode.configure_ruleset(sleeper_agent)

if (!mode.picking_specific_rule(sleeper_agent))
return

mode.picking_specific_rule(/datum/dynamic_ruleset/latejoin/infiltrator)
COOLDOWN_START(mode, midround_injection_cooldown, 1 MINUTES)
mode.forced_injection = TRUE

//////////////////////////////////////////////
// //
Expand Down Expand Up @@ -233,9 +229,8 @@
return ..()

/datum/dynamic_ruleset/midround/autotraitor/execute()
var/mob/M = pick(living_players)
var/mob/M = pick_n_take(living_players)
assigned += M
living_players -= M
var/datum/antagonist/traitor/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.")
Expand Down Expand Up @@ -336,7 +331,7 @@
candidates -= player
continue

if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0))
if(player.mind && (player.mind.special_role || length(player.mind.antag_datums)))
candidates -= player

/datum/dynamic_ruleset/midround/malf/execute()
Expand All @@ -355,6 +350,70 @@
M.add_ion_law(generate_ion_law())
return TRUE

//////////////////////////////////////////////
// //
// WIZARD (CREW) //
// //
//////////////////////////////////////////////

/datum/dynamic_ruleset/midround/wizard
name = "Wizard"
antag_datum = /datum/antagonist/wizard
antag_flag = "wizard mid crew"
antag_flag_override = ROLE_WIZARD
protected_roles = list("Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg")
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
required_enemies = list(0,0,0,0,0,0,0,0,0,0)
weight = 0
cost = 20
requirements = list(101,101,100,60,40,20,20,20,10,10)
repeatable = TRUE
var/datum/mind/wizard

/datum/dynamic_ruleset/midround/wizard/trim_candidates()
..()
candidates = living_players
for(var/mob/living/player as anything in candidates)
var/turf/player_turf = get_turf(player)
if(!player_turf || !is_station_level(player_turf.z))
candidates -= player
continue

if(player.mind && (player.mind.special_role || length(player.mind.antag_datums) > 0))
candidates -= player
candidates = pollCandidates("Do you want to be a wizard?", antag_flag_override, be_special_flag = antag_flag_override, ignore_category = antag_flag_override, poll_time = 300)

/datum/dynamic_ruleset/midround/wizard/ready(forced = FALSE)
if(GLOB.wizardstart.len == 0)
log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
return FALSE
return ..()

/datum/dynamic_ruleset/midround/wizard/execute()
var/mob/M = pick_n_take(living_players)
assigned += M
var/datum/antagonist/wizard/on_station/wiz = new
M.mind.add_antag_datum(wiz)
wizard = M.mind
message_admins("[ADMIN_LOOKUPFLW(M)] was selected by the [name] ruleset and has been made into a midround wizard.")
log_game("DYNAMIC: [key_name(M)] was selected by the [name] ruleset and has been made into a midround wizard.")
return TRUE

/datum/dynamic_ruleset/midround/wizard/rule_process()
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
return FALSE
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
return FALSE

if(SSevents.wizardmode) //If summon events was active, turn it off
SSevents.toggleWizardmode()
SSevents.resetFrequency()

return RULESET_STOP_PROCESSING

//////////////////////////////////////////////
// //
// WIZARD (GHOST) //
Expand Down Expand Up @@ -459,7 +518,7 @@
antag_flag = "clock mid"
antag_flag_override = ROLE_SERVANT_OF_RATVAR
protected_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
restricted_roles = list("AI", "Cyborg")
enemy_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
required_candidates = 2
Expand Down Expand Up @@ -536,6 +595,7 @@
name = "Blob Infection"
antag_datum = /datum/antagonist/blob
antag_flag = "blob mid"
antag_flag_override = ROLE_BLOB
protected_roles = list("Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
restricted_roles = list("Cyborg", "AI", "Positronic Brain")
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
Expand All @@ -559,11 +619,11 @@
candidates -= player

/datum/dynamic_ruleset/midround/blob_infection/execute()
if(!candidates || !candidates.len)
if(!length(candidates))
return FALSE
var/mob/living/carbon/human/blob_antag = pick_n_take(candidates)
assigned += blob_antag.mind
blob_antag.mind.special_role = antag_flag
blob_antag.mind.special_role = antag_flag_override
return ..()

//////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
/obj/machinery/door/firedoor/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
latetoggle()
INVOKE_ASYNC(src, .proc/latetoggle)
else
stat |= NOPOWER

Expand Down
28 changes: 24 additions & 4 deletions code/modules/antagonists/wizard/wizard.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#define WIZARD_DO_NOTHING 0
#define WIZARD_QDEL_INVENTORY 1
#define WIZARD_DROP_INVENTORY 2

/datum/antagonist/wizard
name = "Space Wizard"
roundend_category = "wizards/witches"
Expand All @@ -10,7 +14,8 @@
ui_name = "AntagInfoWizard"
suicide_cry = "FOR THE FEDERATION!!"
var/give_objectives = TRUE
var/strip = TRUE //strip before equipping
var/inventory_mode = WIZARD_QDEL_INVENTORY
var/change_species = TRUE
var/allow_rename = TRUE
var/datum/team/wizard/wiz_team //Only created if wizard summons apprentices
var/move_to_lair = TRUE
Expand Down Expand Up @@ -90,10 +95,14 @@
var/mob/living/carbon/human/H = owner.current
if(!istype(H))
return
if(strip)
H.delete_equipment()
switch(inventory_mode)
if(WIZARD_QDEL_INVENTORY)
H.delete_equipment()
if(WIZARD_DROP_INVENTORY)
H.unequip_everything()
//Wizards are human by default. Use the mirror if you want something else.
H.set_species(/datum/species/human)
if(change_species)
H.set_species(/datum/species/human)
if(H.age < wiz_age)
H.age = wiz_age
H.equipOutfit(outfit_type)
Expand Down Expand Up @@ -253,6 +262,17 @@
new_objective.owner = owner
objectives += new_objective

/datum/antagonist/wizard/on_station
inventory_mode = WIZARD_DROP_INVENTORY
change_species = FALSE

/datum/antagonist/wizard/on_station/on_gain()
var/datum/effect_system/smoke_spread/smoke = new
smoke.start()
smoke.set_up(2, get_turf(owner))
owner.current.visible_message("<span class='danger'>[owner] suddenly disappears in a puff of smoke, leaving [owner.p_their()] clothes behind!</span>", "<span class='userdanger'>You feel yourself being pulled away...</span>")
return ..()

//Solo wizard report
/datum/antagonist/wizard/roundend_report()
var/list/parts = list()
Expand Down
8 changes: 4 additions & 4 deletions code/modules/holiday/halloween/bartholomew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/obj/item/barthpot/attackby(obj/item/I, mob/user, params)
if(BallTutorial)
say("Hello and welcome to the annual Citadelstation Spookyball 2021! CENTCOM requisitioned this old hospital as a new colony site two years ago, and we’re back again after a few additions here and there. Next to me you can find all the tools you’ll need to build a nice private house, if you’re here for that kind of thing. The axes will chop trees, and give you wood. Shovels will remove grass and things, which you can use the grass to make beds and backets. The pickaxe will allow you pick out the nearby rocks, if you’re more interested in building a cave dwelling. Finally the umbrella and light sources are because it’s spooky, and it might rain! As for interesting spots; There’s the old abandoned mansion which you can get to by going through the entrance and towards the east. There’s also a mech arena directly south, and a racetrack in the caves to the right of the arena, follow the lanterns. And make sure to explore the caves too! Lots of neat things to find!")
say("Hello and welcome to the annual Citadel Station Spooky Ball [time2text(world.realtime, "YYYY")]! CENTCOM requisitioned this old hospital as a new colony site [text2num(time2text(world.realtime,"YYYY")) - 2019] years ago, and we’re back again after a few additions here and there. Next to me you can find all the tools you’ll need to build a nice private house, if you’re here for that kind of thing. The axes will chop trees, and give you wood. Shovels will remove grass and things, which you can use the grass to make beds and backets. The pickaxe will allow you pick out the nearby rocks, if you’re more interested in building a cave dwelling. Finally the umbrella and light sources are because it’s spooky, and it might rain! As for interesting spots; There’s the old abandoned mansion which you can get to by going through the entrance and towards the east. There’s also a mech arena directly south, and a racetrack in the caves to the right of the arena, follow the lanterns. And make sure to explore the caves too! Lots of neat things to find!")
return
if(!active)
say("Meow!")
Expand All @@ -24,23 +24,23 @@
if(istype(I, I2))
qdel(I)
new /obj/item/reagent_containers/food/snacks/special_candy(loc)
to_chat(user, "<span class='notice'>You add the [I.name] to the pot and watch as it melts into the mixture, a candy crystalising in it's wake.</span>")
to_chat(user, "<span class='notice'>You add the [I.name] to the pot and watch as it melts into the mixture, a candy crystallizing in it's wake.</span>")
say("Hooray! Thank you!")
items_list -= I2
return
say("It doesn't seem like that's magical enough!")

/obj/item/barthpot/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(BallTutorial)
say("Hello and welcome to the annual Citadelstation Spookyball 2021! CENTCOM requisitioned this old hospital as a new colony site two years ago, and we’re back again after a few additions here and there. Next to me you can find all the tools you’ll need to build a nice private house, if you’re here for that kind of thing. The axes will chop trees, and give you wood. Shovels will remove grass and things, which you can use the grass to make beds and backets. The pickaxe will allow you pick out the nearby rocks, if you’re more interested in building a cave dwelling. Finally the umbrella and light sources are because it’s spooky, and it might rain! As for interesting spots; There’s the old abandoned mansion which you can get to by going through the entrance and towards the east. There’s also a mech arena directly south, and a racetrack in the caves to the right of the arena, follow the lanterns. And make sure to explore the caves too! Lots of neat things to find!")
say("Hello and welcome to the annual Citadel Station Spooky Ball [time2text(world.realtime, "YYYY")]! CENTCOM requisitioned this old hospital as a new colony site [text2num(time2text(world.realtime,"YYYY")) - 2019] years ago, and we’re back again after a few additions here and there. Next to me you can find all the tools you’ll need to build a nice private house, if you’re here for that kind of thing. The axes will chop trees, and give you wood. Shovels will remove grass and things, which you can use the grass to make beds and backets. The pickaxe will allow you pick out the nearby rocks, if you’re more interested in building a cave dwelling. Finally the umbrella and light sources are because it’s spooky, and it might rain! As for interesting spots; There’s the old abandoned mansion which you can get to by going through the entrance and towards the east. There’s also a mech arena directly south, and a racetrack in the caves to the right of the arena, follow the lanterns. And make sure to explore the caves too! Lots of neat things to find!")
return
if(!active)
say("Meow!")
return
say("Hello there, I'm Bartholomew, Jacqueline's Familiar.")
sleep(20)

say("I'm currently seeking items to put into my pot, if we get the right items, it should crystalise into a magic candy!")
say("I'm currently seeking items to put into my pot, if we get the right items, it should crystalize into a magic candy!")
if(!iscarbon(user))
say("Though... I'm not sure you can help me.")

Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/power.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
addStaticPower(-value, powerchannel)

/obj/machinery/proc/power_change()
//SIGNAL_HANDLER
SHOULD_NOT_SLEEP(TRUE)
//SHOULD_CALL_PARENT(TRUE)

if(stat & BROKEN)
Expand Down
12 changes: 12 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,18 @@
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "sniper_zoom"

/datum/action/item_action/toggle_scope_zoom/IsAvailable(silent = FALSE)
. = ..()
if(!. && owner)
var/obj/item/gun/G = target
G.zoom(owner, owner.dir, FALSE)

/datum/action/item_action/toggle_scope_zoom/Trigger()
. = ..()
if(.)
var/obj/item/gun/G = target
G.zoom(owner, owner.dir)

/datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L)
var/obj/item/gun/G = target
G.zoom(L, L.dir, FALSE)
Expand Down
Loading

0 comments on commit 2288ab9

Please sign in to comment.