mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
Deathsquad now has TRAIT_DISK_VERIFIER, and code review
This commit is contained in:
@@ -88,8 +88,8 @@
|
||||
#define TRAUMA_TRAIT "trauma"
|
||||
#define SPECIES_TRAIT "species"
|
||||
#define ORGAN_TRAIT "organ"
|
||||
#define OUTFIT_TRAIT "outfit"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
#define JOB_TRAIT "job"
|
||||
|
||||
// unique trait sources, still defines
|
||||
#define STATUE_MUTE "statue"
|
||||
@@ -102,5 +102,6 @@
|
||||
#define GENETICS_SPELL "genetics_spell"
|
||||
#define EYES_COVERED "eyes_covered"
|
||||
#define CULT_EYES "cult_eyes"
|
||||
#define OBSERVER_TRAIT "observer-trait"
|
||||
#define SCRYING_ORB "scrying-orb"
|
||||
#define NUKEOP_TRAIT "nuke-op"
|
||||
#define DEATHSQUAD_TRAIT "deathsquad"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
var/internals_slot = null //ID of slot containing a gas tank
|
||||
var/list/backpack_contents = null // In the list(path=count,otherpath=count) format
|
||||
var/list/implants = null
|
||||
var/list/mind_traits = null
|
||||
var/accessory = null
|
||||
|
||||
var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters
|
||||
@@ -107,9 +106,6 @@
|
||||
for(var/implant_type in implants)
|
||||
var/obj/item/implant/I = new implant_type(H)
|
||||
I.implant(H, null, TRUE)
|
||||
if(mind_traits && H.mind)
|
||||
for(var/mt in mind_traits)
|
||||
H.mind.add_trait(mt, OUTFIT_TRAIT)
|
||||
|
||||
H.update_body()
|
||||
return TRUE
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/datum/proc/add_trait(trait, source)
|
||||
LAZYINITLIST(status_traits)
|
||||
|
||||
|
||||
if(!status_traits[trait])
|
||||
status_traits[trait] = list(source)
|
||||
else
|
||||
status_traits[trait] |= list(source)
|
||||
|
||||
|
||||
|
||||
/datum/proc/remove_trait(trait, list/sources, force)
|
||||
if(!status_traits)
|
||||
return //nothing to remove
|
||||
|
||||
|
||||
if(!status_traits[trait])
|
||||
return
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
|
||||
if(!LAZYLEN(status_traits[trait]))
|
||||
status_traits -= trait
|
||||
|
||||
|
||||
/datum/proc/has_trait(trait, list/sources)
|
||||
if(!status_traits)
|
||||
return FALSE //well of course it doesn't have the trait
|
||||
|
||||
|
||||
if(!status_traits[trait])
|
||||
return FALSE
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
return TRUE
|
||||
else if(LAZYLEN(status_traits[trait]))
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/proc/remove_all_traits(remove_species_traits = FALSE, remove_organ_traits = FALSE, remove_quirks = FALSE)
|
||||
if(!status_traits)
|
||||
return //nothing to remove
|
||||
|
||||
|
||||
var/list/blacklisted_sources = list()
|
||||
if(!remove_species_traits)
|
||||
blacklisted_sources += SPECIES_TRAIT
|
||||
@@ -72,4 +72,4 @@
|
||||
break
|
||||
if(!skip)
|
||||
remove_trait(kebab, null, TRUE)
|
||||
CHECK_TICK
|
||||
CHECK_TICK
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
. = ..()
|
||||
name_source = GLOB.commando_names
|
||||
|
||||
/datum/antagonist/ert/deathsquad/apply_innate_effects(mob/living/mob_override)
|
||||
owner.add_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
|
||||
|
||||
/datum/antagonist/ert/deathsquad/remove_innate_effects(mob/living/mob_override)
|
||||
owner.remove_trait(TRAIT_DISK_VERIFIER, DEATHSQUAD_TRAIT)
|
||||
|
||||
/datum/antagonist/ert/security // kinda handled by the base template but here for completion
|
||||
|
||||
/datum/antagonist/ert/security/red
|
||||
|
||||
@@ -600,7 +600,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
if(!fake)
|
||||
return
|
||||
|
||||
if(user.has_trait(TRAIT_DISK_VERIFIER) || (user.mind && user.mind.has_trait(TRAIT_DISK_VERIFIER)))
|
||||
if(isobserver(user) || user.has_trait(TRAIT_DISK_VERIFIER) || (user.mind && user.mind.has_trait(TRAIT_DISK_VERIFIER)))
|
||||
to_chat(user, "<span class='warning'>The serial numbers on [src] are incorrect.</span>")
|
||||
|
||||
/obj/item/disk/nuclear/attackby(obj/item/I, mob/living/user, params)
|
||||
|
||||
@@ -23,10 +23,12 @@
|
||||
/datum/antagonist/nukeop/apply_innate_effects(mob/living/mob_override)
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
update_synd_icons_added(M)
|
||||
owner.add_trait(TRAIT_DISK_VERIFIER, NUKEOP_TRAIT)
|
||||
|
||||
/datum/antagonist/nukeop/remove_innate_effects(mob/living/mob_override)
|
||||
var/mob/living/M = mob_override || owner.current
|
||||
update_synd_icons_removed(M)
|
||||
owner.remove_trait(TRAIT_DISK_VERIFIER, NUKEOP_TRAIT)
|
||||
|
||||
/datum/antagonist/nukeop/proc/equip_op()
|
||||
if(!ishuman(owner.current))
|
||||
@@ -42,7 +44,6 @@
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0)
|
||||
to_chat(owner, "<span class='notice'>You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!</span>")
|
||||
owner.announce_objectives()
|
||||
return
|
||||
|
||||
/datum/antagonist/nukeop/on_gain()
|
||||
give_alias()
|
||||
@@ -50,7 +51,6 @@
|
||||
. = ..()
|
||||
equip_op()
|
||||
memorize_code()
|
||||
owner.add_trait(TRAIT_DISK_VERIFIER, "nuke-op")
|
||||
if(send_to_spawnpoint)
|
||||
move_to_spawnpoint()
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ Captain
|
||||
/datum/job/captain/get_access()
|
||||
return get_all_accesses()
|
||||
|
||||
/datum/job/captain/after_spawn(mob/living/H, mob/M, latejoin = FALSE)
|
||||
H.mind.add_trait(TRAIT_DISK_VERIFIER, JOB_TRAIT)
|
||||
|
||||
/datum/job/captain/announce(mob/living/carbon/human/H)
|
||||
..()
|
||||
SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, "Captain [H.real_name] on deck!"))
|
||||
@@ -50,7 +53,6 @@ Captain
|
||||
duffelbag = /obj/item/storage/backpack/duffelbag/captain
|
||||
|
||||
implants = list(/obj/item/implant/mindshield)
|
||||
mind_traits = list(TRAIT_DISK_VERIFIER)
|
||||
accessory = /obj/item/clothing/accessory/medal/gold/captain
|
||||
|
||||
chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/captain)
|
||||
|
||||
@@ -133,7 +133,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
. = ..()
|
||||
|
||||
grant_all_languages()
|
||||
grant_observer_traits()
|
||||
|
||||
/mob/dead/observer/get_photo_description(obj/item/camera/camera)
|
||||
if(!invisibility || camera.see_ghosts)
|
||||
@@ -842,6 +841,3 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
spawners_menu = new(src)
|
||||
|
||||
spawners_menu.ui_interact(src)
|
||||
|
||||
/mob/dead/observer/proc/grant_observer_traits()
|
||||
add_trait(TRAIT_DISK_VERIFIER, OBSERVER_TRAIT)
|
||||
|
||||
Reference in New Issue
Block a user