mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
fix: better handling of whiteship signaller input (#25531)
This commit is contained in:
committed by
GitHub
parent
ef557d7743
commit
c6d0eced94
@@ -37,6 +37,7 @@
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/dir_choice = tgui_input_list(user, "Select the new docking area orientation.", "Dock Orientation", dir_choices)
|
||||
if(!dir_choice)
|
||||
to_chat(user, "<span class='notice'>Docking placement cancelled.</span>")
|
||||
return
|
||||
|
||||
var/dest_dir = dir_choices[dir_choice]
|
||||
@@ -76,17 +77,22 @@
|
||||
qdel(port, force = TRUE)
|
||||
return
|
||||
|
||||
placed_docks += port
|
||||
var/dock_count = length(placed_docks)
|
||||
|
||||
var/basename = "Custom Dock #[dock_count]"
|
||||
var/basename = "Docking Port #[length(placed_docks) + 1]"
|
||||
var/name = tgui_input_text(user,
|
||||
message = "Select the new docking area name.",
|
||||
title = "New Dock Name",
|
||||
default = basename,
|
||||
max_length = 20
|
||||
)
|
||||
port.name = name ? name : basename
|
||||
if(!name)
|
||||
to_chat(user, "<span class='notice'>Docking placement cancelled.</span>")
|
||||
qdel(port, force = TRUE)
|
||||
return
|
||||
|
||||
placed_docks += port
|
||||
var/dock_count = length(placed_docks)
|
||||
|
||||
port.name = name
|
||||
port.id = "whiteship_custom_[dock_count]"
|
||||
port.register()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user