Skip to content

Commit

Permalink
More IFF stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Jul 25, 2023
1 parent c16f4a2 commit 3f1addf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
user.put_in_hands(iff_tag)
iff_tag = null
user.visible_message(SPAN_NOTICE("[user] removes \the [src]'s IFF tag."), SPAN_NOTICE("You remove \the [src]'s IFF tag."), max_distance = 3)
if(src.hive.hivenumber == XENO_HIVE_RENEGADE) //it's important to know their IFF settings for renegade
to_chat(src, SPAN_NOTICE("Your IFF tag was removed. You can now attack anyone."))
return
return ..()

Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/items/iff_tag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
injector.visible_message(SPAN_NOTICE("[injector] forces \the [src] into [xeno]'s carapace!"), SPAN_NOTICE("You force \the [src] into [xeno]'s carapace!"))
xeno.iff_tag = src
injector.drop_inv_item_to_loc(src, xeno)
if(xeno.hive.hivenumber == XENO_HIVE_RENEGADE) //it's important to know their IFF settings for renegade
to_chat(xeno, SPAN_NOTICE("You got new IFF tag with following settings: [english_list(faction_groups, "None")]. You cannot attack creatures within these settings."))
return
return ..()

Expand Down Expand Up @@ -48,6 +50,8 @@
if("Remove")
faction_groups = list()
to_chat(programmer, SPAN_NOTICE("You <b>[option]</b> the IFF group data, the IFF group on the tag now reads as: [english_list(faction_groups, "None")]"))
if(xeno?.hive.hivenumber == XENO_HIVE_RENEGADE) //it's important to know their IFF settings for renegade
to_chat(xeno, SPAN_NOTICE("Your IFF tag settings were changed: [english_list(faction_groups, "None")]. You cannot attack creatures within these settings."))
return TRUE

/obj/item/iff_tag/pmc_handler
Expand Down
5 changes: 5 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,11 @@
defectors += xeno
xeno.set_hive_and_update(XENO_HIVE_RENEGADE)
to_chat(xeno, SPAN_XENOANNOUNCE("You lost connection with your hive. Now there is no Queen, only masters."))
to_chat(xeno, SPAN_NOTICE("Your IFF tag settings are: [english_list(xeno.iff_tag.faction_groups, "None")]. You cannot attack creatures within these settings."))
return
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] rips out [xeno.iff_tag]!"), SPAN_XENOWARNING("You rip out [xeno.iff_tag]! For the hive!"))
xeno.adjustBruteLoss(50)
xeno.iff_tag.forceMove(get_turf(xeno))
xeno.iff_tag = null

/datum/hive_status/corrupted/proc/handle_defectors(faction)
Expand All @@ -1355,6 +1358,8 @@
if(!(faction in xeno.iff_tag.faction_groups))
continue
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] rips out [xeno.iff_tag]!"), SPAN_XENOWARNING("You rip out [xeno.iff_tag]! For the hive!"))
xeno.adjustBruteLoss(50)
xeno.iff_tag.forceMove(get_turf(xeno))
xeno.iff_tag = null
if(!length(defectors))
return
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/xeno_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
to_chat(src, SPAN_WARNING("There is no Queen. You are alone."))
return

if(hive.hivenumber == XENO_HIVE_RENEGADE) //Renegade's ability to attack someone depends on IFF settings, not on alliance
if(!src.iff_tag)
to_chat(src, SPAN_NOTICE("You have no IFF tag. You can attack anyone."))
return
to_chat(src, SPAN_NOTICE("Your IFF tag settings are: [english_list(src.iff_tag.faction_groups, "None")]. You cannot attack creatures within these settings."))
return

if(interference)
to_chat(src, SPAN_WARNING("A headhunter temporarily cut off your psychic connection!"))
return
Expand Down

0 comments on commit 3f1addf

Please sign in to comment.