diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 4ff95775e70..827ad18619e 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -101,7 +101,7 @@
update_icon()
/obj/machinery/pdapainter/attack_hand(mob/user)
- if(..())
+ if(!..())
add_fingerprint(user)
if(storedpda)
@@ -118,7 +118,7 @@
ejectpda()
else
- user << "The [src] is empty."
+ user << "\The [src] is empty."
/obj/machinery/pdapainter/verb/ejectpda()
diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm
index 29af1ab1e18..393f2f4f600 100644
--- a/code/game/machinery/announcement_system.dm
+++ b/code/game/machinery/announcement_system.dm
@@ -75,8 +75,7 @@ var/list/announcement_systems = list()
if(istype(P, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
- if(!panel_open)
- user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
+ user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]."
update_icon()
else if(default_deconstruction_crowbar(P))
return
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 648339bcbf7..724311e6a54 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -238,10 +238,6 @@
cable.plugin(src, user)
return
- else if(istype(W, /obj/item/device/laser_pointer))
- var/obj/item/device/laser_pointer/L = W
- L.laser_act(src, user)
- return
return ..()
/obj/machinery/camera/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index a6f8eb6eb01..1ae36a3a43d 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -93,7 +93,8 @@
C.loc = src.loc
if (stat & BROKEN)
user << "The broken glass falls out."
- new /obj/item/weapon/shard( src.loc )
+ new /obj/item/weapon/shard(src.loc)
+ new /obj/item/weapon/shard(src.loc)
A.state = 3
A.icon_state = "3"
else
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 366c3f56479..5d03cc6f5f2 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -69,7 +69,9 @@ var/const/HOLOPAD_MODE = RANGE_BASED
if(default_unfasten_wrench(user, P))
return
- default_deconstruction_crowbar(P)
+ if(default_deconstruction_crowbar(P))
+ return
+ return ..()
/obj/machinery/hologram/holopad/AltClick(mob/living/carbon/human/user)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 462dee8ff9d..99e7e402233 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -326,11 +326,11 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(6)
dat+="ERROR: Could not submit Feed story to Network.
"
if(channel_name=="")
- dat+="?Invalid receiving channel name.
"
+ dat+="Invalid receiving channel name.
"
if(scanned_user=="Unknown")
- dat+="?Channel author unverified.
"
+ dat+="Channel author unverified.
"
if(msg == "" || msg == "\[REDACTED\]")
- dat+="?Invalid message body.
"
+ dat+="Invalid message body.
"
dat+="
Return
"
if(7)
dat+="ERROR: Could not submit Feed Channel to Network.
"
@@ -341,18 +341,18 @@ var/list/obj/machinery/newscaster/allCasters = list()
else
existing_authors += FC.author
if(scanned_user in existing_authors)
- dat+="?There already exists a Feed channel under your name.
"
+ dat+="There already exists a Feed channel under your name.
"
if(channel_name=="" || channel_name == "\[REDACTED\]")
- dat+="?Invalid channel name.
"
+ dat+="Invalid channel name.
"
var/check = 0
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == channel_name)
check = 1
break
if(check)
- dat+="?Channel name already in use.
"
+ dat+="Channel name already in use.
"
if(scanned_user=="Unknown")
- dat+="?Channel author unverified.
"
+ dat+="Channel author unverified.
"
dat+="
Return
"
if(8)
var/total_num=length(news_network.network_channels)
@@ -471,11 +471,11 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(16)
dat+="ERROR: Wanted Issue rejected by Network.
"
if(channel_name=="" || channel_name == "\[REDACTED\]")
- dat+="?Invalid name for person wanted.
"
+ dat+="Invalid name for person wanted.
"
if(scanned_user=="Unknown")
- dat+="?Issue author unverified.
"
+ dat+="Issue author unverified.
"
if(msg == "" || msg == "\[REDACTED\]")
- dat+="?Invalid description.
"
+ dat+="Invalid description.
"
dat+="
Return
"
if(17)
dat+="Wanted Issue successfully deleted from Circulation
"
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index a879455c1b2..3ae2ded9223 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -31,35 +31,35 @@
user << "You [anchored ? "attached" : "detached"] [src]."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
return
- if(istype(user,/mob/living/silicon))
- return
+
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton) || istype(G, /obj/item/ammo_box/magazine/recharge))
if(anchored)
if(charging || panel_open)
- return
+ return 1
//Checks to make sure he's not in space doing it, and that the area got proper power.
var/area/a = get_area(src)
if(!isarea(a) || a.power_equip == 0)
user << "[src] blinks red as you try to insert [G]."
- return
+ return 1
if (istype(G, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/gun = G
if(!gun.can_charge)
user << "Your gun has no external power connector."
- return
- if(!user.drop_item())
- return
+ return 1
+ if(!user.drop_item())
+ return 1
G.loc = src
charging = G
use_power = 2
update_icon()
else
user << "[src] isn't connected to anything!"
+ return 1
- if (anchored && !charging)
+ if(anchored && !charging)
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
return
@@ -69,6 +69,7 @@
if(exchange_parts(user, G))
return
+ return ..()
/obj/machinery/recharger/attack_hand(mob/user)
if(issilicon(user))
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index a26b66350de..1868e966e5a 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -282,8 +282,6 @@
var/locked = 1
var/obj/structure/cable/attached // the attached cable
var/storedpower = 0
- flags = CONDUCT
- use_power = 0
/obj/machinery/shieldwallgen/proc/power()
if(!anchored)
diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 21ae2c75996..4ec3efe5a33 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -141,7 +141,7 @@
/obj/structure/alien/resin/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
- if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
+ if(!M.melee_damage_upper)
return
visible_message("[M] [M.attacktext] [src]!")
take_damage(M.melee_damage_upper, M.melee_damage_type)
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 817cc5b22cf..3e12f0d4954 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -336,7 +336,7 @@
continue
if(G.amount >= G.max_amount)
continue
- G.attackby(G, user)
+ G.attackby(NG, user)
user << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s."
qdel(src)
else
diff --git a/code/modules/food&drinks/kitchen machinery/processor.dm b/code/modules/food&drinks/kitchen machinery/processor.dm
index a602e611581..ab460e14999 100644
--- a/code/modules/food&drinks/kitchen machinery/processor.dm
+++ b/code/modules/food&drinks/kitchen machinery/processor.dm
@@ -193,6 +193,7 @@
"You put the [what] into [src].")
user.drop_item()
what.loc = src
+ return 1
else
if(user.a_intent != "harm")
user << "That probably won't blend!"
diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm
index 978c4d191d9..9ebde1d58ab 100644
--- a/code/modules/hydroponics/biogenerator.dm
+++ b/code/modules/hydroponics/biogenerator.dm
@@ -73,17 +73,21 @@
return
if(istype(O, /obj/item/weapon/reagent_containers/glass))
+ . = 1 //no afterattack
if(!panel_open)
if(beaker)
user << "A container is already loaded into the machine."
else
- user.unEquip(O)
+ if(!user.drop_item())
+ return
O.loc = src
beaker = O
user << "You add the container to the machine."
update_icon()
updateUsrDialog()
- return 1 //no afterattack
+ else
+ user << "Close the maintenance panel first."
+ return
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/PB = O
diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm
index d30378251f5..e7e63b26e23 100644
--- a/code/modules/hydroponics/seed_extractor.dm
+++ b/code/modules/hydroponics/seed_extractor.dm
@@ -1,4 +1,4 @@
-/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor)
+/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
var/t_amount = 0
if(t_max == -1)
if(extractor)
@@ -13,6 +13,8 @@
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/))
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
if(F.seed)
+ if(user && !user.drop_item()) //couldn't drop the item
+ return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
@@ -23,6 +25,8 @@
else if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
if(F.seed)
+ if(user && !user.drop_item())
+ return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
@@ -89,17 +93,13 @@
user << "There are no seeds in \the [O.name]."
return
- if(!user.drop_item()) //couldn't drop the item
- user << "\The [O] is stuck to your hand, you cannot put it in the seed extractor!"
- return
-
- else if(seedify(O,-1, src))
+ else if(seedify(O,-1, src, user))
user << "You extract some seeds."
return
else if (istype(O,/obj/item/seeds))
- add_seed(O)
- user << "You add [O] to [src.name]."
- updateUsrDialog()
+ if(add_seed(O))
+ user << "You add [O] to [src.name]."
+ updateUsrDialog()
return
else if(user.a_intent != "harm")
user << "You can't extract any seeds from \the [O.name]!"
@@ -188,15 +188,14 @@
if(istype(O.loc,/mob))
var/mob/M = O.loc
- if(!M.unEquip(O))
- usr << "\the [O] is stuck to your hand, you cannot put it in \the [src]!"
- return
+ if(!M.drop_item())
+ return 0
else if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = O.loc
S.remove_from_storage(O,src)
O.loc = src
-
+ . = 1
for (var/datum/seed_pile/N in piles)
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
++N.amount
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 3bc5812c90e..46b263aabc6 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -91,6 +91,7 @@
var/global/list/status_overlays_equipment
var/global/list/status_overlays_lighting
var/global/list/status_overlays_environ
+ var/health = 50
/obj/machinery/power/apc/connect_to_network()
//Override because the APC does not directly connect to the network; it goes through a terminal.
@@ -442,7 +443,7 @@
user << "The wires have been [panel_open ? "exposed" : "unexposed"]"
update_icon()
- else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
+ else if (W.GetID()) // trying to unlock the interface with an ID card
if(emagged)
user << "The interface is broken!"
else if(opened)
@@ -544,14 +545,21 @@
if (opened==2)
opened = 1
update_icon()
+
+ else if(panel_open && !opened && is_wire_tool(W))
+ wires.interact(user)
else
- if(panel_open && !opened && is_wire_tool(W))
- wires.interact(user)
- if(((stat & BROKEN) || malfhack) && !opened && W.force >= 5 && W.w_class >= 3 && prob(20))
+ return ..()
+
+/obj/machinery/power/apc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
+ ..()
+ if((malfhack || (stat & BROKEN)) && !opened)
+ if(damage < 10)
+ return
+ health -= damage
+ if(health <= 0)
opened = 2
- user.visible_message("[user.name] has knocked down the APC cover with the [W.name].", \
- "You knock down the APC cover with your [W.name]!", \
- "You hear bang.")
+ visible_message("The APC cover is knocked down!")
update_icon()
/obj/machinery/power/apc/emag_act(mob/user)
@@ -590,23 +598,28 @@
..()
/obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- user.visible_message("[user.name] slashes at the [src.name]!", "You slash at the [src.name]!")
- playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+ ..()
+ if(malfhack || (stat & BROKEN))
+ return
+ if(opened == 0)
+ if(!panel_open)
+ panel_open = 1
+ update_icon()
+ visible_message("The [src.name]'s cover flies open, exposing the wires!")
- if(beenhit >= pick(3, 4) && panel_open != 1)
- panel_open = 1
- update_icon()
- visible_message("The [src.name]'s cover flies open, exposing the wires!")
+ else if(panel_open && !wires.is_all_cut())
+ wires.cut_all()
+ update_icon()
+ visible_message("The [src.name]'s wires are shredded!")
+ else if(opened == 1)
+ if(cell)
+ cell.loc = user.loc
+ cell.updateicon()
+ cell = null
+ visible_message("The [src.name]'s power cell flies off!")
+ charging = 0
+ update_icon()
- else if(panel_open == 1 && !wires.is_all_cut())
- wires.cut_all()
- update_icon()
- visible_message("The [src.name]'s wires are shredded!")
- else
- beenhit += 1
- return
/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index 9ac92d78ace..419d5e2c91d 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -104,17 +104,16 @@
return
if (istype(I, /obj/item/weapon/reagent_containers) && (I.flags & OPENCONTAINER) )
- . = 1 //no afterattack
- if (beaker)
- return 1
- else
+ if (!beaker)
if(!user.drop_item())
return 1
beaker = I
beaker.loc = src
update_icon()
src.updateUsrDialog()
- return 0
+ else
+ user << "There's already a container inside."
+ return 1 //no afterattack
if(is_type_in_list(I, dried_items))
if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/grown))
@@ -144,14 +143,17 @@
return 1
if (!is_type_in_list(I, blend_items) && !is_type_in_list(I, juice_items))
- user << "Cannot refine into a reagent!"
- return 1
+ if(user.a_intent == "harm")
+ return ..()
+ else
+ user << "Cannot refine into a reagent!"
+ return 1
- user.unEquip(I)
- I.loc = src
- holdingitems += I
- src.updateUsrDialog()
- return 0
+ if(user.drop_item())
+ I.loc = src
+ holdingitems += I
+ src.updateUsrDialog()
+ return 0
/obj/machinery/reagentgrinder/attack_paw(mob/user)
return src.attack_hand(user)
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 1db73cad36d..128ab849252 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -28,7 +28,10 @@
qdel(src)
/obj/structure/reagent_dispensers/attackby(obj/item/weapon/W, mob/user, params)
- return
+ if(istype(W, /obj/item/weapon/reagent_containers))
+ return 0 //so we can refill them via their afterattack.
+ else
+ return ..()
/obj/structure/reagent_dispensers/New()
create_reagents(1000)
diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm
index b2296e9c746..df8325fea57 100644
--- a/code/modules/recycling/disposal-unit.dm
+++ b/code/modules/recycling/disposal-unit.dm
@@ -92,7 +92,7 @@
return
user << "You slice the floorweld off \the [src]."
Deconstruct()
- return
+ return
if(user.a_intent != "harm")
if(!user.drop_item() || (I.flags & ABSTRACT))
diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm
index d4018d364ee..46dc22254a0 100644
--- a/code/modules/security levels/keycard authentication.dm
+++ b/code/modules/security levels/keycard authentication.dm
@@ -26,9 +26,6 @@ var/datum/events/keycard_events = new()
qdel(ev)
. = ..()
-/obj/machinery/keycard_auth/attackby(obj/item/weapon/W, mob/user, params)
- return
-
/obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)