mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
[mind UI] Soulblades HUD. Goodbye gui_icons (#30132)
* Soulblade UI * removed deprecated dmi * fixes * woops, almost made soulblades good there * :csgrad:
This commit is contained in:
@@ -134,6 +134,11 @@
|
||||
// mob/user: The mob that's logging out.
|
||||
/lazy_event/on_logout
|
||||
|
||||
// Called by mob/living/Login().
|
||||
// Arguments:
|
||||
// mob/user: The living mob that's logging in.
|
||||
/lazy_event/on_living_login
|
||||
|
||||
// Called whenever a mob takes damage.
|
||||
// Truthy return values will prevent the damage.
|
||||
// Arguments:
|
||||
|
||||
@@ -150,58 +150,6 @@
|
||||
#define ui_ai_view_images "SOUTH:[6*PIXEL_MULTIPLIER],WEST+12:[16*PIXEL_MULTIPLIER]"
|
||||
#define ui_ai_config_radio "SOUTH:[6*PIXEL_MULTIPLIER],WEST+13:[16*PIXEL_MULTIPLIER]"
|
||||
|
||||
//Adminbus HUD
|
||||
#define ui_adminbus_bg "1,1"
|
||||
#define ui_adminbus_delete "11:[31*PIXEL_MULTIPLIER],1:[6*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_delmobs "1:[6*PIXEL_MULTIPLIER],5:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_spclowns "1:[8*PIXEL_MULTIPLIER],6:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_spcarps "1:[8*PIXEL_MULTIPLIER],7:[10*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_spbears "1:[8*PIXEL_MULTIPLIER],8:[6*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_sptrees "1:[8*PIXEL_MULTIPLIER],9:[2*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_spspiders "1:[8*PIXEL_MULTIPLIER],9:[30*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_spalien "1:[5*PIXEL_MULTIPLIER],10:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_loadsids "5,2:[9*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_loadsmone "5,3:[5*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_massrepair "6:[3*PIXEL_MULTIPLIER],2:[9*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_massrejuv "6:[3*PIXEL_MULTIPLIER],3:[5*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_hook "10,3:[7*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_juke "11:[11*PIXEL_MULTIPLIER],3:[7*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_tele "12:[22*PIXEL_MULTIPLIER],3:[7*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_bumpers_1 "9:[21*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_bumpers_2 "10:[5*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_bumpers_3 "10:[21*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_door_0 "11:[11*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_door_1 "11:273*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_roadlights_0 "12:[17*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_roadlights_1 "13:[1*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_roadlights_2 "13:[17*PIXEL_MULTIPLIER],2:[14*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_free "13:[9*PIXEL_MULTIPLIER],14:[20*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_home "14:[6*PIXEL_MULTIPLIER],14:[20*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_antag "15:[3*PIXEL_MULTIPLIER],14:[20*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_dellasers "6:[13*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_givelasers "6:[29*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_delbombs "9:[18*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_givebombs "10:[2*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_tdred "1:[18*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_tdarena "2:[4*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_tdgreen "3:[6*PIXEL_MULTIPLIER],13:[26*PIXEL_MULTIPLIER]"
|
||||
#define ui_adminbus_tdobs "2:[4*PIXEL_MULTIPLIER],14:[28*PIXEL_MULTIPLIER]"
|
||||
|
||||
//Blob HUD
|
||||
#define ui_blob_bgLEFT "WEST,CENTER-7"
|
||||
#define ui_blob_bgRIGHT "EAST-14,CENTER-7"
|
||||
#define ui_blob_powerbar "WEST,CENTER-3"
|
||||
#define ui_blob_healthbar "EAST:[14*PIXEL_MULTIPLIER],CENTER-3"
|
||||
#define ui_blob_spawnblob "WEST:[18*PIXEL_MULTIPLIER],CENTER-3:[5*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_spawnstrong "WEST:[18*PIXEL_MULTIPLIER],CENTER-2:[9*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_spawnresource "WEST:[18*PIXEL_MULTIPLIER],CENTER-1:[13*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_spawnfactory "WEST:[18*PIXEL_MULTIPLIER],CENTER:[17*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_spawnnode "WEST:[18*PIXEL_MULTIPLIER],CENTER+1:[21*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_spawncore "WEST:[18*PIXEL_MULTIPLIER],CENTER+2:[25*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_ping "EAST-1:[24*PIXEL_MULTIPLIER],CENTER+3:[21*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_rally "EAST-1:[24*PIXEL_MULTIPLIER],CENTER+4:[25*PIXEL_MULTIPLIER]"
|
||||
#define ui_blob_taunt "EAST-1:[24*PIXEL_MULTIPLIER],CENTER+5:[29*PIXEL_MULTIPLIER]"
|
||||
|
||||
//Cult HUD
|
||||
#define ui_cult_Act "WEST+0:[6*PIXEL_MULTIPLIER],SOUTH+5:[15*PIXEL_MULTIPLIER]"
|
||||
#define ui_cult_tattoos "WEST+0:[6*PIXEL_MULTIPLIER], SOUTH+4:[13*PIXEL_MULTIPLIER]"
|
||||
|
||||
@@ -197,8 +197,6 @@ var/global/obj/abstract/screen/clicker/catcher = new()
|
||||
return FALSE
|
||||
if(!mymob.client)
|
||||
return FALSE
|
||||
if(!mymob.gui_icons)
|
||||
mymob.gui_icons = new /datum/ui_icons(src)
|
||||
|
||||
var/ui_style
|
||||
var/ui_color
|
||||
|
||||
@@ -77,28 +77,6 @@
|
||||
|
||||
|
||||
////////SOUL BLADE HUD ELEMENTS////////
|
||||
mymob.gui_icons.soulblade_bgLEFT = new /obj/abstract/screen
|
||||
mymob.gui_icons.soulblade_bgLEFT.icon = 'icons/mob/screen1_shade_fullscreen.dmi'
|
||||
mymob.gui_icons.soulblade_bgLEFT.icon_state = "backgroundLEFT"
|
||||
mymob.gui_icons.soulblade_bgLEFT.name = "Blood"
|
||||
mymob.gui_icons.soulblade_bgLEFT.layer = HUD_BASE_LAYER
|
||||
mymob.gui_icons.soulblade_bgLEFT.screen_loc = ui_blob_bgLEFT
|
||||
|
||||
mymob.gui_icons.soulblade_coverLEFT = new /obj/abstract/screen
|
||||
mymob.gui_icons.soulblade_coverLEFT.icon = 'icons/mob/screen1_shade_fullscreen.dmi'
|
||||
mymob.gui_icons.soulblade_coverLEFT.icon_state = "coverLEFT"
|
||||
mymob.gui_icons.soulblade_coverLEFT.name = "Blood"
|
||||
mymob.gui_icons.soulblade_coverLEFT.layer = HUD_ABOVE_ITEM_LAYER
|
||||
mymob.gui_icons.soulblade_coverLEFT.screen_loc = ui_blob_bgLEFT
|
||||
mymob.gui_icons.soulblade_coverLEFT.maptext_x = 1
|
||||
mymob.gui_icons.soulblade_coverLEFT.maptext_y = 126*PIXEL_MULTIPLIER
|
||||
|
||||
mymob.gui_icons.soulblade_bloodbar = new /obj/abstract/screen
|
||||
mymob.gui_icons.soulblade_bloodbar.icon = 'icons/mob/screen1_shade_bars.dmi'
|
||||
mymob.gui_icons.soulblade_bloodbar.icon_state = "blood"
|
||||
mymob.gui_icons.soulblade_bloodbar.name = "Blood"
|
||||
mymob.gui_icons.soulblade_bloodbar.screen_loc = ui_blob_powerbar
|
||||
|
||||
mymob.healths2 = new /obj/abstract/screen
|
||||
mymob.healths2.icon = 'icons/mob/screen1_shade.dmi'
|
||||
mymob.healths2.icon_state = "blade_ok"
|
||||
|
||||
@@ -28,7 +28,6 @@ var/list/mind_ui_ID2type = list()
|
||||
for (var/mind_ui in activeUIs)
|
||||
var/datum/mind_ui/ui = activeUIs[mind_ui]
|
||||
ui.SendToClient()
|
||||
ReLoginUIFailsafe() // Makes sure we're not missing an UI whose requirements were given somehow before the mob had a mind
|
||||
|
||||
/datum/mind/proc/RemoveAllUIs() // Removes all mind uis from client.screen, called on mob/Logout()
|
||||
for (var/mind_ui in activeUIs)
|
||||
@@ -144,8 +143,7 @@ var/list/mind_ui_ID2type = list()
|
||||
if (!M.client)
|
||||
return
|
||||
|
||||
for (var/obj/abstract/mind_ui_element/element in elements)
|
||||
mind.current.client.screen -= element
|
||||
mind.current.client.screen -= elements
|
||||
|
||||
// Makes every element visible
|
||||
/datum/mind_ui/proc/Display()
|
||||
@@ -270,25 +268,3 @@ var/list/mind_ui_ID2type = list()
|
||||
I.pixel_x = (i - 1) * 6
|
||||
result.overlays += I
|
||||
return result
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// RE-LOGIN FAILSAFE //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Checks that the mob isn't missing a given UI for some reason, called by ResendAllUIs() on mob/living/Login()
|
||||
// I mean, really this should never happen under normal circumstances but if for example someone placed a Test Dummy inside an adminbus
|
||||
// before they had a mind, their UI would fail to initialize, and this proc makes sure that whoever then takes control of it, won't be lacking the UI.
|
||||
// This isn't necessary for all UI (such as those displayed after interacting with an object), but preferable for some (such as those tied to the player's roles, species, or vehicle)
|
||||
/datum/mind/proc/ReLoginUIFailsafe()
|
||||
var/mob/M = current
|
||||
if (!current)
|
||||
return
|
||||
if(istype(M.locked_to, /obj/structure/bed/chair/vehicle/adminbus))
|
||||
if (!("Adminbus" in activeUIs))
|
||||
DisplayUI("Adminbus")
|
||||
if(isovermind(M))
|
||||
if (!("Blob" in activeUIs))
|
||||
DisplayUI("Blob")
|
||||
|
||||
73
code/_onclick/mindUI/soulblade.dm
Normal file
73
code/_onclick/mindUI/soulblade.dm
Normal file
@@ -0,0 +1,73 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// SOULBLADE (BLOOD GAUGE) //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/mind_ui/soulblade
|
||||
uniqueID = "Soulblade"
|
||||
x = "LEFT"
|
||||
element_types_to_spawn = list(
|
||||
/obj/abstract/mind_ui_element/blood_gauge,
|
||||
/obj/abstract/mind_ui_element/blood_count,
|
||||
)
|
||||
|
||||
/datum/mind_ui/soulblade/Valid()
|
||||
var/mob/M = mind.current
|
||||
if (isshade(M) && istype(M.loc, /obj/item/weapon/melee/soulblade))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
/obj/abstract/mind_ui_element/blood_gauge
|
||||
name = "Blood"
|
||||
icon = 'icons/ui/soulblade/21x246.dmi'
|
||||
icon_state = "blood_gauge_background"
|
||||
layer = MIND_UI_BACK
|
||||
offset_y = -119
|
||||
|
||||
/obj/abstract/mind_ui_element/blood_gauge/UpdateIcon()
|
||||
var/mob/living/simple_animal/shade/M = GetUser()
|
||||
if(!istype(M) || !istype(M.loc, /obj/item/weapon/melee/soulblade))
|
||||
return
|
||||
var/obj/item/weapon/melee/soulblade/SB = M.loc
|
||||
overlays.len = 0
|
||||
|
||||
var/image/gauge = image('icons/ui/soulblade/18x200.dmi', src, "blood")
|
||||
var/matrix/gauge_matrix = matrix()
|
||||
gauge_matrix.Scale(1,SB.blood/SB.maxblood)
|
||||
gauge.transform = gauge_matrix
|
||||
gauge.layer = MIND_UI_BUTTON
|
||||
gauge.pixel_y = round(-77 + 100 * (SB.blood/SB.maxblood))
|
||||
overlays += gauge
|
||||
|
||||
var/image/cover = image(icon, src, "blood_gauge_cover")
|
||||
cover.layer = MIND_UI_FRONT
|
||||
overlays += cover
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
/obj/abstract/mind_ui_element/blood_count
|
||||
icon = 'icons/ui/soulblade/21x246.dmi'
|
||||
icon_state = ""
|
||||
layer = MIND_UI_FRONT+1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/abstract/mind_ui_element/blood_count/UpdateIcon()
|
||||
var/mob/living/simple_animal/shade/M = GetUser()
|
||||
if(!istype(M) || !istype(M.loc, /obj/item/weapon/melee/soulblade))
|
||||
return
|
||||
var/obj/item/weapon/melee/soulblade/SB = M.loc
|
||||
overlays.len = 0
|
||||
overlays += String2Image("[SB.blood]")
|
||||
if(SB.blood >= 100)
|
||||
offset_x = 0
|
||||
else if(SB.blood >= 10)
|
||||
offset_x = 3
|
||||
else
|
||||
offset_x = 6
|
||||
UpdateUIScreenLoc()
|
||||
|
||||
//------------------------------------------------------------
|
||||
@@ -116,9 +116,4 @@
|
||||
spawn(blade.movespeed)
|
||||
move_delay = 0
|
||||
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(1,blade.blood/blade.maxblood)
|
||||
var/total_offset = (60 + (100*(blade.blood/blade.maxblood))) * PIXEL_MULTIPLIER
|
||||
controller.hud_used.mymob.gui_icons.soulblade_bloodbar.transform = M
|
||||
controller.hud_used.mymob.gui_icons.soulblade_bloodbar.screen_loc = "WEST,CENTER-[8-round(total_offset/WORLD_ICON_SIZE)]:[total_offset%WORLD_ICON_SIZE]"
|
||||
controller.hud_used.mymob.gui_icons.soulblade_coverLEFT.maptext = "[blade.blood]"
|
||||
controller.DisplayUI("Soulblade")
|
||||
|
||||
@@ -848,13 +848,8 @@ var/list/arcane_tomes = list()
|
||||
blood = min(100,blood+5)
|
||||
to_chat(user, "<span class='warning'>You steal a bit of their blood, but not much.</span>")
|
||||
|
||||
if (shade && shade.hud_used && shade.gui_icons && shade.gui_icons.soulblade_bloodbar)
|
||||
var/matrix/MAT = matrix()
|
||||
MAT.Scale(1,blood/maxblood)
|
||||
var/total_offset = (60 + (100*(blood/maxblood))) * PIXEL_MULTIPLIER
|
||||
shade.hud_used.mymob.gui_icons.soulblade_bloodbar.transform = MAT
|
||||
shade.hud_used.mymob.gui_icons.soulblade_bloodbar.screen_loc = "WEST,CENTER-[8-round(total_offset/WORLD_ICON_SIZE)]:[total_offset%WORLD_ICON_SIZE]"
|
||||
shade.hud_used.mymob.gui_icons.soulblade_coverLEFT.maptext = "[blood]"
|
||||
if (shade)
|
||||
shade.DisplayUI("Soulblade")
|
||||
|
||||
|
||||
/obj/item/weapon/melee/soulblade/pickup(var/mob/living/user)
|
||||
|
||||
@@ -226,16 +226,13 @@
|
||||
tattoos_names = "none"
|
||||
M.hud_used.cult_tattoo_display.name = "Arcane Tattoos: [tattoos_names]"
|
||||
|
||||
if (isshade(M) && M.hud_used && M.gui_icons && istype(M.loc,/obj/item/weapon/melee/soulblade))
|
||||
if(!M.gui_icons.soulblade_bgLEFT)
|
||||
M.hud_used.shade_hud()
|
||||
|
||||
M.client.screen += list(
|
||||
M.gui_icons.soulblade_bgLEFT,
|
||||
M.gui_icons.soulblade_coverLEFT,
|
||||
M.gui_icons.soulblade_bloodbar,
|
||||
M.healths2,
|
||||
)
|
||||
if (isshade(M))
|
||||
M.hud_used.shade_hud()
|
||||
if (istype(M.loc,/obj/item/weapon/melee/soulblade))
|
||||
M.DisplayUI("Soulblade")
|
||||
M.client.screen += list(
|
||||
M.healths2,
|
||||
)
|
||||
|
||||
/datum/role/cultist/proc/remove_cult_hud()
|
||||
var/mob/M = antag?.current
|
||||
|
||||
@@ -26,11 +26,16 @@
|
||||
/mob/camera/blob/New()
|
||||
blob_overminds += src
|
||||
..()
|
||||
lazy_register_event(/lazy_event/on_living_login, src, /mob/camera/blob/proc/add_HUD)
|
||||
|
||||
/mob/camera/blob/Destroy()
|
||||
blob_overminds -= src
|
||||
lazy_unregister_event(/lazy_event/on_living_login, src, /mob/camera/blob/proc/add_HUD)
|
||||
..()
|
||||
|
||||
/mob/camera/blob/proc/add_HUD(var/mob/user)
|
||||
DisplayUI("Blob")
|
||||
|
||||
/mob/camera/blob/Login()
|
||||
..()
|
||||
//Mind updates
|
||||
|
||||
@@ -424,24 +424,11 @@
|
||||
to_chat(user, "<span class='notice'>You may not climb into \the [src] while its door is closed.</span>")
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/vehicle/adminbus/proc/add_HUD(var/mob/M)
|
||||
M.DisplayUI("Adminbus")
|
||||
/*
|
||||
if(!M || !(M.hud_used))
|
||||
return
|
||||
|
||||
M.hud_used.adminbus_hud()
|
||||
update_rearview()
|
||||
*/
|
||||
/obj/structure/bed/chair/vehicle/adminbus/proc/add_HUD(var/mob/user)
|
||||
user.DisplayUI("Adminbus")
|
||||
|
||||
/obj/structure/bed/chair/vehicle/adminbus/proc/remove_HUD(var/mob/M)
|
||||
M.HideUI("Adminbus")
|
||||
/*
|
||||
if(!M || !(M.hud_used))
|
||||
return
|
||||
|
||||
M.hud_used.remove_adminbus_hud()
|
||||
*/
|
||||
|
||||
/obj/structure/bed/chair/vehicle/adminbus/proc/update_rearview()
|
||||
if(occupant)
|
||||
@@ -663,14 +650,16 @@
|
||||
var/obj/structure/bed/chair/vehicle/adminbus/bus = owner
|
||||
M.flags |= INVULNERABLE
|
||||
bus.add_HUD(M)
|
||||
M.lazy_register_event(/lazy_event/on_living_login, bus, /obj/structure/bed/chair/vehicle/adminbus/proc/add_HUD)
|
||||
|
||||
/datum/locking_category/adminbus/unlock(var/atom/movable/AM)
|
||||
. = ..()
|
||||
if (isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
var/obj/structure/bed/chair/vehicle/adminbus/bus = owner
|
||||
bus.remove_HUD(M)
|
||||
M.flags &= ~INVULNERABLE
|
||||
bus.remove_HUD(M)
|
||||
M.lazy_unregister_event(/lazy_event/on_living_login, bus, /obj/structure/bed/chair/vehicle/adminbus/proc/add_HUD)
|
||||
|
||||
/obj/structure/bed/chair/vehicle/adminbus/acidable()
|
||||
return 0
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
mind.active = 1 //indicates that the mind is currently synced with a client
|
||||
|
||||
ResendAllUIs() // Re-sends mind UIs
|
||||
lazy_invoke_event(/lazy_event/on_living_login, list("user" = src))
|
||||
|
||||
//login during ventcrawl
|
||||
if(is_ventcrawling && istype(loc, /obj/machinery/atmospherics)) //attach us back into the pipes
|
||||
@@ -24,4 +25,4 @@
|
||||
CanBuild()
|
||||
|
||||
if (hasFactionIcons(src))
|
||||
update_faction_icons()
|
||||
update_faction_icons()
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
..()
|
||||
if (istype(loc, /obj/item/weapon/melee/soulblade))
|
||||
client.CAN_MOVE_DIAGONALLY = 1
|
||||
client.screen += list(
|
||||
gui_icons.soulblade_bgLEFT,
|
||||
gui_icons.soulblade_coverLEFT,
|
||||
gui_icons.soulblade_bloodbar,
|
||||
)
|
||||
to_chat(src,"<span class='notice'>To be understood by non-cult speaking humans, use :1.</span>")
|
||||
|
||||
/mob/living/simple_animal/shade/say(var/message)
|
||||
@@ -146,7 +141,7 @@
|
||||
/mob/living/simple_animal/shade/regular_hud_updates()
|
||||
update_pull_icon() //why is this here?
|
||||
|
||||
if(istype(loc, /obj/item/weapon/melee/soulblade) && hud_used && gui_icons && gui_icons.soulblade_bloodbar)
|
||||
if(istype(loc, /obj/item/weapon/melee/soulblade) && hud_used)
|
||||
var/obj/item/weapon/melee/soulblade/SB = loc
|
||||
if(healths2)
|
||||
switch(SB.health)
|
||||
@@ -156,12 +151,8 @@
|
||||
healths2.icon_state = "blade_notok"
|
||||
if(36 to INFINITY)
|
||||
healths2.icon_state = "blade_ok"
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(1,SB.blood/SB.maxblood)
|
||||
var/total_offset = (60 + (100*(SB.blood/SB.maxblood))) * PIXEL_MULTIPLIER
|
||||
hud_used.mymob.gui_icons.soulblade_bloodbar.transform = M
|
||||
hud_used.mymob.gui_icons.soulblade_bloodbar.screen_loc = "WEST,CENTER-[8-round(total_offset/WORLD_ICON_SIZE)]:[total_offset%WORLD_ICON_SIZE]"
|
||||
hud_used.mymob.gui_icons.soulblade_coverLEFT.maptext = "[SB.blood]"
|
||||
|
||||
DisplayUI("Soulblade")
|
||||
|
||||
if(client && hud_used && healths)
|
||||
switch(health)
|
||||
|
||||
@@ -15,14 +15,11 @@
|
||||
/mob/living/simple_animal/shade/proc/give_blade_powers()
|
||||
if (!istype(loc, /obj/item/weapon/melee/soulblade))
|
||||
return
|
||||
DisplayUI("Soulblade")
|
||||
lazy_register_event(/lazy_event/on_living_login, src, /mob/living/simple_animal/shade/proc/add_HUD)
|
||||
if (client)
|
||||
client.CAN_MOVE_DIAGONALLY = 1
|
||||
if(hud_used && !gui_icons.soulblade_bgLEFT)
|
||||
hud_used.shade_hud()
|
||||
client.screen += list(
|
||||
gui_icons.soulblade_bgLEFT,
|
||||
gui_icons.soulblade_coverLEFT,
|
||||
gui_icons.soulblade_bloodbar,
|
||||
healths2,
|
||||
)
|
||||
var/obj/item/weapon/melee/soulblade/SB = loc
|
||||
@@ -44,13 +41,10 @@
|
||||
if (client)
|
||||
client.CAN_MOVE_DIAGONALLY = 0
|
||||
client.screen -= list(
|
||||
gui_icons.soulblade_bgLEFT,
|
||||
gui_icons.soulblade_coverLEFT,
|
||||
gui_icons.soulblade_bloodbar,
|
||||
healths2,
|
||||
)
|
||||
if (hud_used && gui_icons && gui_icons.soulblade_coverLEFT)
|
||||
hud_used.mymob.gui_icons.soulblade_coverLEFT.maptext = ""
|
||||
HideUI("Soulblade")
|
||||
lazy_unregister_event(/lazy_event/on_living_login, src, /mob/living/simple_animal/shade/proc/add_HUD)
|
||||
for(var/spell/soulblade/spell_to_remove in spell_list)
|
||||
remove_spell(spell_to_remove)
|
||||
|
||||
@@ -58,6 +52,9 @@
|
||||
if (C)
|
||||
C.logo_state = "cult-logo"
|
||||
|
||||
/mob/living/simple_animal/shade/proc/add_HUD(var/mob/user)
|
||||
DisplayUI("Soulblade")
|
||||
|
||||
/spell/soulblade
|
||||
panel = "Cult"
|
||||
override_base = "cult"
|
||||
@@ -76,12 +73,7 @@
|
||||
var/obj/item/weapon/melee/soulblade/SB = holder.loc
|
||||
SB.blood = max(0,SB.blood-blood_cost)
|
||||
var/mob/shade = holder
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(1,SB.blood/SB.maxblood)
|
||||
var/total_offset = (60 + (100*(SB.blood/SB.maxblood))) * PIXEL_MULTIPLIER
|
||||
shade.hud_used.mymob.gui_icons.soulblade_bloodbar.transform = M
|
||||
shade.hud_used.mymob.gui_icons.soulblade_bloodbar.screen_loc = "WEST,CENTER-[8-round(total_offset/WORLD_ICON_SIZE)]:[total_offset%WORLD_ICON_SIZE]"
|
||||
shade.hud_used.mymob.gui_icons.soulblade_coverLEFT.maptext = "[SB.blood]"
|
||||
shade.DisplayUI("Soulblade")
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
attack_delayer = null
|
||||
special_delayer = null
|
||||
throw_delayer = null
|
||||
gui_icons = null
|
||||
qdel(hud_used)
|
||||
hud_used = null
|
||||
for(var/atom/movable/leftovers in src)
|
||||
@@ -230,24 +229,6 @@
|
||||
if(client)
|
||||
client.screen -= hud_used.cult_tattoo_display
|
||||
hud_used.cult_tattoo_display = null
|
||||
if (isshade(src) && gui_icons)
|
||||
if(gui_icons.soulblade_bgLEFT)
|
||||
qdel(gui_icons.soulblade_bgLEFT)
|
||||
if(client)
|
||||
client.screen -= gui_icons.soulblade_bgLEFT
|
||||
gui_icons.soulblade_bgLEFT = null
|
||||
if(gui_icons.soulblade_bloodbar)
|
||||
qdel(gui_icons.soulblade_bloodbar)
|
||||
if(client)
|
||||
client.screen -= gui_icons.soulblade_bloodbar
|
||||
gui_icons.soulblade_bloodbar = null
|
||||
if(gui_icons.soulblade_coverLEFT)
|
||||
qdel(gui_icons.soulblade_coverLEFT)
|
||||
if(client)
|
||||
client.screen -= gui_icons.soulblade_coverLEFT
|
||||
gui_icons.soulblade_coverLEFT = null
|
||||
|
||||
|
||||
|
||||
/mob/proc/cultify()
|
||||
return
|
||||
|
||||
@@ -158,7 +158,6 @@
|
||||
var/seer = 0 // Legacy Cult
|
||||
|
||||
var/datum/hud/hud_used = null
|
||||
var/datum/ui_icons/gui_icons = null
|
||||
|
||||
var/list/grabbed_by = list()
|
||||
var/list/requests = list()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
BIN
icons/ui/soulblade/21x246.dmi
Normal file
BIN
icons/ui/soulblade/21x246.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
icons/ui/soulblade/32x32.dmi
Normal file
BIN
icons/ui/soulblade/32x32.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
@@ -164,6 +164,7 @@
|
||||
#include "code\_onclick\mindUI\_mindUI.dm"
|
||||
#include "code\_onclick\mindUI\adminbus.dm"
|
||||
#include "code\_onclick\mindUI\blob.dm"
|
||||
#include "code\_onclick\mindUI\soulblade.dm"
|
||||
#include "code\ATMOSPHERICS\atmospherics.dm"
|
||||
#include "code\ATMOSPHERICS\burstpipe.dm"
|
||||
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
|
||||
|
||||
Reference in New Issue
Block a user