Unit Test rework & Master/Ticker update (#17912)

* Unit Test rework & Master/Ticker update

* Fixes and working unit testing

* Fixes

* Test fixes and FA update

* Fixed runtimes

* Radio subsystem

* move that glob wherever later

* ident

* CIBUILDING compile option

* Fixed runtimes

* Some changes to the workflow

* CI Split

* More split

* Pathing

* Linters and Annotators

* ci dir fix

* Missing undef fixed

* Enable grep checks

* More test conversions

* More split

* Correct file

* Removes unneeded inputs

* oop

* More dependency changes

* More conversions

* Conversion fixes

* Fixes

* Some assert fixes

* Corrects start gate

* Converted some README.dms to README.mds

* Removes duplicate proc

* Removes unused defines

* Example configs

* fix dll access viol by double calling

* Post-rebase fixes

* Cleans up names global list

* Undef restart counter

* More code/game/ cleanup

* Statpanel update

* Skybox

* add

* Fix ticker

* Roundend fix

* Persistence dependency update

* Reordering

* Reordering

* Reordering

* Initstage fix

* .

* .

* Reorder

* Reorder

* Circle

* Mobs

* Air

* Test fix

* CI Script Fix

* Configs

* More ticker stuff

* This is now in 'reboot world'

* Restart world announcements

* no glob in PreInit

* to define

* Update

* Removed old include

* Make this file normal again

* moved

* test

* shared unit testing objects

* Updates batched_spritesheets and universal_icon

* .

* job data debug

* rm that

* init order

* show us

* .

* i wonder

* .

* .

* urg

* do we not have a job ID?

* .

* rm sleep for now

* updated rust-g linux binaries

* binaries update 2

* binaries update 3

* testing something

* change that

* test something

* .

* .

* .

* locavar

* test

* move that

* .

* debug

* don't run this test

* strack trace it

* cleaner

* .

* .

* cras again

* also comment this out

* return to official rust g

* Update robot_icons.dm

* monitor the generation

* .

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2025-08-10 01:37:23 +02:00
committed by GitHub
parent 5e54e17ebd
commit f4bf017921
382 changed files with 10193 additions and 4421 deletions
+9 -27
View File
@@ -1,28 +1,10 @@
/client/proc/cinematic(var/cinematic as anything in list("explosion",null))
set name = "Cinematic"
set category = "Fun.Do Not"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
if(!check_rights(R_FUN))
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", ADMIN_CATEGORY_FUN)
var/datum/cinematic/choice = tgui_input_list(
user,
"Chose a cinematic to play to everyone in the server.",
"Choose Cinematic",
sortList(subtypesof(/datum/cinematic), GLOBAL_PROC_REF(cmp_typepaths_asc)),
)
if(!choice || !ispath(choice, /datum/cinematic))
return
if(tgui_alert(usr, "Are you sure you want to run [cinematic]?","Confirmation",list("Yes","No")) != "Yes") return
if(!ticker) return
switch(cinematic)
if("explosion")
var/input = tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel"))
if(!input || input == "Cancel")
return
var/parameter = tgui_input_number(src,"station_missed = ?","Enter Parameter",0,1,0)
var/override
switch(parameter)
if(1)
override = tgui_input_list(src,"mode = ?","Enter Parameter", list("mercenary","no override"))
if(0)
override = tgui_input_list(src,"mode = ?","Enter Parameter", list("blob","mercenary","AI malfunction","no override"))
ticker.station_explosion_cinematic(parameter,override)
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"")
message_admins("[key_name_admin(src)] launched cinematic \"[cinematic]\"", 1)
return
play_cinematic(choice, world)
+5 -5
View File
@@ -97,7 +97,7 @@
set category = "Fun.Event Kit"
set name = "Make Robot"
if(!ticker)
if(!SSticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if(ishuman(M))
@@ -112,7 +112,7 @@
set category = "Fun.Event Kit"
set name = "Make Simple Animal"
if(!ticker)
if(!SSticker)
tgui_alert_async(usr, "Wait until the game starts")
return
@@ -164,7 +164,7 @@
set category = "Fun.Event Kit"
set name = "Make Alien"
if(!ticker)
if(!SSticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if(ishuman(M))
@@ -277,7 +277,7 @@
set category = "Admin.Events"
set name = "Grant Full Access"
if (!ticker)
if (!SSticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if (ishuman(M))
@@ -610,7 +610,7 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
// DNA2 - Admin Hax
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
if(!ticker)
if(!SSticker)
tgui_alert_async(usr, "Wait until the game starts")
return
if(istype(M, /mob/living/carbon))
+2 -2
View File
@@ -79,9 +79,9 @@
set name = "Radio report"
var/output = "<b>Radio Report</b><hr>"
for (var/fq in radio_controller.frequencies)
for (var/fq in SSradio.frequencies)
output += "<b>Freq: [fq]</b><br>"
var/datum/radio_frequency/fqs = radio_controller.frequencies[fq]
var/datum/radio_frequency/fqs = SSradio.frequencies[fq]
if (!fqs)
output += "&nbsp;&nbsp;<b>ERROR</b><br>"
continue
+8 -8
View File
@@ -867,7 +867,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Events"
set name = "Call Shuttle"
if ((!( ticker ) || !emergency_shuttle.location()))
if ((!( SSticker ) || !emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return
@@ -876,7 +876,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(confirm != "Yes") return
var/choice
if(ticker.mode.auto_recall_shuttle)
if(SSticker.mode.auto_recall_shuttle)
choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", "Shuttle Call", list("Confirm", "Cancel"))
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
@@ -903,7 +903,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) != "Yes") return
if(!ticker || !emergency_shuttle.can_recall())
if(!SSticker || !emergency_shuttle.can_recall())
return
emergency_shuttle.recall()
@@ -917,7 +917,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
set category = "Admin.Events"
set name = "Toggle Deny Shuttle"
if (!ticker)
if (!SSticker)
return
if(!check_rights(R_ADMIN)) return
@@ -944,12 +944,12 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(!check_rights(R_FUN)) return
if (ticker && ticker.mode)
if (SSticker && SSticker.mode)
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
return
if(ticker.random_players)
ticker.random_players = 0
if(CONFIG_GET(flag/force_random_names))
CONFIG_SET(flag/force_random_names, FALSE)
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1)
to_chat(usr, "Disabled.")
return
@@ -967,7 +967,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
ticker.random_players = 1
CONFIG_SET(flag/force_random_names, TRUE)
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -79,7 +79,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
if("show_traitors_and_objectives") // Not implemented in the UI
holder.holder.check_antagonists()
if("show_game_mode")
if (ticker.mode) tgui_alert_async(holder, "The game mode is [ticker.mode.name]")
if (SSticker.mode) tgui_alert_async(holder, "The game mode is [SSticker.mode.name]")
else tgui_alert_async(holder, "For some reason there's a ticker, but not a game mode")
//Buttons for debug.
+151 -1
View File
@@ -10,7 +10,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
to_chat(src, "Only administrators may use this command.")
return
if(!ticker)
if(!SSticker)
to_chat(usr, span_red("The game hasn't started yet!"))
return
@@ -54,3 +54,153 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
return
team.attempt_random_spawn()
//STRIKE TEAMS
//Thanks to Kilakk for the admin-button portion of this code.
GLOBAL_VAR_INIT(send_emergency_team, 0) // Used for automagic response teams; 'admin_emergency_team' for admin-spawned response teams
GLOBAL_VAR_INIT(ert_base_chance, 10) // Default base chance. Will be incremented by increment ERT chance.
GLOBAL_VAR(can_call_ert)
GLOBAL_VAR_INIT(silent_ert, 0)
/client/proc/response_team()
set name = "Dispatch Emergency Response Team"
set category = "Fun.Event Kit"
set desc = "Send an emergency response team to the station"
if(!check_rights_for(src, R_HOLDER))
to_chat(usr, span_danger("Only administrators may use this command."))
return
if(!SSticker)
to_chat(usr, span_danger("The game hasn't started yet!"))
return
if(SSticker.current_state == 1)
to_chat(usr, span_danger("The round hasn't started yet!"))
return
if(GLOB.send_emergency_team)
to_chat(usr, span_danger("[using_map.boss_name] has already dispatched an emergency response team!"))
return
if(tgui_alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT",list("Yes","No")) != "Yes")
return
if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes")
GLOB.silent_ert = 1
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
if(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")) != "Yes")
return
if(GLOB.send_emergency_team)
to_chat(usr, span_danger("Looks like somebody beat you to it!"))
return
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
admin_chat_message(message = "[key_name(usr)] is dispatching an Emergency Response Team", color = "#CC2222") //VOREStation Add
log_admin("[key_name(usr)] used Dispatch Response Team.")
trigger_armed_response_team(1)
/client/verb/JoinResponseTeam()
set name = "Join Response Team"
set category = "IC.Event"
if(!MayRespawn(1))
to_chat(usr, span_warning("You cannot join the response team at this time."))
return
if(isobserver(usr) || isnewplayer(usr))
if(!GLOB.send_emergency_team)
to_chat(usr, "No emergency response team is currently being sent.")
return
if(jobban_isbanned(usr, JOB_SYNDICATE) || jobban_isbanned(usr, JOB_EMERGENCY_RESPONSE_TEAM) || jobban_isbanned(usr, JOB_SECURITY_OFFICER))
to_chat(usr, span_danger("You are jobbanned from the emergency reponse team!"))
return
if(ert.current_antagonists.len >= ert.hard_cap)
to_chat(usr, "The emergency response team is already full!")
return
ert.create_default(usr)
else
to_chat(usr, "You need to be an observer or new player to use this.")
// returns a number of dead players in %
/proc/percentage_dead()
var/total = 0
var/deadcount = 0
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(H.client) // Monkeys and mice don't have a client, amirite?
if(H.stat == 2) deadcount++
total++
if(total == 0) return 0
else return round(100 * deadcount / total)
// counts the number of antagonists in %
/proc/percentage_antagonists()
var/total = 0
var/antagonists = 0
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(is_special_character(H) >= 1)
antagonists++
total++
if(total == 0) return 0
else return round(100 * antagonists / total)
// Increments the ERT chance automatically, so that the later it is in the round,
// the more likely an ERT is to be able to be called.
/proc/increment_ert_chance()
while(GLOB.send_emergency_team == 0) // There is no ERT at the time.
if(get_security_level() == "green")
GLOB.ert_base_chance += 1
if(get_security_level() == "yellow")
GLOB.ert_base_chance += 1
if(get_security_level() == "violet")
GLOB.ert_base_chance += 2
if(get_security_level() == "orange")
GLOB.ert_base_chance += 2
if(get_security_level() == "blue")
GLOB.ert_base_chance += 2
if(get_security_level() == "red")
GLOB.ert_base_chance += 3
if(get_security_level() == "delta")
GLOB.ert_base_chance += 10 // Need those big guns
sleep(600 * 3) // Minute * Number of Minutes
/proc/trigger_armed_response_team(var/force = 0)
if(!GLOB.can_call_ert && !force)
return
if(GLOB.send_emergency_team)
return
var/send_team_chance = GLOB.ert_base_chance // Is incremented by increment_ert_chance.
send_team_chance += 2*percentage_dead() // the more people are dead, the higher the chance
send_team_chance += percentage_antagonists() // the more antagonists, the higher the chance
send_team_chance = min(send_team_chance, 100)
if(force) send_team_chance = 100
// there's only a certain chance a team will be sent
if(!prob(send_team_chance))
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "[using_map.boss_name]")
GLOB.can_call_ert = 0 // Only one call per round, ladies.
return
if(GLOB.silent_ert == 0)
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "[using_map.boss_name]")
GLOB.can_call_ert = 0 // Only one call per round, gentleman.
GLOB.send_emergency_team = 1
consider_ert_load() //VOREStation Add
sleep(600 * 5)
GLOB.send_emergency_team = 0 // Can no longer join the ERT.
GLOBAL_VAR(ert_loaded)
/proc/consider_ert_load()
if(!GLOB.ert_loaded)
GLOB.ert_loaded = TRUE
var/datum/map_template/MT = SSmapping.map_templates["Special Area - ERT"]
if(!istype(MT))
error("ERT Area is not a valid map template!")
else
MT.load_new_z(centered = TRUE)
log_and_message_admins("Loaded the ERT shuttle just now.")
+81
View File
@@ -0,0 +1,81 @@
//Based on the ERT setup
GLOBAL_VAR_INIT(send_beruang, 0)
GLOBAL_VAR_INIT(can_call_traders, 1)
/client/proc/trader_ship()
set name = "Dispatch Beruang Trader Ship"
set category = "Fun.Event Kit"
set desc = "Invite players to join the Beruang."
if(!holder)
to_chat(usr, span_danger("Only administrators may use this command."))
return
if(!SSticker)
to_chat(usr, span_danger("The game hasn't started yet!"))
return
if(SSticker.current_state == 1)
to_chat(usr, span_danger("The round hasn't started yet!"))
return
if(GLOB.send_beruang)
to_chat(usr, span_danger("The Beruang has already been sent this round!"))
return
if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes")
return
if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red
if(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")) != "Yes")
return
if(GLOB.send_beruang)
to_chat(usr, span_danger("Looks like somebody beat you to it!"))
return
message_admins("[key_name_admin(usr)] is dispatching the Beruang.", 1)
log_admin("[key_name(usr)] used Dispatch Beruang Trader Ship.")
trigger_trader_visit()
/client/verb/JoinTraders()
set name = "Join Trader Visit"
set category = "IC.Event"
if(!MayRespawn(1))
to_chat(usr, span_warning("You cannot join the traders."))
return
if(isobserver(usr) || isnewplayer(usr))
if(!GLOB.send_beruang)
to_chat(usr, "The Beruang is not currently heading to the station.")
return
if(traders.current_antagonists.len >= traders.hard_cap)
to_chat(usr, "The number of trader slots is already full!")
return
traders.create_default(usr)
else
to_chat(usr, "You need to be an observer or new player to use this.")
/proc/trigger_trader_visit()
if(!GLOB.can_call_traders)
return
if(GLOB.send_beruang)
return
command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control")
GLOB.can_call_traders = 0 // Only one call per round.
GLOB.send_beruang = 1
consider_trader_load() //VOREStation Add
sleep(600 * 5)
GLOB.send_beruang = 0 // Can no longer join the traders.
GLOBAL_VAR(trader_loaded)
/proc/consider_trader_load()
if(!GLOB.trader_loaded)
GLOB.trader_loaded = TRUE
var/datum/map_template/MT = SSmapping.map_templates["Special Area - Salamander Trader"] //was: "Special Area - Trader"
if(!istype(MT))
error("Trader is not a valid map template!")
else
MT.load_new_z(centered = TRUE)
log_and_message_admins("Loaded the trade shuttle just now.")
+5 -5
View File
@@ -2,21 +2,21 @@
set category = "Fun.Event Kit"
set name = "Create AI Triumvirate"
if(ticker.current_state > GAME_STATE_PREGAME)
if(SSticker.current_state > GAME_STATE_PREGAME)
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
if(job_master && ticker)
if(job_master && SSticker)
var/datum/job/job = job_master.GetJob(JOB_AI)
if(!job)
to_chat(usr, "Unable to locate the AI job")
return
if(ticker.triai)
ticker.triai = 0
if(GLOB.triai)
GLOB.triai = 0
to_chat(usr, "Only one AI will be spawned at round start.")
message_admins(span_blue("[key_name_admin(usr)] has toggled off triple AIs at round start."), 1)
else
ticker.triai = 1
GLOB.triai = 1
to_chat(usr, "There will be an AI Triumvirate at round start.")
message_admins(span_blue("[key_name_admin(usr)] has toggled on triple AIs at round start."), 1)
return