mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
if to switch
From ugly if to beautiful switch
This commit is contained in:
@@ -71,16 +71,16 @@
|
||||
/obj/spacepod/proc/apply_paint(mob/user as mob)
|
||||
var/part_type
|
||||
var/part = input(user, "Choose part", null) as null|anything in list("Lights","Rim","Paint","Windows")
|
||||
if(part == "Lights")
|
||||
part_type = LIGHT
|
||||
if(part == "Rim")
|
||||
part_type = RIM
|
||||
if(part == "Paint")
|
||||
part_type = PAINT
|
||||
if(part == "Windows")
|
||||
part_type = WINDOW
|
||||
if(!part)
|
||||
return
|
||||
switch (part)
|
||||
if("Lights")
|
||||
part_type = LIGHT
|
||||
if("Rim")
|
||||
part_type = RIM
|
||||
if("Paint")
|
||||
part_type = PAINT
|
||||
if("Windows")
|
||||
part_type = WINDOW
|
||||
else
|
||||
var/coloradd = input(user, "Choose a color", "Color") as color
|
||||
colors[part_type] = coloradd
|
||||
if(!has_paint)
|
||||
|
||||
Reference in New Issue
Block a user