mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] ticker followup (#11474)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3cb3fbcd0a
commit
495c373e69
@@ -7,8 +7,8 @@
|
||||
/proc/send2adminchat(category, message, embed_links = FALSE)
|
||||
set waitfor = FALSE
|
||||
|
||||
category = replacetext(replacetext(category, "\proper", ""), "\improper", "")
|
||||
message = replacetext(replacetext(message, "\proper", ""), "\improper", "")
|
||||
category = strip_improper(category)
|
||||
message = strip_improper(message)
|
||||
if(!embed_links)
|
||||
message = GLOB.has_discord_embeddable_links.Replace(replacetext(message, "`", ""), " ```$1``` ")
|
||||
world.TgsTargetedChatBroadcast(new /datum/tgs_message_content("[category] | [message]"), TRUE)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/area/A = isarea(X) ? X : get_area(X)
|
||||
if(!A)
|
||||
return null
|
||||
return format_text ? format_text(A.name) : A.name
|
||||
return format_text ? strip_improper(A.name) : A.name
|
||||
|
||||
/** Checks if any living humans are in a given area. */
|
||||
/proc/area_is_occupied(var/area/myarea)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
roundend_callbacks.InvokeAsync()
|
||||
LAZYCLEARLIST(round_end_events)
|
||||
|
||||
to_world(span_filter_system("<br><br><br><H1>A round of [mode.name] has ended!</H1>"))
|
||||
to_chat(world, span_filter_system("<br><br><br><H1>A round of [mode.name] has ended!</H1>"))
|
||||
for(var/mob/Player in GLOB.player_list)
|
||||
if(Player.mind && !isnewplayer(Player))
|
||||
if(Player.stat != DEAD)
|
||||
@@ -28,20 +28,20 @@
|
||||
to_chat(Player, span_filter_system(span_red(span_bold("You did not survive the events on [station_name()]..."))))
|
||||
else
|
||||
to_chat(Player, span_filter_system(span_red(span_bold("You did not survive the events on [station_name()]..."))))
|
||||
to_world(span_filter_system("<br>"))
|
||||
to_chat(world, span_filter_system("<br>"))
|
||||
|
||||
for (var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list)
|
||||
if (aiPlayer.stat != 2)
|
||||
to_world(span_filter_system(span_bold("[aiPlayer.name]'s laws at the end of the round were:"))) // VOREStation edit
|
||||
to_chat(world, span_filter_system(span_bold("[aiPlayer.name]'s laws at the end of the round were:"))) // VOREStation edit
|
||||
else
|
||||
to_world(span_filter_system(span_bold("[aiPlayer.name]'s laws when it was deactivated were:"))) // VOREStation edit
|
||||
to_chat(world, span_filter_system(span_bold("[aiPlayer.name]'s laws when it was deactivated were:"))) // VOREStation edit
|
||||
aiPlayer.show_laws(1)
|
||||
|
||||
if (aiPlayer.connected_robots.len)
|
||||
var/robolist = span_bold("The AI's loyal minions were:") + " "
|
||||
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
|
||||
robolist += "[robo.name][robo.stat?" (Deactivated), ":", "]" // VOREStation edit
|
||||
to_world(span_filter_system("[robolist]"))
|
||||
to_chat(world, span_filter_system("[robolist]"))
|
||||
|
||||
var/dronecount = 0
|
||||
|
||||
@@ -58,17 +58,18 @@
|
||||
|
||||
if (!robo.connected_ai)
|
||||
if (robo.stat != 2)
|
||||
to_world(span_filter_system(span_bold("[robo.name] survived as an AI-less stationbound synthetic! Its laws were:"))) // VOREStation edit
|
||||
to_chat(world, span_filter_system(span_bold("[robo.name] survived as an AI-less stationbound synthetic! Its laws were:"))) // VOREStation edit
|
||||
else
|
||||
to_world(span_filter_system(span_bold("[robo.name] was unable to survive the rigors of being a stationbound synthetic without an AI. Its laws were:"))) // VOREStation edit
|
||||
to_chat(world, span_filter_system(span_bold("[robo.name] was unable to survive the rigors of being a stationbound synthetic without an AI. Its laws were:"))) // VOREStation edit
|
||||
|
||||
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
|
||||
robo.laws.show_laws(world)
|
||||
|
||||
if(dronecount)
|
||||
to_world(span_filter_system(span_bold("There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.")))
|
||||
to_chat(world, span_filter_system(span_bold("There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.")))
|
||||
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
var/extra_delay = mode.declare_completion()//To declare normal completion.
|
||||
RoundTrivia()
|
||||
|
||||
//Ask the event manager to print round end information
|
||||
SSevents.RoundEnd()
|
||||
@@ -92,9 +93,8 @@
|
||||
|
||||
SSdbcore.SetRoundEnd()
|
||||
|
||||
sleep(5 SECONDS)
|
||||
ready_for_reboot = TRUE
|
||||
standard_reboot()
|
||||
addtimer(CALLBACK(src, PROC_REF(standard_reboot)), 5 SECONDS + extra_delay)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/standard_reboot()
|
||||
if(ready_for_reboot)
|
||||
|
||||
@@ -21,14 +21,14 @@ GLOBAL_VAR_INIT(items_sold_shift_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(disposals_flush_shift_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(rocks_drilled_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(mech_destroyed_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(prey_eaten_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(prey_digested_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously
|
||||
GLOBAL_LIST_EMPTY(security_printer_tickets) //VOREStation Edit
|
||||
GLOBAL_VAR_INIT(prey_eaten_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(prey_digested_roundstat, 0)
|
||||
GLOBAL_VAR_INIT(items_digested_roundstat, 0)
|
||||
GLOBAL_LIST_EMPTY(security_printer_tickets)
|
||||
GLOBAL_LIST_EMPTY(refined_chems_sold)
|
||||
|
||||
/hook/roundend/proc/RoundTrivia()//bazinga
|
||||
/datum/controller/subsystem/ticker/proc/RoundTrivia()//bazinga
|
||||
var/list/valid_stats_list = list() //This is to be populated with the good shit
|
||||
|
||||
if(GLOB.lost_limbs_shift_roundstat > 1)
|
||||
@@ -56,7 +56,6 @@ GLOBAL_LIST_EMPTY(refined_chems_sold)
|
||||
else if(GLOB.disposals_flush_shift_roundstat > 40)
|
||||
valid_stats_list.Add("The disposal system flushed a whole [GLOB.disposals_flush_shift_roundstat] times for this shift. We should really invest in waste treatement.")
|
||||
|
||||
//VOREStation add Start - Ticket time!
|
||||
if(GLOB.security_printer_tickets.len)
|
||||
valid_stats_list.Add(span_danger("[GLOB.security_printer_tickets.len] unique security tickets were issued today!") + "<br>Examples include:")
|
||||
var/good_num = 5
|
||||
@@ -73,7 +72,7 @@ GLOBAL_LIST_EMPTY(refined_chems_sold)
|
||||
good_num = 0
|
||||
|
||||
if(GLOB.prey_eaten_roundstat > 0)
|
||||
valid_stats_list.Add("Individuals were eaten a total of [GLOB.prey_eaten_roundstat] times today!") //CHOMPEdit
|
||||
valid_stats_list.Add("Individuals were eaten a total of [GLOB.prey_eaten_roundstat] times today!")
|
||||
if(GLOB.prey_digested_roundstat > 0)
|
||||
valid_stats_list.Add("A total of [GLOB.prey_digested_roundstat] individuals were digested today!")
|
||||
if(GLOB.prey_absorbed_roundstat > 0)
|
||||
@@ -100,7 +99,7 @@ GLOBAL_LIST_EMPTY(refined_chems_sold)
|
||||
valid_stats_list.Add("For a total of: [points] points, or [end_dols] [end_dols > 1 ? "thalers" : "thaler"]!")
|
||||
|
||||
if(LAZYLEN(valid_stats_list))
|
||||
to_world(span_world("Shift trivia!"))
|
||||
to_chat(world, span_world("Shift trivia!"))
|
||||
|
||||
for(var/body in valid_stats_list)
|
||||
to_world(span_filter_system("[body]"))
|
||||
to_chat(world, span_filter_system("[body]"))
|
||||
@@ -400,7 +400,7 @@ GLOBAL_LIST_EMPTY(text_tag_cache)
|
||||
* Strip out the special beyond characters for \proper and \improper
|
||||
* from text that will be sent to the browser.
|
||||
*/
|
||||
/proc/strip_improper(var/text)
|
||||
/proc/strip_improper(text)
|
||||
return replacetext(replacetext(text, "\proper", ""), "\improper", "")
|
||||
|
||||
/proc/pencode2html(t)
|
||||
|
||||
@@ -1206,9 +1206,6 @@ var/list/WALLITEMS = list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
|
||||
/proc/topic_link(var/datum/D, var/arglist, var/content)
|
||||
if(istype(arglist,/list))
|
||||
arglist = list2params(arglist)
|
||||
|
||||
@@ -10,12 +10,6 @@
|
||||
*/
|
||||
/hook/roundstart
|
||||
|
||||
/**
|
||||
* Roundend hook.
|
||||
* Called in gameticker.dm when a round ends.
|
||||
*/
|
||||
/hook/roundend
|
||||
|
||||
/**
|
||||
* Death hook.
|
||||
* Called in death.dm when someone dies.
|
||||
|
||||
@@ -452,7 +452,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
|
||||
if(!delay)
|
||||
delay = CONFIG_GET(number/round_end_countdown) * 10
|
||||
delay = CONFIG_GET(number/round_end_countdown) SECONDS
|
||||
if(delay >= 60 SECONDS)
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), delay), 60 SECONDS)
|
||||
|
||||
var/skip_delay = check_rights()
|
||||
if(delay_end && !skip_delay)
|
||||
@@ -473,6 +475,16 @@ SUBSYSTEM_DEF(ticker)
|
||||
UNTIL(round_end_sound_sent || (world.time - start_wait) > (delay * 2)) //don't wait forever
|
||||
reboot_timer = addtimer(CALLBACK(src, PROC_REF(reboot_callback), reason, end_string), delay - (world.time - start_wait), TIMER_STOPPABLE)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/announce_countodwn(remaining_time)
|
||||
if(remaining_time >= 60 SECONDS)
|
||||
remaining_time -= 60 SECONDS
|
||||
to_chat(world, span_boldannounce("Rebooting World in [DisplayTimeText(remaining_time)]."))
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), remaining_time), 60 SECONDS)
|
||||
return
|
||||
if(remaining_time > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(announce_countodwn), 0), remaining_time)
|
||||
return
|
||||
to_chat(world, span_boldannounce("Rebooting World."))
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/reboot_callback(reason, end_string)
|
||||
if(end_string)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
RegisterSignal(user, COMSIG_PARENT_QDELETING, PROC_REF(user_deleted))
|
||||
src.window_id = window_id
|
||||
if (title)
|
||||
src.title = format_text(title)
|
||||
src.title = strip_improper(title)
|
||||
if (width)
|
||||
src.width = width
|
||||
if (height)
|
||||
|
||||
@@ -194,5 +194,5 @@
|
||||
else if(finished == 2)
|
||||
feedback_set_details("round_end_result","loss - rev heads killed")
|
||||
to_world(span_boldannounce(span_large("The crew succumbed to the epidemic!")))
|
||||
..()
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -282,18 +282,22 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
|
||||
/datum/game_mode/proc/cleanup() //This is called when the round has ended but not the game, if any cleanup would be necessary in that case.
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/declare_completion()
|
||||
|
||||
var/is_antag_mode = (antag_templates && antag_templates.len)
|
||||
check_victory()
|
||||
if(is_antag_mode)
|
||||
sleep(10)
|
||||
/datum/game_mode/proc/declare_antag_goals()
|
||||
for(var/datum/antagonist/antag in antag_templates)
|
||||
sleep(10)
|
||||
antag.check_victory()
|
||||
antag.print_player_summary()
|
||||
sleep(10)
|
||||
addtimer(CALLBACK(src, PROC_REF(finish_completion_declatration)), 1 SECOND)
|
||||
|
||||
/datum/game_mode/proc/declare_completion()
|
||||
var/is_antag_mode = LAZYLEN(antag_templates)
|
||||
check_victory()
|
||||
if(is_antag_mode)
|
||||
is_antag_mode += 2
|
||||
addtimer(CALLBACK(src, PROC_REF(declare_antag_goals)), 1 SECOND)
|
||||
return is_antag_mode SECONDS
|
||||
|
||||
/datum/game_mode/proc/finish_completion_declatration()
|
||||
var/clients = 0
|
||||
var/surviving_humans = 0
|
||||
var/surviving_total = 0
|
||||
@@ -408,8 +412,6 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
|
||||
)
|
||||
)
|
||||
|
||||
return 0
|
||||
|
||||
/datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere.
|
||||
return 0
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
feedback_set_details("round_end_result","end - evacuation")
|
||||
feedback_set("round_end_result",survivors)
|
||||
|
||||
..()
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
#undef METEOR_DELAY
|
||||
|
||||
@@ -34,8 +34,7 @@ GLOBAL_LIST_EMPTY(nuke_disks)
|
||||
|
||||
/datum/game_mode/nuclear/declare_completion()
|
||||
if(CONFIG_GET(flag/objectives_disabled))
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
var/disk_rescued = 1
|
||||
for(var/obj/item/disk/nuclear/D in GLOB.nuke_disks)
|
||||
var/disk_area = get_area(D)
|
||||
@@ -89,5 +88,4 @@ GLOBAL_LIST_EMPTY(nuke_disks)
|
||||
to_world(span_filter_system(span_large(span_bold("Neutral Victory"))))
|
||||
to_world(span_filter_system(span_bold("Round was mysteriously interrupted!")))
|
||||
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/storage/fancy/cigar/choiba
|
||||
name = "/improper Choiba cigar case"
|
||||
name = "\improper Choiba cigar case"
|
||||
desc = "A fancy case for holding your cigars when you are not smoking them."
|
||||
description_fluff = "The exquisite wooden case bears the markings of the \
|
||||
Choiba cigar company based out of Cuba. The perfectly humidized case keeps \
|
||||
|
||||
@@ -178,7 +178,7 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit,
|
||||
/proc/init_lunchable_list(var/list/lunches)
|
||||
. = list()
|
||||
for(var/obj/O as anything in lunches)
|
||||
var/name = replacetext(initial(O.name), new/regex("\improper *", "g"), "")
|
||||
var/name = strip_improper(initial(O.name))
|
||||
.[name] = O
|
||||
return sortAssoc(.)
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
if(!isbelly(loc) || !vore_death_privacy)
|
||||
for(var/mob/observer/dead/O in GLOB.mob_list)
|
||||
if(O.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay))
|
||||
to_chat(O, span_deadsay(span_bold("[src]") + " has died in " + span_bold("[get_area(src)]") + ". [ghost_follow_link(src, O)] "))
|
||||
to_chat(O, span_deadsay(span_bold("[src]") + " has died in " + span_bold(strip_improper("[A]")) + ". [ghost_follow_link(src, O)] "))
|
||||
|
||||
if(!gibbed && !isbelly(loc))
|
||||
playsound(src, pick(get_species_sound(get_gendered_sound(src))["death"]), src.species.death_volume, 1, 20, volume_channel = VOLUME_CHANNEL_DEATH_SOUNDS)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if(G.emped == 1)
|
||||
t += "<BR>[tracked_gpstag]: ERROR"
|
||||
else
|
||||
t += "<BR>[tracked_gpstag]: [format_text(gps_area.name)] ([pos.x], [pos.y], [pos.z])"
|
||||
t += "<BR>[tracked_gpstag]: [strip_improper(gps_area.name)] ([pos.x], [pos.y], [pos.z])"
|
||||
|
||||
var/datum/browser/popup = new(user, "GPS", name, 600, 450)
|
||||
popup.set_content(t)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
data["message_current_id"] = current_viewing_message_id
|
||||
data["message_current"] = current_viewing_message
|
||||
|
||||
// data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null
|
||||
// data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? strip_improper(SSshuttle.emergencyLastCallLoc.name) : null
|
||||
data["msg_cooldown"] = message_cooldown ? (round((message_cooldown - world.time) / 10)) : 0
|
||||
data["cc_cooldown"] = centcomm_message_cooldown ? (round((centcomm_message_cooldown - world.time) / 10)) : 0
|
||||
|
||||
|
||||
@@ -76,8 +76,7 @@ Notes:
|
||||
content = "<p>[content]</p>"
|
||||
|
||||
// Strip macros from item names
|
||||
title = replacetext(title, "\proper", "")
|
||||
title = replacetext(title, "\improper", "")
|
||||
title = strip_improper(title)
|
||||
|
||||
//Make our dumb param object
|
||||
params = {"{ "cursor": "[params]", "screenLoc": "[thing.screen_loc]" }"}
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
#include "code\_helpers\priority_queue_ch.dm"
|
||||
#include "code\_helpers\refinery.dm"
|
||||
#include "code\_helpers\roundend.dm"
|
||||
#include "code\_helpers\roundstats.dm"
|
||||
#include "code\_helpers\sanitize_values.dm"
|
||||
#include "code\_helpers\screen_objs.dm"
|
||||
#include "code\_helpers\shell.dm"
|
||||
@@ -810,7 +811,6 @@
|
||||
#include "code\datums\repositories\repository.dm"
|
||||
#include "code\datums\repositories\unique.dm"
|
||||
#include "code\datums\roundstats\_defines_local.dm"
|
||||
#include "code\datums\roundstats\roundstats.dm"
|
||||
#include "code\datums\supplypacks\atmospherics.dm"
|
||||
#include "code\datums\supplypacks\contraband.dm"
|
||||
#include "code\datums\supplypacks\costumes.dm"
|
||||
|
||||
Reference in New Issue
Block a user