mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 17:26:35 +01:00
…l-Station-13-RP into opendream_branch<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request adjusts the repo to work with opendream <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game a more modern, and hopefully more reliable engine!!! <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 code: changed the code to work with Opendream /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
/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/length = 0 // Determines how long the event lasts, until end() is called.
|
|
var/datum/controller/subsystem/gamemaster/gm = null
|
|
var/severity = 1 // The severity of the action. This is here to prevent continued future defining of this var on actions, un-used.
|
|
|
|
/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
|
|
|
|
/datum/gm_action/proc/pick_weight(var/mundande_weight, var/moderate_weight, var/major_weight)
|
|
var/picked = rand(1, mundande_weight + moderate_weight + major_weight)
|
|
if(picked < mundande_weight)
|
|
return EVENT_LEVEL_MUNDANE
|
|
if(picked < mundande_weight + moderate_weight)
|
|
return EVENT_LEVEL_MODERATE
|
|
return EVENT_LEVEL_MAJOR
|