mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-30 03:53:33 +00:00
Updates emag attackby usages to emag_act where it's not too much of a headache.
This commit is contained in:
@@ -150,15 +150,15 @@ max volume of phoron storeable by the field = the total volume of a number of ti
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_core/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rust_core/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -14,6 +14,21 @@
|
||||
//20% easier to read than apc code
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!emagged)
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return 1
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/attackby(obj/item/W, mob/user)
|
||||
|
||||
@@ -55,21 +70,6 @@
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !emagged) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
|
||||
@@ -106,12 +106,6 @@
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/fuel_assembly) && !cur_assembly)
|
||||
if(emergency_insert_ready)
|
||||
cur_assembly = W
|
||||
@@ -122,6 +116,13 @@
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.")
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/attack_ai(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
Reference in New Issue
Block a user