Files
Bubberstation/code/modules/buildmode/submodes/throwing.dm
tattle d81eaae90c 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


![image](https://github.com/tgstation/tgstation/assets/66640614/3f6fe986-1767-4639-94d3-523f1039c947)


![image](https://github.com/tgstation/tgstation/assets/66640614/a7eae938-a575-46bd-b00e-865f04e0de20)


## 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>
2023-06-23 20:04:18 -06:00

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)])")