Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak: Pick Darkness & Ghost Teleport List #809

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions modular_ss220/verbs/code/verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,47 @@

M.key = key
return

// Pick darkness list
/mob/dead/observer/pick_darkness()
set name = "Pick Darkness"
set desc = "Choose how much darkness you want to see."
set category = "Ghost"

if(!client)
return

var/darkness_level = tgui_input_list(usr, "Choose your darkness", "Pick Darkness", list("Darkness", "Twilight", "Brightness", "Custom"))
if(!darkness_level)
return

var/new_darkness
switch(darkness_level)
if("Darkness")
new_darkness = 255
if("Twilight")
new_darkness = 210
if("Brightness")
new_darkness = 0
if("Custom")
new_darkness = input(usr, "Введите новое значение (0 - 255). Больше - темнее.", "Pick Darkness") as null|num
AyIong marked this conversation as resolved.
Show resolved Hide resolved

if(isnull(new_darkness))
return

client.prefs.ghost_darkness_level = new_darkness
client.prefs.save_preferences(src)
lighting_alpha = client.prefs.ghost_darkness_level
update_sight()

/mob/dead/observer/dead_tele()
set category = "Ghost"
set name = "Teleport"
set desc= "Teleport to a location"

if(!isobserver(usr))
to_chat(usr, "Ты ещё не мёртв!")
return

var/target = tgui_input_list(usr, "Куда телепортируемся?", "Телепортация", SSmapping.ghostteleportlocs)
teleport(SSmapping.ghostteleportlocs[target])