Nuke disk being still now generates threat
This commit is contained in:
@@ -315,6 +315,8 @@
|
||||
parts += "[FOURSPACES]Executed rules:"
|
||||
for(var/str in mode.threat_log)
|
||||
parts += "[FOURSPACES][FOURSPACES][str]"
|
||||
for(var/entry in mode.threat_tallies)
|
||||
parts += "[FOURSPACES][FOURSPACES][entry] added [mode.threat_tallies[entry]]"
|
||||
return parts.Join("<br>")
|
||||
|
||||
/client/proc/roundend_report_file()
|
||||
|
||||
@@ -62,6 +62,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
var/threat_level = 0
|
||||
/// Set at the beginning of the round. Spent by the mode to "purchase" rules.
|
||||
var/threat = 0
|
||||
/// Starting threat level, for things that increase it but can bring it back down.
|
||||
var/initial_threat_level = 0
|
||||
/// Things that cause a rolling threat adjustment to be displayed at roundend.
|
||||
var/list/threat_tallies = list()
|
||||
/// Running information about the threat. Can store text or datum entries.
|
||||
var/list/threat_log = list()
|
||||
/// As above, but with info such as refunds.
|
||||
@@ -281,7 +285,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/list/out = list("<TITLE>Threat Log</TITLE><B><font size='3'>Threat Log</font></B><br><B>Starting Threat:</B> [threat_level]<BR>")
|
||||
var/list/out = list("<TITLE>Threat Log</TITLE><B><font size='3'>Threat Log</font></B><br><B>Starting Threat:</B> [initial_threat_level]<BR>")
|
||||
|
||||
for(var/entry in threat_log_verbose)
|
||||
if(istext(entry))
|
||||
@@ -328,6 +332,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_first_midround_delay_min + GLOB.dynamic_first_midround_delay_max)
|
||||
midround_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_first_midround_delay_min, GLOB.dynamic_first_midround_delay_max)) + world.time
|
||||
log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]!")
|
||||
initial_threat_level = threat_level
|
||||
return TRUE
|
||||
|
||||
/datum/game_mode/dynamic/pre_setup()
|
||||
|
||||
@@ -583,6 +583,8 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
. = ..()
|
||||
AddComponent(/datum/component/stationloving, !fake)
|
||||
|
||||
#define STATIONARY_DISK_STRING "Stationary Nuke Disk"
|
||||
|
||||
/obj/item/disk/nuclear/process()
|
||||
if(fake)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -590,21 +592,42 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
var/turf/newturf = get_turf(src)
|
||||
if(newturf && lastlocation == newturf)
|
||||
if(last_disk_move < world.time - 5000 && prob((world.time - 5000 - last_disk_move)*0.0001))
|
||||
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
|
||||
if(istype(loneop))
|
||||
loneop.weight += 1
|
||||
if(loneop.weight % 5 == 0)
|
||||
message_admins("[src] is stationary in [ADMIN_VERBOSEJMP(newturf)]. The weight of Lone Operative is now [loneop.weight].")
|
||||
log_game("[src] is stationary for too long in [loc_name(newturf)], and has increased the weight of the Lone Operative event to [loneop.weight].")
|
||||
if(istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
mode.create_threat(0.1)
|
||||
if(round(mode.threat) == mode.threat)
|
||||
message_admins("[src] is stationary in [ADMIN_VERBOSEJMP(newturf)]. The dynamic threat rating has increased to [mode.threat].")
|
||||
log_game("[src] is stationary for too long in [loc_name(newturf)], and has increased dynamic threat to [mode.threat].")
|
||||
if(!(STATIONARY_DISK_STRING in mode.threat_tallies))
|
||||
mode.threat_tallies[STATIONARY_DISK_STRING] = 0
|
||||
mode.threat_tallies[STATIONARY_DISK_STRING] += 0.1
|
||||
else
|
||||
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
|
||||
if(istype(loneop))
|
||||
loneop.weight += 1
|
||||
if(loneop.weight % 5 == 0)
|
||||
message_admins("[src] is stationary in [ADMIN_VERBOSEJMP(newturf)]. The weight of Lone Operative is now [loneop.weight].")
|
||||
log_game("[src] is stationary for too long in [loc_name(newturf)], and has increased the weight of the Lone Operative event to [loneop.weight].")
|
||||
else
|
||||
lastlocation = newturf
|
||||
last_disk_move = world.time
|
||||
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
|
||||
if(istype(loneop) && prob(loneop.weight))
|
||||
loneop.weight = max(loneop.weight - 1, 0)
|
||||
if(loneop.weight % 5 == 0)
|
||||
message_admins("[src] is on the move (currently in [ADMIN_VERBOSEJMP(newturf)]). The weight of Lone Operative is now [loneop.weight].")
|
||||
log_game("[src] being on the move has reduced the weight of the Lone Operative event to [loneop.weight].")
|
||||
if(istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
if(STATIONARY_DISK_STRING in mode.threat_tallies)
|
||||
mode.threat_tallies[STATIONARY_DISK_STRING] -= 0.1
|
||||
mode.spend_threat(0.1)
|
||||
mode.threat_level = max(mode.threat_level-0.1,mode.initial_threat_level)
|
||||
if(mode.threat_tallies[STATIONARY_DISK_STRING] == 0)
|
||||
mode.threat_tallies -= STATIONARY_DISK_STRING
|
||||
else
|
||||
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
|
||||
if(istype(loneop) && prob(loneop.weight))
|
||||
loneop.weight = max(loneop.weight - 1, 0)
|
||||
if(loneop.weight % 5 == 0)
|
||||
message_admins("[src] is on the move (currently in [ADMIN_VERBOSEJMP(newturf)]). The weight of Lone Operative is now [loneop.weight].")
|
||||
log_game("[src] being on the move has reduced the weight of the Lone Operative event to [loneop.weight].")
|
||||
|
||||
#undef STATIONARY_DISK_STRING
|
||||
|
||||
/obj/item/disk/nuclear/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user