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

Uncluttering Queen UI P1 #5350

Merged
merged 28 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
657c5f3
qol
Dec 27, 2023
5248024
Merge branch 'master' into uistuff
Red-byte3D Dec 27, 2023
2e2fa3b
changes
Dec 31, 2023
3993291
Merge branch 'uistuff' of https://github.com/InsaneRed/cmss13 into ui…
Dec 31, 2023
4681f21
Merge branch 'master' into uistuff
Red-byte3D Dec 31, 2023
4fc7de2
Merge remote-tracking branch 'upstream/master' into uistuff
Dec 31, 2023
cfcc983
Merge branch 'uistuff' of https://github.com/InsaneRed/cmss13 into ui…
Dec 31, 2023
cabe069
fix
Dec 31, 2023
b19d651
we loove indentation
Dec 31, 2023
3e4eca8
changes
Jan 1, 2024
b56756a
fix
Jan 1, 2024
8e9adbb
Merge branch 'master' into uistuff
Red-byte3D Jan 1, 2024
491c0cb
procs
Jan 1, 2024
27d7ba9
Merge branch 'uistuff' of https://github.com/InsaneRed/cmss13 into ui…
Jan 1, 2024
364b11c
Merge branch 'master' into uistuff
Red-byte3D Jan 1, 2024
0b6f68a
Update code/modules/mob/living/carbon/xenomorph/abilities/queen/queen…
Red-byte3D Jan 2, 2024
ab6b518
Update code/modules/mob/living/carbon/xenomorph/abilities/queen/queen…
Red-byte3D Jan 2, 2024
84f5b3d
Merge branch 'master' into uistuff
Red-byte3D Jan 2, 2024
3098edc
requestedchanges
Jan 2, 2024
c8c1cd8
Merge branch 'uistuff' of https://github.com/InsaneRed/cmss13 into ui…
Jan 2, 2024
2bdc592
guh
Jan 2, 2024
896410b
yea
Jan 2, 2024
d526d1d
Merge branch 'master' into uistuff
Red-byte3D Jan 2, 2024
410ce0f
changes, plasma costs
Jan 4, 2024
87ec55c
Merge branch 'master' into uistuff
Red-byte3D Jan 4, 2024
16989bd
vars
Jan 11, 2024
0c37ca7
Merge branch 'uistuff' of https://github.com/InsaneRed/cmss13 into ui…
Jan 11, 2024
1c2042f
Merge branch 'master' into uistuff
Red-byte3D Jan 11, 2024
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
15 changes: 0 additions & 15 deletions code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,6 @@
return
return ..()

/datum/action/xeno_action/onclick/queen_award
name = "Give Royal Jelly (500)"
action_icon_state = "queen_award"
plasma_cost = 500

/datum/action/xeno_action/onclick/queen_award/use_ability(atom/target)
var/mob/living/carbon/xenomorph/queen/xeno = owner
if(!xeno.check_state())
return
if(!xeno.check_plasma(plasma_cost))
return
if(give_jelly_award(xeno.hive))
xeno.use_plasma(plasma_cost)
return ..()

/datum/action/xeno_action/onclick/queen_word
name = "Word of the Queen (50)"
action_icon_state = "queen_word"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/datum/action/xeno_action/onclick/deevolve
name = "De-Evolve a Xenomorph (500)"
action_icon_state = "xeno_deevolve"
plasma_cost = 500

/datum/action/xeno_action/onclick/remove_eggsac
name = "Remove Eggsac"
action_icon_state = "grow_ovipositor"
Expand Down Expand Up @@ -45,23 +40,10 @@
var/node_plant_plasma_cost = 300
var/turf_build_cooldown = 7 SECONDS

/datum/action/xeno_action/onclick/give_evo_points
name = "Trade Larva for Evolution Points (100)"
action_icon_state = "queen_give_evo_points"
plasma_cost = 100
xeno_cooldown = 60 SECONDS
var/evo_points_per_larva = 250
var/required_larva = 3

/datum/action/xeno_action/onclick/banish
name = "Banish a Xenomorph (500)"
action_icon_state = "xeno_banish"
plasma_cost = 500

/datum/action/xeno_action/onclick/readmit
name = "Readmit a Xenomorph (100)"
/datum/action/xeno_action/onclick/manage_hive
name = "Manage The Hive"
action_icon_state = "xeno_readmit"
Red-byte3D marked this conversation as resolved.
Show resolved Hide resolved
plasma_cost = 100
plasma_cost = 0

/datum/action/xeno_action/activable/secrete_resin/remote/queen
name = "Projected Resin (100)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// devolve a xeno - lots of old, vaguely shitty code here
/datum/action/xeno_action/onclick/deevolve/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/de_evolve_other()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_devolve = 500
if(!user_xeno.check_state())
return
if(!user_xeno.observed_xeno)
to_chat(user_xeno, SPAN_WARNING("You must overwatch the xeno you want to de-evolve."))
return

var/mob/living/carbon/xenomorph/target_xeno = user_xeno.observed_xeno
if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_devolve))
return

if(target_xeno.hivenumber != user_xeno.hivenumber)
Expand Down Expand Up @@ -130,7 +131,7 @@
SSround_recording.recorder.stop_tracking(target_xeno)
SSround_recording.recorder.track_player(new_xeno)
qdel(target_xeno)
return ..()
return

/datum/action/xeno_action/onclick/remove_eggsac/use_ability(atom/A)
var/mob/living/carbon/xenomorph/queen/X = owner
Expand Down Expand Up @@ -292,12 +293,15 @@
to_chat(X, SPAN_XENONOTICE("You channel your plasma to heal your sisters' wounds around this area."))
return ..()

/datum/action/xeno_action/onclick/give_evo_points/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/give_evo_points()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_givepoints = 100


if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_givepoints))
return

if(world.time < SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK)
Expand All @@ -308,7 +312,8 @@

if(!choice)
return

var/evo_points_per_larva = 250
var/required_larva = 3
var/mob/living/carbon/xenomorph/target_xeno

for(var/mob/living/carbon/xenomorph/xeno in user_xeno.hive.totalXenos)
Expand Down Expand Up @@ -351,14 +356,45 @@
target_xeno.evolution_stored += evo_points_per_larva

user_xeno.hive.stored_larva--
return ..()
return



/datum/action/xeno_action/onclick/manage_hive/proc/give_jelly_reward()
var/mob/living/carbon/xenomorph/queen/xeno = owner
var/plasma_cost_jelly = 500
if(!xeno.check_state())
return
if(!xeno.check_plasma(plasma_cost_jelly))
return
if(give_jelly_award(xeno.hive))
xeno.use_plasma(plasma_cost_jelly)
return
/datum/action/xeno_action/onclick/manage_hive/use_ability(atom/Atom)
var/mob/living/carbon/xenomorph/queen/queenbanish = owner
plasma_cost = 0

/datum/action/xeno_action/onclick/banish/use_ability(atom/Atom)
var/choice = tgui_input_list(queenbanish, "Manage The Hive", "Hive Management", list("Banish (500)", "Re-Admit (100)", "De-evolve (500)", "Reward Jelly (500)", "Exchange larva for evolution (100)",), theme="hive_status")
switch(choice)
if("Banish (500)")
banish()
if("Re-Admit (100)")
readmit()
if("De-evolve (500)")
de_evolve_other()
if("Reward Jelly (500)")
give_jelly_reward(queenbanish.hive)
if("Exchange larva for evolution (100)")
give_evo_points()


/datum/action/xeno_action/onclick/manage_hive/proc/banish()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_banish = 500
if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_banish))
return

var/choice = tgui_input_list(user_xeno, "Choose a xenomorph to banish:", "Banish", user_xeno.hive.totalXenos, theme="hive_status")
Expand Down Expand Up @@ -399,7 +435,7 @@
to_chat(user_xeno, SPAN_XENOWARNING("You must provide a reason for banishing [target_xeno]."))
return

if(!user_xeno.check_state() || !check_and_use_plasma_owner(plasma_cost) || target_xeno.health < 0)
if(!user_xeno.check_state() || !check_and_use_plasma_owner(plasma_cost_banish) || target_xeno.health < 0)
return

// Let everyone know they were banished
Expand All @@ -413,20 +449,21 @@
addtimer(CALLBACK(src, PROC_REF(remove_banish), user_xeno.hive, target_xeno.name), 30 MINUTES)
Red-byte3D marked this conversation as resolved.
Show resolved Hide resolved

message_admins("[key_name_admin(user_xeno)] has banished [key_name_admin(target_xeno)]. Reason: [reason]")
return ..()
return

/datum/action/xeno_action/onclick/banish/proc/remove_banish(datum/hive_status/hive, name)
/datum/action/xeno_action/proc/remove_banish(datum/hive_status/hive, name)
hive.banished_ckeys.Remove(name)


// Readmission = un-banish

/datum/action/xeno_action/onclick/readmit/use_ability(atom/Atom)
/datum/action/xeno_action/onclick/manage_hive/proc/readmit()
var/mob/living/carbon/xenomorph/queen/user_xeno = owner
var/plasma_cost_readmit = 100
if(!user_xeno.check_state())
return

if(!user_xeno.check_plasma(plasma_cost))
if(!user_xeno.check_plasma(plasma_cost_readmit))
return

var/choice = tgui_input_list(user_xeno, "Choose a xenomorph to readmit:", "Re-admit", user_xeno.hive.banished_ckeys, theme="hive_status")
Expand Down Expand Up @@ -470,7 +507,7 @@
target_xeno.lock_evolve = FALSE

user_xeno.hive.banished_ckeys.Remove(banished_name)
return ..()
return

/datum/action/xeno_action/onclick/eye
name = "Enter Eye Form"
Expand Down
17 changes: 5 additions & 12 deletions code/modules/mob/living/carbon/xenomorph/castes/Queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,8 @@
/datum/action/xeno_action/onclick/choose_resin/queen_macro, //fourth macro
/datum/action/xeno_action/activable/secrete_resin/queen_macro, //fifth macro
/datum/action/xeno_action/onclick/grow_ovipositor,
/datum/action/xeno_action/onclick/banish,
/datum/action/xeno_action/onclick/readmit,
/datum/action/xeno_action/onclick/queen_award,
/datum/action/xeno_action/activable/info_marker/queen,
/datum/action/xeno_action/onclick/manage_hive,
)

inherent_verbs = list(
Expand Down Expand Up @@ -338,13 +336,12 @@
/datum/action/xeno_action/onclick/choose_resin/queen_macro, //fourth macro
/datum/action/xeno_action/activable/secrete_resin/queen_macro, //fifth macro
/datum/action/xeno_action/onclick/grow_ovipositor,
/datum/action/xeno_action/onclick/banish,
/datum/action/xeno_action/onclick/readmit,
/datum/action/xeno_action/onclick/queen_award,
/datum/action/xeno_action/onclick/manage_hive,
/datum/action/xeno_action/activable/info_marker/queen,
/datum/action/xeno_action/onclick/screech, //custom macro, Screech
/datum/action/xeno_action/activable/xeno_spit/queen_macro, //third macro
/datum/action/xeno_action/onclick/shift_spits, //second macro
/datum/action/xeno_action/onclick/shift_spits,
//second macro
)

// Abilities they get when they've successfully aged.
Expand Down Expand Up @@ -839,19 +836,15 @@
/datum/action/xeno_action/onclick/psychic_whisper,
/datum/action/xeno_action/onclick/psychic_radiance,
/datum/action/xeno_action/onclick/choose_resin/queen_macro, //fourth macro
/datum/action/xeno_action/onclick/banish,
/datum/action/xeno_action/onclick/readmit,
/datum/action/xeno_action/onclick/queen_award,
/datum/action/xeno_action/onclick/manage_hive,
/datum/action/xeno_action/activable/info_marker/queen,
// Screech is typically new for this list, but its possible they never ovi and it then is forced here:
/datum/action/xeno_action/onclick/screech, //custom macro, Screech
// These are new and their arrangement matters:
/datum/action/xeno_action/onclick/remove_eggsac,
/datum/action/xeno_action/onclick/give_evo_points,
/datum/action/xeno_action/onclick/set_xeno_lead,
/datum/action/xeno_action/activable/queen_heal, //first macro
/datum/action/xeno_action/activable/queen_give_plasma, //second macro
/datum/action/xeno_action/onclick/deevolve,
/datum/action/xeno_action/onclick/queen_order,
/datum/action/xeno_action/activable/expand_weeds, //third macro
/datum/action/xeno_action/activable/secrete_resin/remote/queen, //fifth macro
Expand Down