Fixed statue (sculpture) rotation. (#19500)

Fixed statue (sculpture) rotation.
Some code clenaup and use of tgui input.

Fixes #19189
This commit is contained in:
Fluffy
2024-06-21 07:34:47 +02:00
committed by GitHub
parent b3619f283f
commit 2e87f4ebba
2 changed files with 68 additions and 5 deletions
+9 -5
View File
@@ -1236,7 +1236,7 @@ var/list/total_extraction_beacons = list()
if(sculpted == TRUE_QDEL)
qdel(src)
/obj/structure/sculpting_block/proc/sculpture_options(var/choice, var/mob/user)
/obj/structure/sculpting_block/proc/sculpture_options(choice, mob/user)
switch(choice)
if("sculpture")
var/mob/living/old_T
@@ -1244,7 +1244,7 @@ var/list/total_extraction_beacons = list()
old_T = T
var/list/choices = list()
for(var/mob/living/M in view(7,user))
for(var/mob/living/M in get_hearers_in_LOS(7, user))
choices += M
T = tgui_input_list(user, "Who do you wish to sculpt?", "Sculpt Options", choices)
if(!T)
@@ -1287,7 +1287,7 @@ var/list/total_extraction_beacons = list()
return FALSE
return TRUE
/obj/structure/sculpting_block/proc/finish_sculpture(var/choice, var/mob/user)
/obj/structure/sculpting_block/proc/finish_sculpture(choice, mob/user)
switch(choice)
if("sculpture")
appearance = T
@@ -1306,13 +1306,13 @@ var/list/total_extraction_beacons = list()
obj_flags = OBJ_FLAG_ROTATABLE
var/title = sanitize(input(usr, "If you would like to name your art, do so here.", "Christen Your Sculpture", "") as text|null)
var/title = tgui_input_text(usr, "If you would like to name your art, do so here.", "Christen Your Sculpture", multiline = FALSE)
if(title)
name = title
else
name = T.name
var/legend = sanitize(input(usr, "If you would like to describe your art, do so here.", "Story Your Sculpture", "") as message|null)
var/legend = tgui_input_text(usr, "If you would like to describe your art, do so here.", "Story Your Sculpture", multiline = TRUE)
if(legend)
desc = legend
else
@@ -1321,6 +1321,7 @@ var/list/total_extraction_beacons = list()
T = null // null T out, we don't need the ref to them anymore
return TRUE
if("ladder")
var/turf/above = GET_ABOVE(src)
if(!above)
@@ -1334,6 +1335,9 @@ var/list/total_extraction_beacons = list()
new /obj/structure/ladder/mining(above)
return TRUE_QDEL
/obj/structure/sculpting_block/update_icon()
return
#undef TRUE_QDEL
/******************************Gains Boroughs*******************************/
@@ -0,0 +1,59 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: FluffyGhost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixed statue (sculpture) rotation."
- code_imp: "Some code clenaup and use of tgui input."