Skip to content

Commit

Permalink
Update trap sprites. (#548)
Browse files Browse the repository at this point in the history
* update acidgas trap sprites

* hugger trap sprite update
  • Loading branch information
Helg2 authored Oct 25, 2024
1 parent 56e1cd8 commit 47bf459
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 29 deletions.
12 changes: 7 additions & 5 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
#define PANTHER_OZELOMELYN "Ozelomelyn"
#define PANTHER_SANGUINAL "Sanguinal"

#define TRAP_HUGGER "hugger"
#define TRAP_HUGGER_LARVAL "hugger larval"
#define TRAP_HUGGER_ACID "hugger acid"
#define TRAP_HUGGER_NEURO "hugger neuro"
#define TRAP_HUGGER_RESIN "hugger resin"
#define TRAP_HUGGER_SLASH "hugger slash"
#define TRAP_SMOKE_NEURO "neurotoxin gas"
#define TRAP_SMOKE_ACID "acid gas"
#define TRAP_ACID_WEAK "weak acid"
Expand Down Expand Up @@ -91,18 +95,16 @@ GLOBAL_LIST_INIT(defiler_toxin_type_list, list(
/datum/reagent/toxin/xeno_ozelomelyn,
/datum/reagent/toxin/xeno_hemodile,
/datum/reagent/toxin/xeno_transvitox,
// /datum/reagent/toxin/xeno_neurotoxin, RU TGMC EDIT DELETION
/datum/reagent/toxin/acid, //RUTGMC EDIT ADDITION
/datum/reagent/toxin/acid,
))

//List of toxins improving defile's damage
GLOBAL_LIST_INIT(defiler_toxins_typecache_list, typecacheof(list(
/datum/reagent/toxin/xeno_ozelomelyn,
/datum/reagent/toxin/xeno_hemodile,
/datum/reagent/toxin/xeno_transvitox,
// /datum/reagent/toxin/xeno_neurotoxin, RU TGMC EDIT DELETION
/datum/reagent/toxin/xeno_sanguinal,
/datum/reagent/toxin/acid, //RUTGMC EDIT ADDITION
/datum/reagent/toxin/acid,
/datum/status_effect/stacking/intoxicated,
)))

Expand Down
7 changes: 6 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/facehuggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
var/about_to_jump = FALSE
///Time to become active after moving into the facehugger's space.
var/proximity_time = 0.75 SECONDS
var/trap_type = TRAP_HUGGER_LARVAL

/obj/item/clothing/mask/facehugger/Initialize(mapload, input_hivenumber, input_source)
. = ..()
Expand Down Expand Up @@ -320,7 +321,7 @@
visible_message(span_xenowarning("[src] crawls into [T]!"))
forceMove(T)
T.hugger = src
T.set_trap_type(TRAP_HUGGER)
T.set_trap_type(trap_type)
go_idle(TRUE)
return FALSE
kill_hugger()
Expand Down Expand Up @@ -719,6 +720,7 @@
activate_time = 1 SECONDS
jump_cooldown = 1 SECONDS
proximity_time = 0.25 SECONDS
trap_type = TRAP_HUGGER_NEURO

/obj/item/clothing/mask/facehugger/combat/neuro/Attach(mob/M, mob/user)
if(!combat_hugger_check_target(M))
Expand All @@ -742,6 +744,7 @@
activate_time = 1 SECONDS
jump_cooldown = 1 SECONDS
proximity_time = 0.25 SECONDS
trap_type = TRAP_HUGGER_ACID

/obj/item/clothing/mask/facehugger/combat/acid/Attach(mob/M, mob/user)
if(!combat_hugger_check_target(M))
Expand Down Expand Up @@ -769,6 +772,7 @@
activate_time = 1 SECONDS
jump_cooldown = 1 SECONDS
proximity_time = 0.25 SECONDS
trap_type = TRAP_HUGGER_RESIN
var/have_resin = TRUE

/obj/item/clothing/mask/facehugger/combat/resin/Attach(mob/M, mob/user)
Expand Down Expand Up @@ -806,6 +810,7 @@
activate_time = 1 SECONDS
jump_cooldown = 1 SECONDS
proximity_time = 0.5 SECONDS
trap_type = TRAP_HUGGER_SLASH

/obj/item/clothing/mask/facehugger/combat/slash/Attach(mob/M)
if(!combat_hugger_check_target(M))
Expand Down
54 changes: 31 additions & 23 deletions code/modules/xenomorph/trap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,26 @@
/obj/structure/xeno/trap/update_icon_state()
. = ..()
switch(trap_type)
if(TRAP_HUGGER)
icon_state = "traphugger"
if(TRAP_HUGGER_LARVAL)
icon_state = "trap_hugger"
if(TRAP_HUGGER_NEURO)
icon_state = "trap_hugger_neuro"
if(TRAP_HUGGER_ACID)
icon_state = "trap_hugger_acid"
if(TRAP_HUGGER_RESIN)
icon_state = "trap_hugger_resin"
if(TRAP_HUGGER_SLASH)
icon_state = "trap_hugger_slash"
if(TRAP_SMOKE_NEURO)
icon_state = "trapneurogas"
icon_state = "trap_neuro_gas"
if(TRAP_SMOKE_ACID)
icon_state = "trapacidgas"
icon_state = "trap_acid_gas"
if(TRAP_ACID_WEAK)
icon_state = "trapacidweak"
icon_state = "trap_acid_weak"
if(TRAP_ACID_NORMAL)
icon_state = "trapacid"
icon_state = "trap_acid"
if(TRAP_ACID_STRONG)
icon_state = "trapacidstrong"
icon_state = "trap_acid_strong"
else
icon_state = "trap"

Expand All @@ -60,22 +68,22 @@
. = ..()
if(!isxeno(user))
return
. += "A hole for a little one to hide in ambush for or for spewing acid."
. += span_notice("A hole for a little one to hide in ambush or for spewing acid.")
switch(trap_type)
if(TRAP_HUGGER)
. += "There's a little one inside."
if(TRAP_HUGGER_LARVAL, TRAP_HUGGER_NEURO, TRAP_HUGGER_ACID, TRAP_HUGGER_RESIN, TRAP_HUGGER_SLASH)
. += span_notice("There's a little one inside.")
if(TRAP_SMOKE_NEURO)
. += "There's pressurized neurotoxin inside."
. += span_notice("There's pressurized neurotoxin inside.")
if(TRAP_SMOKE_ACID)
. += "There's pressurized acid gas inside."
. += span_notice("There's pressurized acid gas inside.")
if(TRAP_ACID_WEAK)
. += "There's pressurized weak acid inside."
. += span_notice("There's pressurized weak acid inside.")
if(TRAP_ACID_NORMAL)
. += "There's pressurized normal acid inside."
. += span_notice("There's pressurized normal acid inside.")
if(TRAP_ACID_STRONG)
. += "There's strong pressurized acid inside."
. += span_notice("There's strong pressurized acid inside.")
else
. += "It's empty."
. += span_notice("It's empty.")

/obj/structure/xeno/trap/fire_act(burn_level, flame_color)
hugger?.kill_hugger()
Expand All @@ -95,7 +103,7 @@
crosser.visible_message(span_warning("[crosser] trips on [src]!"), span_danger("You trip on [src]!"))
crosser.ParalyzeNoChain(4 SECONDS)
switch(trap_type)
if(TRAP_HUGGER)
if(TRAP_HUGGER_LARVAL, TRAP_HUGGER_NEURO, TRAP_HUGGER_ACID, TRAP_HUGGER_RESIN, TRAP_HUGGER_SLASH)
if(!AM)
drop_hugger()
return
Expand Down Expand Up @@ -133,7 +141,7 @@

if(xeno_attacker.a_intent == INTENT_HARM)
return ..()
if(trap_type == TRAP_HUGGER)
if(trap_type == (TRAP_HUGGER_LARVAL || TRAP_HUGGER_NEURO || TRAP_HUGGER_ACID || TRAP_HUGGER_RESIN || TRAP_HUGGER_SLASH))
if(!(xeno_attacker.xeno_caste.can_flags & CASTE_CAN_HOLD_FACEHUGGERS))
return
if(!hugger)
Expand Down Expand Up @@ -182,23 +190,23 @@
user.transferItemToLoc(FH, src)
FH.go_idle(TRUE)
hugger = FH
set_trap_type(TRAP_HUGGER)
set_trap_type(FH.trap_type)
balloon_alert(user, "Inserted facehugger")

//Sentient facehugger can get in the trap
/obj/structure/xeno/trap/attack_facehugger(mob/living/carbon/xenomorph/facehugger/F, isrightclick = FALSE)
. = ..()
if(tgui_alert(F, "Do you want to get into the trap?", "Get inside the trap", list("Yes", "No")) != "Yes")
return

if(trap_type)
F.balloon_alert(F, "The trap is occupied")
return

if(tgui_alert(F, "Do you want to get into the trap?", "Get inside the trap", list("Yes", "No")) != "Yes")
return

var/obj/item/clothing/mask/facehugger/FH = new(src)
FH.go_idle(TRUE)
hugger = FH
set_trap_type(TRAP_HUGGER)
set_trap_type(TRAP_HUGGER_LARVAL)

F.visible_message(span_xenowarning("[F] slides back into [src]."),span_xenonotice("You slides back into [src]."))
F.ghostize()
Expand Down
Binary file modified icons/Xeno/Effects.dmi
Binary file not shown.

0 comments on commit 47bf459

Please sign in to comment.