Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made filled resin holes and weed nodes destroyable by xenos #3711

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions code/modules/cm_aliens/structures/trap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,20 @@
to_chat(X, SPAN_XENONOTICE("[src] is occupied by a child."))
return XENO_NO_DELAY_ACTION

if(X.a_intent == INTENT_HARM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the single letter vars as you need to modify code. See https://github.com/cmss13-devs/cmss13/blob/master/.github/guides/STYLES.md#variables

In VSC its very easy to do this, just ctrl+f, highlight the entire proc block, press the paragraph looking button to restrict search to selection, match case, and match word, and then dropdown to reveal replace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E.g.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the queen option for both of them, in separate toggles?

Copy link
Contributor

@Drulikar Drulikar Jun 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search for one of those options and you'll see what I mean. It's a single setting with 3 possible states. I think you can have both weed destruction and trap destruction together in the same setting. But up to you.

to_chat(X, SPAN_XENONOTICE("You start tearing away at the hole."))
xeno_attack_delay(X)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's really any point to add an attack delay before a do_after.

if(!do_after(X, 30, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, src))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return XENO_NO_DELAY_ACTION
var/area/A = get_area(src)
if (X.hivenumber == hivenumber)
Destroy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use qdel instead of directly calling what qdel calls.

to_chat(X, SPAN_XENONOTICE("You destroy the trap."))
for(var/mob/living/carbon/xenomorph/Xeno in GLOB.living_xeno_list)
if(Xeno.hivenumber == hivenumber)
to_chat(Xeno, SPAN_XENOMINORWARNING("One of your Hive's traps at [A.name] has been torn apart by [X]!"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the wording of /obj/effect/alien/resin/trap/proc/trigger_trap:

Suggested change
to_chat(Xeno, SPAN_XENOMINORWARNING("One of your Hive's traps at [A.name] has been torn apart by [X]!"))
to_chat(Xeno, SPAN_XENOMINORWARNING("You sense one of your Hive's traps at [A.name] has been torn apart by [X]!"))

return XENO_NO_DELAY_ACTION

if((!X.acid_level || trap_type == RESIN_TRAP_GAS) && trap_type != RESIN_TRAP_EMPTY)
to_chat(X, SPAN_XENONOTICE("Better not risk setting this off."))
return XENO_NO_DELAY_ACTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@
return

var/obj/effect/alien/weeds/node/N = locate() in T
if(N && N.weed_strength >= X.weed_level)
to_chat(X, SPAN_WARNING("There's a pod here already!"))
if(N)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the single letter vars as you need to modify code.

if(N.weed_strength > X.weed_level)
to_chat(X, SPAN_WARNING("There's a pod here already!"))
else
to_chat(X, SPAN_WARNING("You start removing the resin node."))
if(!do_after(X, 10, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return
playsound(X.loc, "alien_resin_break", 25)
N.Destroy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use qdel instead of directly calling what qdel calls.

to_chat(X, SPAN_WARNING("You removed the resin node."))
return

var/obj/effect/alien/resin/trap/resin_trap = locate() in T
Expand Down