Gives slimes a HUD and an ability to choose face

This commit is contained in:
Kelenius
2015-02-04 01:39:30 +03:00
parent c69bdd81a8
commit cb25b524ab
3 changed files with 99 additions and 1 deletions

View File

@@ -241,6 +241,8 @@ datum/hud/New(mob/owner)
brain_hud(ui_style)
else if(isalien(mymob))
larva_hud()
else if(isslime(mymob))
slime_hud()
else if(isAI(mymob))
ai_hud()
else if(isrobot(mymob))

View File

@@ -33,3 +33,71 @@
mymob.client.screen = null
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

View File

@@ -8,6 +8,8 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/updateicon = 0
switch(act) //Alphabetical please
if ("me")
if(silent)
@@ -58,8 +60,32 @@
message = "<B>The [src.name]</B> vibrates!"
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
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
src << "\blue Unusable emote '[act]'. Say *help for a list."
@@ -70,4 +96,6 @@
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
if(updateicon)
regenerate_icons()
return