mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into upstream/upstream-merge-5735
This commit is contained in:
@@ -247,7 +247,7 @@
|
||||
return TRUE
|
||||
|
||||
else if(istype(I, /obj/item/integrated_circuit))
|
||||
if(!user.unEquip(I))
|
||||
if(!user.unEquip(I) && !istype(user, /mob/living/silicon/robot)) //Robots cannot de-equip items in grippers.
|
||||
return FALSE
|
||||
if(add_circuit(I, user))
|
||||
to_chat(user, "<span class='notice'>You slide \the [I] inside \the [src].</span>")
|
||||
@@ -323,6 +323,12 @@
|
||||
if(choice)
|
||||
choice.ask_for_input(user)
|
||||
|
||||
/obj/item/device/electronic_assembly/attack_robot(mob/user as mob)
|
||||
if(Adjacent(user))
|
||||
return attack_self(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/electronic_assembly/emp_act(severity)
|
||||
..()
|
||||
for(var/atom/movable/AM in contents)
|
||||
|
||||
@@ -215,6 +215,8 @@
|
||||
user.visible_message("\The [user] attaches \the [src] to the wall.",
|
||||
"<span class='notice'>You attach \the [src] to the wall.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
if(istype(user, /mob/living/silicon/robot)) //Robots cannot unequip/drop items, for Safety Reasons.
|
||||
forceMove(T)
|
||||
user.drop_item(T)
|
||||
anchored = TRUE
|
||||
on_anchored()
|
||||
|
||||
@@ -233,7 +233,7 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
|
||||
else
|
||||
var/datum/integrated_io/io = pin
|
||||
io.ask_for_pin_data(usr) // The pins themselves will determine how to ask for data, and will validate the data.
|
||||
io.ask_for_pin_data(usr, held_item) // The pins themselves will determine how to ask for data, and will validate the data.
|
||||
/*
|
||||
if(io.io_type == DATA_CHANNEL)
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ list[](
|
||||
return !isnull(data)
|
||||
|
||||
// This proc asks for the data to write, then writes it.
|
||||
/datum/integrated_io/proc/ask_for_pin_data(mob/user)
|
||||
/datum/integrated_io/proc/ask_for_pin_data(mob/user, obj/item/I)
|
||||
var/new_data = ask_for_data_type(user)
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
can_clone = TRUE
|
||||
debug = TRUE
|
||||
|
||||
/obj/item/device/integrated_circuit_printer/attack_robot(mob/user as mob)
|
||||
if(Adjacent(user))
|
||||
return interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/device/integrated_circuit_printer/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/stack = O
|
||||
@@ -146,6 +152,8 @@
|
||||
return
|
||||
|
||||
if(!debug)
|
||||
if(!Adjacent(usr))
|
||||
to_chat(usr, "<span class='notice'>You are too far away from \the [src].</span>")
|
||||
if(metal - cost < 0)
|
||||
to_chat(usr, "<span class='warning'>You need [cost] metal to build that!.</span>")
|
||||
return 1
|
||||
|
||||
@@ -2,8 +2,15 @@
|
||||
/datum/integrated_io/ref
|
||||
name = "ref pin"
|
||||
|
||||
/datum/integrated_io/ref/ask_for_pin_data(mob/user) // This clears the pin.
|
||||
write_data_to_pin(null)
|
||||
/datum/integrated_io/ref/ask_for_pin_data(mob/user, obj/item/I)
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/tool = I
|
||||
write_data_to_pin(tool.weakref_wiring)
|
||||
else if(istype(I, /obj/item/device/integrated_electronics/debugger))
|
||||
var/obj/item/device/integrated_electronics/debugger/tool = I
|
||||
write_data_to_pin(tool.data_to_write)
|
||||
else
|
||||
write_data_to_pin(null)
|
||||
|
||||
/datum/integrated_io/ref/write_data_to_pin(var/new_data)
|
||||
if(isnull(new_data) || isweakref(new_data))
|
||||
@@ -11,4 +18,4 @@
|
||||
holder.on_data_written()
|
||||
|
||||
/datum/integrated_io/ref/display_pin_type()
|
||||
return IC_FORMAT_REF
|
||||
return IC_FORMAT_REF
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
|
||||
|
||||
/obj/item/device/multitool
|
||||
var/accepting_refs
|
||||
var/datum/integrated_io/selected_io = null
|
||||
var/mode = 0
|
||||
|
||||
@@ -190,6 +191,10 @@
|
||||
else
|
||||
if(buffer || connecting || connectable)
|
||||
icon_state = "multitool_tracking_fail"
|
||||
else if(accepting_refs)
|
||||
icon_state = "multitool_ref_scan"
|
||||
else if(weakref_wiring)
|
||||
icon_state = "multitool_no_camera"
|
||||
else
|
||||
icon_state = "multitool"
|
||||
|
||||
@@ -239,7 +244,13 @@
|
||||
io1.holder.interact(user) // This is to update the UI.
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/multitool/afterattack(atom/target, mob/living/user, proximity)
|
||||
if(accepting_refs && toolmode == MULTITOOL_MODE_INTCIRCUITS && proximity)
|
||||
weakref_wiring = weakref(target)
|
||||
visible_message("<span class='notice'>[user] slides \a [src]'s over \the [target].</span>")
|
||||
to_chat(user, "<span class='notice'>You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \
|
||||
now off.</span>")
|
||||
accepting_refs = 0
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user