4989c88a22
http://forums.nanotrasen.com/viewtopic.php?f=16&t=12245#p189186 Ported all the random events to Pete/Gia's event system: >Event system now supports weighting. default is 10. a weight of 5 is half as likely as default, 20 twice as likely....etc. >Increased the frequency of events (dust happens over 60% of the time though) >tidied up some ninja code: ninjas now get ~5 objectives. So they are hardmode. >made the gravity toggle into a random event >event system now supports round-start events >event system now supports holiday events >event system now supports events which can only happen after the round has lasted a certain number of ticks >event system now supports max_occurrences for events. Setting any event's max_occurrences to 0 will stop it randomly occurring >events now support being fed associative lists inside new(). This allows you to override their variables easily. >wormhole events no longer cause loads of lag. They are extremely deadly. wormholes should be avoided Other: >replaced the procs for fetching candidates for ninjas and aliums with /proc/get_candidates(be_special_flag), it returns a list of active clients with that be_special preference enabled. >minor fixes to minds >your memories are displayed to you at Login() >removed aliens_allowed >removed ninjas_allowed >pick_n_take() is now more efficient (uses Cut() rather than Remove() Things I added: - Made the pandemic call ..() instead of doing the checks itself. - Made the staff of animation use more charge. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5720 316c924e-a436-60f5-8080-3fe189b3f50e
52 lines
1.8 KiB
Plaintext
52 lines
1.8 KiB
Plaintext
/datum/event_control/brand_intelligence
|
|
name = "Brand Intelligence"
|
|
typepath = /datum/event/brand_intelligence
|
|
weight = 5
|
|
max_occurrences = 1
|
|
|
|
/datum/event/brand_intelligence
|
|
announceWhen = 21
|
|
endWhen = 1000 //Ends when all vending machines are subverted anyway.
|
|
|
|
var/list/obj/machinery/vending/vendingMachines = list()
|
|
var/obj/machinery/vending/originMachine
|
|
|
|
|
|
/datum/event/brand_intelligence/announce()
|
|
command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
|
|
|
|
|
|
/datum/event/brand_intelligence/start()
|
|
for(var/obj/machinery/vending/V in machines)
|
|
if(V.z != 1) continue
|
|
vendingMachines.Add(V)
|
|
|
|
if(!vendingMachines.len)
|
|
kill()
|
|
return
|
|
|
|
originMachine = pick(vendingMachines)
|
|
vendingMachines.Remove(originMachine)
|
|
originMachine.shut_up = 0
|
|
originMachine.shoot_inventory = 1
|
|
|
|
|
|
/datum/event/brand_intelligence/tick()
|
|
if(!vendingMachines.len || !originMachine || originMachine.shut_up) //if every machine is infected, or if the original vending machine is missing or has it's voice switch flipped
|
|
kill()
|
|
return
|
|
|
|
if(IsMultiple(activeFor, 3))
|
|
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
|
|
vendingMachines.Remove(infectedMachine)
|
|
infectedMachine.shut_up = 0
|
|
infectedMachine.shoot_inventory = 1
|
|
|
|
if(IsMultiple(activeFor, 12))
|
|
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
|
|
"You should buy products to feed your lifestyle obession!", \
|
|
"Consume!", \
|
|
"Your money can buy happiness!", \
|
|
"Engage direct marketing!", \
|
|
"Advertising is legalized lying! But don't let that put you off our great deals!", \
|
|
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either.")) |