Files
Bubberstation/code/modules/events/wizard/madness.dm
T
NamelessFairy 105dff5058 Refactors admin event setup (again) (#73801)
## About The Pull Request

Requested by @tralezab 

Admin event setups now use a list rather than a single setup. This means
common functionality list setting position and picking an option from a
list can be applied to events that have multiple customizable factors
rather than needing to making entirely overridden subtypes for every
event.

Adds a few new subtypes of event_admin_setup:
- input_number for setting a number value. An example can be found in
the heart attack event.
- set_location for causing an event to occur in a specific location. An
example can be found in the stray cargo pod event.
- question, yes no question that returns true/false. An example of its
usage can be found in immovable rod
- candidate_check, a more niche subtype used to block events that do not
function unless theres a specific number of valid candidates. An example
of its usage can be found in the disease events.

While doing the refactor I also implemented some simple extra options
for some of the refactored events. Classic Disease now has an option for
admins to roll **any** disease rather than just the "safe" ones. And
shuttle catastrophe now allows admins to select which shuttle is used.
## Why It's Good For The Game

Cuts back on duplicate lines of code a lot, should make adding more
customization to events slightly easier. Also more admin customization.
## Changelog
🆑
refactor: Admin event setup's have been refactored to use lists.
fix: When admins customize the pirate event all options will be
available rather than just options that have not been randomly rolled.
fix: The stray meteor event no longer runtimes when customized by
admins.
admin: Admins can now select the shuttle brought in by the shuttle
catastrophe event.
admin: Admins can now randomize the disease outbreak classic event to
roll any disease type, including transformation diseases so have fun
with that.
/🆑
2023-03-08 09:50:59 -07:00

27 lines
961 B
Plaintext

/datum/round_event_control/wizard/madness
name = "Curse of Madness"
weight = 1
typepath = /datum/round_event/wizard/madness
earliest_start = 0 MINUTES
description = "Reveals a horrifying truth to everyone, giving them a trauma."
admin_setup = list(/datum/event_admin_setup/text_input/madness)
/datum/round_event/wizard/madness
/// the horrifying truth sent to the crew, can be picked by admins.
var/horrifying_truth
/datum/round_event/wizard/madness/start()
if(!horrifying_truth)
horrifying_truth = pick(strings(REDPILL_FILE, "redpill_questions"))
curse_of_madness(null, horrifying_truth)
/datum/event_admin_setup/text_input/madness
input_text = "What horrifying truth will you reveal?"
/datum/event_admin_setup/text_input/madness/get_text_suggestion()
return pick(strings(REDPILL_FILE, "redpill_questions"))
/datum/event_admin_setup/text_input/madness/apply_to_event(datum/round_event/wizard/madness/event)
event.horrifying_truth = chosen