Merge remote-tracking branch 'origin/master' into TGUI-4
This commit is contained in:
@@ -833,10 +833,7 @@
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
/obj/machinery/power/apc/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/machinery/power/apc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(opened && (!issilicon(user)))
|
||||
if(cell)
|
||||
user.visible_message("[user] removes \the [cell] from [src]!","<span class='notice'>You remove \the [cell].</span>")
|
||||
@@ -925,6 +922,9 @@
|
||||
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
|
||||
|
||||
/obj/machinery/power/apc/proc/update()
|
||||
var/old_light = area.power_light
|
||||
var/old_equip = area.power_equip
|
||||
var/old_environ = area.power_environ
|
||||
if(operating && !shorted && !failure_timer)
|
||||
area.power_light = (lighting > 1)
|
||||
area.power_equip = (equipment > 1)
|
||||
@@ -933,7 +933,8 @@
|
||||
area.power_light = FALSE
|
||||
area.power_equip = FALSE
|
||||
area.power_environ = FALSE
|
||||
area.power_change()
|
||||
if(old_light != area.power_light || old_equip != area.power_equip || old_environ != area.power_environ)
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
|
||||
if(IsAdminGhost(user))
|
||||
|
||||
@@ -564,10 +564,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon_state = "[initial(item_state)][amount < 3 ? amount : ""]"
|
||||
name = "cable [amount < 3 ? "piece" : "coil"]"
|
||||
|
||||
/obj/item/stack/cable_coil/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/stack/cable_coil/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
var/obj/item/stack/cable_coil/new_cable = ..()
|
||||
if(istype(new_cable))
|
||||
new_cable.color = color
|
||||
|
||||
@@ -92,10 +92,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/floodlight/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/machinery/power/floodlight/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
var/current = setting
|
||||
if(current == 1)
|
||||
current = light_setting_list.len
|
||||
|
||||
@@ -80,7 +80,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
/obj/machinery/gravity_generator/part/get_status()
|
||||
return main_part?.get_status()
|
||||
|
||||
/obj/machinery/gravity_generator/part/attack_hand(mob/user)
|
||||
/obj/machinery/gravity_generator/part/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
return main_part.attack_hand(user)
|
||||
|
||||
/obj/machinery/gravity_generator/part/set_broken()
|
||||
|
||||
@@ -595,11 +595,9 @@
|
||||
// attack with hand - remove tube/bulb
|
||||
// if hands aren't protected and the light is on, burn the player
|
||||
|
||||
/obj/machinery/light/attack_hand(mob/living/carbon/human/user)
|
||||
/obj/machinery/light/on_attack_hand(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(status == LIGHT_EMPTY)
|
||||
@@ -812,11 +810,11 @@
|
||||
return
|
||||
|
||||
/obj/item/light/attack(mob/living/M, mob/living/user, def_zone)
|
||||
..()
|
||||
. = ..()
|
||||
shatter()
|
||||
|
||||
/obj/item/light/attack_obj(obj/O, mob/living/user)
|
||||
..()
|
||||
. = ..()
|
||||
shatter()
|
||||
|
||||
/obj/item/light/proc/shatter()
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
/obj/machinery/power/rad_collector/analyzer_act(mob/living/user, obj/item/I)
|
||||
if(loaded_tank)
|
||||
loaded_tank.analyzer_act(user, I)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/rad_collector/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
FG2.fields -= src
|
||||
return ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/machinery/field/containment/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/machinery/field/containment/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(get_dist(src, user) > 1)
|
||||
return FALSE
|
||||
else
|
||||
|
||||
@@ -315,6 +315,9 @@
|
||||
|
||||
/obj/machinery/power/emitter/proc/integrate(obj/item/gun/energy/E,mob/user)
|
||||
if(istype(E, /obj/item/gun/energy))
|
||||
if(!E.can_emitter)
|
||||
to_chat(user, "<span class='warning'>[E] cannot fit into emitters.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(E, src))
|
||||
return
|
||||
gun = E
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
did_something = TRUE
|
||||
|
||||
if(did_something)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
update_state()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -244,7 +244,6 @@
|
||||
did_something = TRUE
|
||||
|
||||
if(did_something)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
update_state()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
last_failed_movement = direct
|
||||
return 0
|
||||
|
||||
/obj/singularity/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/singularity/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
consume(user)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
/obj/machinery/power/supermatter_crystal/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/machinery/power/supermatter_crystal/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user