mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Prevent re-selection of targets on cryo (#27635)
* Prevent re-selection of targets on cryo * goodbye documentation
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#define TARGET_INVALID_NOTHEAD 11
|
||||
#define TARGET_INVALID_CULTIST 12
|
||||
#define TARGET_INVALID_CULT_CONVERTABLE 13
|
||||
#define TARGET_CRYOING 14
|
||||
|
||||
//gamemode istype helpers
|
||||
#define GAMEMODE_IS_CULT (SSticker && istype(SSticker.mode, /datum/game_mode/cult))
|
||||
|
||||
@@ -243,6 +243,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_EMP_RESIST "emp_resist" //The mob will take less damage from EMPs
|
||||
#define TRAIT_MINDFLAYER_NULLIFIED "flayer_nullified" //The mindflayer will not be able to activate their abilities, or drain swarms from people
|
||||
#define TRAIT_FLYING "flying"
|
||||
#define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please
|
||||
|
||||
//***** MIND TRAITS *****/
|
||||
#define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion
|
||||
|
||||
@@ -109,6 +109,8 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
|
||||
return TARGET_INVALID_GOLEM
|
||||
if(possible_target.offstation_role)
|
||||
return TARGET_INVALID_EVENT
|
||||
if(HAS_TRAIT(possible_target.current, TRAIT_CRYO_DESPAWNING))
|
||||
return TARGET_CRYOING
|
||||
|
||||
/datum/objective/is_invalid_target(datum/mind/possible_target)
|
||||
. = ..()
|
||||
@@ -165,9 +167,6 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
|
||||
target = null
|
||||
INVOKE_ASYNC(src, PROC_REF(post_target_cryo), owners)
|
||||
|
||||
/**
|
||||
* Called a tick after when the objective's target goes to cryo.
|
||||
*/
|
||||
/datum/objective/proc/post_target_cryo(list/owners)
|
||||
find_target()
|
||||
if(!target)
|
||||
|
||||
@@ -343,6 +343,8 @@
|
||||
items -= occupant // Don't delete the occupant
|
||||
items -= announce // or the autosay radio.
|
||||
|
||||
ADD_TRAIT(occupant, TRAIT_CRYO_DESPAWNING, TRAIT_GENERIC)
|
||||
|
||||
for(var/obj/item/I in items)
|
||||
if(istype(I, /obj/item/pda))
|
||||
var/obj/item/pda/P = I
|
||||
|
||||
Reference in New Issue
Block a user