mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
m_intent now uses defines
This commit is contained in:
@@ -577,6 +577,10 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
// Examples of huge items: Shotgun, Two Handed Melee Weapons
|
||||
// Examples of gigantic items: Mech Parts, Safe
|
||||
|
||||
// m_intent
|
||||
#define MOVE_INTENT_WALK "walk"
|
||||
#define MOVE_INTENT_RUN "run"
|
||||
|
||||
//Endgame Results
|
||||
|
||||
#define NUKE_NEAR_MISS 1
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
|
||||
@@ -284,10 +284,10 @@
|
||||
return
|
||||
switch(user.m_intent)
|
||||
if("run")
|
||||
user.m_intent = "walk"
|
||||
user.m_intent = MOVE_INTENT_WALK
|
||||
icon_state = "walking"
|
||||
if("walk")
|
||||
user.m_intent = "run"
|
||||
user.m_intent = MOVE_INTENT_RUN
|
||||
icon_state = "running"
|
||||
user.update_icons()
|
||||
|
||||
@@ -649,4 +649,3 @@
|
||||
if(word_messages.len && talk_cooldown < world.time)
|
||||
talk_cooldown = world.time + 10
|
||||
L.say(pick(word_messages))
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(!is_servant_of_ratvar(C) && !C.null_rod_check() && number_legs) //you have legs right
|
||||
C.apply_damage(noncultist_damage * 0.5, BURN, "l_leg")
|
||||
C.apply_damage(noncultist_damage * 0.5, BURN, "r_leg")
|
||||
if(C.m_intent != "walk")
|
||||
if(C.m_intent != MOVE_INTENT_WALK)
|
||||
if(!iscultist(C))
|
||||
C << "<span class='warning'>Your leg[number_legs > 1 ? "s shiver":" shivers"] with pain!</span>"
|
||||
else //Cultists take extra burn damage
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
if (M.m_intent != "walk" && anchored)
|
||||
if (M.m_intent != MOVE_INTENT_WALK && anchored)
|
||||
flash()
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W, mob/user, params)
|
||||
@@ -207,4 +207,4 @@
|
||||
/obj/item/wallframe/flasher/after_attach(var/obj/O)
|
||||
..()
|
||||
var/obj/machinery/flasher/F = O
|
||||
F.id = id
|
||||
F.id = id
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/mob/living/L = AM
|
||||
if(L.movement_type & FLYING)
|
||||
return
|
||||
if(L.m_intent != "walk" && prob(40))
|
||||
if(L.m_intent != MOVE_INTENT_WALK && prob(40))
|
||||
var/acid_used = min(acid_level*0.05, 20)
|
||||
if(L.acid_act(10, acid_used, "feet"))
|
||||
acid_level = max(0, acid_level - acid_used*10)
|
||||
@@ -98,4 +98,4 @@
|
||||
if(8)
|
||||
visible_message("<span class='warning'>[target] is struggling to withstand the acid!</span>")
|
||||
if(4)
|
||||
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
|
||||
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
/obj/item/toy/snappop/Crossed(H as mob|obj)
|
||||
if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
|
||||
var/mob/living/carbon/M = H
|
||||
if(issilicon(H) || M.m_intent == "run")
|
||||
if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
|
||||
M << "<span class='danger'>You step on the snap pop!</span>"
|
||||
pop_burst(2, 0)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
obj_integrity = 20
|
||||
max_integrity = 20
|
||||
var/allow_walk = 1 //can we pass through it on walk intent
|
||||
|
||||
|
||||
/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!density)
|
||||
return 1
|
||||
@@ -59,7 +59,7 @@
|
||||
return 1
|
||||
if(iscarbon(mover))
|
||||
var/mob/living/carbon/C = mover
|
||||
if(allow_walk && C.m_intent == "walk")
|
||||
if(allow_walk && C.m_intent == MOVE_INTENT_WALK)
|
||||
return 1
|
||||
|
||||
/obj/structure/holosign/barrier/engineering
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
else
|
||||
if(C.lying || !(C.status_flags & CANWEAKEN)) // can't slip unbuckled mob if they're lying or can't fall.
|
||||
return 0
|
||||
if(C.m_intent=="walk" && (lube&NO_SLIP_WHEN_WALKING))
|
||||
if(C.m_intent == MOVE_INTENT_WALK && (lube&NO_SLIP_WHEN_WALKING))
|
||||
return 0
|
||||
if(!(lube&SLIDE_ICE))
|
||||
C << "<span class='notice'>You slipped[ O ? " on the [O.name]" : ""]!</span>"
|
||||
@@ -236,4 +236,3 @@
|
||||
wet_time = 0
|
||||
if(wet)
|
||||
addtimer(src, "HandleWet", 15)
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
|
||||
@@ -59,7 +59,7 @@ var/const/SLIDE_ICE = 8
|
||||
nutrition = NUTRITION_LEVEL_FED - 1 //just less than feeling vigorous
|
||||
else if(nutrition && stat != DEAD)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if((disabilities & FAT) && m_intent == "run" && bodytemperature <= 360)
|
||||
if((disabilities & FAT) && m_intent == MOVE_INTENT_RUN && bodytemperature <= 360)
|
||||
bodytemperature += 2
|
||||
|
||||
@@ -447,11 +447,11 @@
|
||||
. += config.run_speed
|
||||
else
|
||||
switch(m_intent)
|
||||
if("run")
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(drowsyness > 0)
|
||||
. += 6
|
||||
. += config.run_speed
|
||||
if("walk")
|
||||
if(MOVE_INTENT_WALK)
|
||||
. += config.walk_speed
|
||||
|
||||
/mob/living/proc/makeTrail(turf/T)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/weakened = 0
|
||||
var/losebreath = 0//Carbon
|
||||
var/a_intent = "help"//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/m_intent = MOVE_INTENT_RUN//Living
|
||||
var/lastKnownIP = null
|
||||
var/atom/movable/buckled = null//Living
|
||||
|
||||
@@ -144,4 +144,4 @@
|
||||
|
||||
var/resize = 1 //Badminnery resize
|
||||
|
||||
var/list/observers = null //The list of people observing this mob.
|
||||
var/list/observers = null //The list of people observing this mob.
|
||||
|
||||
Reference in New Issue
Block a user