mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 04:26:38 +01:00
Adds Groundwork for New Event System
Adds what I hope to be able to make a sort of intelligent system that in the future will be able to decide what event would be the best to choose at any given moment. A lot of this will probably get rewritten later. You can use the new debug verb Show GM Status to have it show some data about itself, such as player activity across the whole server. Currently, the system cannot actually run any events, as they don't exist and it's been disabled. The plan is to have the events themselves do most of the heavy lifting for stuff like set-up and weights. When the overarching system is more refined, a lot of new events will be madem and most of our old ones will be ported, and improved upon too. For now, adding this lets me see what the system thinks about a round that has people playing on it and not just me on a test server.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/datum/gm_action
|
||||
var/name = "no name" // Simple name, for organization.
|
||||
var/enabled = TRUE // If not enabled, this action is never taken.
|
||||
var/departments = list() // What kinds of departments are affected by this action. Multiple departments can be listed.
|
||||
var/chaotic = 0 // A number showing how chaotic the action may be. If danger is high, the GM will avoid it.
|
||||
var/reusable = FALSE // If true, the event does not become disabled upon being used. Should be used sparingly.
|
||||
var/observers_used = FALSE // Determines if the GM should check if ghosts are available before using this.
|
||||
var/datum/game_master/gm = null
|
||||
|
||||
/datum/gm_action/New(var/datum/game_master/new_gm)
|
||||
..()
|
||||
gm = new_gm
|
||||
|
||||
/datum/gm_action/proc/set_up()
|
||||
return
|
||||
|
||||
/datum/gm_action/proc/get_weight()
|
||||
return
|
||||
|
||||
/datum/gm_action/proc/start()
|
||||
if(!reusable)
|
||||
enabled = FALSE
|
||||
return
|
||||
|
||||
/datum/gm_action/proc/end()
|
||||
return
|
||||
|
||||
/datum/gm_action/proc/announce()
|
||||
return
|
||||
@@ -0,0 +1,6 @@
|
||||
// Comms blackout is, just like grid check, mostly the same as always, yet engineering has an option to get it back sooner.
|
||||
|
||||
/datum/gm_action/comms_blackout
|
||||
name = "communications blackout"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
||||
chaotic = 35
|
||||
@@ -0,0 +1,9 @@
|
||||
// New grid check event:
|
||||
// Very similar to the old one, power goes out in most of the colony, however the new feature is the ability for engineering to
|
||||
// get power back on sooner, if they are able to reach a special machine and initiate a manual reboot. If no one is able to do so,
|
||||
// it will reboot itself after a few minutes, just like the old one.
|
||||
|
||||
/datum/gm_action/grid_check
|
||||
name = "grid check"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
||||
chaotic = 20
|
||||
@@ -0,0 +1,6 @@
|
||||
// A shuttle full of junk docks, and cargo is tasked with sifting through it all to find valuables, or just dispose of it.
|
||||
|
||||
/datum/gm_action/waste_disposal
|
||||
name = "waste disposal"
|
||||
departments = list(ROLE_CARGO)
|
||||
chaotic = 0
|
||||
Reference in New Issue
Block a user