mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
* Build Mode Preview + better help text (#76095) ## About The Pull Request Gives `Adv Build Mode` and `Fill` an item preview, and puts the help text for build mode modes into an examine block. https://github.com/tgstation/tgstation/assets/66640614/6751c721-6ddd-4761-8311-fb002ea905ac   ## Why It's Good For The Game It's good to see what you're doing. ## Changelog 🆑 Tattle admin: build mode help text is in an examine block admin: adv build mode and fill now have item previews /🆑 --------- Co-authored-by: tattle <article.disaster@ gmail.com> Co-authored-by: san7890 <the@ san7890.com> * Build Mode Preview + better help text --------- Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com> Co-authored-by: tattle <article.disaster@ gmail.com> Co-authored-by: san7890 <the@ san7890.com>
28 lines
846 B
Plaintext
28 lines
846 B
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/builder)
|
|
to_chat(builder, span_purple(examine_block(
|
|
"[span_bold("Select")] -> Left Mouse Button on turf/obj/mob\n\
|
|
[span_bold("Throw")] -> Right Mouse Button on turf/obj/mob"))
|
|
)
|
|
|
|
/datum/buildmode_mode/throwing/handle_click(client/c, params, obj/object)
|
|
var/list/modifiers = params2list(params)
|
|
|
|
if(LAZYACCESS(modifiers, LEFT_CLICK))
|
|
if(isturf(object))
|
|
return
|
|
throw_atom = object
|
|
to_chat(c, "Selected object '[throw_atom]'")
|
|
if(LAZYACCESS(modifiers, 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)])")
|