Makes it plausible for the lone operative event to roll if the nuclear disk stays still for long enough (#37468)

* makes it possible for the lone operative event to roll if the nuclear disk stays still for long enough

* makes the event weight increase chance reset if the disk moves

* slows this shit *WAY* down, adds a minimum time for the weight to start rolling for an increase (approximately 10 minutes)

* .

* this was an absolute pain in the ass to test - addresses reviews

* addresses ninjanomnom's review, makes it possible for the loneop event weight to decrease if the disk moves
This commit is contained in:
deathride58
2018-05-06 09:22:49 +00:00
committed by CitadelStationBot
parent 11c1e8fbf7
commit 06fc24e953
@@ -501,16 +501,37 @@ This is here to make the tiles around the station mininuke change when it's arme
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/fake = FALSE
var/turf/lastlocation
var/last_disk_move
/obj/item/disk/nuclear/Initialize()
. = ..()
if(!fake)
GLOB.poi_list |= src
last_disk_move = world.time
START_PROCESSING(SSobj, src)
/obj/item/disk/nuclear/ComponentInitialize()
. = ..()
AddComponent(/datum/component/stationloving, !fake)
/obj/item/disk/nuclear/process()
if(fake)
STOP_PROCESSING(SSobj, src)
CRASH("A fake nuke disk tried to call process(). Who the fuck and how the fuck")
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.00001))
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
if(istype(loneop))
loneop.weight += 1
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)
/obj/item/disk/nuclear/examine(mob/user)
. = ..()
if(!fake)