Added a HUD for abilities and energy for Hanner and Lleill

This commit is contained in:
SatinIsle
2024-09-07 10:38:02 +01:00
parent 5310dc1339
commit ba0afb6b68
11 changed files with 205 additions and 11 deletions
+1
View File
@@ -1,2 +1,3 @@
#define ui_shadekin_display "EAST-1:28,CENTER-3:15"
#define ui_lleill_display "EAST-1:28,CENTER-3:15"
#define ui_xenochimera_danger_display "EAST-1:28,CENTER-3:15"
+5
View File
@@ -331,6 +331,11 @@
xenochimera_danger_display.screen_loc = ui_xenochimera_danger_display
xenochimera_danger_display.icon_state = "danger00"
hud_elements |= xenochimera_danger_display
lleill_display = new /obj/screen/lleill()
lleill_display.screen_loc = ui_lleill_display
lleill_display.icon_state = "lleill"
hud_elements |= lleill_display
//VOREStation Addition end
ling_chem_display = new /obj/screen/ling/chems()
+5 -1
View File
@@ -19,6 +19,10 @@
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/shadekin))
to_chat(usr,"<span class='notice'><b>Energy:</b> [H.shadekin_get_energy(H)]</span>")
if("lleill status")
var/mob/living/carbon/human/H = usr
if(istype(H))
to_chat(usr,"<span class='notice'><b>Energy:</b> [H.species.lleill_energy]/[H.species.lleill_energy_max]</span>")
if("danger level")
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/xenochimera))
@@ -59,7 +63,7 @@
to_chat(usr, "<span class='notice'>We are currently reviving, and will be done in [round((H.revive_finished - world.time) / 10)] seconds, or [round(((H.revive_finished - world.time) * 0.1) / 60)] minutes.</span>")
else if(H.revive_ready == REVIVING_DONE)
to_chat(usr, "<span class='warning'>You should have a notification + alert for this! Bug report that this is still here!</span>")
if("Ready to Hatch") // Allow Viewing Reconstruction Timer + Hatching for 'chimera
var/mob/living/carbon/human/H = usr
if(istype(H) && istype(H.species, /datum/species/xenochimera)) // If you're somehow able to click this while not a chimera, this should prevent weird runtimes. Will need changing if regeneration is ever opened to non-chimera using the same alert.
@@ -89,10 +89,44 @@
/mob/living/carbon/human/proc/shapeshifter_select_tail,
/mob/living/carbon/human/proc/shapeshifter_select_ears,
/mob/living/proc/set_size,
/mob/living/carbon/human/proc/lleill_contact,
/mob/living/carbon/human/proc/lleill_alchemy,
/mob/living/carbon/human/proc/hanner_beast_form
// /mob/living/carbon/human/proc/lleill_contact,
// /mob/living/carbon/human/proc/lleill_alchemy,
// /mob/living/carbon/human/proc/hanner_beast_form
)
valid_transform_species = list(SPECIES_HUMAN, SPECIES_HUMAN_VATBORN, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_SKRELL, SPECIES_ALTEVIAN, SPECIES_TESHARI, SPECIES_MONKEY, SPECIES_LLEILL, SPECIES_VULPKANIN, SPECIES_ZORREN_HIGH, SPECIES_RAPALA, SPECIES_NEVREAN, SPECIES_VASILISSAN, SPECIES_AKULA)
var/list/lleill_abilities = list(/datum/power/lleill/contact,
/datum/power/lleill/alchemy,
/datum/power/lleill/beastform_hanner)
var/list/lleill_ability_datums = list()
/datum/species/shapeshifter/hanner/New()
..()
for(var/power in lleill_abilities)
var/datum/power/lleill/LP = new power(src)
lleill_ability_datums.Add(LP)
/datum/species/shapeshifter/hanner/proc/add_lleill_abilities(var/mob/living/carbon/human/H)
if(!H.ability_master || !istype(H.ability_master, /obj/screen/movable/ability_master/lleill))
H.ability_master = null
H.ability_master = new /obj/screen/movable/ability_master/lleill(H)
for(var/datum/power/lleill/P in lleill_ability_datums)
if(!(P.verbpath in H.verbs))
H.verbs += P.verbpath
H.ability_master.add_lleill_ability(
object_given = H,
verb_given = P.verbpath,
name_given = P.name,
ability_icon_given = P.ability_icon_state,
arguments = list()
)
spawn (50)
if(H.lleill_display)
H.lleill_display.invisibility = 0
H.lleill_display.icon_state = "lleill-4"
/datum/species/shapeshifter/hanner/add_inherent_verbs(var/mob/living/carbon/human/H)
..()
add_lleill_abilities(H)
@@ -83,12 +83,13 @@
/mob/living/carbon/human/proc/shapeshifter_select_tail,
/mob/living/carbon/human/proc/shapeshifter_select_ears,
/mob/living/proc/set_size,
/mob/living/carbon/human/proc/lleill_invisibility,
/mob/living/carbon/human/proc/lleill_transmute,
/mob/living/carbon/human/proc/lleill_rings,
/mob/living/carbon/human/proc/lleill_contact,
/mob/living/carbon/human/proc/lleill_alchemy,
/mob/living/carbon/human/proc/lleill_beast_form)
// /mob/living/carbon/human/proc/lleill_invisibility,
// /mob/living/carbon/human/proc/lleill_transmute,
// /mob/living/carbon/human/proc/lleill_rings,
// /mob/living/carbon/human/proc/lleill_contact,
// /mob/living/carbon/human/proc/lleill_alchemy,
// /mob/living/carbon/human/proc/lleill_beast_form
)
//organs, going with just the basics for now
@@ -122,6 +123,15 @@
base_species = SPECIES_LLEILL
var/list/lleill_abilities = list(/datum/power/lleill/invisibility,
/datum/power/lleill/transmute,
/datum/power/lleill/rings,
/datum/power/lleill/contact,
/datum/power/lleill/alchemy,
/datum/power/lleill/beastform)
var/list/lleill_ability_datums = list()
// Shapeshifters have some behaviour that doesn't play well with this species so I have taken the main parts needed for here.
/datum/species/lleill/get_valid_shapeshifter_forms(var/mob/living/carbon/human/H)
@@ -183,3 +193,50 @@
if(!S || S.name == src.name)
return ..()
return S?.get_tail_hair(H)
/datum/species/lleill/New()
..()
for(var/power in lleill_abilities)
var/datum/power/lleill/LP = new power(src)
lleill_ability_datums.Add(LP)
/datum/species/lleill/proc/add_lleill_abilities(var/mob/living/carbon/human/H)
if(!H.ability_master || !istype(H.ability_master, /obj/screen/movable/ability_master/lleill))
H.ability_master = null
H.ability_master = new /obj/screen/movable/ability_master/lleill(H)
for(var/datum/power/lleill/P in lleill_ability_datums)
if(!(P.verbpath in H.verbs))
H.verbs += P.verbpath
H.ability_master.add_lleill_ability(
object_given = H,
verb_given = P.verbpath,
name_given = P.name,
ability_icon_given = P.ability_icon_state,
arguments = list()
)
spawn (50)
if(H.lleill_display)
H.lleill_display.invisibility = 0
H.lleill_display.icon_state = "lleill-4"
/datum/species/proc/update_lleill_hud(var/mob/living/carbon/human/H)
var/relative_energy = ((lleill_energy/lleill_energy_max)*100)
if(H.lleill_display)
H.lleill_display.invisibility = 0
switch(relative_energy)
if(0 to 24)
H.lleill_display.icon_state = "lleill-0"
if(25 to 49)
H.lleill_display.icon_state = "lleill-1"
if(50 to 74)
H.lleill_display.icon_state = "lleill-2"
if(75 to 99)
H.lleill_display.icon_state = "lleill-3"
if(100 to INFINITY)
H.lleill_display.icon_state = "lleill-4"
return
/datum/species/lleill/add_inherent_verbs(var/mob/living/carbon/human/H)
..()
add_lleill_abilities(H)
@@ -4,9 +4,10 @@
// Essentially the same as traitor cloaking, using the same proc for it.
/datum/power/lleill/invisibility
name = "Invisibility"
name = "Invisibility (75)"
desc = "Change your appearance to match your surroundings, becoming completely invisible to the naked eye."
verbpath = /mob/living/carbon/human/proc/lleill_invisibility
ability_icon_state = "ling_camoflage"
/mob/living/carbon/human/proc/lleill_invisibility()
set name = "Invisibility (75)"
@@ -33,6 +34,7 @@
block_hud = 0
hud_updateflag = 1
to_chat(src, "<span class='warning'>The brustling of your fur settles down and you become visible once again.</span>")
species.update_lleill_hud(src)
/mob/living/carbon/human/proc/lleill_select_shape()
@@ -90,6 +92,12 @@
regenerate_icons()
/datum/power/lleill/transmute
name = "Transmute Object (50)"
desc = "Convert an object into a piece of glamour."
verbpath = /mob/living/carbon/human/proc/lleill_transmute
ability_icon_state = "lleill_transmute"
/mob/living/carbon/human/proc/lleill_transmute()
set name = "Transmute Object (50)"
set desc = "Convert an object into a piece of glamour."
@@ -144,6 +152,13 @@
var/obj/item/N = new transmute_product(spawnloc)
put_in_active_hand(N)
species.lleill_energy -= energy_cost
species.update_lleill_hud(src)
/datum/power/lleill/rings
name = "Glamour Rings"
desc = "Place or teleport to a glamour ring."
verbpath = /mob/living/carbon/human/proc/lleill_rings
ability_icon_state = "lleill_ring"
/mob/living/carbon/human/proc/lleill_rings()
set name = "Place/Use Rings"
@@ -214,6 +229,13 @@
if(M.devourable && M.can_be_drop_prey)
M.forceMove(vore_selected)
to_chat(M,"<span class='vwarning'>In a bright flash of white light, you suddenly find yourself trapped in \the [src]'s [vore_selected.name]!</span>")
species.update_lleill_hud(src)
/datum/power/lleill/contact
name = "Energy Transfer"
desc = "Take the energy of another creature by making physical contact with them, the other party must consent. This will make them feel drained."
verbpath = /mob/living/carbon/human/proc/lleill_contact
ability_icon_state = "lleill_contact"
/mob/living/carbon/human/proc/lleill_contact()
set name = "Energy Transfer"
@@ -300,6 +322,13 @@
chosen_target.remove_blood(40) //removes enough blood to make them feel a bit woozy, mostly just for flavour
chosen_target.eye_blurry += 20
to_chat(chosen_target, "<span class='warning'>You feel considerably weakened for the moment.</span>")
species.update_lleill_hud(src)
/datum/power/lleill/alchemy
name = "Alchemy (25)"
desc = "Convert a potion material into a potion without the use of a base or alembic."
verbpath = /mob/living/carbon/human/proc/lleill_alchemy
ability_icon_state = "lleill_alchemy"
/mob/living/carbon/human/proc/lleill_alchemy()
set name = "Alchemy (25)"
@@ -342,6 +371,13 @@
var/obj/item/N = new transmute_product(spawnloc)
put_in_active_hand(N)
species.lleill_energy -= energy_cost
species.update_lleill_hud(src)
/datum/power/lleill/beastform
name = "Beast Form (100)"
desc = "Take the form of a non-humanoid creature."
verbpath = /mob/living/carbon/human/proc/lleill_beast_form
ability_icon_state = "lleill_beast"
/mob/living/carbon/human/proc/lleill_beast_form()
set name = "Beast Form (100)"
@@ -478,6 +514,7 @@
M.forceMove(new_mob)
new_mob.tf_mob_holder = M
new_mob.visible_message("<b>\The [src]</b> has transformed into \the [chosen_beast]!")
species.update_lleill_hud(src)
/mob/living/carbon/human/proc/spawn_beast_mob(var/chosen_beast)
@@ -510,6 +547,12 @@
//Hanner variant
/datum/power/lleill/beastform_hanner
name = "Beast Form (100)"
desc = "Take the form of a non-humanoid creature."
verbpath = /mob/living/carbon/human/proc/hanner_beast_form
ability_icon_state = "lleill_beast"
/mob/living/carbon/human/proc/hanner_beast_form()
set name = "Beast Form (100)"
set desc = "Take the form of a non-humanoid creature."
@@ -0,0 +1,48 @@
/obj/screen/lleill
name = "lleill status"
icon = 'icons/mob/lleill_hud.dmi'
invisibility = 101
/obj/screen/movable/ability_master/lleill
name = "Lleill Abilities"
icon = 'icons/mob/screen_spells.dmi'
icon_state = "grey_spell_ready"
ability_objects = list()
showing = 0
open_state = "master_open"
closed_state = "master_closed"
screen_loc = ui_spell_master
/obj/screen/movable/ability_master/lleill/update_abilities(forced = 0, mob/user) //Different proc to prevent indexing
update_icon()
if(user && user.client)
if(!(src in user.client.screen))
user.client.screen += src
for(var/obj/screen/ability/ability in ability_objects)
ability.update_icon(forced)
/obj/screen/ability/verb_based/lleill
icon_state = "grey_spell_base"
background_base_state = "grey"
/obj/screen/movable/ability_master/proc/add_lleill_ability(var/object_given, var/verb_given, var/name_given, var/ability_icon_given, var/arguments)
if(!object_given)
message_admins("ERROR: add_lleill_ability() was not given an object in its arguments.")
if(!verb_given)
message_admins("ERROR: add_lleill_ability() was not given a verb/proc in its arguments.")
if(get_ability_by_proc_ref(verb_given))
return // Duplicate
var/obj/screen/ability/verb_based/lleill/A = new /obj/screen/ability/verb_based/lleill()
A.ability_master = src
A.object_used = object_given
A.verb_to_call = verb_given
A.ability_icon_state = ability_icon_given
A.name = name_given
if(arguments)
A.arguments_to_use = arguments
ability_objects.Add(A)
if(my_mob.client)
toggle_open(2)
+1
View File
@@ -6,6 +6,7 @@
var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping
var/obj/screen/shadekin/shadekin_display = null
var/obj/screen/shadekin/lleill_display = null
var/obj/screen/xenochimera/danger_level/xenochimera_danger_display = null
var/size_multiplier = 1 //multiplier for the mob's icon size
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB

+1
View File
@@ -2967,6 +2967,7 @@
#include "code\modules\mob\living\carbon\human\species\lleill\hanner.dm"
#include "code\modules\mob\living\carbon\human\species\lleill\lleill.dm"
#include "code\modules\mob\living\carbon\human\species\lleill\lleill_abilities.dm"
#include "code\modules\mob\living\carbon\human\species\lleill\lleill_hud.dm"
#include "code\modules\mob\living\carbon\human\species\lleill\lleill_items.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\event.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\replicant.dm"