mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 01:46:30 +01:00
cadd19beac
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
27 lines
893 B
Plaintext
27 lines
893 B
Plaintext
// Observer Pattern Implementation: Invisibility Set
|
|
// Registration type: /atom
|
|
//
|
|
// Raised when: An atom's invisiblity value is changed.
|
|
//
|
|
// Arguments that the called proc should expect:
|
|
// /atom/invisibilee: The atom that had its invisibility set
|
|
// /old_invisibility: invisibility before the change
|
|
// /new_invisibility: invisibility after the change
|
|
|
|
GLOBAL_DATUM_INIT(set_invisible_event, /singleton/observ/invisibility_set, new)
|
|
|
|
/singleton/observ/invisibility_set
|
|
name = "Invisibility Set"
|
|
expected_type = /atom
|
|
|
|
/*****************************
|
|
* Invisibility Set Handling *
|
|
*****************************/
|
|
|
|
/atom/proc/set_invisibility(var/new_invisibility = 0)
|
|
var/old_invisibility = invisibility
|
|
if(old_invisibility != new_invisibility)
|
|
invisibility = new_invisibility
|
|
GLOB.set_invisible_event.raise_event(src, old_invisibility, new_invisibility)
|
|
update_above()
|