Skip to content

Commit

Permalink
Uncluttering Queen UI P1 (#5350)
Browse files Browse the repository at this point in the history
# About the pull request
Puts the banish/readmit/devolve into one category of "manage hive"

# Explain why it's good for the game

Queen ui is cluttered as hell and disheartening for new players this
aims to clear it up and put it into managable parts, this is the part
one of it.


# Testing Photographs and Procedure

![image](https://github.com/cmss13-devs/cmss13/assets/47158596/2de0fa68-36b8-43df-93ae-5ba9218913d5)


Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
qol: Moves "Banish, Re-admit and De-evolving" queen abilities into one
list, making the queen ui less clutterier
/:cl:

---------

Co-authored-by: InsaneRed <[email protected]>
Co-authored-by: Birdtalon <[email protected]>
  • Loading branch information
3 people committed Jan 12, 2024
1 parent af5a8e4 commit 6129eae
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 63 deletions.
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"
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)

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

0 comments on commit 6129eae

Please sign in to comment.