-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ghost player fixups + centcom improvements
- Loading branch information
Showing
11 changed files
with
154 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
#define COMSIG_CARBON_EQUIP_EARS "carbon_ears_equip" | ||
#define COMSIG_CARBON_UNEQUIP_EARS "carbon_ears_unequip" | ||
|
||
#define COMSIG_HUMAN_BEGIN_DUEL "human_begin_duel" | ||
#define COMSIG_HUMAN_END_DUEL "human_end_duel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/datum/status_effect/centcom_grace | ||
id = "centcom_grace" | ||
tick_interval = -1 | ||
alert_type = null | ||
var/last_active = FALSE | ||
|
||
/datum/status_effect/centcom_grace/on_apply() | ||
. = ..() | ||
if(!.) | ||
return | ||
giveth_taketh() | ||
RegisterSignals(owner, list(COMSIG_ENTER_AREA, COMSIG_HUMAN_BEGIN_DUEL, COMSIG_HUMAN_END_DUEL), PROC_REF(giveth_taketh)) | ||
|
||
/datum/status_effect/centcom_grace/on_remove() | ||
. = ..() | ||
take_traits() | ||
UnregisterSignal(owner, list(COMSIG_ENTER_AREA, COMSIG_HUMAN_BEGIN_DUEL, COMSIG_HUMAN_END_DUEL)) | ||
|
||
/datum/status_effect/centcom_grace/proc/giveth_taketh() | ||
SIGNAL_HANDLER | ||
if(active()) | ||
if(!last_active) | ||
owner.SetAllImmobility(0) | ||
owner.set_safe_hunger_level() | ||
owner.extinguish_mob() | ||
give_traits() | ||
last_active = TRUE | ||
else | ||
take_traits() | ||
last_active = FALSE | ||
|
||
/datum/status_effect/centcom_grace/proc/active() | ||
. = TRUE | ||
if(istype(owner, /mob/living/carbon/human/ghost)) | ||
var/mob/living/carbon/human/ghost/ghost_owner = owner | ||
if(ghost_owner.dueling) | ||
return FALSE | ||
var/area/centcom/centcom_area = get_area(owner) | ||
if(!istype(centcom_area) || !centcom_area.grace) | ||
return FALSE | ||
|
||
/datum/status_effect/centcom_grace/proc/give_traits() | ||
if(QDELETED(owner)) | ||
qdel(src) | ||
return | ||
owner.add_traits(list( | ||
TRAIT_RESISTCOLD, | ||
TRAIT_RESISTHEAT, | ||
TRAIT_RESISTLOWPRESSURE, | ||
TRAIT_RESISTHIGHPRESSURE, | ||
TRAIT_NOBREATH, | ||
TRAIT_NOHUNGER, | ||
TRAIT_STABLEHEART, | ||
TRAIT_STABLELIVER, | ||
TRAIT_BOMBIMMUNE, | ||
TRAIT_RADIMMUNE, | ||
TRAIT_TUMOR_SUPPRESSED, | ||
TRAIT_IGNORESLOWDOWN, | ||
TRAIT_NOFIRE, | ||
TRAIT_NODISMEMBER | ||
), id) | ||
|
||
/datum/status_effect/centcom_grace/proc/take_traits() | ||
if(QDELETED(owner)) | ||
qdel(src) | ||
return | ||
REMOVE_TRAITS_IN(owner, id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
monkestation/code/modules/ghost_players/ghost_player_outfit.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/datum/outfit/ghost_player | ||
name = "Ghost Player" | ||
shoes = /obj/item/clothing/shoes/sneakers/black | ||
box = /obj/item/storage/box/survival/engineer | ||
|
||
/datum/outfit/ghost_player/pre_equip(mob/living/carbon/human/target, visualsOnly) | ||
. = ..() | ||
uniform = (target.jumpsuit_style == PREF_SKIRT) ? /obj/item/clothing/under/color/jumpskirt/grey : /obj/item/clothing/under/color/grey | ||
switch(target.backpack) | ||
if(GSATCHEL, DSATCHEL) | ||
back = /obj/item/storage/backpack/satchel | ||
if(GDUFFELBAG, DDUFFELBAG) | ||
back = /obj/item/storage/backpack/duffelbag | ||
if(LSATCHEL) | ||
back = /obj/item/storage/backpack/satchel/leather | ||
else | ||
back = /obj/item/storage/backpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters