mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-23 09:26:46 +01:00
<!-- 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 <!-- 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 Fixes #6728 <!-- 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. --> 🆑 fix: fixed feign impairment being activated while not conscious fix: fixed corpses jittering around refactor: refactored some variables on /mob level to be in the mob_defines.dm file, where most of the type is defined /🆑 <!-- 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. -->
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
// This file contains all Nano procs/definitions for external classes/objects
|
|
|
|
/**
|
|
* Called when a Nano UI window is closed
|
|
* This is how Nano handles closed windows
|
|
* It must be a verb so that it can be called using winset
|
|
*
|
|
* @return nothing
|
|
*/
|
|
/client/verb/nanoclose(var/uiref as text)
|
|
set hidden = 1 // hide this verb from the user's panel
|
|
set name = "nanoclose"
|
|
|
|
var/datum/nanoui/ui = locate(uiref)
|
|
|
|
if (istype(ui))
|
|
ui.close()
|
|
|
|
if(ui.ref)
|
|
var/href = "close=1"
|
|
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's Topic() proc via client.Topic()
|
|
else if (ui.on_close_logic)
|
|
// no atomref specified (or not found)
|
|
// so just reset the user mob's machine var
|
|
if(src && src.mob)
|
|
src.mob.unset_machine()
|
|
|
|
/**
|
|
* The nano_ui_interact proc is used to open and update Nano UIs
|
|
* If nano_ui_interact is not used then the UI will not update correctly
|
|
* nano_ui_interact is currently defined for /atom/movable
|
|
*
|
|
* @param user /mob The mob who is interacting with this ui
|
|
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
|
|
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
|
|
* @param force_open boolean Force the UI to (re)open, even if it's already open
|
|
*
|
|
* @return nothing
|
|
*/
|
|
/datum/proc/nano_ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nanoui/master_ui = null, var/datum/topic_state/state = default_state)
|
|
return
|