Fixes #3319, you cannot use rpd's when they are far away from you.

Fixes machine frames (but the real way that should have been done originally)
Fixes #2701, r-ust topics should no longer be affected by ghost hands
This commit is contained in:
clusterfack
2015-03-05 17:07:40 -06:00
parent c7df7494d4
commit b401dbf909
10 changed files with 177 additions and 173 deletions

View File

@@ -122,7 +122,7 @@
user.set_machine(src)
/obj/machinery/computer/rust_core_control/Topic(href, href_list)
..()
if(..()) return
if( href_list["goto_scanlist"] )
cur_viewed_device = null

View File

@@ -180,6 +180,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
user.set_machine(src)
/obj/machinery/power/rust_core/Topic(href, href_list)
if(..()) return
if(href_list["str"])
var/dif = text2num(href_list["str"])
field_strength = min(max(field_strength + dif, MIN_FIELD_STR), MAX_FIELD_STR)

View File

@@ -68,7 +68,7 @@ var/const/max_assembly_amount = 300
//var/coverlocked
/obj/machinery/rust_fuel_compressor/Topic(href, href_list)
..()
if(..()) return
if( href_list["close"] )
usr << browse(null, "window=fuelcomp")
usr.machine = null

View File

@@ -130,7 +130,7 @@
user.set_machine(src)
/obj/machinery/computer/rust_fuel_control/Topic(href, href_list)
..()
if(..()) return
if( href_list["scan"] )
connected_injectors = list()

View File

@@ -137,7 +137,7 @@
user.set_machine(src)
/obj/machinery/power/rust_fuel_injector/Topic(href, href_list)
..()
if(..()) return
if( href_list["modify_tag"] )
id_tag = input("Enter new ID tag", "Modifying ID tag") as text|null

View File

@@ -28,7 +28,7 @@
//pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
Topic(href, href_list)
..()
if(..()) return
if( href_list["close"] )
usr << browse(null, "window=gyro_monitor")
usr.machine = null

View File

@@ -12,14 +12,14 @@
var/list/req_components = null
var/list/req_component_names = null
var/list/components_in_use = null
var/build_state = 2
var/build_state = 1
// For pods
var/list/connected_parts = list()
var/pattern_idx=0
machine_flags = WRENCHMOVE | FIXED2WORK
proc/update_desc()
/obj/machinery/constructable_frame/proc/update_desc()
var/D
if(req_components)
D = "Requires "
@@ -35,7 +35,7 @@
/obj/machinery/constructable_frame/machine_frame
attackby(obj/item/P as obj, mob/user as mob)
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
user << "<span class='warning'>This part is faulty, you cannot add this to the machine!</span>"
return

View File

@@ -415,8 +415,8 @@ Class Procs:
/obj/machinery/proc/dropFrame()
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 1
M.build_state = 2
M.state = 1
M.icon_state = "box_1"
/obj/machinery/proc/crowbarDestroy(mob/user)

View File

@@ -407,6 +407,9 @@ var/global/list/RPD_recipes=list(
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(get_dist(usr,src)>=1)
usr.unset_machine(usr)
return
if(href_list["setdir"])
p_dir= text2num(href_list["setdir"])
show_menu(usr)

View File

@@ -221,7 +221,6 @@ var/global/ingredientLimit = 10
icon_state_on = "mixer_on"
cookSound = 'sound/machines/juicer.ogg'
v
/obj/machinery/cooking/candy/validateIngredient(var/obj/item/I)
. = ..()
@@ -241,6 +240,7 @@ var/global/ingredientLimit = 10
/obj/machinery/cooking/candy/getFoodChoices()
return (typesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/candy)-(/obj/item/weapon/reagent_containers/food/snacks/customizable/candy))
// Still ///////////////////////////////////////////////////////
/obj/machinery/cooking/still