Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into putnamos-for-real
This commit is contained in:
@@ -873,3 +873,8 @@
|
||||
pixel_x = -31
|
||||
if(WEST)
|
||||
pixel_x = 31
|
||||
plane = ABOVE_WALL_PLANE
|
||||
|
||||
/obj/item/electronic_assembly/wallmount/Moved(atom/OldLoc, Dir, Forced = FALSE) //reset the plane if moved off the wall.
|
||||
. = ..()
|
||||
plane = GAME_PLANE
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
desc = "Produces electricity from chemicals."
|
||||
icon_state = "chemical_cell"
|
||||
extended_desc = "This is effectively an internal beaker. It will consume and produce power from plasma, slime jelly, welding fuel, carbon,\
|
||||
ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy."
|
||||
ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy. But no fuel can be compared with blood of living human."
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_SELFREF)
|
||||
@@ -102,10 +102,8 @@
|
||||
var/lfwb =TRUE
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_reagents(volume, OPENCONTAINER)
|
||||
extended_desc +="But no fuel can be compared with blood of living human."
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/interact(mob/user)
|
||||
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
|
||||
|
||||
@@ -283,10 +283,8 @@
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/square_root/do_work()
|
||||
var/result = 0
|
||||
for(var/k in 2 to inputs.len)
|
||||
var/I = get_pin_data(IC_INPUT, k)
|
||||
if(isnum(I))
|
||||
result += sqrt(I)
|
||||
var/I = get_pin_data(IC_INPUT, 1)
|
||||
result = sqrt(I)
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
activators = list("compute abs coordinates" = IC_PINTYPE_PULSE_IN, "on convert" = IC_PINTYPE_PULSE_OUT)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
|
||||
/obj/item/integrated_circuit/converter/rel_to_abs_coords/do_work()
|
||||
var/x1 = get_pin_data(IC_INPUT, 1)
|
||||
var/y1 = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
activators = list("compute abs coordinates" = IC_PINTYPE_PULSE_IN, "on convert" = IC_PINTYPE_PULSE_OUT)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
|
||||
/obj/item/integrated_circuit/converter/adv_rel_to_abs_coords/do_work()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!T)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
for(var/i in 1 to length(harvest_output))
|
||||
harvest_output[i] = WEAKREF(harvest_output[i])
|
||||
|
||||
if(harvest_output.len)
|
||||
if(length(harvest_output))
|
||||
set_pin_data(IC_OUTPUT, 1, harvest_output)
|
||||
push_data()
|
||||
if(1)
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/grabber/do_work()
|
||||
var/obj/item/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/item)
|
||||
if(!QDELETED(AM) && !istype(AM, /obj/item/electronic_assembly) && !istype(AM, /obj/item/transfer_valve) && !istype(AM, /obj/item/twohanded) && !istype(assembly.loc, /obj/item/implant/storage))
|
||||
if(!QDELETED(AM) && !istype(AM, /obj/item/electronic_assembly) && !istype(AM, /obj/item/transfer_valve) && !istype(assembly.loc, /obj/item/implant/storage) && !AM.GetComponent(/datum/component/two_handed))
|
||||
var/mode = get_pin_data(IC_INPUT, 2)
|
||||
switch(mode)
|
||||
if(1)
|
||||
@@ -300,7 +300,7 @@
|
||||
var/target_y_rel = round(get_pin_data(IC_INPUT, 2))
|
||||
var/obj/item/A = get_pin_data_as_type(IC_INPUT, 3, /obj/item)
|
||||
|
||||
if(!A || A.anchored || A.throwing || A == assembly || istype(A, /obj/item/twohanded) || istype(A, /obj/item/transfer_valve))
|
||||
if(!A || A.anchored || A.throwing || A == assembly || istype(A, /obj/item/transfer_valve) || A.GetComponent(/datum/component/two_handed))
|
||||
return
|
||||
|
||||
if (istype(assembly.loc, /obj/item/implant/storage)) //Prevents the more abusive form of chestgun.
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
to_chat(user, "<span class='notice'>There's no weapon to remove from the mechanism.</span>")
|
||||
|
||||
/obj/item/integrated_circuit/weaponized/weapon_firing/do_work()
|
||||
if(!assembly || !installed_gun)
|
||||
if(!assembly || !installed_gun || !installed_gun.can_shoot())
|
||||
return
|
||||
if(isliving(assembly.loc))
|
||||
var/mob/living/L = assembly.loc
|
||||
@@ -246,7 +246,7 @@
|
||||
var/obj/item/A = get_pin_data_as_type(IC_INPUT, 3, /obj/item)
|
||||
var/obj/item/integrated_circuit/atmospherics/AT = get_pin_data_as_type(IC_INPUT, 4, /obj/item/integrated_circuit/atmospherics)
|
||||
|
||||
if(!A || A.anchored || A.throwing || A == assembly || istype(A, /obj/item/twohanded) || istype(A, /obj/item/transfer_valve))
|
||||
if(!A || A.anchored || A.throwing || A == assembly || istype(A, /obj/item/transfer_valve) || A.GetComponent(/datum/component/two_handed))
|
||||
return
|
||||
|
||||
var/obj/item/I = get_object()
|
||||
@@ -296,6 +296,7 @@
|
||||
var/x_abs = clamp(T.x + target_x_rel, 0, world.maxx)
|
||||
var/y_abs = clamp(T.y + target_y_rel, 0, world.maxy)
|
||||
var/range = round(clamp(sqrt(target_x_rel*target_x_rel+target_y_rel*target_y_rel),0,8),1)
|
||||
playsound(src, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
assembly.visible_message("<span class='danger'>\The [assembly] has thrown [A]!</span>")
|
||||
log_attack("[assembly] [REF(assembly)] has thrown [A] with lethal force.")
|
||||
A.forceMove(drop_location())
|
||||
|
||||
Reference in New Issue
Block a user