mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Gives slimes a HUD and an ability to choose face
This commit is contained in:
@@ -241,6 +241,8 @@ datum/hud/New(mob/owner)
|
|||||||
brain_hud(ui_style)
|
brain_hud(ui_style)
|
||||||
else if(isalien(mymob))
|
else if(isalien(mymob))
|
||||||
larva_hud()
|
larva_hud()
|
||||||
|
else if(isslime(mymob))
|
||||||
|
slime_hud()
|
||||||
else if(isAI(mymob))
|
else if(isAI(mymob))
|
||||||
ai_hud()
|
ai_hud()
|
||||||
else if(isrobot(mymob))
|
else if(isrobot(mymob))
|
||||||
|
|||||||
@@ -33,3 +33,71 @@
|
|||||||
mymob.client.screen = null
|
mymob.client.screen = null
|
||||||
|
|
||||||
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
||||||
|
|
||||||
|
/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||||
|
|
||||||
|
src.adding = list()
|
||||||
|
|
||||||
|
var/obj/screen/using
|
||||||
|
|
||||||
|
using = new /obj/screen()
|
||||||
|
using.name = "act_intent"
|
||||||
|
using.set_dir(SOUTHWEST)
|
||||||
|
using.icon = ui_style
|
||||||
|
using.icon_state = "intent_"+mymob.a_intent
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 20
|
||||||
|
src.adding += using
|
||||||
|
action_intent = using
|
||||||
|
|
||||||
|
//intent small hud objects
|
||||||
|
var/icon/ico
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "help"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
help_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "disarm"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
disarm_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "grab"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
grab_intent = using
|
||||||
|
|
||||||
|
ico = new(ui_style, "black")
|
||||||
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||||
|
using = new /obj/screen( src )
|
||||||
|
using.name = "harm"
|
||||||
|
using.icon = ico
|
||||||
|
using.screen_loc = ui_zonesel
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
hurt_intent = using
|
||||||
|
|
||||||
|
mymob.client.screen = null
|
||||||
|
mymob.client.screen += src.adding
|
||||||
|
|
||||||
|
return
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||||
act = copytext(act,1,length(act))
|
act = copytext(act,1,length(act))
|
||||||
|
|
||||||
|
var/updateicon = 0
|
||||||
|
|
||||||
switch(act) //Alphabetical please
|
switch(act) //Alphabetical please
|
||||||
if ("me")
|
if ("me")
|
||||||
if(silent)
|
if(silent)
|
||||||
@@ -58,8 +60,32 @@
|
|||||||
message = "<B>The [src.name]</B> vibrates!"
|
message = "<B>The [src.name]</B> vibrates!"
|
||||||
m_type = 1
|
m_type = 1
|
||||||
|
|
||||||
|
if("nomood")
|
||||||
|
mood = null
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("pout")
|
||||||
|
mood = "pout"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("sad")
|
||||||
|
mood = "sad"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("angry")
|
||||||
|
mood = "angry"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("frown")
|
||||||
|
mood = "mischevous"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
|
if("smile")
|
||||||
|
mood = ":3"
|
||||||
|
updateicon = 1
|
||||||
|
|
||||||
if ("help") //This is an exception
|
if ("help") //This is an exception
|
||||||
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate"
|
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. You can also set your face with: \n\nnomood, pout, sad, angry, frown, smile"
|
||||||
|
|
||||||
else
|
else
|
||||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||||
@@ -70,4 +96,6 @@
|
|||||||
else
|
else
|
||||||
for(var/mob/O in hearers(src, null))
|
for(var/mob/O in hearers(src, null))
|
||||||
O.show_message(message, m_type)
|
O.show_message(message, m_type)
|
||||||
|
if(updateicon)
|
||||||
|
regenerate_icons()
|
||||||
return
|
return
|
||||||
Reference in New Issue
Block a user