mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
About The Pull Request Scrubs those filthy single letter variables out of surgery and organ code. Replaces a few 0s and 1s with FALSE and TRUE where relevant Normalises and cleans up surgery step lists and surgical implements lists. Replaces a whole lotta for loops with for x as anything in y lops This is my first PR (upstream anyway) so I encourage you to treat my code with as much confidence as I treat it, which is to say none, because there's a strong chance I've totally broken everything. But it compiles! Why It's Good For The Game code improvement, follows contributing guidelines. Changelog 🆑 FlamingLily code: Cleanup of surgery and organ code /🆑
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
/obj/item/organ/cyberimp/eyes
|
|
name = "cybernetic eye implant"
|
|
desc = "Implants for your eyes."
|
|
icon_state = "eye_implant"
|
|
implant_overlay = "eye_implant_overlay"
|
|
slot = ORGAN_SLOT_EYES
|
|
zone = BODY_ZONE_PRECISE_EYES
|
|
w_class = WEIGHT_CLASS_TINY
|
|
|
|
// HUD implants
|
|
/obj/item/organ/cyberimp/eyes/hud
|
|
name = "HUD implant"
|
|
desc = "These cybernetic eyes will display a HUD over everything you see. Maybe."
|
|
slot = ORGAN_SLOT_HUD
|
|
var/HUD_type = 0
|
|
var/HUD_trait = null
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/Insert(mob/living/carbon/eye_owner, special = 0, drop_if_replaced = FALSE)
|
|
..()
|
|
if(HUD_type)
|
|
var/datum/atom_hud/hud = GLOB.huds[HUD_type]
|
|
hud.add_hud_to(eye_owner)
|
|
if(HUD_trait)
|
|
ADD_TRAIT(eye_owner, HUD_trait, ORGAN_TRAIT)
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/Remove(mob/living/carbon/eye_owner, special = 0)
|
|
if(HUD_type)
|
|
var/datum/atom_hud/hud = GLOB.huds[HUD_type]
|
|
hud.remove_hud_from(eye_owner)
|
|
if(HUD_trait)
|
|
REMOVE_TRAIT(eye_owner, HUD_trait, ORGAN_TRAIT)
|
|
..()
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/medical
|
|
name = "Medical HUD implant"
|
|
desc = "These cybernetic eye implants will display a medical HUD over everything you see."
|
|
HUD_type = DATA_HUD_MEDICAL_ADVANCED
|
|
HUD_trait = TRAIT_MEDICAL_HUD
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/security
|
|
name = "Security HUD implant"
|
|
desc = "These cybernetic eye implants will display a security HUD over everything you see."
|
|
HUD_type = DATA_HUD_SECURITY_ADVANCED
|
|
HUD_trait = TRAIT_SECURITY_HUD
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/diagnostic
|
|
name = "Diagnostic HUD implant"
|
|
desc = "These cybernetic eye implants will display a diagnostic HUD over everything you see."
|
|
HUD_type = DATA_HUD_DIAGNOSTIC_ADVANCED
|
|
|
|
/obj/item/organ/cyberimp/eyes/hud/security/syndicate
|
|
name = "Contraband Security HUD Implant"
|
|
desc = "A Cybersun Industries brand Security HUD Implant. These illicit cybernetic eye implants will display a security HUD over everything you see."
|
|
syndicate_implant = TRUE
|