mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Replaces intents with combat mode (#56601)
About The Pull Request
This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:
Disarm and Grab intents have been removed.
Harm/Help is now combat mode, toggled by F or 4 by default
The context/verb/popup menu now only works when you do shift+right-click
Right click is now disarm, both in and out of combat mode.
Grabbing is now on ctrl-click.
If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)
Minor interaction changes:
Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game
Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.
As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.
As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.
In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.
The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog
cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/canvas/attackby(obj/item/I, mob/living/user, params)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!user.combat_mode)
|
||||
ui_interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
|
||||
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/living/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
|
||||
. = TRUE
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
@@ -303,7 +303,7 @@
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='hear'>You hear a ratchet.</span>")
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
var/item_is_id = W.GetID()
|
||||
if(!item_is_id)
|
||||
return FALSE
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need a crowbar to pry this open!</span>")
|
||||
|
||||
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/living/user, params)
|
||||
if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
@@ -41,7 +41,7 @@
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it.
|
||||
if(user.combat_mode) //Only return ..() if intent is harm, otherwise return 0 or just end it.
|
||||
return ..() //Stops it from opening and turning invisible when items are used on it.
|
||||
|
||||
else
|
||||
|
||||
@@ -113,14 +113,14 @@
|
||||
else if(!open)
|
||||
. += "[initial(icon_state)]_closed"
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/displaycase/attackby(obj/item/W, mob/living/user, params)
|
||||
if(W.GetID() && !broken && openable)
|
||||
if(allowed(user))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Access denied.</span>")
|
||||
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(W.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=5))
|
||||
return
|
||||
@@ -177,7 +177,7 @@
|
||||
/obj/structure/displaycase/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
/obj/structure/displaycase/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -192,7 +192,7 @@
|
||||
//prevents remote "kicks" with TK
|
||||
if (!Adjacent(user))
|
||||
return
|
||||
if (user.a_intent == INTENT_HELP)
|
||||
if (!user.combat_mode)
|
||||
if(!user.is_blind())
|
||||
user.examinate(src)
|
||||
return
|
||||
@@ -293,11 +293,11 @@
|
||||
GLOB.trophy_cases -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/trophy/attackby(obj/item/W, mob/user, params)
|
||||
/obj/structure/displaycase/trophy/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
if(!user.Adjacent(src)) //no TK museology
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return ..()
|
||||
|
||||
if(user.is_holding_item_of_type(/obj/item/key/displaycase))
|
||||
@@ -539,7 +539,7 @@
|
||||
|
||||
/obj/structure/displaycase/forsale/wrench_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(open && user.a_intent == INTENT_HELP )
|
||||
if(open && !user.combat_mode)
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [src]...</span>")
|
||||
else
|
||||
@@ -553,7 +553,7 @@
|
||||
to_chat(user, "<span class='notice'>You secure [src].</span>")
|
||||
set_anchored(!anchored)
|
||||
return
|
||||
else if(!open && user.a_intent == INTENT_HELP)
|
||||
else if(!open && !user.combat_mode)
|
||||
to_chat(user, "<span class='notice'>[src] must be open to move it.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
stored_extinguisher = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/living/user, params)
|
||||
if(I.tool_behaviour == TOOL_WRENCH && !stored_extinguisher)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
@@ -68,7 +68,7 @@
|
||||
return TRUE
|
||||
else
|
||||
toggle_cabinet(user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
toggle_cabinet(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
QDEL_NULL(fireaxe)
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/living/user, params)
|
||||
if(iscyborg(user) || I.tool_behaviour == TOOL_MULTITOOL)
|
||||
toggle_lock(user)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=2))
|
||||
return
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
. += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
|
||||
|
||||
/obj/structure/guillotine/attack_hand(mob/user)
|
||||
/obj/structure/guillotine/attack_hand(mob/living/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
// Currently being used by something
|
||||
@@ -83,7 +83,7 @@
|
||||
return
|
||||
if (GUILLOTINE_BLADE_RAISED)
|
||||
if (LAZYLEN(buckled_mobs))
|
||||
if (user.a_intent == INTENT_HARM)
|
||||
if (user.combat_mode)
|
||||
user.visible_message("<span class='warning'>[user] begins to pull the lever!</span>",
|
||||
"<span class='warning'>You begin to the pull the lever.</span>")
|
||||
current_action = GUILLOTINE_ACTION_INUSE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
else
|
||||
. += "[icon_state]_door"
|
||||
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/living/user, params)
|
||||
if(iscyborg(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, gun_category) && open)
|
||||
@@ -47,7 +47,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/medical/attack_hand(mob/living/user)
|
||||
if(CanPass(user) && user.a_intent == INTENT_HELP)
|
||||
if(CanPass(user) && !user.combat_mode)
|
||||
force_allaccess = !force_allaccess
|
||||
to_chat(user, "<span class='warning'>You [force_allaccess ? "deactivate" : "activate"] the biometric scanners.</span>") //warning spans because you can make the station sick!
|
||||
else
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
return TRUE
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
|
||||
/obj/structure/kitchenspike/attack_hand(mob/living/user)
|
||||
if(VIABLE_MOB_CHECK(user.pulling) && user.combat_mode && !has_buckled_mobs())
|
||||
var/mob/living/L = user.pulling
|
||||
if(do_mob(user, src, 120))
|
||||
if(has_buckled_mobs()) //to prevent spam/queing up attacks
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
/obj/structure/mineral_door/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][door_opened ? "open":""]"
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/mineral_door/attackby(obj/item/I, mob/living/user)
|
||||
if(pickaxe_door(user, I))
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
@@ -341,7 +341,7 @@
|
||||
fire_act(I.get_temperature())
|
||||
return
|
||||
|
||||
if((user.a_intent != INTENT_HARM) && istype(I, /obj/item/paper) && (obj_integrity < max_integrity))
|
||||
if((!user.combat_mode) && istype(I, /obj/item/paper) && (obj_integrity < max_integrity))
|
||||
user.visible_message("<span class='notice'>[user] starts to patch the holes in [src].</span>", "<span class='notice'>You start patching some of the holes in [src]!</span>")
|
||||
if(do_after(user, 2 SECONDS, src))
|
||||
obj_integrity = min(obj_integrity+4,max_integrity)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/obj/structure/mirror/welder_act(mob/living/user, obj/item/I)
|
||||
..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
|
||||
if(!broken)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
/obj/structure/plaque/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='warning'>This plaque is already in perfect condition.</span>")
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/item/plaque/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='warning'>This plaque is already in perfect condition.</span>")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
..()
|
||||
add_fingerprint(user)
|
||||
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
|
||||
if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
/obj/structure/sign/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='warning'>This sign is already in perfect condition.</span>")
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
/obj/item/sign/welder_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return FALSE
|
||||
if(obj_integrity == max_integrity)
|
||||
to_chat(user, "<span class='warning'>This sign is already in perfect condition.</span>")
|
||||
|
||||
@@ -69,15 +69,16 @@
|
||||
if(pushed_mob.buckled)
|
||||
to_chat(user, "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
|
||||
return
|
||||
if(user.a_intent == INTENT_GRAB)
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
if(user.grab_state >= GRAB_NECK)
|
||||
tablelimbsmash(user, pushed_mob)
|
||||
else
|
||||
tablepush(user, pushed_mob)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(user.combat_mode)
|
||||
switch(user.grab_state)
|
||||
if(GRAB_PASSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
if(GRAB_AGGRESSIVE)
|
||||
tablepush(user, pushed_mob)
|
||||
if(GRAB_NECK to GRAB_KILL)
|
||||
tablelimbsmash(user, pushed_mob)
|
||||
else
|
||||
pushed_mob.visible_message("<span class='notice'>[user] begins to place [pushed_mob] onto [src]...</span>", \
|
||||
"<span class='userdanger'>[user] begins to place [pushed_mob] onto [src]...</span>")
|
||||
if(do_after(user, 35, target = pushed_mob))
|
||||
@@ -161,8 +162,9 @@
|
||||
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
|
||||
SEND_SIGNAL(pushed_mob, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table_limbsmash, banged_limb)
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && user.a_intent != INTENT_HELP)
|
||||
/obj/structure/table/attackby(obj/item/I, mob/living/user, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && modifiers && modifiers["right"])
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
@@ -192,30 +194,26 @@
|
||||
var/mob/living/carried_mob = riding_item.rider
|
||||
if(carried_mob == user) //Piggyback user.
|
||||
return
|
||||
switch(user.a_intent)
|
||||
if(INTENT_HARM)
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablelimbsmash(user, carried_mob)
|
||||
if(INTENT_HELP)
|
||||
var/tableplace_delay = 3.5 SECONDS
|
||||
var/skills_space = ""
|
||||
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
|
||||
tableplace_delay = 2 SECONDS
|
||||
skills_space = " expertly"
|
||||
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
|
||||
tableplace_delay = 2.75 SECONDS
|
||||
skills_space = " quickly"
|
||||
carried_mob.visible_message("<span class='notice'>[user] begins to[skills_space] place [carried_mob] onto [src]...</span>",
|
||||
"<span class='userdanger'>[user] begins to[skills_space] place [carried_mob] onto [src]...</span>")
|
||||
if(do_after(user, tableplace_delay, target = carried_mob))
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tableplace(user, carried_mob)
|
||||
else
|
||||
if(user.combat_mode)
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablelimbsmash(user, carried_mob)
|
||||
else
|
||||
var/tableplace_delay = 3.5 SECONDS
|
||||
var/skills_space = ""
|
||||
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
|
||||
tableplace_delay = 2 SECONDS
|
||||
skills_space = " expertly"
|
||||
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
|
||||
tableplace_delay = 2.75 SECONDS
|
||||
skills_space = " quickly"
|
||||
carried_mob.visible_message("<span class='notice'>[user] begins to[skills_space] place [carried_mob] onto [src]...</span>",
|
||||
"<span class='userdanger'>[user] begins to[skills_space] place [carried_mob] onto [src]...</span>")
|
||||
if(do_after(user, tableplace_delay, target = carried_mob))
|
||||
user.unbuckle_mob(carried_mob)
|
||||
tablepush(user, carried_mob)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT))
|
||||
if(!user.combat_mode && !(I.item_flags & ABSTRACT))
|
||||
if(user.transferItemToLoc(I, drop_location(), silent = FALSE))
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
@@ -511,8 +509,9 @@
|
||||
else
|
||||
return "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>"
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
|
||||
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HELP)
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/living/user, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(W.tool_behaviour == TOOL_WELDER && modifiers && modifiers["right"])
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -632,12 +631,13 @@
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if (W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1) && user.a_intent != INTENT_HELP)
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/living/user, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if (W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1) && modifiers && modifiers["right"])
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return ..()
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
return 1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(5 to TANK_DISPENSER_CAPACITY)
|
||||
. += "plasma-5"
|
||||
|
||||
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
|
||||
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/living/user, params)
|
||||
var/full
|
||||
if(istype(I, /obj/item/tank/internals/plasma))
|
||||
if(plasmatanks < TANK_DISPENSER_CAPACITY)
|
||||
@@ -53,7 +53,7 @@
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
default_unfasten_wrench(user, I, time = 20)
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
else if(!user.combat_mode)
|
||||
to_chat(user, "<span class='notice'>[I] does not fit into [src].</span>")
|
||||
return
|
||||
else
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>It is held together by some <b>screws</b>.</span>"
|
||||
|
||||
/obj/structure/tank_holder/attackby(obj/item/W, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
/obj/structure/tank_holder/attackby(obj/item/W, mob/living/user, params)
|
||||
if(user.combat_mode)
|
||||
return ..()
|
||||
if(!SEND_SIGNAL(W, COMSIG_CONTAINER_TRY_ATTACH, src, user))
|
||||
to_chat(user, "<span class='warning'>[W] does not fit in [src].</span>")
|
||||
|
||||
@@ -107,8 +107,8 @@
|
||||
* Meant for attaching an item to the machine, should only be a training toolbox or target. If emagged, the
|
||||
* machine will gain an auto-attached syndicate toolbox, so in that case we shouldn't be able to swap it out
|
||||
*/
|
||||
/obj/structure/training_machine/attackby(obj/item/target, mob/user)
|
||||
if (user.a_intent != INTENT_HELP)
|
||||
/obj/structure/training_machine/attackby(obj/item/target, mob/living/user)
|
||||
if (!user.combat_mode)
|
||||
return ..()
|
||||
if (!istype(target, /obj/item/training_toolbox) && !istype(target, /obj/item/target))
|
||||
return ..()
|
||||
@@ -357,9 +357,9 @@
|
||||
///Number of hits made since the Lap button (alt-click) was last pushed
|
||||
var/lap_hits = 0
|
||||
|
||||
/obj/item/training_toolbox/afterattack(atom/target, mob/user, proximity)
|
||||
/obj/item/training_toolbox/afterattack(atom/target, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if (!proximity || target == user || user.a_intent == INTENT_HELP)
|
||||
if (!proximity || target == user || !user.combat_mode)
|
||||
return
|
||||
if (check_hit(target))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(.)
|
||||
return
|
||||
if(!pod_moving)
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
if(open_status == STATION_TUBE_OPEN)
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
log_combat(user, swirlie, "swirlied (brute)")
|
||||
swirlie.adjustBruteLoss(5)
|
||||
|
||||
else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
else if(user.pulling && isliving(user.pulling))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
@@ -103,21 +103,20 @@
|
||||
else if(I.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
|
||||
I.play_tool_sound(src)
|
||||
deconstruct()
|
||||
else if(cistern)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(I.w_class > WEIGHT_CLASS_NORMAL)
|
||||
to_chat(user, "<span class='warning'>[I] does not fit!</span>")
|
||||
return
|
||||
if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
|
||||
to_chat(user, "<span class='warning'>The cistern is full!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the cistern!</span>")
|
||||
return
|
||||
w_items += I.w_class
|
||||
to_chat(user, "<span class='notice'>You carefully place [I] into the cistern.</span>")
|
||||
else if(cistern && !user.combat_mode)
|
||||
if(I.w_class > WEIGHT_CLASS_NORMAL)
|
||||
to_chat(user, "<span class='warning'>[I] does not fit!</span>")
|
||||
return
|
||||
if(w_items + I.w_class > WEIGHT_CLASS_HUGE)
|
||||
to_chat(user, "<span class='warning'>The cistern is full!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the cistern!</span>")
|
||||
return
|
||||
w_items += I.w_class
|
||||
to_chat(user, "<span class='notice'>You carefully place [I] into the cistern.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/reagent_containers))
|
||||
else if(istype(I, /obj/item/reagent_containers) && !user.combat_mode)
|
||||
if (!open)
|
||||
return
|
||||
if(istype(I, /obj/item/food/monkeycube))
|
||||
@@ -160,11 +159,11 @@
|
||||
. = ..()
|
||||
hiddenitem = new /obj/item/food/urinalcake
|
||||
|
||||
/obj/structure/urinal/attack_hand(mob/user)
|
||||
/obj/structure/urinal/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.loc != get_turf(src))
|
||||
@@ -394,7 +393,7 @@
|
||||
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
to_chat(user, "<span class='notice'>You start washing [O]...</span>")
|
||||
busy = TRUE
|
||||
if(!do_after(user, 40, target = src))
|
||||
@@ -577,7 +576,7 @@
|
||||
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
to_chat(user, "<span class='notice'>You start washing [O]...</span>")
|
||||
busy = TRUE
|
||||
if(!do_after(user, 4 SECONDS, target = src))
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user)
|
||||
/obj/structure/window/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -146,7 +146,7 @@
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.combat_mode)
|
||||
user.visible_message("<span class='notice'>[user] knocks on [src].</span>", \
|
||||
"<span class='notice'>You knock on [src].</span>")
|
||||
playsound(src, knocksound, 50, TRUE)
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP)
|
||||
if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
@@ -384,10 +384,11 @@
|
||||
|
||||
//this is shitcode but all of construction is shitcode and needs a refactor, it works for now
|
||||
//If you find this like 4 years later and construction still hasn't been refactored, I'm so sorry for this //Adding a timestamp, I found this in 2020, I hope it's from this year -Lemon
|
||||
//2021 AND STILLLL GOING STRONG
|
||||
/obj/structure/window/reinforced/attackby(obj/item/I, mob/living/user, params)
|
||||
switch(state)
|
||||
if(RWINDOW_SECURE)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HARM)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.combat_mode)
|
||||
user.visible_message("<span class='notice'>[user] holds \the [I] to the security screws on \the [src]...</span>",
|
||||
"<span class='notice'>You begin heating the security screws on \the [src]...</span>")
|
||||
if(I.use_tool(src, user, 150, volume = 100))
|
||||
@@ -516,7 +517,7 @@
|
||||
/obj/structure/window/plasma/reinforced/attackby(obj/item/I, mob/living/user, params)
|
||||
switch(state)
|
||||
if(RWINDOW_SECURE)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HARM)
|
||||
if(I.tool_behaviour == TOOL_WELDER && user.combat_mode)
|
||||
user.visible_message("<span class='notice'>[user] holds \the [I] to the security screws on \the [src]...</span>",
|
||||
"<span class='notice'>You begin heating the security screws on \the [src]...</span>")
|
||||
if(I.use_tool(src, user, 180, volume = 100))
|
||||
@@ -774,11 +775,11 @@
|
||||
for (var/i in 1 to rand(1,4))
|
||||
. += new /obj/item/paper/natural(location)
|
||||
|
||||
/obj/structure/window/paperframe/attack_hand(mob/user)
|
||||
/obj/structure/window/paperframe/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
take_damage(4,BRUTE,MELEE, 0)
|
||||
if(!QDELETED(src))
|
||||
update_icon()
|
||||
@@ -796,11 +797,11 @@
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
|
||||
/obj/structure/window/paperframe/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/window/paperframe/attackby(obj/item/W, mob/living/user)
|
||||
if(W.get_temperature())
|
||||
fire_act(W.get_temperature())
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.combat_mode)
|
||||
return ..()
|
||||
if(istype(W, /obj/item/paper) && obj_integrity < max_integrity)
|
||||
user.visible_message("<span class='notice'>[user] starts to patch the holes in \the [src].</span>")
|
||||
|
||||
Reference in New Issue
Block a user