mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 04:01:41 +00:00
* Ports paradise's modular buildmode * Axes logout callback of buildmode * AnturK's changes - Code formatting - Gives mob to throw args - Selection overlays are on ABOVE_LIGHTING_PLANE to be visible on space Other: - Doubleclicks of observers and AI no longer "double-tap" click intercepts
30 lines
1.0 KiB
Plaintext
30 lines
1.0 KiB
Plaintext
/datum/buildmode_mode/throwing
|
|
key = "throw"
|
|
|
|
var/atom/movable/throw_atom = null
|
|
|
|
/datum/buildmode_mode/throwing/Destroy()
|
|
throw_atom = null
|
|
return ..()
|
|
|
|
/datum/buildmode_mode/throwing/show_help(client/c)
|
|
to_chat(c, "<span class='notice'>***********************************************************</span>")
|
|
to_chat(c, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
|
|
to_chat(c, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
|
|
to_chat(c, "<span class='notice'>***********************************************************</span>")
|
|
|
|
/datum/buildmode_mode/throwing/handle_click(client/c, params, obj/object)
|
|
var/list/pa = params2list(params)
|
|
var/left_click = pa.Find("left")
|
|
var/right_click = pa.Find("right")
|
|
|
|
if(left_click)
|
|
if(isturf(object))
|
|
return
|
|
throw_atom = object
|
|
to_chat(c, "Selected object '[throw_atom]'")
|
|
if(right_click)
|
|
if(throw_atom)
|
|
throw_atom.throw_at(object, 10, 1, c.mob)
|
|
log_admin("Build Mode: [key_name(c)] threw [throw_atom] at [object] ([AREACOORD(object)])")
|