Skip to content

Commit 2de8e50

Browse files
authored
bugfix: AI's airlocks Alt-click works (#6662)
1 parent b2fe35f commit 2de8e50

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

code/_onclick/ai.dm

+5-2
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
if(lethal_is_configurable)
200200
lethal = !lethal
201201
updateTurrets()
202+
return CLICK_ACTION_SUCCESS
202203

203204
// AIRLOCKS
204205

@@ -219,13 +220,14 @@
219220

220221
/obj/machinery/door/airlock/ai_click_alt(mob/living/silicon/ai/user) // Electrifies doors.
221222
if(!ai_control_check(user))
222-
return
223+
return CLICK_ACTION_BLOCKING
223224
if(wires.is_cut(WIRE_ELECTRIFY))
224-
to_chat(user, "<span class='warning'>The electrification wire is cut - Cannot electrify the door.</span>")
225+
to_chat(user, span_warning("The electrification wire is cut - Cannot electrify the door."))
225226
if(isElectrified())
226227
electrify(0, user, TRUE) // un-shock
227228
else
228229
electrify(-1, user, TRUE) // permanent shock
230+
return CLICK_ACTION_SUCCESS
229231

230232

231233
/obj/machinery/door/airlock/AIMiddleClick(mob/living/user) // Toggles door bolt lights.
@@ -240,3 +242,4 @@
240242

241243
/obj/machinery/ai_slipper/ai_click_alt(mob/living/silicon/ai/user) //Dispenses liquid if on
242244
Activate()
245+
return CLICK_ACTION_SUCCESS

code/game/machinery/ai_slipper.dm

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
anchored = TRUE
88
max_integrity = 200
99
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
10+
interaction_flags_click = ALLOW_SILICON_REACH
1011
var/uses = 20
1112
var/disabled = TRUE
1213
var/locked = TRUE
@@ -68,11 +69,11 @@
6869
if(cooldown_on)
6970
to_chat(user, span_warning("[src] is still recharging!"))
7071
return
71-
72+
7273
var/datum/effect_system/fluid_spread/foam/s = new()
7374
s.set_up(range = 3, location = loc)
7475
s.start()
75-
76+
7677
uses--
7778
cooldown_on = TRUE
7879
update_icon(UPDATE_ICON_STATE)

code/game/machinery/doors/airlock.dm

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
5959
assemblytype = /obj/structure/door_assembly
6060
siemens_strength = 1
6161
smoothing_groups = SMOOTH_GROUP_AIRLOCK
62+
interaction_flags_click = ALLOW_SILICON_REACH
6263

6364
var/security_level = 0 //How much are wires secured
6465
var/aiControlDisabled = AICONTROLDISABLED_OFF

code/game/machinery/turret_control.dm

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
anchored = TRUE
1515
density = FALSE
1616
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
17+
interaction_flags_click = ALLOW_SILICON_REACH
1718
var/enabled = FALSE
1819
var/lethal = FALSE
1920
var/lethal_is_configurable = TRUE

code/modules/mob/living/silicon/ai/ai.dm

+1
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
13471347
if(control_disabled)
13481348
to_chat(src, span_warning("You can't do that right now!"))
13491349
return FALSE
1350+
action_bitflags &= ~NEED_HANDS
13501351
return can_see(target) && ..() //stop AIs from leaving windows open and using then after they lose vision
13511352

13521353
/mob/living/silicon/ai/switch_to_camera(obj/machinery/camera/C)

code/modules/mob/living/silicon/silicon.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
gender = NEUTER
33
voice_name = "synthesized voice"
44
bubble_icon = "machine"
5-
has_unlimited_silicon_privilege = 1
5+
has_unlimited_silicon_privilege = TRUE
66
weather_immunities = list(TRAIT_WEATHER_IMMUNE)
77
var/syndicate = 0
88
var/obj/item/gps/cyborg/gps

0 commit comments

Comments
 (0)