mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
* Adds hacking tool. In normal mode a hacking tool acts and functions just like any multitool. Use a screwdriver to toggle between normal and hacking mode. Hacking attempts will take 20 +(0 to 20) seconds (triangular distribution, averages at +10 seconds). Once an airlock has been successfully hacked the user will have full access to the door operation interface normally restricted to silicons. A hacking tool will remember the last 6 to 8 hacked airlocks. No time is needed to again hack remembered airlocks. Once the limit has been reached the least recently accessed airlock is forgotten. Hacking a remembered airlock will update the last accessed time. Also adds a basic observer/listener pattern implementation to, for example, make it easier to catch when objects have been destroyed and clear references. * Corrects and adds more sanity checking. * Adds hacktool to uplink devices
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
|
|
#define CLAMP01(x) (Clamp(x, 0, 1))
|
|
|
|
#define isAI(A) istype(A, /mob/living/silicon/ai)
|
|
|
|
#define isalien(A) istype(A, /mob/living/carbon/alien)
|
|
|
|
#define isanimal(A) istype(A, /mob/living/simple_animal)
|
|
|
|
#define isairlock(A) istype(A, /obj/machinery/door/airlock)
|
|
|
|
#define isbrain(A) istype(A, /mob/living/carbon/brain)
|
|
|
|
#define iscarbon(A) istype(A, /mob/living/carbon)
|
|
|
|
#define iscorgi(A) istype(A, /mob/living/simple_animal/corgi)
|
|
|
|
#define isEye(A) istype(A, /mob/observer/eye)
|
|
|
|
#define ishuman(A) istype(A, /mob/living/carbon/human)
|
|
|
|
#define isliving(A) istype(A, /mob/living)
|
|
|
|
#define ismouse(A) istype(A, /mob/living/simple_animal/mouse)
|
|
|
|
#define isnewplayer(A) istype(A, /mob/new_player)
|
|
|
|
#define isobserver(A) istype(A, /mob/observer/dead)
|
|
|
|
#define isorgan(A) istype(A, /obj/item/organ/external)
|
|
|
|
#define ispAI(A) istype(A, /mob/living/silicon/pai)
|
|
|
|
#define isrobot(A) istype(A, /mob/living/silicon/robot)
|
|
|
|
#define issilicon(A) istype(A, /mob/living/silicon)
|
|
|
|
#define isslime(A) istype(A, /mob/living/carbon/slime)
|