Skip to content

Commit

Permalink
final?
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Jul 25, 2023
1 parent 4d46b45 commit 0328500
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
3 changes: 2 additions & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@
#define XENO_HIVE_MUTATED "xeno_hive_mutated"
#define XENO_HIVE_FORSAKEN "xeno_hive_forsaken"
#define XENO_HIVE_YAUTJA "xeno_hive_yautja"
#define XENO_HIVE_RENEGADE "xeno_hive_renegade"

#define ALL_XENO_HIVES list(XENO_HIVE_NORMAL, XENO_HIVE_CORRUPTED, XENO_HIVE_ALPHA, XENO_HIVE_BRAVO, XENO_HIVE_CHARLIE, XENO_HIVE_DELTA, XENO_HIVE_FERAL, XENO_HIVE_TAMED, XENO_HIVE_MUTATED, XENO_HIVE_FORSAKEN, XENO_HIVE_YAUTJA)
#define ALL_XENO_HIVES list(XENO_HIVE_NORMAL, XENO_HIVE_CORRUPTED, XENO_HIVE_ALPHA, XENO_HIVE_BRAVO, XENO_HIVE_CHARLIE, XENO_HIVE_DELTA, XENO_HIVE_FERAL, XENO_HIVE_TAMED, XENO_HIVE_MUTATED, XENO_HIVE_FORSAKEN, XENO_HIVE_YAUTJA, XENO_HIVE_RENEGADE)

//=================================================

Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ GLOBAL_LIST_INIT_TYPED(hive_datum, /datum/hive_status, list(
XENO_HIVE_TAMED = new /datum/hive_status/corrupted/tamed(),
XENO_HIVE_MUTATED = new /datum/hive_status/mutated(),
XENO_HIVE_FORSAKEN = new /datum/hive_status/forsaken(),
XENO_HIVE_YAUTJA = new /datum/hive_status/yautja()
XENO_HIVE_YAUTJA = new /datum/hive_status/yautja(),
XENO_HIVE_RENEGADE = new /datum/hive_status/corrupted/renegade(),
))

GLOBAL_LIST_INIT(xeno_evolve_times, setup_xeno_evolve_times())
Expand Down
46 changes: 32 additions & 14 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,25 @@

return ..()

/datum/hive_status/corrupted/renegade
name = "Renegade Hive"
reporting_id = "renegade"
hivenumber = XENO_HIVE_RENEGADE
prefix = "Renegade "
color = "#9c7a4d"

dynamic_evolution = FALSE
allow_no_queen_actions = TRUE
allow_queen_evolve = FALSE
ignore_slots = TRUE
latejoin_burrowed = FALSE

/datum/hive_status/corrupted/tamed/New()
. = ..()
hive_structures_limit[XENO_STRUCTURE_EGGMORPH] = 0
hive_structures_limit[XENO_STRUCTURE_EVOPOD] = 0
allies[FACTION_MARINE] = TRUE

/datum/hive_status/proc/on_stance_change(faction)
if(!living_xeno_queen)
return
Expand All @@ -1263,18 +1282,17 @@
for(var/number in GLOB.hive_datum)
var/datum/hive_status/target_hive = GLOB.hive_datum[number]
if(target_hive.name != faction)
xeno_message(SPAN_XENOANNOUNCE("[target_hive.name] != [faction]!"), hivenumber)
continue
if(!target_hive.living_xeno_queen)
if(!target_hive.living_xeno_queen && !target_hive.allow_no_queen_actions)
return
if(allies[faction])
xeno_message(SPAN_XENOANNOUNCE("You sense that [faction] Queen set up alliance with us!"), 3, target_hive.hivenumber)
xeno_message(SPAN_XENOANNOUNCE("You sense that [name] Queen set up alliance with us!"), 3, target_hive.hivenumber)
return
else
xeno_message(SPAN_XENOANNOUNCE("You sense that [faction] Queen broke alliance with us!"), 3, target_hive.hivenumber)
xeno_message(SPAN_XENOANNOUNCE("You sense that [name] Queen broke alliance with us!"), 3, target_hive.hivenumber)
return

if(allies[faction])
if(allies[faction] || faction != FACTION_MARINE)
return

for(var/mob/living/carbon/xenomorph/xeno in totalXenos) // handle deflecting xenos on betrayal
Expand All @@ -1284,20 +1302,23 @@
continue
if(xeno in deflectors)
continue
// if(xeno.caste == XENO_CASTE_QUEEN)
// continue
if(xeno.caste_type == XENO_CASTE_QUEEN)
continue
INVOKE_ASYNC(src, PROC_REF(give_deflection_choice), xeno, faction)
addtimer(CALLBACK(src, PROC_REF(handle_deflectors), faction), 10 SECONDS)

/datum/hive_status/proc/give_deflection_choice(mob/living/carbon/xenomorph/xeno, faction)
if(alert(xeno, "Your Queen has broken alliance with [faction]. Your IFF tag begins to suppress your connection with the hive. Do you wish to remove the tag and stay with Queen or become Tamed? You have 10 seconds to decide.", "Choose", "Stay with Queen", "Become Tamed") == "Become Tamed")
if(alert(xeno, "Your Queen has broken alliance with [faction]. Your IFF tag begins to suppress your connection with the hive. Do you wish to remove the tag and stay with Queen or deflect? You have 10 seconds to decide.", "Choose", "Stay with Queen", "Stay with your masters") == "Stay with your masters")
if(!xeno.iff_tag)
to_chat(xeno, SPAN_XENOWARNING("It's too late now. Your IFF tag is broken and your service to Queen continues."))
to_chat(xeno, SPAN_XENOWARNING("It's too late now. Your IFF tag is broken and your service to the Queen continues."))
return
deflectors += xeno
to_chat(xeno, SPAN_XENOWARNING("You decided to become Tamed."))
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."))
return
to_chat(xeno, SPAN_XENOWARNING("You decided to stay with Queen."))
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] rips out [xeno.iff_tag]!"), SPAN_XENOWARNING("You rip out [xeno.iff_tag]! For the hive!"))
xeno.iff_tag = null


/datum/hive_status/proc/handle_deflectors(faction)
Expand All @@ -1309,19 +1330,16 @@
if(!xeno.iff_tag)
continue
if(xeno in deflectors)
xeno.set_hive_and_update(XENO_HIVE_TAMED)
to_chat(xeno, SPAN_XENOANNOUNCE("You lost connection with your hive. Now there is no Queen, only masters."))
continue
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.iff_tag = null

if(deflectors.len < 1)
return

xeno_message(SPAN_XENOANNOUNCE("You sense that [deflectors.Join(", ")] deflected from your hive and became Tamed! Traitors!"), 3, hivenumber)
xeno_message(SPAN_XENOANNOUNCE("You sense that [deflectors.Join(", ")] turned their backs against their sisters and the Queen in favor of their slavemasters!"), 3, hivenumber)
deflectors = list()

//Xeno Resin Mark Shit, the very best place for it too :0)
Expand Down

0 comments on commit 0328500

Please sign in to comment.