mirror of
https://github.com/goonstation/goonstation-2020.git
synced 2026-07-14 00:22:21 +01:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
/datum/buildmode/clipboard
|
|
name = "Clipboard"
|
|
desc = {"***********************************************************<br>
|
|
Left Mouse Button = Paste object<br>
|
|
Right Mouse Button = Select object to copy<br>
|
|
***********************************************************"}
|
|
icon_state = "buildmode11"
|
|
var/atom/cloned = null
|
|
|
|
click_left(atom/object, var/ctrl, var/alt, var/shift)
|
|
if (!cloned)
|
|
return
|
|
var/turf/T = get_turf(object)
|
|
if (isobj(cloned))
|
|
var/obj/O = cloned:clone()
|
|
O.set_loc(T)
|
|
O.appearance = cloned.appearance
|
|
O.dir = cloned.dir
|
|
else if (isturf(cloned))
|
|
var/turf/t = new cloned.type(T)
|
|
t.appearance = cloned.appearance
|
|
blink(T)
|
|
|
|
click_right(atom/object, var/ctrl, var/alt, var/shift)
|
|
if (isturf(object))
|
|
cloned = object
|
|
boutput(usr, "<span style=\"color:blue\">Selected [object] for copying by reference.</span>")
|
|
update_button_text("Copying [object] by reference.")
|
|
else if (isobj(object))
|
|
cloned = object:clone()
|
|
boutput(usr, "<span style=\"color:blue\">Selected [object] for copying.</span>")
|
|
update_button_text("Copying [object].")
|