mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
added INTENT_NEXT
This commit is contained in:
@@ -618,3 +618,6 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define INTENT_GRAB "grab"
|
||||
#define INTENT_DISARM "disarm"
|
||||
#define INTENT_HARM "harm"
|
||||
// NOTE: This is not a real intent! It's used to allow
|
||||
// the alternate intent selection stlye (clockwise)
|
||||
#define INTENT_NEXT "next"
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
usr.a_intent_change(INTENT_DISARM)
|
||||
|
||||
else
|
||||
usr.a_intent_change("right")
|
||||
usr.a_intent_change(INTENT_NEXT)
|
||||
|
||||
/obj/screen/act_intent/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
@@ -649,4 +649,3 @@
|
||||
if(word_messages.len && talk_cooldown < world.time)
|
||||
talk_cooldown = world.time + 10
|
||||
L.say(pick(word_messages))
|
||||
|
||||
|
||||
@@ -280,29 +280,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//converts intent-strings into numbers and back
|
||||
/proc/intent_numeric(argument)
|
||||
if(istext(argument))
|
||||
switch(argument)
|
||||
if(INTENT_HELP)
|
||||
return 0
|
||||
if(INTENT_DISARM)
|
||||
return 1
|
||||
if(INTENT_GRAB)
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
else
|
||||
switch(argument)
|
||||
if(0)
|
||||
return INTENT_HELP
|
||||
if(1)
|
||||
return INTENT_DISARM
|
||||
if(2)
|
||||
return INTENT_GRAB
|
||||
else
|
||||
return INTENT_HARM
|
||||
|
||||
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
|
||||
/mob/verb/a_intent_change(input as text)
|
||||
set name = "a-intent"
|
||||
@@ -312,10 +289,16 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
switch(input)
|
||||
if(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM)
|
||||
a_intent = input
|
||||
if("right")
|
||||
a_intent = intent_numeric((intent_numeric(a_intent) + 1) % 4)
|
||||
if("left")
|
||||
a_intent = intent_numeric((intent_numeric(a_intent) + 3) % 4)
|
||||
if(INTENT_NEXT)
|
||||
switch (a_intent)
|
||||
if(INTENT_HELP)
|
||||
a_intent = INTENT_DISARM
|
||||
if(INTENT_DISARM)
|
||||
a_intent = INTENT_GRAB
|
||||
if(INTENT_GRAB)
|
||||
a_intent = INTENT_HARM
|
||||
if(INTENT_HARM)
|
||||
a_intent = INTENT_HELP
|
||||
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "[a_intent]"
|
||||
@@ -326,8 +309,16 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
a_intent = INTENT_HELP
|
||||
if(INTENT_HARM)
|
||||
a_intent = INTENT_HARM
|
||||
if("right","left")
|
||||
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
|
||||
if(INTENT_NEXT)
|
||||
switch (a_intent)
|
||||
if(INTENT_HELP)
|
||||
a_intent = INTENT_DISARM
|
||||
if(INTENT_DISARM)
|
||||
a_intent = INTENT_GRAB
|
||||
if(INTENT_GRAB)
|
||||
a_intent = INTENT_HARM
|
||||
if(INTENT_HARM)
|
||||
a_intent = INTENT_HELP
|
||||
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "[a_intent]"
|
||||
|
||||
Reference in New Issue
Block a user