mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-06-28 06:12:08 +02:00
Add a -transparent-dim=percent flag to set the extra dimming of transparent materials each depth meter.
This commit is contained in:
@ -18,18 +18,19 @@ import (
|
||||
|
||||
func main() {
|
||||
var (
|
||||
webPort int
|
||||
webHost string
|
||||
webDir string
|
||||
mapDir string
|
||||
redisPort int
|
||||
redisHost string
|
||||
colorsFile string
|
||||
workers int
|
||||
transparent bool
|
||||
updateHosts string
|
||||
websockets bool
|
||||
playersFIFO string
|
||||
webPort int
|
||||
webHost string
|
||||
webDir string
|
||||
mapDir string
|
||||
redisPort int
|
||||
redisHost string
|
||||
colorsFile string
|
||||
workers int
|
||||
transparent bool
|
||||
transparentDim float64
|
||||
updateHosts string
|
||||
websockets bool
|
||||
playersFIFO string
|
||||
)
|
||||
flag.IntVar(&webPort, "web-port", 8808, "port of the web server")
|
||||
flag.IntVar(&webPort, "p", 8808, "port of the web server (shorthand)")
|
||||
@ -52,6 +53,12 @@ func main() {
|
||||
flag.StringVar(&colorsFile, "c", "colors.txt", "colors used to render map tiles (shorthand).")
|
||||
flag.BoolVar(&transparent, "transparent", false, "Render transparent blocks.")
|
||||
flag.BoolVar(&transparent, "t", false, "Render transparent blocks (shorthand).")
|
||||
flag.Float64Var(&transparentDim,
|
||||
"transparent-dim", common.DefaultTransparentDim*100.0,
|
||||
"Extra dimming of transparent nodes each depth meter in percent.")
|
||||
flag.Float64Var(&transparentDim,
|
||||
"td", common.DefaultTransparentDim*100.0,
|
||||
"Extra fimming of transparent nodes each depth meter in percent. (shorthand)")
|
||||
flag.BoolVar(&websockets, "websockets", false, "Forward tile changes to clients via websockets.")
|
||||
flag.BoolVar(&websockets, "ws", false, "Forward tile changes to clients via websockets (shorthand).")
|
||||
flag.StringVar(&playersFIFO, "players", "", "Path to FIFO file to read active players from.")
|
||||
@ -86,6 +93,8 @@ func main() {
|
||||
if colors, err = common.ParseColors(colorsFile); err != nil {
|
||||
log.Fatalf("ERROR: problem loading colors: %s", err)
|
||||
}
|
||||
colors.TransparentDim = common.Clamp32f(
|
||||
float32(transparentDim/100.0), 0.0, 100.0)
|
||||
redisAddress := fmt.Sprintf("%s:%d", redisHost, redisPort)
|
||||
|
||||
var allowedUpdateIps []net.IP
|
||||
|
Reference in New Issue
Block a user