复制链接 & 嵌入
链接
复制链接
嵌入网页
复制嵌入代码
进入全屏模式
载入作品
正在创建积木……
载入角色……
载入声音……
加载扩展……
正在创建积木……
呼唤小猫……
传送Nano……
给Gobo充气 …
准备表情……
还没有人打赏!
最后修改于2025年01月04日

指导教师

操作说明

ACQUIRE AND PILOT A FLEET OF UNMANNED SUBMERSIBLE VEHICLES TO EXPLORE THE OCEANS AND UNDERWATER TERRAIN. HOW DEEP CAN YOU GO?

THE GAME REQUIRES ABOUT 2-3 HOURS TO COMPLETE.
SAVE CODES ARE AVAILABLE (GO TO THE MAIN MENU). THEY ARE QUITE LONG SO DO NOT POST THEM IN THE COMMENTS.

- MOUSE AND KEYBOARD REQUIRED.
- TURBOWARP HIGHLY RECOMMENDED (LESS LAG):
HTTPS://TURBOWARP.ORG/811805586
- THE GREEN FLAG DOES NOT RESET THE GAME.

WASD - MOVEMENT
[MOUSE] - AIM/USE TOOL
E - VIEW INVENTORY
L - TOGGLE LIGHT
P - ADD WAYPOINT
I - TOGGLE WAYPOINT VISIBILITY
M - MAP
X - DELETE (FOR HOVERED OBJECTS)

BASIC GUIDE:
MOST OF THIS INFORMATION CAN BE LEARNT THROUGH THE IN-GAME TUTORIAL.

EXPLORE THE WORLD AND UPGRADE YOUR SUBMERSIBLES THROUGH COLLECTED RESOURCES (MINED IN THE WORLD) OR FUNDS (SCANNING, ACHIEVEMENTS, AND MORE).

YOU ARE ABLE TO CHANGE HULLS AND SWAP OUT EVERY PART THAT MAKES IT FUNCTION INCLUDING BATTERIES, THRUSTERS, AND TOOLS. PARTS CAN BE STACKED. 2 THRUSTERS FOR EXAMPLE WILL MAKE YOUR SUB MOVE FASTER THAN 1. EXPERIMENT AND SEE WHAT CONFIGURATIONS WORK FOR YOU.

YOUR "HOME" IS A SHIP. ALL OPERATIONS BEGIN AND END HERE. RETURNING TO YOUR SHIP WILL ALLOW YOU TO RECHARGE, REPAIR, AND DEPOSIT COLLECTED RESOURCES. UPGRADES CAN BE MADE AT YOUR SHIP.

DON'T LOSE YOUR SUBMERSIBLE! MAKE SURE YOU HAVE ENOUGH BATTERY TO RETURN. "DEATH" IN THIS GAME IS LOSING YOUR SUB AND ALL THE PARTS AND ITEMS CARRIED ON IT. YOU MAY LAUNCH A SECOND SUBMERSIBLE TO RECOVER ITEMS FROM THE SITE IT WAS LOST AT. IF A LOCATOR BEACON WAS INSTALLED ON THE SUB THAT WAS LOST, THERE ARE HIGHER CHANCES OF ITEM RECOVERY.

YOUR SUBMERSIBLE HAS A LIMIT ON HOW FAR IT CAN TRAVEL AS WELL, INDICATED BY "COMMS RANGE". THIS CAN BE DOUBLED WITH THE INSTALLATION OF A COMMUNICATIONS BOOSTER PART.

---

THIS PROJECT WAS ORIGINALLY STARTED OVER 1.5 YEARS AGO. IT'S FINALLY FINISHED!

CREDITS ARE INSIDE THE PROJECT AND ARE ALSO SHOWN WHEN THE GAME IS COMPLETED. MAJORITY OF THE ART IS CREATED BY ME OR

备注与谢志

https://scratch.mit.edu/projects/811805586/

开发日志

变量

loaded save version [io]

used [debug info]

 

列表

save log [io]

 

角色

Stage

代码

当按下 q 键

如果 ({$ dev?} = 1) 那么

如果 ({screen} = world) 那么

如果 ({$ free cam?} = 1) 那么

将 {x} 设为 {cam x}

将 {y} 设为 {cam y}

播放声音 tp

 

当按下 空格 键

如果 ({screen} = world) 那么

如果 ({sub lift state} = lifted) 那么

删除 {text} 的全部项目

将 {screen} 设为 sub

将 {show inventory?} 设为 0

否则

如果 ({sub loss reason} = ) 不成立 那么

执行 // dead

广播 destroy sub

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // salvage

广播 salvage items

否则

如果 ({$ dev?} = 1) 那么

如果 ({$ editor} = terrain) 那么

询问 set tile 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = prop) 那么

询问 choose prop 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = resource) 那么

询问 choose resource (mn, ni, cu, co, ag, ti) 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = wall) 那么

询问 choose wall 并等待

将 {selected object} 设为 回答

否则

将 {selected rand num} 设为 在 1 和 1000 之间取随机数

否则

如果 ({screen} = sub) 那么

如果 ({ready to launch} = 1) 那么

广播 launch

等待 按下 空格 键? 不成立

 

定义 // {comment}

 

当按下 q 键

如果 ({$ dev?} = 1) 那么

如果 ({screen} = world) 那么

如果 ({$ free cam?} = 1) 那么

将 {x} 设为 {cam x}

将 {y} 设为 {cam y}

播放声音 tp

 

当按下 空格 键

如果 ({screen} = world) 那么

如果 ({sub lift state} = lifted) 那么

删除 {text} 的全部项目

将 {screen} 设为 sub

将 {show inventory?} 设为 0

否则

如果 ({sub loss reason} = ) 不成立 那么

执行 // dead

广播 destroy sub

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // salvage

广播 salvage items

否则

如果 ({$ dev?} = 1) 那么

如果 ({$ editor} = terrain) 那么

询问 set tile 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = prop) 那么

询问 choose prop 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = resource) 那么

询问 choose resource (mn, ni, cu, co, ag, ti) 并等待

将 {selected object} 设为 回答

否则

如果 ({$ editor} = wall) 那么

询问 choose wall 并等待

将 {selected object} 设为 回答

否则

将 {selected rand num} 设为 在 1 和 1000 之间取随机数

否则

如果 ({screen} = sub) 那么

如果 ({ready to launch} = 1) 那么

广播 launch

等待 按下 空格 键? 不成立

 

定义 // {comment}

 

thumbnail

造型

thumbnail 3D chrome_cat

 

代码

当 绿旗 被点击

将 {version} 设为 1.6

移到 x:0 y:0

隐藏

 

当按下 . 键

如果 ({$ dev?} = 1) 那么

停止 全部脚本

 

当接收到 reset game to new

广播 ! reset

删除 {! loaded tiles} 的全部项目

删除 {! loaded ao x} 的全部项目

删除 {! loaded ao y} 的全部项目

删除 {! loaded fade type} 的全部项目

删除 {! loaded fade x} 的全部项目

删除 {! loaded fade y} 的全部项目

将 {! save state} 设为 new

将 {screen} 设为 menu

将 {$ dev?} 设为 0

将 {$ map view?} 设为 0

换成 thumbnail3 造型

显示

图章

播放声音 nms build error

 

当接收到 update audio

如果 ({$ dev?} = 1) 那么

将音量设为 30%

否则

将音量设为 ({sfx volume fac} * 30)%

 

当 绿旗 被点击

将 {version} 设为 1.8

移到 x:0 y:0

隐藏

 

当按下 . 键

如果 ({$ dev?} = 1) 那么

停止 全部脚本

 

当接收到 reset game to new

广播 ! reset

删除 {! loaded tiles} 的全部项目

删除 {! loaded ao x} 的全部项目

删除 {! loaded ao y} 的全部项目

删除 {! loaded fade type} 的全部项目

删除 {! loaded fade x} 的全部项目

删除 {! loaded fade y} 的全部项目

将 {! save state} 设为 new

将 {screen} 设为 menu

将 {$ dev?} 设为 0

将 {$ map view?} 设为 0

换成 thumbnail3 造型

显示

图章

播放声音 nms build error

 

当接收到 update audio

如果 ({$ dev?} = 1) 那么

将音量设为 30%

否则

将音量设为 ({sfx volume fac} * 30)%

 

main

代码

当 绿旗 被点击

移到 x:0 y:0

如果 (用户名 = awesome-llama) 那么

将 {$ dev?} 设为 1

否则

将 {$ dev?} 设为 0

将 {$ editor} 设为

将 {$ free cam?} 设为 0

将 {$ map view?} 设为 0

将 {cam x} 设为 0

将 {cam y} 设为 0

执行 reset

如果 ({! save state} = new) 那么

将 {screen} 设为 intro

将 {sub cfg index} 设为 0

广播 ! reset

广播 start audio loop

将 {time} 设为 (86400 * 2000年至今的天数)

重复执行

将 {Δt} 设为 ((86400 * 2000年至今的天数) - {time})

如果 ({Δt} > 0.2) 那么

如果 ({Δt} > 1) 那么

将 {Δt} 设为 0.01

否则

将 {Δt} 设为 0.2

将 {time} 设为 (86400 * 2000年至今的天数)

计时器归零

全部擦除

如果 (({screen} = menu) 与 ({game complete?} = 1)) 那么

换成 ravine 背景

否则

换成 {screen} 背景

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

广播 render player map

广播 render player map text

广播 update world ui

广播 render world text

否则

如果 ({$ free cam?} = 1) 那么

如果 ({$ map view?} = 1) 那么

将 {cam x} 增加 ((0.4 * (按下 d 键? - 按下 a 键?)) / {map scale})

将 {cam y} 增加 ((0.4 * (按下 w 键? - 按下 s 键?)) / {map scale})

否则

将 {cam x} 增加 (0.4 * (按下 d 键? - 按下 a 键?))

将 {cam y} 增加 (0.4 * (按下 w 键? - 按下 s 键?))

否则

广播 sub physics

广播 update camera

广播 mouse position

如果 ({$ map view?} = 1) 那么

广播 render water bg

广播 render ship for map

广播 render dev map

广播 render dev map overlay

广播 render world text

广播 render debug info

否则

广播 chunk handler

广播 render water bg

广播 render props

广播 render resources

广播 render world items

广播 render light rays

广播 update fish

广播 update particles

广播 render submersible

广播 render breakable walls

广播 render tiles

广播 render fade

广播 render water foreground

广播 render water edge

广播 update lighting

广播 render vignette

广播 render world overlay

广播 update world ui

广播 render world text

广播 monitor achievements

广播 explore player map

如果 ({$ dev?} = 1) 那么

广播 render debug info

广播 render tile preview

如果 ({$ dev?} = 1) 那么

广播 check for tile placement

否则

广播 update ui

如果 ({screen} = menu) 那么

广播 render menu text

否则

如果 ({screen} = vehicles) 那么

广播 render submersible icons

广播 render vehicles text

否则

如果 ({screen} = parts) 那么

广播 render parts list

广播 render parts text

否则

如果 ({screen} = sub) 那么

广播 render submersible for upgrade screen

广播 render sub slots

广播 render parts list for sub

广播 render sub text

否则

如果 ({screen} = achievements) 那么

广播 render achievements

广播 render achievements text

否则

如果 ({screen} = settings) 那么

广播 render settings text

否则

如果 ({screen} = save) 那么

广播 save settings text

否则

如果 ({screen} = credits) 那么

广播 run credits

否则

如果 ({screen} = intro) 那么

广播 intro text

否则

广播 tutorial text

广播 render black cover

 

当按下 e 键

广播 toggle inventory

 

当按下 u 键

执行 set editor wall

 

当按下 f 键

执行 // toggle free cam

如果 ({$ free cam?} = 0) 那么

如果 ({$ dev?} = 1) 那么

将 {$ free cam?} 设为 1

将 {cam x} 设为 {x}

将 {cam y} 设为 {y}

将 {cam chunk x} 设为 (向下取整((({cam x} + 6) / 16)) - 1)

将 {cam chunk y} 设为 (向下取整((({cam y} + 8) / 16)) - 1)

将 {prop thrust} 设为 0

否则

将 {$ free cam?} 设为 0

将 {cam chunk x} 设为

将 {cam chunk y} 设为

 

当按下 r 键

执行 set editor terrain

 

当按下 t 键

执行 set editor prop

 

当按下 y 键

如果 那么

执行 set editor resource

 

当按下 i 键

广播 toggle waypoints

 

当按下 p 键

广播 add waypoint

 

当按下 l 键

广播 toggle light

 

当按下 m 键

如果 (({$ free cam?} = 1) 与 ({$ dev?} = 1)) 那么

如果 ({$ map view?} = 1) 那么

将 {$ map view?} 设为 0

否则

将 {$ map view?} 设为 1

否则

广播 toggle player map

 

当接收到 toggle waypoints

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub scanner} > 0) 那么

如果 ({show waypoints?} = 0) 那么

如果 ({battery} > 0) 那么

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 1

将 showing waypoints 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_02_9344E057

否则

执行 add text no power

否则

将 {show waypoints?} 设为 0

将 waypoints hidden 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_02_9344E057

否则

将 {show waypoints?} 设为 0

执行 add text no scanner installed

 

当接收到 start audio loop

执行 // audio loop needs to be separate to prevent lag

重复执行

将音量设为 ({sfx volume fac} * 100)%

广播 update audio

等待 0 秒

 

当接收到 ! reset

将 {$ map view?} 设为 0

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

将 {game complete?} 设为 0

将 {player map?} 设为 0

将 {sfx volume fac} 设为 1

将 {music volume fac} 设为 1

将 {low quality?} 设为 0

执行 sanity check

 

当接收到 mouse position

如果 ({$ map view?} = 1) 那么

将 {mouse x} 设为 向下取整(((鼠标的x坐标 / ({# tile size} * {map scale})) + {cam x}))

将 {mouse y} 设为 向下取整(((鼠标的y坐标 / ({# tile size} * {map scale})) + {cam y}))

否则

将 {mouse x} 设为 向下取整(((鼠标的x坐标 / {# tile size}) + {cam x}))

将 {mouse y} 设为 向下取整(((鼠标的y坐标 / {# tile size}) + {cam y}))

将 {mouse chunk x} 设为 向下取整(({mouse x} / {# chunk size}))

将 {mouse chunk y} 设为 向下取整(({mouse y} / {# chunk size}))

 

当 绿旗 被点击

移到 x:0 y:0

如果 (用户名 = awesome-llama) 那么

将 {$ dev?} 设为 1

否则

将 {$ dev?} 设为 0

将 {$ editor} 设为

将 {$ free cam?} 设为 0

将 {$ map view?} 设为 0

将 {cam x} 设为 0

将 {cam y} 设为 0

执行 reset

如果 ({! save state} = new) 那么

将 {screen} 设为 intro

将 {sub cfg index} 设为 0

广播 ! reset

广播 start audio loop

将 {time} 设为 (86400 * 2000年至今的天数)

重复执行

将 {Δt} 设为 ((86400 * 2000年至今的天数) - {time})

如果 ({Δt} > 0.2) 那么

如果 ({Δt} > 1) 那么

将 {Δt} 设为 0.01

否则

将 {Δt} 设为 0.2

将 {time} 设为 (86400 * 2000年至今的天数)

计时器归零

全部擦除

如果 (({screen} = menu) 与 ({game complete?} = 1)) 那么

换成 ravine 背景

否则

换成 {screen} 背景

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

广播 render player map

广播 render player map text

广播 update world ui

广播 render world text

否则

如果 ({$ free cam?} = 1) 那么

如果 ({$ map view?} = 1) 那么

将 {cam x} 增加 ((0.4 * (按下 d 键? - 按下 a 键?)) / {map scale})

将 {cam y} 增加 ((0.4 * (按下 w 键? - 按下 s 键?)) / {map scale})

否则

将 {cam x} 增加 (0.4 * (按下 d 键? - 按下 a 键?))

将 {cam y} 增加 (0.4 * (按下 w 键? - 按下 s 键?))

否则

广播 sub physics

广播 update camera

广播 mouse position

如果 ({$ map view?} = 1) 那么

广播 render water bg

广播 render ship for map

广播 render dev map

广播 render dev map overlay

广播 render world text

广播 render debug info

否则

广播 chunk handler

广播 render water bg

广播 render props

广播 render resources

广播 render world items

广播 render light rays

广播 update fish

广播 update particles

广播 render submersible

广播 render breakable walls

广播 render tiles

广播 render fade

广播 render water foreground

广播 render water edge

广播 update lighting

广播 render vignette

广播 render world overlay

广播 update world ui

广播 render world text

广播 monitor achievements

广播 explore player map

如果 ({$ dev?} = 1) 那么

广播 render debug info

广播 render tile preview

如果 ({$ dev?} = 1) 那么

广播 check for tile placement

否则

广播 update ui

如果 ({screen} = menu) 那么

广播 render menu text

否则

如果 ({screen} = vehicles) 那么

广播 render submersible icons

广播 render vehicles text

否则

如果 ({screen} = parts) 那么

广播 render parts list

广播 render parts text

否则

如果 ({screen} = sub) 那么

广播 render submersible for upgrade screen

广播 render sub slots

广播 render parts list for sub

广播 render sub text

否则

如果 ({screen} = achievements) 那么

广播 render achievements

广播 render achievements text

否则

如果 ({screen} = settings) 那么

广播 render settings text

否则

如果 ({screen} = save) 那么

广播 save settings text

否则

如果 ({screen} = credits) 那么

广播 run credits

否则

如果 ({screen} = intro) 那么

广播 intro text

否则

广播 tutorial text

广播 render black cover

 

当按下 f 键

执行 // toggle free cam

如果 ({$ free cam?} = 0) 那么

如果 ({$ dev?} = 1) 那么

将 {$ free cam?} 设为 1

将 {cam x} 设为 {x}

将 {cam y} 设为 {y}

将 {cam chunk x} 设为 (向下取整((({cam x} + 6) / 16)) - 1)

将 {cam chunk y} 设为 (向下取整((({cam y} + 8) / 16)) - 1)

将 {prop thrust} 设为 0

否则

将 {$ free cam?} 设为 0

将 {cam chunk x} 设为

将 {cam chunk y} 设为

 

当按下 r 键

执行 set editor terrain

 

当按下 t 键

执行 set editor prop

 

当按下 m 键

如果 (({$ free cam?} = 1) 与 ({$ dev?} = 1)) 那么

如果 ({$ map view?} = 1) 那么

将 {$ map view?} 设为 0

否则

将 {$ map view?} 设为 1

否则

广播 toggle player map

将 {$ map view?} 设为 0

 

当按下 i 键

广播 toggle waypoints

 

当按下 p 键

广播 add waypoint

 

当按下 l 键

广播 toggle light

 

当按下 u 键

执行 set editor wall

 

当按下 e 键

广播 toggle inventory

 

当接收到 start audio loop

执行 // audio loop needs to be separate to prevent lag

重复执行

将音量设为 ({sfx volume fac} * 100)%

广播 update audio

等待 0 秒

 

当接收到 ! reset

将 {$ map view?} 设为 0

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

将 {game complete?} 设为 0

将 {player map?} 设为 0

将 {sfx volume fac} 设为 1

将 {music volume fac} 设为 1

将 {low quality?} 设为 0

执行 sanity check

 

当接收到 mouse position

如果 ({$ map view?} = 1) 那么

将 {mouse x} 设为 向下取整(((鼠标的x坐标 / ({# tile size} * {map scale})) + {cam x}))

将 {mouse y} 设为 向下取整(((鼠标的y坐标 / ({# tile size} * {map scale})) + {cam y}))

否则

将 {mouse x} 设为 向下取整(((鼠标的x坐标 / {# tile size}) + {cam x}))

将 {mouse y} 设为 向下取整(((鼠标的y坐标 / {# tile size}) + {cam y}))

将 {mouse chunk x} 设为 向下取整(({mouse x} / {# chunk size}))

将 {mouse chunk y} 设为 向下取整(({mouse y} / {# chunk size}))

 

当接收到 update camera

如果 ({end animation state} = holding) 那么

将 {cam x} 增加 ({Δt} * ({x} - {cam x}))

将 {cam y} 增加 ({Δt} * ({y} - {cam y}))

否则

如果 ({end animation state} = pulling) 不成立 那么

将 {cam x} 设为 {x}

将 {cam y} 设为 {y}

如果 ({y} > -45) 那么

如果 ({cam x} > 190) 那么

将 {cam x} 设为 190

否则

如果 ({cam x} < -190) 那么

将 {cam x} 设为 -190

 

当接收到 update camera

如果 ({end animation state} = holding) 那么

将 {cam x} 增加 ({Δt} * ({x} - {cam x}))

将 {cam y} 增加 ({Δt} * ({y} - {cam y}))

否则

如果 ({end animation state} = pulling) 不成立 那么

将 {cam x} 设为 {x}

将 {cam y} 设为 {y}

如果 ({$ dev?} = 1) 那么

如果 按下 c 键? 那么

将 {cam x} 增加 (0.015 * 鼠标的x坐标)

将 {cam y} 增加 (0.015 * 鼠标的y坐标)

如果 ({y} > -45) 那么

如果 ({cam x} > 190) 那么

将 {cam x} 设为 190

否则

如果 ({cam x} < -190) 那么

将 {cam x} 设为 -190

当接收到 toggle waypoints

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub scanner} > 0) 那么

如果 ({show waypoints?} = 0) 那么

如果 ({battery} > 0) 那么

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 1

将 showing waypoints 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_02_9344E057

否则

执行 add text no power

否则

将 {show waypoints?} 设为 0

将 waypoints hidden 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_02_9344E057

否则

将 {show waypoints?} 设为 0

执行 add text no scanner installed

 

定义 sanity check

如果 ((0 = {chunk data} 的项目数 除以 16 的余数) 与 (0 = {chunk data} 的项目数 除以 256 的余数)) 不成立 那么

执行 ​​warn​​

执行 add text sanity check: chunk data list size is wrong

播放声音 error

 

定义 reset

将 {# tile size} 设为 24

将 {# chunk size} 设为 16

将 {# loaded width} 设为 (3 * {# chunk size})

将 {# storage per slot} 设为 10

将 {cam chunk x} 设为

将 {cam chunk y} 设为

将 {selected object} 设为

删除 {text} 的全部项目

 

定义 set editor {name}

如果 ({$ dev?} = 1) 那么

如果 ({screen} = world) 那么

如果 ({$ editor} = {name}) 那么

将 {$ editor} 设为

否则

将 {$ editor} 设为 {name}

将 {selected object} 设为

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 // {comment}

 

定义 sanity check

如果 ((0 = {chunk data} 的项目数 除以 16 的余数) 与 (0 = {chunk data} 的项目数 除以 256 的余数)) 不成立 那么

执行 ​​warn​​

执行 add text sanity check: chunk data list size is wrong

播放声音 error

 

定义 reset

将 {# tile size} 设为 24

将 {# chunk size} 设为 16

将 {# loaded width} 设为 (3 * {# chunk size})

将 {# storage per slot} 设为 10

将 {cam chunk x} 设为

将 {cam chunk y} 设为

将 {selected object} 设为

删除 {text} 的全部项目

 

定义 set editor {name}

如果 ({$ dev?} = 1) 那么

如果 ({screen} = world) 那么

如果 ({$ editor} = {name}) 那么

将 {$ editor} 设为

否则

将 {$ editor} 设为 {name}

将 {selected object} 设为

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 // {comment}

 

submersible

代码

当 绿旗 被点击

将旋转方式设为 左右翻转

移到 x:0 y:0

面向 90 方向

将笔的粗细设为4

将笔的颜色设为#ff00bb

删除 {@ hull types} 的全部项目

执行 create hull type tiny size 0.9 0.6 slots 5 mass 50 drag 25 strength 5

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti)

执行 create hull type small size 1.8 0.8 slots 7 mass 90 drag 45 strength 8

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 15 5

执行 create hull type medium 1 size 2.2 1.2 slots 9 mass 130 drag 50 strength 12

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 10 5 8

执行 create hull type medium 2 size 1.9 1.2 slots 10 mass 140 drag 70 strength 12

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 10 10 10

执行 create hull type large 1 size 2.7 1.6 slots 12 mass 200 drag 75 strength 18

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 18 10 10

执行 create hull type large 2 size 2.3 1.8 slots 15 mass 220 drag 80 strength 20

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 12 10 10

 

当 绿旗 被点击

等待 0 秒

重复执行

等待 (({y} > 0) 与 ({vy} > 0.8))

播放声音 surfacing1 等待播完

 

当接收到 render submersible

执行 render lost subs

清除图形特效

将 颜色 特效设定为 {^ sub colour}

将 亮度 特效设定为 ((20 * {world brightness}) - 20)

换成 blank 造型

将大小设为 1000000

换成 debug 造型

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

如果 那么

执行 // collision points visualisation

面向 darkness overlay 的 light direction 方向

换成 (5 + {^ selected hull}) 造型

将大小设为 200

图章

换成 icon 造型

清除图形特效

执行 //

 

当接收到 sub physics

将 {sub loss reason} 设为

将 {sub range} 设为 0

如果 ({sub lift state} = ) 那么

如果 ({y} > -1) 那么

如果 ({y} < 0.1) 那么

如果 ({speed} < 7) 那么

如果 (绝对值({x}) < 1.4) 那么

将 {sub lift state} 设为 connecting

将 {show inventory?} 设为 0

执行 controllable physics

否则

如果 ({sub lift state} = connecting) 那么

将 {speed} 设为 0

将 {vx} 设为 0

将 {vy} 设为 0

将 {prop thrust} 设为 (0.9 * {prop thrust})

将 {x} 设为 (0.96 * {x})

将 {y} 设为 (0.96 * {y})

如果 (绝对值({y}) < 0.05) 那么

如果 (绝对值({x}) < 0.05) 那么

将 {x} 设为 0

将 {y} 设为 0

将 {sub lift state} 设为 lifting

播放声音 winch

否则

如果 ({sub lift state} = lifting) 那么

如果 ({y} < 3) 那么

将 {y} 增加 ({Δt} * 1.2)

否则

将 {y} 设为 3

将 {sub lift state} 设为 lifted

将 {battery} 设为 {^ sub battery capacity}

将 {health} 设为 {^ sub max health}

广播 deposit items in ship

广播 update display inventory

将 repaired, recharged and deposited collected items 加入 {text}

将 10 加入 {text}

否则

如果 ({sub lift state} = lowering) 那么

如果 ({y} < -0.1) 那么

将 {sub lift state} 设为 released

将 {vx} 设为 0

将 {vy} 设为 0

否则

将 {y} 增加 ({Δt} * -1.2)

否则

如果 ({sub lift state} = released) 那么

如果 (({y} < -1.5) 或 (绝对值({x}) > 1.4)) 那么

将 {sub lift state} 设为

将 {= launches} 增加 1

执行 controllable physics

否则

如果 ({sub lift state} = lifted) 那么

如果 (按下 s 键? 或 按下 ↓ 键?) 那么

将 {sub lift state} 设为 lowering

播放声音 winch down

 

当接收到 ! reset

将 {funds} 设为 500

将 {sub lift state} 设为 lifted

将 {x} 设为 0

将 {y} 设为 3

将 {vx} 设为 0

将 {vy} 设为 0

删除 {@ submersible storage} 的全部项目

删除 {@ installed parts} 的全部项目

删除 {@ submersible storage} 的全部项目

将 {= launches} 设为 0

将 {= record depth} 设为 0

将 {= total distance} 设为 0

将 {= total mission time} 设为 0

将 {= funds spent} 设为 0

将 {= total resources mined} 设为 0

将 {= submersibles lost} 设为 0

将 {= submersibles salvaged} 设为 0

删除 {@ sub configs pointers} 的全部项目

删除 {@ sub configs} 的全部项目

删除 {lost sub data} 的全部项目

删除 {lost sub seen parts} 的全部项目

执行 //

删除 {= owned hulls} 的全部项目

执行 // these are the selection ids

将 1 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

执行 //

 

当接收到 update sub specs

删除 {available functions} 的全部项目

将 {^ sub propulsion f} 设为 0

将 {^ sub thrust pwr consumption} 设为 0

将 {^ sub storage slots} 设为 0

将 {^ sub light} 设为 0

将 {^ sub drill} 设为 0

将 {^ sub arm} 设为 0

将 {^ sub scanner} 设为 0

将 {^ sub battery capacity} 设为 0

将 {^ sub comms range} 设为 250

将 {^ sub drill pwr consumption} 设为 0

将 {^ sub drill range} 设为 50

将 {^ sub elt} 设为 0

将 {^ sub mapper} 设为 0

如果 ({^ selected hull} = 0) 那么

将 {sub index} 设为 0

将 {^ sub size x} 设为 0

将 {^ sub size y} 设为 0

将 {^ sub mass} 设为 100

将 {^ sub drag} 设为 100

将 {^ sub max health} 设为 1

将 {health} 设为 1

将 {battery} 设为 1

将 {ready to launch} 设为 0

将 {^ sub battery capacity} 设为 1

否则

将 {sub index} 设为 (14 * ({^ selected hull} - 1))

执行 // name skipped

将 {^ sub size x} 设为 {@ hull types} 的第 (2 + {sub index}) 项

将 {^ sub size y} 设为 {@ hull types} 的第 (3 + {sub index}) 项

执行 // slots skipped

将 {^ sub mass} 设为 {@ hull types} 的第 (5 + {sub index}) 项

将 {^ sub drag} 设为 {@ hull types} 的第 (6 + {sub index}) 项

将 {^ sub max health} 设为 {@ hull types} 的第 (7 + {sub index}) 项

执行 //

执行 add available function map

执行 check all installed parts

将 {health} 设为 {^ sub max health}

将 {battery} 设为 {^ sub battery capacity}

执行 ready to launch?

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

 

当接收到 render submersible for upgrade screen

将 颜色 特效设定为 {^ sub colour}

换成 (5 + {^ selected hull}) 造型

将大小设为 200

面向 90 方向

移到 x:140 y:72

图章

换成 icon 造型

清除图形特效

 

当接收到 save sub config

执行 save sub config

 

当接收到 render submersible icons

执行 render sub config icons

换成 icon 造型

 

当接收到 render parts list

将 {hovered hull} 设为

执行 render shop hull 1 at 165 94

执行 render shop hull 2 at 165 66

执行 render shop hull 3 at 165 30

执行 render shop hull 4 at 165 -8

执行 render shop hull 5 at 165 -56

执行 render shop hull 6 at 165 -110

换成 icon 造型

清除图形特效

执行 //

 

当接收到 destroy sub

执行 // pressed space

执行 // spawn destroyed version

执行 destroy sub

 

当 绿旗 被点击

将旋转方式设为 左右翻转

移到 x:0 y:0

面向 90 方向

将笔的粗细设为4

将笔的颜色设为#ff00bb

删除 {@ hull types} 的全部项目

执行 create hull type tiny size 0.9 0.6 slots 5 mass 50 drag 25 strength 5

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti)

执行 create hull type small size 1.8 0.8 slots 7 mass 90 drag 45 strength 8

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 15 5

执行 create hull type medium 1 size 2.2 1.2 slots 9 mass 130 drag 50 strength 12

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 10 5 8

执行 create hull type medium 2 size 1.9 1.2 slots 10 mass 140 drag 70 strength 12

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 10 10 10

执行 create hull type large 1 size 2.7 1.6 slots 12 mass 200 drag 75 strength 18

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 18 10 10

执行 create hull type large 2 size 2.3 1.8 slots 15 mass 220 drag 80 strength 20

执行 add hull costs 1 resources (mn, ni, cu, co, ag, ti) 12 10 10

 

当接收到 update audio

将音量设为 (100 * {sfx volume fac})%

当 绿旗 被点击

等待 0 秒

重复执行

等待 (({y} > 0) 与 ({vy} > 0.8))

播放声音 surfacing1 等待播完

 

定义 create hull type {name} size {sx} {sy} slots {slots} mass {mass} drag {drag} strength {strength}

将 {name} 加入 {@ hull types}

将 {sx} 加入 {@ hull types}

将 {sy} 加入 {@ hull types}

将 {slots} 加入 {@ hull types}

将 {mass} 加入 {@ hull types}

将 {drag} 加入 {@ hull types}

将 {strength} 加入 {@ hull types}

 

定义 add hull costs {purchase cost fac} resources (mn, ni, cu, co, ag, ti) {mn} {ni} {cu} {co} {ag} {ti}

执行 // there shouldn't be any cost modifiers

将 {purchase cost} 设为 (30 * {mn})

将 {purchase cost} 增加 (45 * {ni})

将 {purchase cost} 增加 (70 * {cu})

将 {purchase cost} 增加 (90 * {co})

将 {purchase cost} 增加 (140 * {ag})

将 {purchase cost} 增加 (180 * {ti})

将 (5 * 四舍五入((({purchase cost fac} * {purchase cost}) / 5))) 加入 {@ hull types}

将 {mn} 加入 {@ hull types}

将 {ni} 加入 {@ hull types}

将 {cu} 加入 {@ hull types}

将 {co} 加入 {@ hull types}

将 {ag} 加入 {@ hull types}

将 {ti} 加入 {@ hull types}

 

定义 get tile type at {x} {y}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({x} / {# chunk size})) 和 , 和 向下取整(({y} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为

否则

如果 {wall data} 包含 连接 连接 {x} 和 _ 和 {y} ? 那么

将 {tile type} 设为 wall

否则

将 {tile type} 设为 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 controllable physics

将 {sub range} 设为 平方根((({x} * {x}) + ({y} * {y})))

如果 ({health} > 0) 不成立 那么

将 {sub loss reason} 设为 destroyed

否则

如果 ({battery} > 0) 不成立 那么

将 {sub loss reason} 设为 no power

否则

如果 (({sub range} / {^ sub comms range}) > 1.15) 那么

将 {sub loss reason} 设为 connection lost

将 {dir of travel} 设为 (atan(({vx} / {vy})) + (180 * ({vy} < 0)))

将 {speed} 设为 平方根((({vx} * {vx}) + ({vy} * {vy})))

将 {prop thrust} 设为 (0.9 * {prop thrust})

将 {fx} 设为 0

将 {fy} 设为 0

如果 ({y} > -0.1) 那么

执行 // water surface

如果 ({vy} > 0) 那么

将 {fy} 增加 ({^ sub mass} * -10)

否则

将 {fy} 增加 ({^ sub mass} * -5)

否则

将 {= total mission time} 增加 {Δt}

如果 (((按下 w 键? 或 按下 s 键?) 或 (按下 d 键? 或 按下 a 键?)) 或 ((({$ map view?} = 0) 与 ({player map?} = 0)) 与 ((按下 ↑ 键? 或 按下 ↓ 键?) 或 (按下 ← 键? 或 按下 → 键?)))) 那么

如果 ({sub loss reason} = ) 那么

将 {prop dir} 设为 (0.8 * ((按下 w 键? 或 按下 ↑ 键?) - (按下 s 键? 或 按下 ↓ 键?)))

将 {prop dir} 设为 (atan(((1 * ((按下 d 键? 或 按下 → 键?) - (按下 a 键? 或 按下 ← 键?))) / {prop dir})) + (180 * ({prop dir} < 0)))

将 {prop thrust} 增加 0.1

否则

如果 {text} 包含 连接 {sub loss reason} 和 ! ? 不成立 那么

将 连接 {sub loss reason} 和 ! 加入 {text}

将 5 加入 {text}

否则

如果 (绝对值({vx}) < 0.1) 那么

将 {vx} 设为 0

如果 (绝对值({vy}) < 0.1) 那么

将 {vy} 设为 0

执行 add force ({^ sub propulsion f} * {prop thrust}) in dir {prop dir}

执行 add force ({^ sub drag} * 绝对值(({speed} * {speed}))) in dir ({dir of travel} - 180)

将 {battery} 增加 (0 - ({Δt} * ({prop thrust} * {^ sub thrust pwr consumption})))

如果 ({battery} < 0) 那么

将 {battery} 设为 0

将 {vx} 增加 ({Δt} * ({fx} / {^ sub mass}))

将 {vy} 增加 ({Δt} * ({fy} / {^ sub mass}))

执行 // prevent escape

如果 ({y} > -16) 那么

如果 ({x} > 200) 那么

将 {x} 设为 200

将 {vx} 设为 0

否则

如果 ({x} < -200) 那么

将 {x} 设为 -200

将 {vx} 设为 0

执行 // update pos and do collisions

执行 // x

将 {x} 增加 ({Δt} * {vx})

将 {collisions counted} 设为 0

如果 不成立 那么

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / -2)

执行 check collision at 0 ({^ sub size y} / 2)

执行 check collision at 0 ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / 2) 0

执行 check collision at ({^ sub size x} / -2) 0

如果 ({collisions counted} > 0) 那么

执行 // update damage and play sound

如果 (绝对值({vx}) > 1.5) 那么

如果 ({health} > 0) 那么

将 {health} 增加 (1.5 - 绝对值({vx}))

播放声音 hit

广播 thud

将 {vy} 设为 (0.5 * {vy})

执行 // reset

将 {x} 增加 (0 - ({Δt} * {vx}))

将 {vx} 设为 0

执行 // friction

将 {vy} 增加 ({Δt} * (-2 * {vy}))

执行 // y

将 {y} 增加 ({Δt} * {vy})

将 {collisions counted} 设为 0

如果 不成立 那么

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / -2)

执行 check collision at 0 ({^ sub size y} / 2)

执行 check collision at 0 ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / 2) 0

执行 check collision at ({^ sub size x} / -2) 0

如果 ({collisions counted} > 0) 那么

执行 // update damage and play sound

如果 (绝对值({vy}) > 1.5) 那么

如果 ({health} > 0) 那么

将 {health} 增加 (1.5 - 绝对值({vy}))

播放声音 hit

广播 thud

将 {vx} 设为 (0.5 * {vx})

执行 // reset

将 {y} 增加 (0 - ({Δt} * {vy}))

将 {vy} 设为 0

执行 // friction

将 {vx} 增加 ({Δt} * (-2 * {vx}))

如果 ({y} > -50) 那么

执行 // limit x

如果 ({x} < -200) 那么

将 {vx} 设为 0

将 {x} 设为 -200

否则

如果 ({x} > 200) 那么

将 {vx} 设为 0

将 {x} 设为 200

如果 ({health} < 0) 那么

执行 // health decremented above

将 {^ sub drag} 设为 (10 * {^ sub drag})

将 {health} 设为 0

将 your vehicle is destroyed 加入 {text}

将 5 加入 {text}

播放声音 damage (blender foundation)

执行 //

 

清除图形特效

 

执行 // update count

将 {@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项替换为 (4 + {@ installed parts} 的项目数)

执行 // update pointers after

 

定义 add force {f} in dir {dir}

将 {fx} 增加 ({f} * sin({dir}))

将 {fy} 增加 ({f} * cos({dir}))

 

定义 check all installed parts

 

删除 {@ submersible storage} 的全部项目

执行 // delete owned hull

将 {= owned hulls} 的第 {^ selected hull} 项替换为 0

执行 // gameplay stuff:

删除 {text} 的全部项目

将 {screen} 设为 vehicles

将 {x} 设为 0

将 {y} 设为 3

将 {sub lift state} 设为 lifted

将 {sub cfg index} 设为 0

将 {= submersibles lost} 设为 1

 

定义 render shop hull {id} at {x} {y}

换成 (5 + {id}) 造型

移到 x:{x} y:{y}

如果 (1 = {unlocked hulls} 的第 {id} 项) 那么

如果 碰到 鼠标指针? 那么

将 {hovered hull} 设为 {id}

将 亮度 特效设定为 100

将 虚像 特效设定为 99

重复执行 5 次

将大小增加 8

将 鱼眼 特效增加 10

图章

清除图形特效

如果 (1 = {= owned hulls} 的第 {id} 项) 那么

将 虚像 特效设定为 70

将大小设为 200

图章

否则

将 亮度 特效设定为 -100

将 虚像 特效设定为 80

将大小设为 200

图章

 

定义 ready to launch?

将 {ready to launch} 设为 0

如果 (({^ selected hull} > 0) 与 (({^ sub propulsion f} > 0) 与 ({^ sub battery capacity} > 0))) 那么

如果 ({= owned hulls} 的第 {^ selected hull} 项 = 1) 那么

如果 ({@ installed parts} 的项目数 > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 不成立 那么

将 {ready to launch} 设为 1

执行 // list to keep track of owned

删除 {temp parts} 的全部项目

 

定义 add available function {name}

如果 {available functions} 包含 {name} ? 不成立 那么

将 {name} 加入 {available functions}

 

当接收到 render submersible

执行 render lost subs

清除图形特效

将 颜色 特效设定为 {^ sub colour}

将 亮度 特效设定为 ((20 * {world brightness}) - 20)

换成 blank 造型

将大小设为 1000000

换成 debug 造型

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

如果 那么

执行 // collision points visualisation

面向 darkness overlay 的 light direction 方向

换成 (5 + {^ selected hull}) 造型

将大小设为 200

图章

换成 icon 造型

清除图形特效

执行 //

 

当接收到 sub physics

将 {sub loss reason} 设为

将 {sub range} 设为 0

如果 ({sub lift state} = ) 那么

如果 ({y} > -1) 那么

如果 ({y} < 0.1) 那么

如果 ({speed} < 7) 那么

如果 (绝对值({x}) < 1.4) 那么

将 {sub lift state} 设为 connecting

将 {show inventory?} 设为 0

执行 controllable physics

否则

如果 ({sub lift state} = connecting) 那么

将 {speed} 设为 0

将 {vx} 设为 0

将 {vy} 设为 0

将 {prop thrust} 设为 (0.9 * {prop thrust})

将 {x} 设为 (0.96 * {x})

将 {y} 设为 (0.96 * {y})

如果 (绝对值({y}) < 0.05) 那么

如果 (绝对值({x}) < 0.05) 那么

将 {x} 设为 0

将 {y} 设为 0

将 {sub lift state} 设为 lifting

播放声音 winch

否则

如果 ({sub lift state} = lifting) 那么

如果 ({y} < 3) 那么

将 {y} 增加 ({Δt} * 1.2)

否则

将 {y} 设为 3

将 {sub lift state} 设为 lifted

将 {battery} 设为 {^ sub battery capacity}

将 {health} 设为 {^ sub max health}

广播 deposit items in ship

广播 update display inventory

将 repaired, recharged and deposited collected items 加入 {text}

将 10 加入 {text}

否则

如果 ({sub lift state} = lowering) 那么

如果 ({y} < -0.1) 那么

将 {sub lift state} 设为 released

将 {vx} 设为 0

将 {vy} 设为 0

否则

将 {y} 增加 ({Δt} * -1.2)

否则

如果 ({sub lift state} = released) 那么

如果 (({y} < -1.5) 或 (绝对值({x}) > 1.4)) 那么

将 {sub lift state} 设为

将 {= launches} 增加 1

执行 controllable physics

否则

如果 ({sub lift state} = lifted) 那么

如果 (按下 s 键? 或 按下 ↓ 键?) 那么

将 {sub lift state} 设为 lowering

播放声音 winch down

 

当接收到 update sub specs

删除 {available functions} 的全部项目

将 {^ sub propulsion f} 设为 0

将 {^ sub thrust pwr consumption} 设为 0

将 {^ sub storage slots} 设为 0

将 {^ sub light} 设为 0

将 {^ sub drill} 设为 0

将 {^ sub arm} 设为 0

将 {^ sub scanner} 设为 0

将 {^ sub battery capacity} 设为 0

将 {^ sub comms range} 设为 250

将 {^ sub drill pwr consumption} 设为 0

将 {^ sub drill range} 设为 50

将 {^ sub elt} 设为 0

将 {^ sub mapper} 设为 0

如果 ({^ selected hull} = 0) 那么

将 {sub index} 设为 0

将 {^ sub size x} 设为 0

将 {^ sub size y} 设为 0

将 {^ sub mass} 设为 100

将 {^ sub drag} 设为 100

将 {^ sub max health} 设为 1

将 {health} 设为 1

将 {battery} 设为 1

将 {ready to launch} 设为 0

将 {^ sub battery capacity} 设为 1

否则

将 {sub index} 设为 (14 * ({^ selected hull} - 1))

执行 // name skipped

将 {^ sub size x} 设为 {@ hull types} 的第 (2 + {sub index}) 项

将 {^ sub size y} 设为 {@ hull types} 的第 (3 + {sub index}) 项

执行 // slots skipped

将 {^ sub mass} 设为 {@ hull types} 的第 (5 + {sub index}) 项

将 {^ sub drag} 设为 {@ hull types} 的第 (6 + {sub index}) 项

将 {^ sub max health} 设为 {@ hull types} 的第 (7 + {sub index}) 项

执行 //

执行 add available function map

执行 check all installed parts

将 {health} 设为 {^ sub max health}

将 {battery} 设为 {^ sub battery capacity}

执行 ready to launch?

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

 

当接收到 render submersible for upgrade screen

将 颜色 特效设定为 {^ sub colour}

换成 (5 + {^ selected hull}) 造型

将大小设为 200

面向 90 方向

移到 x:140 y:72

图章

换成 icon 造型

清除图形特效

 

当接收到 ! reset

将 {funds} 设为 500

将 {sub lift state} 设为 lifted

将 {x} 设为 0

将 {y} 设为 3

将 {vx} 设为 0

将 {vy} 设为 0

删除 {@ submersible storage} 的全部项目

删除 {@ installed parts} 的全部项目

删除 {@ submersible storage} 的全部项目

将 {= launches} 设为 0

将 {= record depth} 设为 0

将 {= total distance} 设为 0

将 {= total mission time} 设为 0

将 {= funds spent} 设为 0

将 {= total resources mined} 设为 0

将 {= submersibles lost} 设为 0

将 {= submersibles salvaged} 设为 0

删除 {@ sub configs pointers} 的全部项目

删除 {@ sub configs} 的全部项目

删除 {lost sub data} 的全部项目

删除 {lost sub seen parts} 的全部项目

执行 //

删除 {= owned hulls} 的全部项目

执行 // these are the selection ids

将 1 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

将 0 加入 {= owned hulls}

执行 //

 

当接收到 render submersible icons

执行 render sub config icons

换成 icon 造型

 

当接收到 render parts list

将 {hovered hull} 设为

执行 render shop hull 1 at 165 94

执行 render shop hull 2 at 165 66

执行 render shop hull 3 at 165 30

执行 render shop hull 4 at 165 -8

执行 render shop hull 5 at 165 -56

执行 render shop hull 6 at 165 -110

换成 icon 造型

清除图形特效

执行 //

 

当接收到 destroy sub

执行 // pressed space

执行 // spawn destroyed version

执行 destroy sub

 

当接收到 save sub config

执行 save sub config

 

当接收到 update audio

将音量设为 (100 * {sfx volume fac})%

 

定义 create hull type {name} size {sx} {sy} slots {slots} mass {mass} drag {drag} strength {strength}

将 {name} 加入 {@ hull types}

将 {sx} 加入 {@ hull types}

将 {sy} 加入 {@ hull types}

将 {slots} 加入 {@ hull types}

将 {mass} 加入 {@ hull types}

将 {drag} 加入 {@ hull types}

将 {strength} 加入 {@ hull types}

 

定义 add hull costs {purchase cost fac} resources (mn, ni, cu, co, ag, ti) {mn} {ni} {cu} {co} {ag} {ti}

执行 // there shouldn't be any cost modifiers

将 {purchase cost} 设为 (30 * {mn})

将 {purchase cost} 增加 (45 * {ni})

将 {purchase cost} 增加 (70 * {cu})

将 {purchase cost} 增加 (90 * {co})

将 {purchase cost} 增加 (140 * {ag})

将 {purchase cost} 增加 (180 * {ti})

将 (5 * 四舍五入((({purchase cost fac} * {purchase cost}) / 5))) 加入 {@ hull types}

将 {mn} 加入 {@ hull types}

将 {ni} 加入 {@ hull types}

将 {cu} 加入 {@ hull types}

将 {co} 加入 {@ hull types}

将 {ag} 加入 {@ hull types}

将 {ti} 加入 {@ hull types}

 

定义 get tile type at {x} {y}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({x} / {# chunk size})) 和 , 和 向下取整(({y} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为

否则

如果 {wall data} 包含 连接 连接 {x} 和 _ 和 {y} ? 那么

将 {tile type} 设为 wall

否则

将 {tile type} 设为 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 controllable physics

将 {sub range} 设为 平方根((({x} * {x}) + ({y} * {y})))

如果 ({health} > 0) 不成立 那么

将 {sub loss reason} 设为 destroyed

否则

如果 ({battery} > 0) 不成立 那么

将 {sub loss reason} 设为 no power

否则

如果 (({sub range} / {^ sub comms range}) > 1.15) 那么

将 {sub loss reason} 设为 connection lost

将 {dir of travel} 设为 (atan(({vx} / {vy})) + (180 * ({vy} < 0)))

将 {speed} 设为 平方根((({vx} * {vx}) + ({vy} * {vy})))

将 {prop thrust} 设为 (0.9 * {prop thrust})

将 {fx} 设为 0

将 {fy} 设为 0

如果 ({y} > -0.1) 那么

执行 // water surface

如果 ({vy} > 0) 那么

将 {fy} 增加 ({^ sub mass} * -10)

否则

将 {fy} 增加 ({^ sub mass} * -5)

否则

将 {= total mission time} 增加 {Δt}

如果 (((按下 w 键? 或 按下 s 键?) 或 (按下 d 键? 或 按下 a 键?)) 或 ((({$ map view?} = 0) 与 ({player map?} = 0)) 与 ((按下 ↑ 键? 或 按下 ↓ 键?) 或 (按下 ← 键? 或 按下 → 键?)))) 那么

如果 ({sub loss reason} = ) 那么

将 {prop dir} 设为 (0.8 * ((按下 w 键? 或 按下 ↑ 键?) - (按下 s 键? 或 按下 ↓ 键?)))

将 {prop dir} 设为 (atan(((1 * ((按下 d 键? 或 按下 → 键?) - (按下 a 键? 或 按下 ← 键?))) / {prop dir})) + (180 * ({prop dir} < 0)))

将 {prop thrust} 增加 0.1

否则

如果 {text} 包含 连接 {sub loss reason} 和 ! ? 不成立 那么

将 连接 {sub loss reason} 和 ! 加入 {text}

将 5 加入 {text}

否则

如果 (绝对值({vx}) < 0.1) 那么

将 {vx} 设为 0

如果 (绝对值({vy}) < 0.1) 那么

将 {vy} 设为 0

执行 add force ({^ sub propulsion f} * {prop thrust}) in dir {prop dir}

执行 add force ({^ sub drag} * 绝对值(({speed} * {speed}))) in dir ({dir of travel} - 180)

将 {battery} 增加 (0 - ({Δt} * ({prop thrust} * {^ sub thrust pwr consumption})))

如果 ({battery} < 0) 那么

将 {battery} 设为 0

将 {vx} 增加 ({Δt} * ({fx} / {^ sub mass}))

将 {vy} 增加 ({Δt} * ({fy} / {^ sub mass}))

执行 // prevent escape

如果 ({y} > -16) 那么

如果 ({x} > 200) 那么

将 {x} 设为 200

将 {vx} 设为 0

否则

如果 ({x} < -200) 那么

将 {x} 设为 -200

将 {vx} 设为 0

执行 // update pos and do collisions

执行 // x

将 {x} 增加 ({Δt} * {vx})

将 {collisions counted} 设为 0

如果 不成立 那么

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / -2)

执行 check collision at 0 ({^ sub size y} / 2)

执行 check collision at 0 ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / 2) 0

执行 check collision at ({^ sub size x} / -2) 0

如果 ({collisions counted} > 0) 那么

执行 // update damage and play sound

如果 (绝对值({vx}) > 1.5) 那么

如果 ({health} > 0) 那么

将 {health} 增加 (1.5 - 绝对值({vx}))

播放声音 hit

广播 thud

将 {vy} 设为 (0.5 * {vy})

执行 // reset

将 {x} 增加 (0 - ({Δt} * {vx}))

将 {vx} 设为 0

执行 // friction

将 {vy} 增加 ({Δt} * (-2 * {vy}))

执行 // y

将 {y} 增加 ({Δt} * {vy})

将 {collisions counted} 设为 0

如果 不成立 那么

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / 4) ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / 2)

执行 check collision at ({^ sub size x} / -4) ({^ sub size y} / -2)

执行 check collision at 0 ({^ sub size y} / 2)

执行 check collision at 0 ({^ sub size y} / -2)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / 2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / 3)

执行 check collision at ({^ sub size x} / -2) ({^ sub size y} / -3)

执行 check collision at ({^ sub size x} / 2) 0

执行 check collision at ({^ sub size x} / -2) 0

如果 ({collisions counted} > 0) 那么

执行 // update damage and play sound

如果 (绝对值({vy}) > 1.5) 那么

如果 ({health} > 0) 那么

将 {health} 增加 (1.5 - 绝对值({vy}))

播放声音 hit

广播 thud

将 {vx} 设为 (0.5 * {vx})

执行 // reset

将 {y} 增加 (0 - ({Δt} * {vy}))

将 {vy} 设为 0

执行 // friction

将 {vx} 增加 ({Δt} * (-2 * {vx}))

如果 ({y} > -50) 那么

执行 // limit x

如果 ({x} < -200) 那么

将 {vx} 设为 0

将 {x} 设为 -200

否则

如果 ({x} > 200) 那么

将 {vx} 设为 0

将 {x} 设为 200

如果 ({health} < 0) 那么

执行 // health decremented above

将 {^ sub drag} 设为 (10 * {^ sub drag})

将 {health} 设为 0

将 your vehicle is destroyed 加入 {text}

将 5 加入 {text}

播放声音 damage (blender foundation)

执行 //

 

定义 render sub config icons

换成 debug 造型

将大小设为 150

移到 x:-174 y:72

面向 90 方向

清除图形特效

 

定义 add force {f} in dir {dir}

将 {fx} 增加 ({f} * sin({dir}))

将 {fy} 增加 ({f} * cos({dir}))

 

定义 check all installed parts

 

定义 ready to launch?

将 {ready to launch} 设为 0

如果 (({^ selected hull} > 0) 与 (({^ sub propulsion f} > 0) 与 ({^ sub battery capacity} > 0))) 那么

如果 ({= owned hulls} 的第 {^ selected hull} 项 = 1) 那么

如果 ({@ installed parts} 的项目数 > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 不成立 那么

将 {ready to launch} 设为 1

执行 // list to keep track of owned

删除 {temp parts} 的全部项目

 

定义 destroy sub

删除 {lost sub seen parts} 的全部项目

执行 // up to 2 ELTs will affect chances

如果 ({sub loss reason} = destroyed) 那么

如果 ({^ sub elt} > 1) 那么

将 {salvage chance} 设为 1

否则

如果 ({^ sub elt} > 0) 那么

将 {salvage chance} 设为 0.7

否则

将 {salvage chance} 设为 0.2

否则

如果 ({^ sub elt} > 1) 那么

将 {salvage chance} 设为 1

否则

如果 ({^ sub elt} > 0) 那么

将 {salvage chance} 设为 0.8

否则

将 {salvage chance} 设为 0.5

执行 // general info

将 # 加入 {lost sub data}

将 {^ sub name} 加入 {lost sub data}

将 {x} 加入 {lost sub data}

将 {y} 加入 {lost sub data}

将 darkness overlay 的 方向 加入 {lost sub data}

将 {^ selected hull} 加入 {lost sub data}

将 {^ sub colour} 加入 {lost sub data}

将 四舍五入({@ installed parts} 包含 elt1 ?) 加入 {lost sub data}

执行 //

将 inv= 加入 {lost sub data}

执行 //

删除 {@ installed parts} 的全部项目

删除 {@ submersible storage} 的全部项目

执行 // delete owned hull

将 {= owned hulls} 的第 {^ selected hull} 项替换为 0

执行 // gameplay stuff:

删除 {text} 的全部项目

将 {screen} 设为 vehicles

将 {x} 设为 0

将 {y} 设为 3

将 {sub lift state} 设为 lifted

将 {sub cfg index} 设为 0

将 {= submersibles lost} 设为 1

 

定义 save sub config

执行 // first make sure that all parts before are removed

如果 ({@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项 < 3) 那么

如果 ({@ sub configs} 的项目数 > 0) 那么

将 error: corrupted sub configs! 加入 {text}

将 5 加入 {text}

执行 ​​error​​

执行 ​​log​​

停止 这个脚本

如果 ({@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项 > 4) 那么

执行 // delete parts, installed i for counting them

将 {installed count} 设为 ({@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项 - 4)

重复执行 {installed count} 次

删除 {@ sub configs} 的第 (4 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项

执行 // reset count

将 {@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项替换为 4

执行 // now update later pointers

执行 // add parts to configs

将 {i} 设为 (4 + {@ sub configs pointers} 的第 {sub cfg index} 项)

执行 // update count

将 {@ sub configs} 的第 {@ sub configs pointers} 的第 {sub cfg index} 项 项替换为 (4 + {@ installed parts} 的项目数)

执行 // update pointers after

 

定义 render shop hull {id} at {x} {y}

换成 (5 + {id}) 造型

移到 x:{x} y:{y}

如果 (1 = {unlocked hulls} 的第 {id} 项) 那么

如果 碰到 鼠标指针? 那么

将 {hovered hull} 设为 {id}

将 亮度 特效设定为 100

将 虚像 特效设定为 99

重复执行 5 次

将大小增加 8

将 鱼眼 特效增加 10

图章

清除图形特效

如果 (1 = {= owned hulls} 的第 {id} 项) 那么

将 虚像 特效设定为 70

将大小设为 200

图章

否则

将 亮度 特效设定为 -100

将 虚像 特效设定为 80

将大小设为 200

图章

 

定义 check collision at {x} {y}

执行 get tile type at 向下取整(({x} + {x})) 向下取整(({y} + {y}))

将 {collisions counted} 增加 (1 - ({tile type} = ))

定义 add available function {name}

如果 {available functions} 包含 {name} ? 不成立 那么

将 {name} 加入 {available functions}

 

定义 render lost subs

将 {lost sub nearest} 设为

将 {lost sub i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {lost sub i} 项 = #) 那么

如果 (2 > 绝对值(({x} - {lost sub data} 的第 (2 + {lost sub i}) 项))) 那么

如果 (1.5 > 绝对值(({y} - {lost sub data} 的第 (3 + {lost sub i}) 项))) 那么

将 {lost sub nearest} 设为 {lost sub i}

换成 blank 造型

将大小设为 (1 / )

换成 debug 造型

移到 x:({# tile size} * ({lost sub data} 的第 (2 + {lost sub i}) 项 - {cam x})) y:({# tile size} * ({lost sub data} 的第 (3 + {lost sub i}) 项 - {cam y}))

面向 {lost sub data} 的第 (4 + {lost sub i}) 项 方向

换成 (5 + {lost sub data} 的第 (5 + {lost sub i}) 项) 造型

将大小设为 200

将 颜色 特效设定为 {lost sub data} 的第 (6 + {lost sub i}) 项

图章

将 {lost sub i} 增加 8

将 {lost sub i} 增加 1

 

定义 // {comment}

 

定义 check collision at {x} {y}

执行 get tile type at 向下取整(({x} + {x})) 向下取整(({y} + {y}))

将 {collisions counted} 增加 (1 - ({tile type} = ))

 

定义 render lost subs

将 {lost sub nearest} 设为

将 {lost sub i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {lost sub i} 项 = #) 那么

如果 (2 > 绝对值(({x} - {lost sub data} 的第 (2 + {lost sub i}) 项))) 那么

如果 (1.5 > 绝对值(({y} - {lost sub data} 的第 (3 + {lost sub i}) 项))) 那么

将 {lost sub nearest} 设为 {lost sub i}

换成 blank 造型

将大小设为 (1 / )

换成 debug 造型

移到 x:({# tile size} * ({lost sub data} 的第 (2 + {lost sub i}) 项 - {cam x})) y:({# tile size} * ({lost sub data} 的第 (3 + {lost sub i}) 项 - {cam y}))

面向 {lost sub data} 的第 (4 + {lost sub i}) 项 方向

换成 (5 + {lost sub data} 的第 (5 + {lost sub i}) 项) 造型

将大小设为 200

将 颜色 特效设定为 {lost sub data} 的第 (6 + {lost sub i}) 项

图章

将 {lost sub i} 增加 8

将 {lost sub i} 增加 1

 

定义 // {comment}

 

world tiles

代码

当接收到 render tiles

换成 debug 造型

将大小设为 200

如果 ({low quality?} = 0) 那么

执行 render ao

执行 render tiles

如果 ({$ editor} = terrain) 那么

执行 render grid

换成 debug 造型

 

当接收到 ! reset

删除 {# tile name} 的全部项目

删除 {# tile group} 的全部项目

删除 {# tile shape} 的全部项目

执行 // names are abbreviated

执行 tile data 1

执行 tile data 2

执行 tile data 3

 

当接收到 render dev map

执行 render map

换成 debug 造型

执行 //

 

当接收到 render tile preview

如果 ({$ editor} = terrain) 那么

移到 x:-220 y:30

换成 {selected object} 造型

将大小设为 210

将 亮度 特效设定为 -100

图章

将大小设为 200

将 亮度 特效设定为 0

图章

换成 debug 造型

 

定义 render tiles

如果 ({! loaded tiles} 的项目数 = 0) 那么

停止 这个脚本

将笔的颜色设为#333333

将笔的粗细设为5

换成 large 造型

将y坐标设为 (-180 - ({cam y} 除以 1 的余数 * {# tile size}))

将 {ty} 设为 (向下取整({cam y}) + 8) 除以 {# chunk size} 的余数

重复执行 17 次

将x坐标设为 (-228 - ({cam x} 除以 1 的余数 * {# tile size}))

将 {tx} 设为 ((向下取整({cam x}) + 6) 除以 {# chunk size} 的余数 - 0)

重复执行 21 次

将 {i} 设为 (1 + (({ty} * {# loaded width}) + {tx}))

换成 {! loaded tiles} 的第 {i} 项 造型

图章

换成 large 造型

将x坐标增加 {# tile size}

将 {tx} 增加 1

将y坐标增加 {# tile size}

将 {ty} 增加 1

 

定义 render map

 

定义 add tile {name} group {group} shape {shape}

执行 // NAME: the ID

将 {name} 加入 {# tile name}

执行 // GROUP: for tile placement groups (blank to create new based on name)

如果 ({group} = ) 那么

将 {name} 加入 {# tile group}

否则

将 {group} 加入 {# tile group}

执行 // SHAPE: the shape of the tile, numbers indicate corner piece

将 {shape} 加入 {# tile shape}

 

定义 speed test

将 {output} 设为 (2000年至今的天数 * 86400)

重复执行 1000 次

执行 render tiles

将 {output} 设为 ((2000年至今的天数 * 86400) - {output})

将 {output} 设为 ((1000 / {output}) / 30)

 

清除图形特效

 

定义 render grid

换成 debug 造型

将笔的颜色设为#ffffff

将笔的透明度 设为 80

将笔的粗细设为2

移到 x:((0 - {cam x} 除以 16 的余数) * {# tile size}) y:-185

落笔

将y坐标设为 185

抬笔

移到 x:-245 y:((0 - {cam y} 除以 16 的余数) * {# tile size})

落笔

将x坐标设为 245

抬笔

移到 x:((0.5 - {cam x}) * {# tile size}) y:((0.5 - {cam y}) * {# tile size})

落笔

抬笔

移到 x:((0 - {cam x}) * {# tile size}) y:((1 - {cam y}) * {# tile size})

落笔

将x坐标设为 ((1 - {cam x}) * {# tile size})

将y坐标设为 ((0 - {cam y}) * {# tile size})

抬笔

移到 x:((16 - {cam x} 除以 16 的余数) * {# tile size}) y:-185

落笔

将y坐标设为 185

抬笔

移到 x:-245 y:((16 - {cam y} 除以 16 的余数) * {# tile size})

落笔

将x坐标设为 245

抬笔

执行 //

 

定义 tile data 1

执行 add tile dark group shape full

执行 add tile sand group surface sand shape full

执行 add tile sand1 group shape 1

执行 add tile sand2 group shape 2

执行 add tile sand3 group shape 3

执行 add tile sand4 group shape 4

执行 add tile rock group surface rock shape full

执行 add tile rock1 group shape 1

执行 add tile rock2 group shape 2

执行 add tile rock3 group shape 3

执行 add tile rock4 group shape 4

执行 add tile rock5 group surface rock shape full

执行 add tile rock6 group surface rock shape full

执行 add tile rock7 group surface rock shape full

执行 add tile rock8 group surface rock shape full

执行 add tile salt group salt shape full

执行 add tile salt1 group shape 1

执行 add tile salt2 group shape 2

执行 add tile salt3 group shape 3

执行 add tile salt4 group shape 4

执行 add tile salt5 group salt shape full

执行 add tile salt6 group salt shape full

执行 add tile salt7 group salt shape full

执行 add tile sast group surface sand shape full

执行 add tile sast1 group shape 1

执行 add tile sast2 group shape 2

执行 add tile sast3 group shape 3

执行 add tile sast4 group shape 4

执行 add tile sami group shape full

执行 add tile sami1 group shape full

执行 add tile sami2 group shape full

执行 add tile sami3 group shape full

执行 add tile rola group rock layered shape full

执行 add tile rola1 group shape 1

执行 add tile rola2 group shape 2

执行 add tile rola3 group shape 1

执行 add tile rola4 group shape 2

执行 add tile rola5 group rock layered shape full

执行 add tile rola6 group rock layered shape full

执行 add tile rola7 group rock layered shape full

执行 add tile romi group shape full

执行 add tile romi1 group shape full

执行 add tile dast group darkstone shape full

执行 add tile dast1 group shape 1

执行 add tile dast2 group shape 2

执行 add tile dast3 group shape 3

执行 add tile dast4 group shape 4

执行 add tile dast5 group darkstone shape full

执行 add tile dast6 group darkstone shape full

执行 add tile dast7 group darkstone shape full

执行 add tile dast8 group darkstone shape full

执行 add tile dast9 group darkstone shape full

执行 add tile sulf group sulfur shape full

执行 add tile sulf1 group shape 1

执行 add tile sulf2 group shape 2

执行 add tile sulf3 group shape 3

执行 add tile sulf4 group shape 4

执行 add tile sulf5 group sulfur shape full

执行 add tile sulf6 group sulfur shape full

执行 add tile sulf7 group sulfur shape full

执行 add tile sulf8 group sulfur shape full

执行 add tile sulf9 group sulfur shape full

执行 add tile sasu group salt sulfur shape full

执行 add tile sasu2 group salt sulfur shape full

执行 add tile sasu3 group salt sulfur shape full

执行 add tile sasu4 group salt sulfur shape full

执行 add tile sasu5 group salt sulfur shape full

执行 add tile sasu6 group salt sulfur shape full

执行 add tile sasu7 group salt sulfur shape full

 

定义 tile data 3

执行 add tile blst group black stone shape full

执行 add tile blst1 group shape 1

执行 add tile blst2 group shape 2

执行 add tile blst3 group shape 3

执行 add tile blst4 group shape 4

执行 add tile blst5 group black stone shape full

执行 add tile blst6 group black stone shape full

执行 add tile blst7 group black stone shape full

执行 add tile blst8 group black stone shape full

执行 add tile blst9 group black stone shape full

执行 add tile dbmi group dark black mix shape full

执行 add tile dbmi1 group dark black mix shape full

执行 add tile dbmi2 group dark black mix shape full

执行 add tile dbmi3 group dark black mix shape full

执行 add tile dbmi4 group dark black mix shape full

执行 add tile dbmi5 group dark black mix shape full

 

定义 tile data 2

执行 add tile moss group moss shape full

执行 add tile moss1 group shape 1

执行 add tile moss2 group shape 2

执行 add tile moss3 group shape 3

执行 add tile moss4 group shape 4

执行 add tile moss5 group moss shape full

执行 add tile moss6 group moss shape full

执行 add tile moss7 group moss shape full

执行 add tile moss8 group moss shape full

执行 add tile moss9 group moss shape full

执行 add tile moda group moss darkstone shape full

执行 add tile moda2 group moss darkstone shape full

执行 add tile moda3 group moss darkstone shape full

执行 add tile moda4 group moss darkstone shape full

执行 add tile moda5 group moss darkstone shape full

执行 add tile moda6 group moss darkstone shape full

执行 add tile moda7 group moss darkstone shape full

执行 add tile moda8 group moss darkstone shape full

执行 add tile moda9 group moss darkstone shape full

执行 add tile drmi group darkstone rock mix shape full

执行 add tile drmi2 group darkstone rock mix shape full

执行 add tile drmi3 group darkstone rock mix shape full

执行 add tile drmi4 group darkstone rock mix shape full

执行 add tile drmi5 group darkstone rock mix shape full

执行 add tile jaro group jagged rock shape full

执行 add tile jaro1 group shape 1

执行 add tile jaro2 group shape 2

执行 add tile jaro3 group shape 3

执行 add tile jaro4 group shape 4

执行 add tile jaro5 group jagged rock shape full

执行 add tile jaro6 group jagged rock shape full

执行 add tile jaro7 group jagged rock shape full

执行 add tile jaro8 group jagged rock shape full

执行 add tile jaro9 group jagged rock shape full

执行 add tile brro group brown rock shape full

执行 add tile brro1 group shape 1

执行 add tile brro2 group shape 2

执行 add tile brro3 group shape 3

执行 add tile brro4 group shape 4

执行 add tile brro5 group brown rock shape full

执行 add tile brro6 group brown rock shape full

执行 add tile brro7 group brown rock shape full

执行 add tile brro8 group brown rock shape full

执行 add tile jdmi group jagged dark mix shape full

执行 add tile jdmi1 group jagged dark mix shape full

执行 add tile jdmi2 group jagged dark mix shape full

执行 add tile jdmi3 group jagged dark mix shape full

执行 add tile jdmi4 group jagged dark mix shape full

执行 add tile jdmi5 group jagged dark mix shape full

执行 add tile palg group pink algae shape full

执行 add tile palg1 group shape 1

执行 add tile palg2 group shape 2

执行 add tile palg3 group shape 3

执行 add tile palg4 group shape 4

执行 add tile palg5 group pink algae shape full

执行 add tile palg6 group pink algae shape full

执行 add tile palg7 group pink algae shape full

执行 add tile palg8 group pink algae shape full

执行 add tile palg9 group pink algae shape full

执行 add tile pdmi group pink dark mix shape full

执行 add tile pdmi1 group shape 1

执行 add tile pdmi2 group shape 2

执行 add tile pdmi3 group shape 3

执行 add tile pdmi4 group shape 4

执行 add tile pdmi5 group pink dark mix shape full

执行 add tile pdmi6 group pink dark mix shape full

执行 add tile pdmi7 group pink dark mix shape full

执行 add tile pdmi8 group pink dark mix shape full

执行 add tile pdmi9 group pink dark mix shape full

 

定义 // {comment}

 

当接收到 render tiles

换成 debug 造型

将大小设为 200

如果 ({low quality?} = 0) 那么

执行 render ao

执行 render tiles

如果 ({$ editor} = terrain) 那么

执行 render grid

换成 debug 造型

 

当接收到 ! reset

删除 {# tile name} 的全部项目

删除 {# tile group} 的全部项目

删除 {# tile shape} 的全部项目

执行 // names are abbreviated

执行 tile data 1

执行 tile data 2

执行 tile data 3

 

当接收到 render dev map

执行 render map

换成 debug 造型

执行 //

 

当接收到 render tile preview

如果 ({$ editor} = terrain) 那么

移到 x:-220 y:30

换成 {selected object} 造型

将大小设为 210

将 亮度 特效设定为 -100

图章

将大小设为 200

将 亮度 特效设定为 0

图章

换成 debug 造型

 

定义 render tiles

如果 ({! loaded tiles} 的项目数 = 0) 那么

停止 这个脚本

将笔的颜色设为#333333

将笔的粗细设为5

换成 large 造型

将y坐标设为 (-180 - ({cam y} 除以 1 的余数 * {# tile size}))

将 {ty} 设为 (向下取整({cam y}) + 8) 除以 {# chunk size} 的余数

重复执行 17 次

将x坐标设为 (-228 - ({cam x} 除以 1 的余数 * {# tile size}))

将 {tx} 设为 ((向下取整({cam x}) + 6) 除以 {# chunk size} 的余数 - 0)

重复执行 21 次

将 {i} 设为 (1 + (({ty} * {# loaded width}) + {tx}))

换成 {! loaded tiles} 的第 {i} 项 造型

图章

换成 large 造型

将x坐标增加 {# tile size}

将 {tx} 增加 1

将y坐标增加 {# tile size}

将 {ty} 增加 1

 

定义 add tile {name} group {group} shape {shape}

执行 // NAME: the ID

将 {name} 加入 {# tile name}

执行 // GROUP: for tile placement groups (blank to create new based on name)

如果 ({group} = ) 那么

将 {name} 加入 {# tile group}

否则

将 {group} 加入 {# tile group}

执行 // SHAPE: the shape of the tile, numbers indicate corner piece

将 {shape} 加入 {# tile shape}

 

定义 render ao

将 虚像 特效设定为 80

清除图形特效

 

定义 speed test

将 {output} 设为 (2000年至今的天数 * 86400)

重复执行 1000 次

执行 render tiles

将 {output} 设为 ((2000年至今的天数 * 86400) - {output})

将 {output} 设为 ((1000 / {output}) / 30)

 

定义 render map

 

定义 render grid

换成 debug 造型

将笔的颜色设为#ffffff

将笔的透明度 设为 80

将笔的粗细设为2

移到 x:((0 - {cam x} 除以 16 的余数) * {# tile size}) y:-185

落笔

将y坐标设为 185

抬笔

移到 x:-245 y:((0 - {cam y} 除以 16 的余数) * {# tile size})

落笔

将x坐标设为 245

抬笔

移到 x:((0.5 - {cam x}) * {# tile size}) y:((0.5 - {cam y}) * {# tile size})

落笔

抬笔

移到 x:((0 - {cam x}) * {# tile size}) y:((1 - {cam y}) * {# tile size})

落笔

将x坐标设为 ((1 - {cam x}) * {# tile size})

将y坐标设为 ((0 - {cam y}) * {# tile size})

抬笔

移到 x:((16 - {cam x} 除以 16 的余数) * {# tile size}) y:-185

落笔

将y坐标设为 185

抬笔

移到 x:-245 y:((16 - {cam y} 除以 16 的余数) * {# tile size})

落笔

将x坐标设为 245

抬笔

执行 //

 

定义 tile data 1

执行 add tile dark group shape full

执行 add tile sand group surface sand shape full

执行 add tile sand1 group shape 1

执行 add tile sand2 group shape 2

执行 add tile sand3 group shape 3

执行 add tile sand4 group shape 4

执行 add tile rock group surface rock shape full

执行 add tile rock1 group shape 1

执行 add tile rock2 group shape 2

执行 add tile rock3 group shape 3

执行 add tile rock4 group shape 4

执行 add tile rock5 group surface rock shape full

执行 add tile rock6 group surface rock shape full

执行 add tile rock7 group surface rock shape full

执行 add tile rock8 group surface rock shape full

执行 add tile salt group salt shape full

执行 add tile salt1 group shape 1

执行 add tile salt2 group shape 2

执行 add tile salt3 group shape 3

执行 add tile salt4 group shape 4

执行 add tile salt5 group salt shape full

执行 add tile salt6 group salt shape full

执行 add tile salt7 group salt shape full

执行 add tile sast group surface sand shape full

执行 add tile sast1 group shape 1

执行 add tile sast2 group shape 2

执行 add tile sast3 group shape 3

执行 add tile sast4 group shape 4

执行 add tile sami group shape full

执行 add tile sami1 group shape full

执行 add tile sami2 group shape full

执行 add tile sami3 group shape full

执行 add tile rola group rock layered shape full

执行 add tile rola1 group shape 1

执行 add tile rola2 group shape 2

执行 add tile rola3 group shape 1

执行 add tile rola4 group shape 2

执行 add tile rola5 group rock layered shape full

执行 add tile rola6 group rock layered shape full

执行 add tile rola7 group rock layered shape full

执行 add tile romi group shape full

执行 add tile romi1 group shape full

执行 add tile dast group darkstone shape full

执行 add tile dast1 group shape 1

执行 add tile dast2 group shape 2

执行 add tile dast3 group shape 3

执行 add tile dast4 group shape 4

执行 add tile dast5 group darkstone shape full

执行 add tile dast6 group darkstone shape full

执行 add tile dast7 group darkstone shape full

执行 add tile dast8 group darkstone shape full

执行 add tile dast9 group darkstone shape full

执行 add tile sulf group sulfur shape full

执行 add tile sulf1 group shape 1

执行 add tile sulf2 group shape 2

执行 add tile sulf3 group shape 3

执行 add tile sulf4 group shape 4

执行 add tile sulf5 group sulfur shape full

执行 add tile sulf6 group sulfur shape full

执行 add tile sulf7 group sulfur shape full

执行 add tile sulf8 group sulfur shape full

执行 add tile sulf9 group sulfur shape full

执行 add tile sasu group salt sulfur shape full

执行 add tile sasu2 group salt sulfur shape full

执行 add tile sasu3 group salt sulfur shape full

执行 add tile sasu4 group salt sulfur shape full

执行 add tile sasu5 group salt sulfur shape full

执行 add tile sasu6 group salt sulfur shape full

执行 add tile sasu7 group salt sulfur shape full

 

定义 tile data 3

执行 add tile blst group black stone shape full

执行 add tile blst1 group shape 1

执行 add tile blst2 group shape 2

执行 add tile blst3 group shape 3

执行 add tile blst4 group shape 4

执行 add tile blst5 group black stone shape full

执行 add tile blst6 group black stone shape full

执行 add tile blst7 group black stone shape full

执行 add tile blst8 group black stone shape full

执行 add tile blst9 group black stone shape full

执行 add tile dbmi group dark black mix shape full

执行 add tile dbmi1 group dark black mix shape full

执行 add tile dbmi2 group dark black mix shape full

执行 add tile dbmi3 group dark black mix shape full

执行 add tile dbmi4 group dark black mix shape full

执行 add tile dbmi5 group dark black mix shape full

 

定义 tile data 2

执行 add tile moss group moss shape full

执行 add tile moss1 group shape 1

执行 add tile moss2 group shape 2

执行 add tile moss3 group shape 3

执行 add tile moss4 group shape 4

执行 add tile moss5 group moss shape full

执行 add tile moss6 group moss shape full

执行 add tile moss7 group moss shape full

执行 add tile moss8 group moss shape full

执行 add tile moss9 group moss shape full

执行 add tile moda group moss darkstone shape full

执行 add tile moda2 group moss darkstone shape full

执行 add tile moda3 group moss darkstone shape full

执行 add tile moda4 group moss darkstone shape full

执行 add tile moda5 group moss darkstone shape full

执行 add tile moda6 group moss darkstone shape full

执行 add tile moda7 group moss darkstone shape full

执行 add tile moda8 group moss darkstone shape full

执行 add tile moda9 group moss darkstone shape full

执行 add tile drmi group darkstone rock mix shape full

执行 add tile drmi2 group darkstone rock mix shape full

执行 add tile drmi3 group darkstone rock mix shape full

执行 add tile drmi4 group darkstone rock mix shape full

执行 add tile drmi5 group darkstone rock mix shape full

执行 add tile jaro group jagged rock shape full

执行 add tile jaro1 group shape 1

执行 add tile jaro2 group shape 2

执行 add tile jaro3 group shape 3

执行 add tile jaro4 group shape 4

执行 add tile jaro5 group jagged rock shape full

执行 add tile jaro6 group jagged rock shape full

执行 add tile jaro7 group jagged rock shape full

执行 add tile jaro8 group jagged rock shape full

执行 add tile jaro9 group jagged rock shape full

执行 add tile brro group brown rock shape full

执行 add tile brro1 group shape 1

执行 add tile brro2 group shape 2

执行 add tile brro3 group shape 3

执行 add tile brro4 group shape 4

执行 add tile brro5 group brown rock shape full

执行 add tile brro6 group brown rock shape full

执行 add tile brro7 group brown rock shape full

执行 add tile brro8 group brown rock shape full

执行 add tile jdmi group jagged dark mix shape full

执行 add tile jdmi1 group jagged dark mix shape full

执行 add tile jdmi2 group jagged dark mix shape full

执行 add tile jdmi3 group jagged dark mix shape full

执行 add tile jdmi4 group jagged dark mix shape full

执行 add tile jdmi5 group jagged dark mix shape full

执行 add tile palg group pink algae shape full

执行 add tile palg1 group shape 1

执行 add tile palg2 group shape 2

执行 add tile palg3 group shape 3

执行 add tile palg4 group shape 4

执行 add tile palg5 group pink algae shape full

执行 add tile palg6 group pink algae shape full

执行 add tile palg7 group pink algae shape full

执行 add tile palg8 group pink algae shape full

执行 add tile palg9 group pink algae shape full

执行 add tile pdmi group pink dark mix shape full

执行 add tile pdmi1 group shape 1

执行 add tile pdmi2 group shape 2

执行 add tile pdmi3 group shape 3

执行 add tile pdmi4 group shape 4

执行 add tile pdmi5 group pink dark mix shape full

执行 add tile pdmi6 group pink dark mix shape full

执行 add tile pdmi7 group pink dark mix shape full

执行 add tile pdmi8 group pink dark mix shape full

执行 add tile pdmi9 group pink dark mix shape full

 

定义 // {comment}

 

shadow tiles

代码

当接收到 render fade

如果 ({low quality?} = 0) 那么

执行 render fade

换成 00000001 造型

 

定义 render fade

 

当接收到 render fade

如果 ({low quality?} = 0) 那么

执行 render fade

换成 00000001 造型

 

定义 render fade

 

terrain loader

代码

当 绿旗 被点击

隐藏

将 亮度 特效设定为 100

 

当接收到 chunk handler

如果 (({cam chunk x} = (向下取整((({cam x} + 6) / 16)) - 1)) 与 ({cam chunk y} = (向下取整((({cam y} + 8) / 16)) - 1))) 不成立 那么

执行 // if current frame is in a new chunk, reload all

执行 load

 

定义 load sequential data

执行 // load chunks 123

将 {iy} 设为 0

重复执行 16 次

将 {ix} 设为 0

重复执行 16 次

如果 ({1} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {1} 项 + ({ix} + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({2} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {2} 项 + (({ix} - 16) + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({3} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {3} 项 + (({ix} - 32) + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

将 {iy} 增加 1

执行 // load chunks 456

重复执行 16 次

将 {ix} 设为 0

重复执行 16 次

如果 ({4} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {4} 项 + ({ix} + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({5} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {5} 项 + (({ix} - 16) + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({6} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {6} 项 + (({ix} - 32) + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

将 {iy} 增加 1

 

定义 load

将 {cam chunk x} 设为 (向下取整((({cam x} + 6) / 16)) - 1)

将 {cam chunk y} 设为 (向下取整((({cam y} + 8) / 16)) - 1)

将 {1} 设为 {*0 existing chunks} 中第一个 连接 连接 {cam chunk x} 和 , 和 {cam chunk y} 的编号

将 {2} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 1) 和 , 和 {cam chunk y} 的编号

将 {3} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 2) 和 , 和 {cam chunk y} 的编号

将 {4} 设为 {*0 existing chunks} 中第一个 连接 连接 {cam chunk x} 和 , 和 ({cam chunk y} + 1) 的编号

将 {5} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 1) 和 , 和 ({cam chunk y} + 1) 的编号

将 {6} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 2) 和 , 和 ({cam chunk y} + 1) 的编号

删除 {! loaded tiles} 的全部项目

删除 {! loaded ao x} 的全部项目

删除 {! loaded ao y} 的全部项目

删除 {! loaded fade type} 的全部项目

删除 {! loaded fade x} 的全部项目

删除 {! loaded fade y} 的全部项目

如果 (000000 = 连接 连接 连接 连接 连接 {1} 和 {2} 和 {3} 和 {4} 和 {5} 和 {6}) 那么

执行 // perf optimisation

停止 这个脚本

删除 {loaded chunk index} 的全部项目

将 {1} 加入 {loaded chunk index}

将 {2} 加入 {loaded chunk index}

将 {3} 加入 {loaded chunk index}

将 {4} 加入 {loaded chunk index}

将 {5} 加入 {loaded chunk index}

将 {6} 加入 {loaded chunk index}

执行 load sequential data

执行 load referenced data

 

定义 load referenced data

 

定义 speed test

将 {output} 设为 (2000年至今的天数 * 86400)

重复执行 1000 次

执行 load

将 {output} 设为 ((2000年至今的天数 * 86400) - {output})

将 {output} 设为 ((1000 / {output}) / 30)

 

定义 // {comment}

 

当 绿旗 被点击

隐藏

将 亮度 特效设定为 100

 

当接收到 chunk handler

如果 (({cam chunk x} = (向下取整((({cam x} + 6) / 16)) - 1)) 与 ({cam chunk y} = (向下取整((({cam y} + 8) / 16)) - 1))) 不成立 那么

执行 // if current frame is in a new chunk, reload all

执行 load

 

定义 load sequential data

执行 // load chunks 123

将 {iy} 设为 0

重复执行 16 次

将 {ix} 设为 0

重复执行 16 次

如果 ({1} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {1} 项 + ({ix} + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({2} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {2} 项 + (({ix} - 16) + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({3} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {3} 项 + (({ix} - 32) + (16 * {iy}))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

将 {iy} 增加 1

执行 // load chunks 456

重复执行 16 次

将 {ix} 设为 0

重复执行 16 次

如果 ({4} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {4} 项 + ({ix} + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({5} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {5} 项 + (({ix} - 16) + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

重复执行 16 次

如果 ({6} = 0) 那么

将 加入 {! loaded tiles}

否则

将 {chunk data} 的第 ({*1 chunk pointers} 的第 {6} 项 + (({ix} - 32) + (16 * ({iy} - 16)))) 项 加入 {! loaded tiles}

将 {ix} 增加 1

将 {iy} 增加 1

 

定义 load

将 {cam chunk x} 设为 (向下取整((({cam x} + 6) / 16)) - 1)

将 {cam chunk y} 设为 (向下取整((({cam y} + 8) / 16)) - 1)

将 {1} 设为 {*0 existing chunks} 中第一个 连接 连接 {cam chunk x} 和 , 和 {cam chunk y} 的编号

将 {2} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 1) 和 , 和 {cam chunk y} 的编号

将 {3} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 2) 和 , 和 {cam chunk y} 的编号

将 {4} 设为 {*0 existing chunks} 中第一个 连接 连接 {cam chunk x} 和 , 和 ({cam chunk y} + 1) 的编号

将 {5} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 1) 和 , 和 ({cam chunk y} + 1) 的编号

将 {6} 设为 {*0 existing chunks} 中第一个 连接 连接 ({cam chunk x} + 2) 和 , 和 ({cam chunk y} + 1) 的编号

删除 {! loaded tiles} 的全部项目

删除 {! loaded ao x} 的全部项目

删除 {! loaded ao y} 的全部项目

删除 {! loaded fade type} 的全部项目

删除 {! loaded fade x} 的全部项目

删除 {! loaded fade y} 的全部项目

如果 (000000 = 连接 连接 连接 连接 连接 {1} 和 {2} 和 {3} 和 {4} 和 {5} 和 {6}) 那么

执行 // perf optimisation

停止 这个脚本

删除 {loaded chunk index} 的全部项目

将 {1} 加入 {loaded chunk index}

将 {2} 加入 {loaded chunk index}

将 {3} 加入 {loaded chunk index}

将 {4} 加入 {loaded chunk index}

将 {5} 加入 {loaded chunk index}

将 {6} 加入 {loaded chunk index}

执行 load sequential data

执行 load referenced data

 

定义 load referenced data

 

定义 speed test

将 {output} 设为 (2000年至今的天数 * 86400)

重复执行 1000 次

执行 load

将 {output} 设为 ((2000年至今的天数 * 86400) - {output})

将 {output} 设为 ((1000 / {output}) / 30)

 

定义 // {comment}

 

terrain processor

代码

当按下 z 键

如果 ({$ editor} = terrain) 那么

如果 ({screen} = world) 那么

如果 {*0 existing chunks} 包含 连接 连接 (0 + {mouse chunk x}) 和 , 和 (0 + {mouse chunk y}) ? 那么

执行 flood fill chunk at {mouse x} {mouse y} with tile {selected object}

否则

执行 new chunk at: {mouse chunk x} {mouse chunk y} tile type: {selected object}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

播放声音 pop

 

当按下 k 键

如果 ({$ editor} = terrain) 那么

如果 ({screen} = world) 那么

执行 get tile type at {mouse x} {mouse y} diff void

将 {selected object} 设为 {tile type}

播放声音 pop

 

当接收到 check for tile placement

如果 按下鼠标? 那么

如果 ({$ editor} = terrain) 那么

将 {pointer} 设为 {*0 existing chunks} 中第一个 连接 连接 {mouse chunk x} 和 , 和 {mouse chunk y} 的编号

如果 ({pointer} = 0) 那么

将 {pointer} 设为 (1 + {*0 existing chunks} 的项目数)

执行 new chunk at: {mouse chunk x} {mouse chunk y} tile type:

执行 //

将 {pointer} 设为 ({*1 chunk pointers} 的第 {pointer} 项 + ({mouse x} 除以 {# chunk size} 的余数 + ({# chunk size} * {mouse y} 除以 {# chunk size} 的余数)))

执行 // replace only solid tiles

执行 //

如果 不成立 那么

如果 ({selected object} = sami) 那么

执行 set tile at {pointer} to 连接 sami 和 123 的第 在 0 和 3 之间取随机数 个字符

否则

如果 ({selected object} = romi) 那么

执行 set tile at {pointer} to 连接 romi 和 123 的第 在 0 和 3 之间取随机数 个字符

否则

如果 ({selected object} = sasu) 那么

执行 set tile at {pointer} to 连接 sasu 和 234567 的第 在 0 和 5 之间取随机数 个字符

否则

如果 ({selected object} = moda) 那么

执行 set tile at {pointer} to 连接 moda 和 23456789 的第 在 0 和 8 之间取随机数 个字符

否则

如果 ({selected object} = drmi) 那么

执行 set tile at {pointer} to 连接 drmi 和 2345 的第 在 0 和 4 之间取随机数 个字符

否则

如果 ({selected object} = jdmi) 那么

执行 set tile at {pointer} to 连接 jdmi 和 12345 的第 在 0 和 5 之间取随机数 个字符

否则

如果 ({selected object} = dbmi) 那么

执行 set tile at {pointer} to 连接 dbmi 和 12345 的第 在 0 和 5 之间取随机数 个字符

否则

执行 set tile at {pointer} to {selected object}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

执行 //

 

定义 delete all ao

删除 {*2 ao pointers} 的全部项目

删除 {*3 ao length} 的全部项目

删除 {ao data x} 的全部项目

删除 {ao data y} 的全部项目

重复执行 {*0 existing chunks} 的项目数 次

将 1 加入 {*2 ao pointers}

重复执行 {*0 existing chunks} 的项目数 次

将 0 加入 {*3 ao length}

 

隐藏变量 {output}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

播放声音 A Guitar

 

定义 get tile type at {x} {y} diff void {void?}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

如果 {void?} 那么

将 {tile type} 设为 void

否则

将 {tile type} 设为

否则

将 {tile index} 设为 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 try ao at {x} {y}

执行 get tile type at {x} {y} diff void

将 {original index} 设为 {index}

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {i} 设为 0

重复执行 4 次

执行 get tile type at ({x} + {neighbours ao} 的第 ({i} + 1) 项) ({y} + {neighbours ao} 的第 ({i} + 2) 项) diff void 不成立

如果 ({tile type} = ) 那么

在 {x} 的第 {*2 ao pointers} 的第 {original index} 项 项前插入 {ao data x}

在 {y} 的第 {*2 ao pointers} 的第 {original index} 项 项前插入 {ao data y}

将 {*3 ao length} 的第 {original index} 项替换为 ({*3 ao length} 的第 {original index} 项 + 1)

将 {i} 设为 {original index}

重复执行 ({*0 existing chunks} 的项目数 - {original index}) 次

将 {i} 增加 1

将 {*2 ao pointers} 的第 {i} 项替换为 ({*2 ao pointers} 的第 {i} 项 + 1)

停止 这个脚本

将 {i} 增加 2

 

定义 set tile at {x} {y} to {type}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

执行 // there's no chunk here!

否则

将 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项替换为 {type}

 

定义 try fade at {x} {y}

执行 get tile type at {x} {y} diff void

将 {original index} 设为 {index}

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

删除 {neighbours} 的全部项目

将 {i} 设为 0

重复执行 8 次

执行 get tile type at ({x} + {neighbours fade} 的第 ({i} + 1) 项) ({y} + {neighbours fade} 的第 ({i} + 2) 项) diff void

如果 ({tile type} = dark) 那么

将 1 加入 {neighbours}

否则

将 0 加入 {neighbours}

将 {i} 增加 2

如果 (neighbours = 00000000) 不成立 那么

在 {x} 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data x}

在 {y} 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data y}

在 neighbours 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data type}

将 {*5 fade length} 的第 {original index} 项替换为 ({*5 fade length} 的第 {original index} 项 + 1)

将 {i} 设为 {original index}

重复执行 ({*0 existing chunks} 的项目数 - {original index}) 次

将 {i} 增加 1

将 {*4 fade pointers} 的第 {i} 项替换为 ({*4 fade pointers} 的第 {i} 项 + 1)

 

定义 delete all fade

删除 {*4 fade pointers} 的全部项目

删除 {*5 fade length} 的全部项目

删除 {fade data x} 的全部项目

删除 {fade data y} 的全部项目

删除 {fade data type} 的全部项目

重复执行 {*0 existing chunks} 的项目数 次

将 1 加入 {*4 fade pointers}

重复执行 {*0 existing chunks} 的项目数 次

将 0 加入 {*5 fade length}

 

定义 try round edge at {x} {y}

执行 // only works on tile without numbers

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {original index} 设为 {index}

将 {original type} 设为 {tile type}

如果 (full = {# tile shape} 的第 {# tile name} 中第一个 {tile type} 的编号 项) 那么

将 {i} 设为 0

删除 {neighbours} 的全部项目

执行 get tile type at {x} ({y} + 1) diff void 不成立

如果 ({tile type} = ) 那么

将 0 加入 {neighbours}

否则

将 1 加入 {neighbours}

将 {i} 增加 1

执行 get tile type at ({x} + 1) {y} diff void 不成立

如果 ({tile type} = ) 那么

将 0 加入 {neighbours}

否则

将 1 加入 {neighbours}

将 {i} 增加 1

执行 get tile type at {x} ({y} - 1) diff void 不成立

如果 ({tile type} = ) 那么

将 0 加入 {neighbours}

否则

将 1 加入 {neighbours}

将 {i} 增加 1

执行 get tile type at ({x} - 1) {y} diff void 不成立

如果 ({tile type} = ) 那么

将 0 加入 {neighbours}

否则

将 1 加入 {neighbours}

将 {i} 增加 1

如果 ({i} = 2) 那么

如果 (neighbours = 0011) 那么

将 {i} 设为 1

否则

如果 (neighbours = 1001) 那么

将 {i} 设为 2

否则

如果 (neighbours = 1100) 那么

将 {i} 设为 3

否则

如果 (neighbours = 0110) 那么

将 {i} 设为 4

否则

将 {i} 设为 0

如果 ({i} > 0) 那么

执行 // check if tile type exists

如果 {# tile name} 包含 连接 {original type} 和 {i} ? 那么

执行 set tile at {x} {y} to 连接 {original type} 和 {i}

 

定义 set tile at {index} to {type}

如果 ({index} = 0) 那么

执行 // there's no chunk here!

否则

将 {chunk data} 的第 {index} 项替换为 {type}

 

定义 try darkness at {x} {y}

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {i} 设为 1

重复执行 ({# darkness neighbours} 的项目数 / 2) 次

执行 get tile type at ({x} + {# darkness neighbours} 的第 {i} 项) ({y} + {# darkness neighbours} 的第 ({i} + 1) 项) diff void 不成立

如果 ({tile type} = ) 那么

停止 这个脚本

将 {i} 增加 2

执行 set tile at {x} {y} to dark

 

定义 try random variation at {x} {y}

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {tile type index} 设为 {# tile name} 中第一个 {tile type} 的编号

如果 (full = {# tile shape} 的第 {tile type index} 项) 那么

如果 (surface sand = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 5 之间取随机数 = 1) 那么

执行 set tile at {tile index} to sast

否则

执行 set tile at {tile index} to sand

否则

如果 (surface rock = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 10 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock5

否则

如果 (在 1 和 9 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock6

否则

如果 (在 1 和 8 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock7

否则

如果 (在 1 和 7 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock8

否则

执行 set tile at {tile index} to rock

否则

如果 (rock layered = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 5 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola5

否则

如果 (在 1 和 4 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola6

否则

如果 (在 1 和 3 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola7

否则

执行 set tile at {tile index} to rola

否则

如果 (darkstone = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 dast 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (sulfur = {# tile group} 的第 {tile type index} 项) 那么

如果 ({tile type} = sulf) 那么

执行 set tile at {tile index} to 连接 sulf 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (salt = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 salt 和 567 的第 在 0 和 3 之间取随机数 个字符

否则

如果 (moss = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 moss 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (jagged rock = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 jaro 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (brown rock = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 brro 和 5678 的第 在 0 和 4 之间取随机数 个字符

否则

如果 (pink algae = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 palg 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (pink dark mix = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 pdmi 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (black stone = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 blst 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

 

播放声音 A Guitar

 

定义 new chunk at: {chunk x} {chunk y} tile type: {tiles}

如果 {*0 existing chunks} 包含 连接 连接 (0 + {chunk x}) 和 , 和 (0 + {chunk y}) ? 那么

执行 ​​warn​​

否则

将 连接 连接 (0 + {chunk x}) 和 , 和 (0 + {chunk y}) 加入 {*0 existing chunks}

将 {chunk x} 加入 {existing chunks x}

将 {chunk y} 加入 {existing chunks y}

将 (1 + {chunk data} 的项目数) 加入 {*1 chunk pointers}

重复执行 (16 * 16) 次

将 {tiles} 加入 {chunk data}

将 0 加入 {*3 ao length}

将 (1 + {ao data x} 的项目数) 加入 {*2 ao pointers}

将 0 加入 {*5 fade length}

将 (1 + {fade data x} 的项目数) 加入 {*4 fade pointers}

将 连接 new chunk 和 连接 连接 {chunk x} 和 , 和 {chunk y} 加入 {text}

将 5 加入 {text}

 

定义 // {comment}

 

定义 flood fill chunk at {x} {y} with tile {tile}

删除 {to fill x} 的全部项目

删除 {to fill y} 的全部项目

删除 {to fill id} 的全部项目

执行 get tile type at {x} {y} diff void

将 {fill tile} 设为 {tile type}

将 连接 连接 {x} 和 , 和 {y} 加入 {to fill id}

将 {x} 加入 {to fill x}

将 {y} 加入 {to fill y}

重复执行直到 ({to fill x} 的项目数 = 0)

执行 set tile at {to fill x} 的第 1 项 {to fill y} 的第 1 项 to {tile}

如果 ({to fill x} 的第 1 项 除以 16 的余数 < 15) 那么

执行 get tile type at (1 + {to fill x} 的第 1 项) (0 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 (1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 ? 不成立 那么

将 连接 连接 (1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 加入 {to fill id}

将 (1 + {to fill x} 的第 1 项) 加入 {to fill x}

将 {to fill y} 的第 1 项 加入 {to fill y}

如果 ({to fill x} 的第 1 项 除以 16 的余数 > 0) 那么

执行 get tile type at (-1 + {to fill x} 的第 1 项) (0 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 (-1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 ? 不成立 那么

将 连接 连接 (-1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 加入 {to fill id}

将 (-1 + {to fill x} 的第 1 项) 加入 {to fill x}

将 {to fill y} 的第 1 项 加入 {to fill y}

如果 ({to fill y} 的第 1 项 除以 16 的余数 < 15) 那么

如果 ({to fill y} 的第 1 项 除以 16 的余数 > 0) 那么

执行 get tile type at (0 + {to fill x} 的第 1 项) (-1 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 {to fill x} 的第 1 项 和 , 和 (-1 + {to fill y} 的第 1 项) ? 不成立 那么

将 连接 连接 {to fill x} 的第 1 项 和 , 和 (-1 + {to fill y} 的第 1 项) 加入 {to fill id}

将 {to fill x} 的第 1 项 加入 {to fill x}

将 (-1 + {to fill y} 的第 1 项) 加入 {to fill y}

删除 {to fill id} 的第 1 项

删除 {to fill x} 的第 1 项

删除 {to fill y} 的第 1 项

将 {cam chunk x} 设为

将 {cam chunk y} 设为

 

当按下 k 键

如果 ({$ editor} = terrain) 那么

如果 ({screen} = world) 那么

执行 get tile type at {mouse x} {mouse y} diff void

将 {selected object} 设为 {tile type}

播放声音 pop

 

当按下 z 键

如果 ({$ editor} = terrain) 那么

如果 ({screen} = world) 那么

如果 {*0 existing chunks} 包含 连接 连接 (0 + {mouse chunk x}) 和 , 和 (0 + {mouse chunk y}) ? 那么

执行 flood fill chunk at {mouse x} {mouse y} with tile {selected object}

否则

执行 new chunk at: {mouse chunk x} {mouse chunk y} tile type: {selected object}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

播放声音 pop

 

当接收到 check for tile placement

如果 按下鼠标? 那么

如果 ({$ editor} = terrain) 那么

将 {pointer} 设为 {*0 existing chunks} 中第一个 连接 连接 {mouse chunk x} 和 , 和 {mouse chunk y} 的编号

如果 ({pointer} = 0) 那么

将 {pointer} 设为 (1 + {*0 existing chunks} 的项目数)

执行 new chunk at: {mouse chunk x} {mouse chunk y} tile type:

执行 //

将 {pointer} 设为 ({*1 chunk pointers} 的第 {pointer} 项 + ({mouse x} 除以 {# chunk size} 的余数 + ({# chunk size} * {mouse y} 除以 {# chunk size} 的余数)))

执行 // replace only solid tiles

执行 //

如果 不成立 那么

如果 ({selected object} = sami) 那么

执行 set tile at {pointer} to 连接 sami 和 123 的第 在 0 和 3 之间取随机数 个字符

否则

如果 ({selected object} = romi) 那么

执行 set tile at {pointer} to 连接 romi 和 123 的第 在 0 和 3 之间取随机数 个字符

否则

如果 ({selected object} = sasu) 那么

执行 set tile at {pointer} to 连接 sasu 和 234567 的第 在 0 和 5 之间取随机数 个字符

否则

如果 ({selected object} = moda) 那么

执行 set tile at {pointer} to 连接 moda 和 23456789 的第 在 0 和 8 之间取随机数 个字符

否则

如果 ({selected object} = drmi) 那么

执行 set tile at {pointer} to 连接 drmi 和 2345 的第 在 0 和 4 之间取随机数 个字符

否则

如果 ({selected object} = jdmi) 那么

执行 set tile at {pointer} to 连接 jdmi 和 12345 的第 在 0 和 5 之间取随机数 个字符

否则

如果 ({selected object} = dbmi) 那么

执行 set tile at {pointer} to 连接 dbmi 和 12345 的第 在 0 和 5 之间取随机数 个字符

否则

执行 set tile at {pointer} to {selected object}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

执行 //

 

当接收到 regenerate world data

执行 // regenerate everything

执行 generate data

 

定义 delete all ao

删除 {*2 ao pointers} 的全部项目

删除 {*3 ao length} 的全部项目

删除 {ao data x} 的全部项目

删除 {ao data y} 的全部项目

重复执行 {*0 existing chunks} 的项目数 次

将 1 加入 {*2 ao pointers}

重复执行 {*0 existing chunks} 的项目数 次

将 0 加入 {*3 ao length}

 

定义 get tile type at {x} {y} diff void {void?}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

如果 {void?} 那么

将 {tile type} 设为 void

否则

将 {tile type} 设为

否则

将 {tile index} 设为 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 generate data

显示变量 {output}

将 {output} 设为 delete all ao

执行 delete all ao

将 {output} 设为 delete all fade

执行 delete all fade

执行 // 1st pass

执行 // 2nd pass

隐藏变量 {output}

将 {cam chunk x} 设为

将 {cam chunk y} 设为

播放声音 A Guitar

 

定义 try ao at {x} {y}

执行 get tile type at {x} {y} diff void

将 {original index} 设为 {index}

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {i} 设为 0

重复执行 4 次

执行 get tile type at ({x} + {neighbours ao} 的第 ({i} + 1) 项) ({y} + {neighbours ao} 的第 ({i} + 2) 项) diff void 不成立

如果 ({tile type} = ) 那么

在 {x} 的第 {*2 ao pointers} 的第 {original index} 项 项前插入 {ao data x}

在 {y} 的第 {*2 ao pointers} 的第 {original index} 项 项前插入 {ao data y}

将 {*3 ao length} 的第 {original index} 项替换为 ({*3 ao length} 的第 {original index} 项 + 1)

将 {i} 设为 {original index}

重复执行 ({*0 existing chunks} 的项目数 - {original index}) 次

将 {i} 增加 1

将 {*2 ao pointers} 的第 {i} 项替换为 ({*2 ao pointers} 的第 {i} 项 + 1)

停止 这个脚本

将 {i} 增加 2

 

定义 delete all fade

删除 {*4 fade pointers} 的全部项目

删除 {*5 fade length} 的全部项目

删除 {fade data x} 的全部项目

删除 {fade data y} 的全部项目

删除 {fade data type} 的全部项目

重复执行 {*0 existing chunks} 的项目数 次

将 1 加入 {*4 fade pointers}

重复执行 {*0 existing chunks} 的项目数 次

将 0 加入 {*5 fade length}

 

定义 set tile at {x} {y} to {type}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

执行 // there's no chunk here!

否则

将 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项替换为 {type}

 

定义 try fade at {x} {y}

执行 get tile type at {x} {y} diff void

将 {original index} 设为 {index}

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

删除 {neighbours} 的全部项目

将 {i} 设为 0

重复执行 8 次

执行 get tile type at ({x} + {neighbours fade} 的第 ({i} + 1) 项) ({y} + {neighbours fade} 的第 ({i} + 2) 项) diff void

如果 ({tile type} = dark) 那么

将 1 加入 {neighbours}

否则

将 0 加入 {neighbours}

将 {i} 增加 2

如果 (neighbours = 00000000) 不成立 那么

在 {x} 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data x}

在 {y} 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data y}

在 neighbours 的第 {*4 fade pointers} 的第 {original index} 项 项前插入 {fade data type}

将 {*5 fade length} 的第 {original index} 项替换为 ({*5 fade length} 的第 {original index} 项 + 1)

将 {i} 设为 {original index}

重复执行 ({*0 existing chunks} 的项目数 - {original index}) 次

将 {i} 增加 1

将 {*4 fade pointers} 的第 {i} 项替换为 ({*4 fade pointers} 的第 {i} 项 + 1)

 

定义 try darkness at {x} {y}

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {i} 设为 1

重复执行 ({# darkness neighbours} 的项目数 / 2) 次

执行 get tile type at ({x} + {# darkness neighbours} 的第 {i} 项) ({y} + {# darkness neighbours} 的第 ({i} + 1) 项) diff void 不成立

如果 ({tile type} = ) 那么

停止 这个脚本

将 {i} 增加 2

执行 set tile at {x} {y} to dark

 

定义 set tile at {index} to {type}

如果 ({index} = 0) 那么

执行 // there's no chunk here!

否则

将 {chunk data} 的第 {index} 项替换为 {type}

 

定义 try round edge at {x} {y}

执行 // only works on tile without numbers

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {original index} 设为 {index}

将 {original type} 设为 {tile type}

如果 (full = {# tile shape} 的第 {# tile name} 中第一个 {tile type} 的编号 项) 那么

将 {i} 设为 0

删除 {neighbours} 的全部项目

 

定义 try random variation at {x} {y}

执行 get tile type at {x} {y} diff void

如果 (({tile type} = ) 或 ({tile type} = dark)) 不成立 那么

将 {tile type index} 设为 {# tile name} 中第一个 {tile type} 的编号

如果 (full = {# tile shape} 的第 {tile type index} 项) 那么

如果 (surface sand = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 5 之间取随机数 = 1) 那么

执行 set tile at {tile index} to sast

否则

执行 set tile at {tile index} to sand

否则

如果 (surface rock = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 10 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock5

否则

如果 (在 1 和 9 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock6

否则

如果 (在 1 和 8 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock7

否则

如果 (在 1 和 7 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rock8

否则

执行 set tile at {tile index} to rock

否则

如果 (rock layered = {# tile group} 的第 {tile type index} 项) 那么

如果 (在 1 和 5 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola5

否则

如果 (在 1 和 4 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola6

否则

如果 (在 1 和 3 之间取随机数 = 1) 那么

执行 set tile at {tile index} to rola7

否则

执行 set tile at {tile index} to rola

否则

如果 (darkstone = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 dast 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (sulfur = {# tile group} 的第 {tile type index} 项) 那么

如果 ({tile type} = sulf) 那么

执行 set tile at {tile index} to 连接 sulf 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (salt = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 salt 和 567 的第 在 0 和 3 之间取随机数 个字符

否则

如果 (moss = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 moss 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (jagged rock = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 jaro 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (brown rock = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 brro 和 5678 的第 在 0 和 4 之间取随机数 个字符

否则

如果 (pink algae = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 palg 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (pink dark mix = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 pdmi 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

如果 (black stone = {# tile group} 的第 {tile type index} 项) 那么

执行 set tile at {tile index} to 连接 blst 和 56789 的第 在 0 和 5 之间取随机数 个字符

否则

 

定义 reset tile variation for {tile}

执行 // will remove rounded corners

如果 ({tile} = ) 那么

执行 ​​warn​​

停止 这个脚本

播放声音 A Guitar

 

定义 new chunk at: {chunk x} {chunk y} tile type: {tiles}

如果 {*0 existing chunks} 包含 连接 连接 (0 + {chunk x}) 和 , 和 (0 + {chunk y}) ? 那么

执行 ​​warn​​

否则

将 连接 连接 (0 + {chunk x}) 和 , 和 (0 + {chunk y}) 加入 {*0 existing chunks}

将 {chunk x} 加入 {existing chunks x}

将 {chunk y} 加入 {existing chunks y}

将 (1 + {chunk data} 的项目数) 加入 {*1 chunk pointers}

重复执行 (16 * 16) 次

将 {tiles} 加入 {chunk data}

将 0 加入 {*3 ao length}

将 (1 + {ao data x} 的项目数) 加入 {*2 ao pointers}

将 0 加入 {*5 fade length}

将 (1 + {fade data x} 的项目数) 加入 {*4 fade pointers}

将 连接 new chunk 和 连接 连接 {chunk x} 和 , 和 {chunk y} 加入 {text}

将 5 加入 {text}

 

定义 // {comment}

 

定义 flood fill chunk at {x} {y} with tile {tile}

删除 {to fill x} 的全部项目

删除 {to fill y} 的全部项目

删除 {to fill id} 的全部项目

执行 get tile type at {x} {y} diff void

将 {fill tile} 设为 {tile type}

将 连接 连接 {x} 和 , 和 {y} 加入 {to fill id}

将 {x} 加入 {to fill x}

将 {y} 加入 {to fill y}

重复执行直到 ({to fill x} 的项目数 = 0)

执行 set tile at {to fill x} 的第 1 项 {to fill y} 的第 1 项 to {tile}

如果 ({to fill x} 的第 1 项 除以 16 的余数 < 15) 那么

执行 get tile type at (1 + {to fill x} 的第 1 项) (0 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 (1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 ? 不成立 那么

将 连接 连接 (1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 加入 {to fill id}

将 (1 + {to fill x} 的第 1 项) 加入 {to fill x}

将 {to fill y} 的第 1 项 加入 {to fill y}

如果 ({to fill x} 的第 1 项 除以 16 的余数 > 0) 那么

执行 get tile type at (-1 + {to fill x} 的第 1 项) (0 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 (-1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 ? 不成立 那么

将 连接 连接 (-1 + {to fill x} 的第 1 项) 和 , 和 {to fill y} 的第 1 项 加入 {to fill id}

将 (-1 + {to fill x} 的第 1 项) 加入 {to fill x}

将 {to fill y} 的第 1 项 加入 {to fill y}

如果 ({to fill y} 的第 1 项 除以 16 的余数 < 15) 那么

执行 get tile type at (0 + {to fill x} 的第 1 项) (1 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 {to fill x} 的第 1 项 和 , 和 (1 + {to fill y} 的第 1 项) ? 不成立 那么

将 连接 连接 {to fill x} 的第 1 项 和 , 和 (1 + {to fill y} 的第 1 项) 加入 {to fill id}

将 {to fill x} 的第 1 项 加入 {to fill x}

将 (1 + {to fill y} 的第 1 项) 加入 {to fill y}

如果 ({to fill y} 的第 1 项 除以 16 的余数 > 0) 那么

执行 get tile type at (0 + {to fill x} 的第 1 项) (-1 + {to fill y} 的第 1 项) diff void 不成立

如果 ({tile type} = {fill tile}) 那么

如果 {to fill id} 包含 连接 连接 {to fill x} 的第 1 项 和 , 和 (-1 + {to fill y} 的第 1 项) ? 不成立 那么

将 连接 连接 {to fill x} 的第 1 项 和 , 和 (-1 + {to fill y} 的第 1 项) 加入 {to fill id}

将 {to fill x} 的第 1 项 加入 {to fill x}

将 (-1 + {to fill y} 的第 1 项) 加入 {to fill y}

删除 {to fill id} 的第 1 项

删除 {to fill x} 的第 1 项

删除 {to fill y} 的第 1 项

将 {cam chunk x} 设为

将 {cam chunk y} 设为

 

ui

代码

当 绿旗 被点击

将 {reset hold timer} 设为 0

 

当接收到 update ui

将 {hovered ui} 设为

移到 x:0 y:0

换成 icon 造型

将大小设为 100

清除图形特效

如果 ({screen} = menu) 那么

执行 // menu

执行 stamp title text

如果 ({! save state} = new) 那么

移到 x:0 y:20

执行 stamp new game

将y坐标增加 -25

执行 stamp load game

将y坐标增加 -25

执行 stamp settings

否则

移到 x:0 y:20

执行 stamp continue

将y坐标增加 -25

执行 stamp save game

将y坐标增加 -25

执行 stamp load game

将y坐标增加 -25

执行 stamp settings

否则

执行 //

移到 x:0 y:0

如果 (({screen} = intro) 或 ({screen} = credits)) 不成立 那么

换成 menu1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

如果 ({screen} = vehicles) 那么

执行 // vehicles

执行 stamp vehicles3

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp cfg boxes

否则

如果 ({screen} = sub) 那么

执行 // sub

执行 stamp sub

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

如果 ({ready to launch} = 1) 那么

换成 launch2 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

否则

将 虚像 特效设定为 70

执行 stamp launch1

清除图形特效

移到 x:200 y:123

执行 stamp pencil icon

如果 ({^ selected hull} = 0) 不成立 那么

移到 x:0 y:0

执行 stamp sub colour slider

换成 icon 造型

移到 x:(75 + (0.5 * {^ sub colour})) y:-20

执行 stamp colour grab

如果 ({= owned parts} 的项目数 > 5) 那么

移到 x:0 y:0

执行 stamp parts scroll slider

换成 icon 造型

移到 x:-206 y:(100 - (220 * {sub parts scroll}))

执行 stamp parts scroll

否则

如果 ({screen} = parts) 那么

执行 // parts

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp parts3

移到 x:-200 y:100

执行 stamp resource colours

否则

如果 ({screen} = achievements) 那么

执行 // achievements

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp achievements3

执行 stamp ach scroll slider

换成 icon 造型

移到 x:-206 y:(100 - (250 * {achievements scroll}))

执行 stamp ach scroll

否则

如果 ({screen} = settings) 那么

移到 x:0 y:0

执行 stamp settings screen

执行 stamp settings screen2

将 亮度 特效设定为 100

清除图形特效

移到 x:120 y:50

如果 ({low quality?} = 1) 那么

换成 quality low 造型

否则

换成 quality high 造型

将大小设为 200

图章

将大小设为 100

移到 x:-206 y:-16

换成 generic slider touch 造型

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 music slider

执行 stamp generic slider track

将x坐标增加 (100 * {music volume fac})

执行 stamp generic slider click

移到 x:-206 y:-60

换成 generic slider touch 造型

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 sfx slider

执行 stamp generic slider track

将x坐标增加 (100 * {sfx volume fac})

执行 stamp generic slider click

移到 x:-206 y:-110

执行 stamp reset game

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 reset game

将 虚像 特效设定为 (100 - ({reset hold timer} * 33))

执行 stamp reset game3

将 虚像 特效设定为 0

执行 stamp reset game2

移到 x:-206 y:25

如果 ({low quality?} = 1) 那么

执行 stamp generic toggle r

否则

执行 stamp generic toggle

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 quality toggle

否则

如果 ({screen} = intro) 那么

移到 x:0 y:0

执行 stamp intro btn1

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 start with tutorial

执行 stamp intro btn2

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 start normal

否则

换成 icon 造型

将大小设为 100

移到 x:0 y:0

执行 //

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 stage clicked

如果 ({screen} = world) 那么

如果 ((鼠标的y坐标 > 156) 与 (鼠标的x坐标 > 216)) 那么

如果 ({sub loss reason} = ) 那么

如果 ({sub lift state} = lifted) 那么

将 {screen} 设为 sub

否则

将 {screen} 设为 menu

删除 {text} 的全部项目

将 {show inventory?} 设为 0

否则

如果 ({hovered function button} = ) 不成立 那么

执行 // bottom buttons on screen

执行 clicked button function

否则

如果 ({screen} = menu) 那么

如果 (鼠标的x坐标 > -180) 那么

如果 (鼠标的x坐标 < -75) 那么

如果 (鼠标的y坐标 < 33) 那么

如果 ({! save state} = new) 那么

如果 (鼠标的y坐标 > 9) 那么

执行 // new

将 {black cover} 设为 100

将 {screen} 设为 vehicles

将 {! save state} 设为 active

播放声音 menu click special

否则

如果 (鼠标的y坐标 > -16) 那么

执行 // load

播放声音 click

询问 Paste save code (leave blank to cancel): 并等待

广播 LOAD

否则

如果 (鼠标的y坐标 > -41) 那么

将 {screen} 设为 settings

播放声音 click

否则

如果 (鼠标的y坐标 > 9) 那么

执行 // continue

将 {black cover} 设为 100

如果 ({sub lift state} = lifted) 那么

将 {screen} 设为 vehicles

否则

将 {screen} 设为 world

播放声音 click

否则

如果 (鼠标的y坐标 > -16) 那么

执行 // save

将 {screen} 设为 save warn

播放声音 click

否则

如果 (鼠标的y坐标 > -41) 那么

执行 // load

播放声音 click

询问 Paste save code (leave blank to cancel): 并等待

广播 LOAD

否则

如果 (鼠标的y坐标 > -66) 那么

将 {screen} 设为 settings

播放声音 click

否则

如果 (鼠标的y坐标 > 147) 那么

将 {selected part type (hull/part)} 设为

将 {selected part} 设为

如果 (鼠标的x坐标 < -168) 那么

如果 ({screen} = credits) 不成立 那么

如果 ({screen} = sub) 那么

广播 save sub config

如果 ({screen} = save) 那么

广播 hide save

将 {screen} 设为 menu

删除 {text} 的全部项目

播放声音 click

否则

如果 (({screen} = vehicles) 或 (({screen} = sub) 或 (({screen} = parts) 或 ({screen} = achievements)))) 那么

如果 (鼠标的x坐标 < -68) 那么

如果 ({screen} = sub) 那么

广播 save sub config

将 {screen} 设为 vehicles

删除 {text} 的全部项目

播放声音 click

否则

如果 (鼠标的x坐标 < 8) 那么

如果 ({screen} = sub) 那么

广播 save sub config

广播 unlock parts

将 {screen} 设为 parts

删除 {text} 的全部项目

播放声音 click

否则

如果 (鼠标的x坐标 < 138) 那么

如果 ({screen} = sub) 那么

广播 save sub config

广播 check for all ach completion

将 {screen} 设为 achievements

删除 {text} 的全部项目

播放声音 click

否则

如果 ({screen} = sub) 那么

如果 ((鼠标的y坐标 < -147) 与 (鼠标的x坐标 > 20)) 那么

如果 ({ready to launch} = 1) 那么

广播 launch

否则

如果 ({^ selected hull} = 0) 那么

执行 add text not ready for launch: no hull

否则

如果 ({@ installed parts} 的项目数 > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

执行 add text not ready for launch: too many parts

否则

如果 ({= owned hulls} 的第 {^ selected hull} 项 = 0) 那么

执行 add text not ready for launch: hull unowned

否则

执行 add text not ready for launch: missing parts

否则

移到 x:200 y:123

换成 pencil click 造型

如果 碰到 鼠标指针? 那么

播放声音 click

询问 Rename submersible configuration. 20 character limit, no special characters except - _ . 并等待

如果 (回答 = ) 不成立 那么

执行 rename

否则

移到 x:73 y:10

换成 hull click 1 造型

如果 碰到 鼠标指针? 那么

执行 // prev hull

执行 change hull -1

播放声音 hull

否则

移到 x:83 y:10

换成 hull click 2 造型

如果 碰到 鼠标指针? 那么

执行 // next hull

执行 change hull 1

播放声音 hull

否则

换成 hull click 1 造型

移到 x:0 y:0

如果 (鼠标的x坐标 > 67) 那么

如果 ({^ selected hull} = 0) 不成立 那么

如果 ((鼠标的x坐标 < 200) 与 ((鼠标的y坐标 < -14) 与 (鼠标的y坐标 > -24))) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {^ sub colour} 设为 四舍五入((2 * (鼠标的x坐标 - 75)))

如果 ({^ sub colour} > 200) 那么

将 {^ sub colour} 设为 200

如果 ({^ sub colour} < 0) 那么

将 {^ sub colour} 设为 0

将 {@ sub configs} 的第 (2 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项替换为 {^ sub colour}

否则

如果 ((鼠标的x坐标 < -200) 与 ((鼠标的x坐标 > -211) 与 ((鼠标的y坐标 < 105) 与 (鼠标的y坐标 > -130)))) 那么

如果 ({= owned parts} 的项目数 > 5) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {sub parts scroll} 设为 ((100 - 鼠标的y坐标) / 220)

如果 ({sub parts scroll} > 1) 那么

将 {sub parts scroll} 设为 1

如果 ({sub parts scroll} < 0) 那么

将 {sub parts scroll} 设为 0

否则

将 {sub parts scroll} 设为 0

否则

否则

如果 ({screen} = vehicles) 那么

如果 ((鼠标的x坐标 < 42) 与 ((鼠标的x坐标 > -210) 与 ((鼠标的y坐标 < 102) 与 (鼠标的y坐标 > -150)))) 那么

移到 x:-100 y:72

换成 configbox click all 造型

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 1

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 2

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 3

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 4

否则

如果 ({screen} = achievements) 那么

如果 ((鼠标的x坐标 < -200) 与 ((鼠标的x坐标 > -211) 与 ((鼠标的y坐标 < 124) 与 (鼠标的y坐标 > -153)))) 那么

如果 (({achievements} 的项目数 / 5) > 5) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {achievements scroll} 设为 ((100 - 鼠标的y坐标) / 250)

如果 ({achievements scroll} > 1) 那么

将 {achievements scroll} 设为 1

如果 ({achievements scroll} < 0) 那么

将 {achievements scroll} 设为 0

否则

将 {achievements scroll} 设为 0

否则

如果 ({screen} = settings) 那么

执行 // settings

如果 ({hovered ui} = quality toggle) 那么

将 {low quality?} 设为 (1 - ({low quality?} = 1))

播放声音 click

否则

如果 ({hovered ui} = music slider) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {music volume fac} 设为 ((鼠标的x坐标 + 206) / 100)

如果 ({music volume fac} < 0) 那么

将 {music volume fac} 设为 0

否则

如果 ({music volume fac} > 1) 那么

将 {music volume fac} 设为 1

否则

如果 ({hovered ui} = sfx slider) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {sfx volume fac} 设为 ((鼠标的x坐标 + 206) / 100)

如果 ({sfx volume fac} < 0) 那么

将 {sfx volume fac} 设为 0

否则

如果 ({sfx volume fac} > 1) 那么

将 {sfx volume fac} 设为 1

否则

如果 ({hovered ui} = reset game) 那么

播放声音 click

将 {reset hold timer} 设为 0

重复执行直到 按下鼠标? 不成立

将 {reset hold timer} 增加 {Δt}

如果 ({reset hold timer} > 3) 那么

广播 reset game to new 并等待

等待 0 秒

停止 全部脚本

将 {reset hold timer} 设为 0

否则

否则

如果 ({screen} = intro) 那么

如果 ({hovered ui} = start with tutorial) 那么

将 {screen} 设为 menu

将 {tutorial phase} 设为 config1

否则

如果 ({hovered ui} = start normal) 那么

将 {screen} 设为 menu

将 {tutorial phase} 设为

否则

 

当接收到 launch

执行 // launch

将 {selected part} 设为

删除 {text} 的全部项目

将 {sub lift state} 设为 lifted

将 {x} 设为 0

将 {y} 设为 3

将 {screen} 设为 world

将 {black cover} 设为 100

广播 update sub specs

播放声音 deploy2

 

当接收到 update world ui

如果 (({end animation state} = holding) 或 ({end animation state} = pulling)) 那么

停止 这个脚本

执行 render available functions

如果 ({sub loss reason} = ) 那么

移到 x:226 y:166

将大小设为 200

将 亮度 特效设定为 100

执行 stamp costume with shadow menu from world g 50

如果 碰到 鼠标指针? 那么

将 虚像 特效设定为 0

图章

换成 icon 造型

执行 //

 

定义 stamp {name}

换成 {name} 造型

图章

 

播放声音 534795_diicorp95_gui-click-sfx

否则

播放声音 click

换成 configbox click up 造型

如果 碰到 鼠标指针? 那么

执行 // move up

如果 ({id} > 1) 那么

将 {swap data} 设为 {@ sub configs pointers} 的第 {id} 项

删除 {@ sub configs pointers} 的第 {id} 项

在 {swap data} 的第 ({id} - 1) 项前插入 {@ sub configs pointers}

否则

换成 configbox click down 造型

如果 碰到 鼠标指针? 那么

执行 // move down

如果 ({id} < {@ sub configs pointers} 的项目数) 那么

将 {swap data} 设为 {@ sub configs pointers} 的第 {id} 项

删除 {@ sub configs pointers} 的第 {id} 项

在 {swap data} 的第 ({id} + 1) 项前插入 {@ sub configs pointers}

 

当 绿旗 被点击

将 {reset hold timer} 设为 0

 

当接收到 launch

执行 // launch

将 {selected part} 设为

删除 {text} 的全部项目

将 {sub lift state} 设为 lifted

将 {x} 设为 0

将 {y} 设为 3

将 {screen} 设为 world

将 {black cover} 设为 100

广播 update sub specs

播放声音 deploy2

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 update ui

将 {hovered ui} 设为

移到 x:0 y:0

换成 icon 造型

将大小设为 100

清除图形特效

如果 ({screen} = menu) 那么

执行 // menu

执行 stamp title text

如果 ({! save state} = new) 那么

移到 x:0 y:20

执行 stamp new game

将y坐标增加 -25

执行 stamp load game

将y坐标增加 -25

执行 stamp settings

否则

移到 x:0 y:20

执行 stamp continue

将y坐标增加 -25

执行 stamp save game

将y坐标增加 -25

执行 stamp load game

将y坐标增加 -25

执行 stamp settings

否则

执行 //

移到 x:0 y:0

如果 (({screen} = intro) 或 ({screen} = credits)) 不成立 那么

换成 menu1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

如果 ({screen} = vehicles) 那么

执行 // vehicles

执行 stamp vehicles3

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp cfg boxes

否则

如果 ({screen} = sub) 那么

执行 // sub

执行 stamp sub

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

如果 ({ready to launch} = 1) 那么

换成 launch2 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

否则

将 虚像 特效设定为 70

执行 stamp launch1

清除图形特效

移到 x:200 y:123

执行 stamp pencil icon

如果 ({^ selected hull} = 0) 不成立 那么

移到 x:0 y:0

执行 stamp sub colour slider

换成 icon 造型

移到 x:(75 + (0.5 * {^ sub colour})) y:-20

执行 stamp colour grab

如果 ({= owned parts} 的项目数 > 5) 那么

移到 x:0 y:0

执行 stamp parts scroll slider

换成 icon 造型

移到 x:-206 y:(100 - (220 * {sub parts scroll}))

执行 stamp parts scroll

否则

如果 ({screen} = parts) 那么

执行 // parts

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 achievements1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp parts3

移到 x:-200 y:100

执行 stamp resource colours

否则

如果 ({screen} = achievements) 那么

执行 // achievements

换成 vehicles1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

换成 parts1 造型

如果 碰到 鼠标指针? 那么

下一个造型

图章

执行 stamp achievements3

执行 stamp ach scroll slider

换成 icon 造型

移到 x:-206 y:(100 - (250 * {achievements scroll}))

执行 stamp ach scroll

否则

如果 ({screen} = settings) 那么

移到 x:0 y:0

执行 stamp settings screen

执行 stamp settings screen2

将 亮度 特效设定为 100

清除图形特效

移到 x:120 y:50

如果 ({low quality?} = 1) 那么

换成 quality low 造型

否则

换成 quality high 造型

将大小设为 200

图章

将大小设为 100

移到 x:-206 y:-16

换成 generic slider touch 造型

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 music slider

执行 stamp generic slider track

将x坐标增加 (100 * {music volume fac})

执行 stamp generic slider click

移到 x:-206 y:-60

换成 generic slider touch 造型

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 sfx slider

执行 stamp generic slider track

将x坐标增加 (100 * {sfx volume fac})

执行 stamp generic slider click

移到 x:-206 y:-110

执行 stamp reset game

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 reset game

将 虚像 特效设定为 (100 - ({reset hold timer} * 33))

执行 stamp reset game3

将 虚像 特效设定为 0

执行 stamp reset game2

移到 x:-206 y:25

如果 ({low quality?} = 1) 那么

执行 stamp generic toggle r

否则

执行 stamp generic toggle

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 quality toggle

否则

如果 ({screen} = intro) 那么

移到 x:0 y:0

执行 stamp intro btn1

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 start with tutorial

执行 stamp intro btn2

如果 碰到 鼠标指针? 那么

将 {hovered ui} 设为 start normal

否则

换成 icon 造型

将大小设为 100

移到 x:0 y:0

执行 //

 

当接收到 stage clicked

如果 ({screen} = world) 那么

如果 ((鼠标的y坐标 > 156) 与 (鼠标的x坐标 > 216)) 那么

如果 ({sub loss reason} = ) 那么

如果 ({sub lift state} = lifted) 那么

将 {screen} 设为 sub

否则

将 {screen} 设为 menu

删除 {text} 的全部项目

将 {show inventory?} 设为 0

否则

如果 ({hovered function button} = ) 不成立 那么

执行 // bottom buttons on screen

执行 clicked button function

否则

如果 ({screen} = menu) 那么

如果 (鼠标的x坐标 > -180) 那么

如果 (鼠标的x坐标 < -75) 那么

如果 (鼠标的y坐标 < 33) 那么

如果 ({! save state} = new) 那么

如果 (鼠标的y坐标 > 9) 那么

执行 // new

将 {black cover} 设为 100

将 {screen} 设为 vehicles

将 {! save state} 设为 active

播放声音 menu click special

否则

如果 (鼠标的y坐标 > -16) 那么

执行 // load

播放声音 click

询问 Paste save code (leave blank to cancel): 并等待

广播 LOAD

否则

如果 (鼠标的y坐标 > -41) 那么

将 {screen} 设为 settings

播放声音 click

否则

如果 (鼠标的y坐标 > 9) 那么

执行 // continue

将 {black cover} 设为 100

如果 ({sub lift state} = lifted) 那么

将 {screen} 设为 vehicles

否则

将 {screen} 设为 world

播放声音 click

否则

如果 (鼠标的y坐标 > -16) 那么

执行 // save

将 {screen} 设为 save warn

播放声音 click

否则

如果 (鼠标的y坐标 > -41) 那么

执行 // load

播放声音 click

询问 Paste save code (leave blank to cancel): 并等待

广播 LOAD

否则

如果 (鼠标的y坐标 > -66) 那么

将 {screen} 设为 settings

播放声音 click

否则

如果 (鼠标的y坐标 > 147) 那么

将 {selected part type (hull/part)} 设为

将 {selected part} 设为

如果 (鼠标的x坐标 < -168) 那么

如果 ({screen} = credits) 不成立 那么

如果 ({screen} = sub) 那么

广播 save sub config

如果 ({screen} = save) 那么

广播 hide save

将 {screen} 设为 menu

删除 {text} 的全部项目

播放声音 click

否则

如果 (({screen} = vehicles) 或 (({screen} = sub) 或 (({screen} = parts) 或 ({screen} = achievements)))) 那么

如果 (鼠标的x坐标 < -68) 那么

如果 ({screen} = sub) 那么

广播 save sub config

将 {screen} 设为 vehicles

删除 {text} 的全部项目

播放声音 click

否则

如果 (鼠标的x坐标 < 8) 那么

如果 ({screen} = sub) 那么

广播 save sub config

广播 unlock parts

将 {screen} 设为 parts

删除 {text} 的全部项目

播放声音 click

否则

如果 (鼠标的x坐标 < 138) 那么

如果 ({screen} = sub) 那么

广播 save sub config

广播 check for all ach completion

将 {screen} 设为 achievements

删除 {text} 的全部项目

播放声音 click

否则

如果 ({screen} = sub) 那么

如果 ((鼠标的y坐标 < -147) 与 (鼠标的x坐标 > 20)) 那么

如果 ({ready to launch} = 1) 那么

广播 launch

否则

如果 ({^ selected hull} = 0) 那么

执行 add text not ready for launch: no hull

否则

如果 ({@ installed parts} 的项目数 > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

执行 add text not ready for launch: too many parts

否则

如果 ({= owned hulls} 的第 {^ selected hull} 项 = 0) 那么

执行 add text not ready for launch: hull unowned

否则

执行 add text not ready for launch: missing parts

否则

移到 x:200 y:123

换成 pencil click 造型

如果 碰到 鼠标指针? 那么

播放声音 click

询问 Rename submersible configuration. 20 character limit, no special characters except - _ . 并等待

如果 (回答 = ) 不成立 那么

执行 rename

否则

移到 x:73 y:10

换成 hull click 1 造型

如果 碰到 鼠标指针? 那么

执行 // prev hull

执行 change hull -1

播放声音 hull

否则

移到 x:83 y:10

换成 hull click 2 造型

如果 碰到 鼠标指针? 那么

执行 // next hull

执行 change hull 1

播放声音 hull

否则

换成 hull click 1 造型

移到 x:0 y:0

如果 (鼠标的x坐标 > 67) 那么

如果 ({^ selected hull} = 0) 不成立 那么

如果 ((鼠标的x坐标 < 200) 与 ((鼠标的y坐标 < -14) 与 (鼠标的y坐标 > -24))) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {^ sub colour} 设为 四舍五入((2 * (鼠标的x坐标 - 75)))

如果 ({^ sub colour} > 200) 那么

将 {^ sub colour} 设为 200

如果 ({^ sub colour} < 0) 那么

将 {^ sub colour} 设为 0

将 {@ sub configs} 的第 (2 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项替换为 {^ sub colour}

否则

如果 ((鼠标的x坐标 < -200) 与 ((鼠标的x坐标 > -211) 与 ((鼠标的y坐标 < 105) 与 (鼠标的y坐标 > -130)))) 那么

如果 ({= owned parts} 的项目数 > 5) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {sub parts scroll} 设为 ((100 - 鼠标的y坐标) / 220)

如果 ({sub parts scroll} > 1) 那么

将 {sub parts scroll} 设为 1

如果 ({sub parts scroll} < 0) 那么

将 {sub parts scroll} 设为 0

否则

将 {sub parts scroll} 设为 0

否则

否则

如果 ({screen} = vehicles) 那么

如果 ((鼠标的x坐标 < 42) 与 ((鼠标的x坐标 > -210) 与 ((鼠标的y坐标 < 102) 与 (鼠标的y坐标 > -150)))) 那么

移到 x:-100 y:72

换成 configbox click all 造型

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 1

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 2

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 3

否则

将y坐标增加 -64

如果 碰到 鼠标指针? 那么

执行 clicked cfg box 4

否则

如果 ({screen} = achievements) 那么

如果 ((鼠标的x坐标 < -200) 与 ((鼠标的x坐标 > -211) 与 ((鼠标的y坐标 < 124) 与 (鼠标的y坐标 > -153)))) 那么

如果 (({achievements} 的项目数 / 5) > 5) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {achievements scroll} 设为 ((100 - 鼠标的y坐标) / 250)

如果 ({achievements scroll} > 1) 那么

将 {achievements scroll} 设为 1

如果 ({achievements scroll} < 0) 那么

将 {achievements scroll} 设为 0

否则

将 {achievements scroll} 设为 0

否则

如果 ({screen} = settings) 那么

执行 // settings

如果 ({hovered ui} = quality toggle) 那么

将 {low quality?} 设为 (1 - ({low quality?} = 1))

播放声音 click

否则

如果 ({hovered ui} = music slider) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {music volume fac} 设为 ((鼠标的x坐标 + 206) / 100)

如果 ({music volume fac} < 0) 那么

将 {music volume fac} 设为 0

否则

如果 ({music volume fac} > 1) 那么

将 {music volume fac} 设为 1

否则

如果 ({hovered ui} = sfx slider) 那么

播放声音 click

重复执行直到 按下鼠标? 不成立

将 {sfx volume fac} 设为 ((鼠标的x坐标 + 206) / 100)

如果 ({sfx volume fac} < 0) 那么

将 {sfx volume fac} 设为 0

否则

如果 ({sfx volume fac} > 1) 那么

将 {sfx volume fac} 设为 1

否则

如果 ({hovered ui} = reset game) 那么

播放声音 click

将 {reset hold timer} 设为 0

重复执行直到 按下鼠标? 不成立

将 {reset hold timer} 增加 {Δt}

如果 (({reset hold timer} > 3) 或 (({$ dev?} = 1) 与 ({reset hold timer} > 1))) 那么

广播 reset game to new 并等待

等待 0 秒

停止 全部脚本

将 {reset hold timer} 设为 0

否则

否则

如果 ({screen} = intro) 那么

如果 ({hovered ui} = start with tutorial) 那么

将 {screen} 设为 menu

将 {tutorial phase} 设为 config1

否则

如果 ({hovered ui} = start normal) 那么

将 {screen} 设为 menu

将 {tutorial phase} 设为

否则

 

当接收到 update world ui

如果 (({end animation state} = holding) 或 ({end animation state} = pulling)) 那么

停止 这个脚本

执行 render available functions

如果 ({sub loss reason} = ) 那么

移到 x:226 y:166

将大小设为 200

将 亮度 特效设定为 100

执行 stamp costume with shadow menu from world g 50

如果 碰到 鼠标指针? 那么

将 虚像 特效设定为 0

图章

换成 icon 造型

执行 //

 

定义 rename

将 {^ sub name} 设为

执行 add text new name saved

定义 stamp {name}

换成 {name} 造型

图章

 

定义 change hull {dir}

重复执行 ({unlocked hulls} 的项目数 + 1) 次

将 {^ selected hull} 增加 {dir}

如果 ({^ selected hull} < 0) 那么

将 {^ selected hull} 设为 {unlocked hulls} 的项目数

否则

如果 ({^ selected hull} > {unlocked hulls} 的项目数) 那么

将 {^ selected hull} 设为 0

如果 (({^ selected hull} = 0) 或 ({= owned hulls} 的第 {^ selected hull} 项 = 1)) 那么

将 {@ sub configs} 的第 (3 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项替换为 {^ selected hull}

广播 update sub specs

停止 这个脚本

 

执行 // now reset part availability

删除 {= part availability} 的全部项目

 

清除图形特效

 

如果 ({@ sub configs pointers} 的项目数 < 4) 那么

执行 stamp configbox4

换成 configbox click all 造型

如果 碰到 鼠标指针? 那么

将 亮度 特效设定为 -20

执行 stamp configbox outline

清除图形特效

 

执行 // add installed parts

删除 {@ installed parts} 的全部项目

将 {installed i} 设为 (4 + {@ sub configs pointers} 的第 {sub cfg index} 项)

重复执行 ({@ sub configs} 的第 (0 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项 - 4) 次

如果 {temp parts} 包含 {@ sub configs} 的第 {installed i} 项 ? 那么

删除 {temp parts} 的第 {temp parts} 中第一个 {@ sub configs} 的第 {installed i} 项 的编号 项

将 {@ sub configs} 的第 {installed i} 项 加入 {@ installed parts}

否则

执行 // part not owned

执行 add text 连接 连接 连接 [ 和 {@ parts reference} 的第 (1 + {@ parts reference} 中第一个 {@ sub configs} 的第 {installed i} 项 的编号) 项 和 ] 和 not owned, part removed 8

将 {installed i} 增加 1

执行 reset availability

执行 //

广播 update sub specs

 

定义 clicked button function

如果 ({hovered function button} = light) 那么

广播 toggle light

否则

如果 ({hovered function button} = add waypoint) 那么

广播 add waypoint

否则

如果 ({hovered function button} = waypoint) 那么

广播 toggle waypoints

否则

如果 ({hovered function button} = inventory) 那么

广播 toggle inventory

否则

如果 ({hovered function button} = map) 那么

广播 toggle player map

将 {hovered function button} 设为

否则

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 stamp costume with shadow {name} g {g}

换成 {name} 造型

将 虚像 特效设定为 ({g} * 1.2)

将 亮度 特效设定为 -100

将x坐标增加 1

将y坐标增加 -1

图章

将 虚像 特效设定为 {g}

将 亮度 特效设定为 100

将x坐标增加 -1

将y坐标增加 1

图章

 

定义 // {comment}

 

定义 clicked cfg box {id}

将 {sub cfg index} 设为 0

如果 ({id} = (1 + {@ sub configs pointers} 的项目数)) 那么

将 {sub cfg index} 设为 {id}

执行 // new sub

将 (1 + {@ sub configs} 的项目数) 加入 {@ sub configs pointers}

执行 // length of the list in configs (including itself):

将 4 加入 {@ sub configs}

执行 // name:

将 unnamed submersible 加入 {@ sub configs}

执行 // colour:

将 0 加入 {@ sub configs}

执行 // default hull:

将 0 加入 {@ sub configs}

执行 // now load the new config...

将 {^ selected hull} 设为 0

删除 {@ installed parts} 的全部项目

执行 reset availability

广播 update sub specs

播放声音 click

否则

如果 ({id} < (1 + {@ sub configs pointers} 的项目数)) 那么

换成 configbox click select 造型

如果 碰到 鼠标指针? 那么

执行 // open

执行 load sub config {id}

将 {screen} 设为 sub

播放声音 click

否则

换成 configbox click x 造型

如果 碰到 鼠标指针? 那么

执行 // delete

将 {delete i} 设为 {@ sub configs pointers} 的第 {id} 项

将 {delete length} 设为 {@ sub configs} 的第 {delete i} 项

重复执行 {delete length} 次

删除 {@ sub configs} 的第 {delete i} 项

删除 {@ sub configs pointers} 的第 {id} 项

如果 ({@ sub configs pointers} 的项目数 = 0) 那么

执行 // just in case data corruption happens, deleting will reset

删除 {@ sub configs} 的全部项目

否则

执行 // now update pointers

播放声音 534795_diicorp95_gui-click-sfx

否则

播放声音 click

换成 configbox click up 造型

如果 碰到 鼠标指针? 那么

执行 // move up

如果 ({id} > 1) 那么

将 {swap data} 设为 {@ sub configs pointers} 的第 {id} 项

删除 {@ sub configs pointers} 的第 {id} 项

在 {swap data} 的第 ({id} - 1) 项前插入 {@ sub configs pointers}

否则

换成 configbox click down 造型

如果 碰到 鼠标指针? 那么

执行 // move down

如果 ({id} < {@ sub configs pointers} 的项目数) 那么

将 {swap data} 设为 {@ sub configs pointers} 的第 {id} 项

删除 {@ sub configs pointers} 的第 {id} 项

在 {swap data} 的第 ({id} + 1) 项前插入 {@ sub configs pointers}

 

定义 load sub config {id}

将 {sub cfg index} 设为 {id}

执行 // load basic details

将 {^ sub name} 设为 {@ sub configs} 的第 (1 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项

将 {^ sub colour} 设为 {@ sub configs} 的第 (2 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项

将 {^ selected hull} 设为 {@ sub configs} 的第 (3 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项

执行 // keep a list of owned parts and remove those that get installed

执行 // if an installed part doesn't exist in this list, the part isn't owned

删除 {temp parts} 的全部项目

执行 // add installed parts

删除 {@ installed parts} 的全部项目

将 {installed i} 设为 (4 + {@ sub configs pointers} 的第 {sub cfg index} 项)

重复执行 ({@ sub configs} 的第 (0 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项 - 4) 次

如果 {temp parts} 包含 {@ sub configs} 的第 {installed i} 项 ? 那么

删除 {temp parts} 的第 {temp parts} 中第一个 {@ sub configs} 的第 {installed i} 项 的编号 项

将 {@ sub configs} 的第 {installed i} 项 加入 {@ installed parts}

否则

执行 // part not owned

执行 add text 连接 连接 连接 [ 和 {@ parts reference} 的第 (1 + {@ parts reference} 中第一个 {@ sub configs} 的第 {installed i} 项 的编号) 项 和 ] 和 not owned, part removed 8

将 {installed i} 增加 1

执行 reset availability

执行 //

广播 update sub specs

 

定义 reset availability

执行 // reset the availability to match installed parts

执行 // temp parts gets each item deleted once added

删除 {temp parts} 的全部项目

执行 // now reset part availability

删除 {= part availability} 的全部项目

 

定义 stamp cfg boxes

换成 icon 造型

移到 x:-100 y:72

如果 ({@ sub configs pointers} 的项目数 < 4) 那么

执行 stamp configbox4

换成 configbox click all 造型

如果 碰到 鼠标指针? 那么

将 亮度 特效设定为 -20

执行 stamp configbox outline

清除图形特效

 

定义 rename

将 {^ sub name} 设为

执行 add text new name saved

 

定义 change hull {dir}

重复执行 ({unlocked hulls} 的项目数 + 1) 次

将 {^ selected hull} 增加 {dir}

如果 ({^ selected hull} < 0) 那么

将 {^ selected hull} 设为 {unlocked hulls} 的项目数

否则

如果 ({^ selected hull} > {unlocked hulls} 的项目数) 那么

将 {^ selected hull} 设为 0

如果 (({^ selected hull} = 0) 或 ({= owned hulls} 的第 {^ selected hull} 项 = 1)) 那么

将 {@ sub configs} 的第 (3 + {@ sub configs pointers} 的第 {sub cfg index} 项) 项替换为 {^ selected hull}

广播 update sub specs

停止 这个脚本

 

定义 render available functions

将 {hovered function button} 设为

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 不成立 那么

停止 这个脚本

换成 icon 造型

将 亮度 特效设定为 100

将大小设为 200

移到 x:(-15 * ({available functions} 的项目数 - 1)) y:-160

清除图形特效

 

定义 clicked button function

如果 ({hovered function button} = light) 那么

广播 toggle light

否则

如果 ({hovered function button} = add waypoint) 那么

广播 add waypoint

否则

如果 ({hovered function button} = waypoint) 那么

广播 toggle waypoints

否则

如果 ({hovered function button} = inventory) 那么

广播 toggle inventory

否则

如果 ({hovered function button} = map) 那么

广播 toggle player map

将 {hovered function button} 设为

否则

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 stamp costume with shadow {name} g {g}

换成 {name} 造型

将 虚像 特效设定为 ({g} * 1.2)

将 亮度 特效设定为 -100

将x坐标增加 1

将y坐标增加 -1

图章

将 虚像 特效设定为 {g}

将 亮度 特效设定为 100

将x坐标增加 -1

将y坐标增加 1

图章

 

定义 // {comment}

 

world props

代码

当 绿旗 被点击

隐藏

 

当接收到 render props

换成 blank 造型

将大小设为 500

换成 large 造型

移到 x:(270 - ({# tile size} * {cam x})) y:(122 - ({# tile size} * {cam y}))

换成 blank 造型

将大小设为 200

换成 boat 造型

图章

如果 ({$ editor} = prop) 那么

执行 // preview the prop in the editor

执行 render all props

如果 ({selected object} = ) 不成立 那么

清除图形特效

将 虚像 特效设定为 50

移到 x:((2 * 向下取整((鼠标的x坐标 / 2))) - ({# tile size} * {cam x}) 除以 2 的余数) y:((2 * 向下取整((鼠标的y坐标 / 2))) - ({# tile size} * {cam y}) 除以 2 的余数)

换成 icon 造型

换成 {selected object} 造型

图章

否则

执行 render optimised props

清除图形特效

执行 // ship lifting cables

如果 ((({sub lift state} = lifting) 或 ({sub lift state} = lifted)) 或 ({sub lift state} = lowering)) 那么

将笔的颜色设为#777777

将笔的透明度 设为 50

将笔的粗细设为2

移到 x:(4 - ({# tile size} * {cam x})) y:(126 - ({# tile size} * {cam y}))

落笔

将y坐标设为 ({# tile size} * ({y} - {cam y}))

抬笔

移到 x:(-4 - ({# tile size} * {cam x})) y:(126 - ({# tile size} * {cam y}))

落笔

将y坐标设为 ({# tile size} * ({y} - {cam y}))

抬笔

换成 icon 造型

 

当接收到 stage clicked

如果 ({$ editor} = prop) 那么

如果 ({screen} = world) 那么

如果 ({selected object} = ) 不成立 那么

执行 place {selected object} at 向下取整((12 * ((鼠标的x坐标 / {# tile size}) + {cam x}))) 向下取整((12 * ((鼠标的y坐标 / {# tile size}) + {cam y}))) anim frames

 

当接收到 render ship for map

换成 boat 造型

将大小设为 (200 * {map scale})

移到 x:({map scale} * (270 - ({# tile size} * {cam x}))) y:({map scale} * (122 - ({cam y} * {# tile size})))

图章

 

定义 place {name} at {x} {y} anim frames {frames}

如果 ({name} = ) 不成立 那么

将 {name} 加入 {props data SOURCE}

将 {x} 加入 {props data SOURCE}

将 {y} 加入 {props data SOURCE}

将 (0 + {frames}) 加入 {props data SOURCE}

 

定义 render all props

如果 (按下 z 键? 或 按下 x 键?) 不成立 那么

将 {latest touch} 设为

将 亮度 特效设定为 (-10 * (1 - {world brightness}))

将 {i} 设为 0

重复执行 ({props data SOURCE} 的项目数 / 4) 次

换成 large 造型

移到 x:({# tile size} * (({props data SOURCE} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({props data SOURCE} 的第 ({i} + 3) 项 / 12) - {cam y}))

换成 {props data SOURCE} 的第 ({i} + 1) 项 造型

图章

如果 ({latest touch} = x) 不成立 那么

如果 (按下 z 键? 或 按下 x 键?) 那么

如果 碰到 鼠标指针? 那么

将 {latest touch} 设为 {i}

将 {i} 增加 4

如果 (({latest touch} = ) 或 ({latest touch} = x)) 不成立 那么

如果 按下 x 键? 那么

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

将 {latest touch} 设为 x

否则

将 {latest touch} 增加 1

如果 按下 z 键? 那么

在 {props data SOURCE} 的第 {latest touch} 项 的第 1 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

在 {props data SOURCE} 的第 (1 + {latest touch}) 项 的第 2 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (2 + {latest touch}) 项

在 {props data SOURCE} 的第 (2 + {latest touch}) 项 的第 3 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (3 + {latest touch}) 项

在 {props data SOURCE} 的第 (3 + {latest touch}) 项 的第 4 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (4 + {latest touch}) 项

将 {latest touch} 设为 x

 

执行 // excess

将 {j} 设为 0

重复执行 ({props data excess} 的项目数 / 4) 次

换成 large 造型

移到 x:({# tile size} * (({props data excess} 的第 ({j} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({props data excess} 的第 ({j} + 3) 项 / 12) - {cam y}))

换成 {props data excess} 的第 ({j} + 1) 项 造型

图章

将 {j} 增加 4

 

如果 (({props data excess} 的项目数 + {props data optimised} 的项目数) = {props data SOURCE} 的项目数) 不成立 那么

执行 // should be equal

执行 ​​warn​​

 

定义 // {comment}

 

当 绿旗 被点击

隐藏

 

当接收到 render props

换成 blank 造型

将大小设为 500

换成 large 造型

移到 x:(270 - ({# tile size} * {cam x})) y:(122 - ({# tile size} * {cam y}))

换成 blank 造型

将大小设为 200

换成 boat 造型

图章

如果 ({$ editor} = prop) 那么

执行 // preview the prop in the editor

执行 render all props

如果 ({selected object} = ) 不成立 那么

清除图形特效

将 虚像 特效设定为 50

移到 x:((2 * 向下取整((鼠标的x坐标 / 2))) - ({# tile size} * {cam x}) 除以 2 的余数) y:((2 * 向下取整((鼠标的y坐标 / 2))) - ({# tile size} * {cam y}) 除以 2 的余数)

换成 icon 造型

换成 {selected object} 造型

图章

否则

执行 render optimised props

清除图形特效

执行 // ship lifting cables

如果 ((({sub lift state} = lifting) 或 ({sub lift state} = lifted)) 或 ({sub lift state} = lowering)) 那么

将笔的颜色设为#777777

将笔的透明度 设为 50

将笔的粗细设为2

移到 x:(4 - ({# tile size} * {cam x})) y:(126 - ({# tile size} * {cam y}))

落笔

将y坐标设为 ({# tile size} * ({y} - {cam y}))

抬笔

移到 x:(-4 - ({# tile size} * {cam x})) y:(126 - ({# tile size} * {cam y}))

落笔

将y坐标设为 ({# tile size} * ({y} - {cam y}))

抬笔

换成 icon 造型

 

当接收到 stage clicked

如果 ({$ editor} = prop) 那么

如果 ({screen} = world) 那么

如果 ({selected object} = ) 不成立 那么

执行 place {selected object} at 向下取整((12 * ((鼠标的x坐标 / {# tile size}) + {cam x}))) 向下取整((12 * ((鼠标的y坐标 / {# tile size}) + {cam y}))) anim frames

 

当接收到 render ship for map

换成 boat 造型

将大小设为 (200 * {map scale})

移到 x:({map scale} * (270 - ({# tile size} * {cam x}))) y:({map scale} * (122 - ({cam y} * {# tile size})))

图章

 

定义 generate optimised props

执行 // excess list will get items deleted as props are added to chunks

删除 {props data excess} 的全部项目

执行 //

删除 {props data pointers} 的全部项目

删除 {props data length} 的全部项目

删除 {props data optimised} 的全部项目

如果 (({props data excess} 的项目数 + {props data optimised} 的项目数) = {props data SOURCE} 的项目数) 不成立 那么

执行 // should be equal

执行 ​​warn​​

 

定义 render optimised props

将 亮度 特效设定为 (-10 * (1 - {world brightness}))

执行 // excess

将 {j} 设为 0

重复执行 ({props data excess} 的项目数 / 4) 次

换成 large 造型

移到 x:({# tile size} * (({props data excess} 的第 ({j} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({props data excess} 的第 ({j} + 3) 项 / 12) - {cam y}))

换成 {props data excess} 的第 ({j} + 1) 项 造型

图章

将 {j} 增加 4

 

定义 render all props

如果 (按下 z 键? 或 按下 x 键?) 不成立 那么

将 {latest touch} 设为

将 亮度 特效设定为 (-10 * (1 - {world brightness}))

将 {i} 设为 0

重复执行 ({props data SOURCE} 的项目数 / 4) 次

换成 large 造型

移到 x:({# tile size} * (({props data SOURCE} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({props data SOURCE} 的第 ({i} + 3) 项 / 12) - {cam y}))

换成 {props data SOURCE} 的第 ({i} + 1) 项 造型

图章

如果 ({latest touch} = x) 不成立 那么

如果 (按下 z 键? 或 按下 x 键?) 那么

如果 碰到 鼠标指针? 那么

将 {latest touch} 设为 {i}

将 {i} 增加 4

如果 (({latest touch} = ) 或 ({latest touch} = x)) 不成立 那么

如果 按下 x 键? 那么

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

将 {latest touch} 设为 x

否则

将 {latest touch} 增加 1

如果 按下 z 键? 那么

在 {props data SOURCE} 的第 {latest touch} 项 的第 1 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (1 + {latest touch}) 项

在 {props data SOURCE} 的第 (1 + {latest touch}) 项 的第 2 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (2 + {latest touch}) 项

在 {props data SOURCE} 的第 (2 + {latest touch}) 项 的第 3 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (3 + {latest touch}) 项

在 {props data SOURCE} 的第 (3 + {latest touch}) 项 的第 4 项前插入 {props data SOURCE}

删除 {props data SOURCE} 的第 (4 + {latest touch}) 项

将 {latest touch} 设为 x

 

定义 place {name} at {x} {y} anim frames {frames}

如果 ({name} = ) 不成立 那么

将 {name} 加入 {props data SOURCE}

将 {x} 加入 {props data SOURCE}

将 {y} 加入 {props data SOURCE}

将 (0 + {frames}) 加入 {props data SOURCE}

 

定义 // {comment}

 

resources

代码

当 绿旗 被点击

重复执行

等待 (({^ sub drill} > 0) 与 ({drill progress} > 0))

将音量设为 ({sfx volume fac} * 100)%

播放声音 drill

等待 (按下鼠标? 不成立 或 ({drill progress} = 0))

重复执行 10 次

将音量增加 -10

 

当 绿旗 被点击

隐藏

换成 icon 造型

将大小设为 200

 

当接收到 render resources

清除图形特效

执行 render resources

如果 ({drill progress} = 0) 那么

如果 ((绝对值(鼠标的x坐标) > 230) 或 (绝对值(鼠标的y坐标) > 170)) 那么

将 {resource hovered} 设为

将 {resource type} 设为

如果 ({$ editor} = resource) 那么

如果 ({selected object} = ) 不成立 那么

将 虚像 特效设定为 50

移到 x:((2 * 向下取整((鼠标的x坐标 / 2))) - ({# tile size} * {cam x}) 除以 2 的余数) y:((2 * 向下取整((鼠标的y坐标 / 2))) - ({# tile size} * {cam y}) 除以 2 的余数)

换成 连接 {selected object} 和 {selected rand num} 除以 10 的余数 造型

图章

如果 ({resource type} = mn) 那么

将 {resource name} 设为 manganese

否则

如果 ({resource type} = ni) 那么

将 {resource name} 设为 nickel

否则

如果 ({resource type} = cu) 那么

将 {resource name} 设为 copper

否则

如果 ({resource type} = co) 那么

将 {resource name} 设为 cobalt

否则

如果 ({resource type} = ag) 那么

将 {resource name} 设为 silver

否则

如果 ({resource type} = ti) 那么

将 {resource name} 设为 titanium

否则

将 {resource name} 设为

执行 run drill

换成 icon 造型

执行 //

 

当接收到 render achievements

移到 x:35 y:72

清除图形特效

执行 render achievement resource manganese mn0

执行 render achievement resource nickel ni4

执行 render achievement resource copper cu0

执行 render achievement resource cobalt co3

执行 render achievement resource silver ag3

执行 render achievement resource titanium ti7

换成 icon 造型

 

当接收到 ! reset

删除 {resource names} 的全部项目

删除 {resource element symbols} 的全部项目

将 manganese 加入 {resource names}

将 mn 加入 {resource element symbols}

将 nickel 加入 {resource names}

将 ni 加入 {resource element symbols}

将 copper 加入 {resource names}

将 cu 加入 {resource element symbols}

将 cobalt 加入 {resource names}

将 co 加入 {resource element symbols}

将 silver 加入 {resource names}

将 ag 加入 {resource element symbols}

将 titanium 加入 {resource names}

将 ti 加入 {resource element symbols}

执行 reset distributions

执行 copy read only

删除 {temp} 的全部项目

 

当接收到 sort resources

执行 sort resources

 

当接收到 render dev map overlay

执行 render resource overlay for map

 

定义 determine probabilities {y}

删除 {resource probabilities} 的全部项目

将 {i} 设为 0

重复执行 ({resource distributions} 的项目数 / 4) 次

如果 ({resource distributions} 的第 ({i} + 2) 项 < (0 - {y})) 那么

如果 ((0 - {y}) < {resource distributions} 的第 ({i} + 3) 项) 那么

将 {resource distributions} 的第 ({i} + 1) 项 加入 {resource probabilities}

将 ({resource probabilities} 的第 ({resource probabilities} 的项目数 - 1) 项 + (1 / {resource distributions} 的第 ({i} + 4) 项)) 加入 {resource probabilities}

将 {i} 增加 4

 

定义 render resource overlay for map

将 {i} 设为 0

重复执行 ({resource distributions} 的项目数 / 4) 次

如果 (mn = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#c52665

否则

如果 (ni = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#6dc194

否则

如果 (cu = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#d38132

否则

如果 (co = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#4b72c0

否则

如果 (ag = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#cbcbcb

否则

如果 (ti = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#4f4f4f

否则

将笔的颜色设为#ffffff

将y坐标设为 ({map scale} * ({# tile size} * ((0 - {resource distributions} 的第 ({i} + 2) 项) - {cam y})))

将笔的粗细设为2

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标增加 -5

将笔的粗细设为8

将笔的透明度 设为 90

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标设为 ({map scale} * ({# tile size} * ((0 - {resource distributions} 的第 ({i} + 3) 项) - {cam y})))

将笔的粗细设为2

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标增加 5

将笔的粗细设为8

将笔的透明度 设为 90

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将 {i} 增加 4

 

定义 add resource

将 {scatter i} 设为 0

重复执行 ({resource probabilities} 的项目数 / 2) 次

如果 ({resource probability} < {resource probabilities} 的第 ({scatter i} + 2) 项) 那么

执行 place 连接 {resource probabilities} 的第 ({scatter i} + 1) 项 和 在 0 和 9 之间取随机数 at ((12 * {ix}) + 在 4 和 8 之间取随机数) ((12 * {iy}) + 在 0 和 2 之间取随机数)

执行 increment logger (1 + {resources placed logger} 中第一个 {resource probabilities} 的第 ({scatter i} + 1) 项 的编号)

将 {total resources placed} 增加 1

停止 这个脚本

将 {scatter i} 增加 2

 

定义 copy read only

执行 // reset resources by loading from read only

删除 {resource data} 的全部项目

 

定义 add resource distribution {name} depth (min,max) {min} {max} sparseness {tile avg}

如果 (1 < {tile avg}) 那么

执行 // sparseness is how many tiles are expected to be seen before a resource is placed

将 {name} 加入 {resource distributions}

将 {min} 加入 {resource distributions}

将 {max} 加入 {resource distributions}

将 {tile avg} 加入 {resource distributions}

 

定义 render resources

将 {resource dist} 设为 50

将 {resource mouse dist} 设为 15

将 {resource hovered} 设为

将 {resource type} 设为

将 {i} 设为 0

重复执行 ({resource data} 的项目数 / 3) 次

换成 large 造型

移到 x:({# tile size} * (({resource data} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({resource data} 的第 ({i} + 3) 项 / 12) - {cam y}))

如果 (y坐标 < 200) 那么

如果 ({^ sub drill} > 0) 那么

如果 (到 鼠标指针 的距离 < 15) 那么

如果 (到 鼠标指针 的距离 < {resource mouse dist}) 那么

将 {resource hovered} 设为 {i}

将 {resource dist} 设为 到 submersible 的距离

将 {resource mouse dist} 设为 到 鼠标指针 的距离

将 {resource type} 设为 连接 {resource data} 的第 ({i} + 1) 项 的第 1 个字符 和 {resource data} 的第 ({i} + 1) 项 的第 2 个字符

如果 ({resource mouse dist} < 15) 不成立 那么

如果 (到 submersible 的距离 < {resource dist}) 那么

将 {resource hovered} 设为 {i}

将 {resource dist} 设为 到 submersible 的距离

将 {resource mouse dist} 设为 到 鼠标指针 的距离

将 {resource type} 设为 连接 {resource data} 的第 ({i} + 1) 项 的第 1 个字符 和 {resource data} 的第 ({i} + 1) 项 的第 2 个字符

换成 {resource data} 的第 ({i} + 1) 项 造型

图章

如果 (y坐标 < -200) 那么

停止 这个脚本

将 {i} 增加 3

 

当 绿旗 被点击

重复执行

等待 (({^ sub drill} > 0) 与 ({drill progress} > 0))

将音量设为 ({sfx volume fac} * 100)%

播放声音 drill

等待 (按下鼠标? 不成立 或 ({drill progress} = 0))

重复执行 10 次

将音量增加 -10

 

当 绿旗 被点击

隐藏

换成 icon 造型

将大小设为 200

 

当接收到 render resources

清除图形特效

执行 render resources

如果 ({drill progress} = 0) 那么

如果 ((绝对值(鼠标的x坐标) > 230) 或 (绝对值(鼠标的y坐标) > 170)) 那么

将 {resource hovered} 设为

将 {resource type} 设为

如果 ({resource type} = mn) 那么

将 {resource name} 设为 manganese

否则

如果 ({resource type} = ni) 那么

将 {resource name} 设为 nickel

否则

如果 ({resource type} = cu) 那么

将 {resource name} 设为 copper

否则

如果 ({resource type} = co) 那么

将 {resource name} 设为 cobalt

否则

如果 ({resource type} = ag) 那么

将 {resource name} 设为 silver

否则

如果 ({resource type} = ti) 那么

将 {resource name} 设为 titanium

否则

将 {resource name} 设为

执行 run drill

换成 icon 造型

执行 //

 

当接收到 sort resources

执行 sort resources

 

当接收到 render achievements

移到 x:35 y:72

清除图形特效

执行 render achievement resource manganese mn0

执行 render achievement resource nickel ni4

执行 render achievement resource copper cu0

执行 render achievement resource cobalt co3

执行 render achievement resource silver ag3

执行 render achievement resource titanium ti7

换成 icon 造型

 

当接收到 ! reset

删除 {resource names} 的全部项目

删除 {resource element symbols} 的全部项目

将 manganese 加入 {resource names}

将 mn 加入 {resource element symbols}

将 nickel 加入 {resource names}

将 ni 加入 {resource element symbols}

将 copper 加入 {resource names}

将 cu 加入 {resource element symbols}

将 cobalt 加入 {resource names}

将 co 加入 {resource element symbols}

将 silver 加入 {resource names}

将 ag 加入 {resource element symbols}

将 titanium 加入 {resource names}

将 ti 加入 {resource element symbols}

执行 reset distributions

执行 copy read only

删除 {temp} 的全部项目

 

当接收到 render dev map overlay

执行 render resource overlay for map

 

定义 run drill

如果 (overlay 的 run drill? = 1) 那么

如果 按下鼠标? 那么

如果 (({drill index} = -2) 不成立 与 (({screen} = world) 与 ({$ editor} = ))) 那么

如果 (({^ sub drill} > 0) 不成立 与 ({sub loss reason} = )) 那么

如果 (({wall hovered} = ) 不成立 或 ({resource hovered} = ) 不成立) 那么

将 no drill installed! 加入 {text}

将 5 加入 {text}

将 {drill index} 设为 -2

否则

如果 ({resource hovered} = ) 不成立 那么

执行 resource

否则

如果 ({wall hovered} = ) 不成立 那么

执行 wall

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

 

定义 reset distributions

删除 {resource distributions} 的全部项目

执行 add resource distribution mn depth (min,max) 5 200 sparseness 8

执行 add resource distribution mn depth (min,max) 200 720 sparseness 32

执行 add resource distribution ni depth (min,max) 30 70 sparseness 12

执行 add resource distribution ni depth (min,max) 70 300 sparseness 20

执行 add resource distribution ni depth (min,max) 300 720 sparseness 40

执行 add resource distribution cu depth (min,max) 55 720 sparseness 24

执行 add resource distribution co depth (min,max) 170 740 sparseness 16

执行 add resource distribution ag depth (min,max) 300 750 sparseness 16

执行 add resource distribution ti depth (min,max) 550 800 sparseness 16

删除 {resources placed logger} 的全部项目

将 mn 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ni 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 cu 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 co 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ag 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ti 加入 {resources placed logger}

将 0 加入 {resources placed logger}

 

定义 determine probabilities {y}

删除 {resource probabilities} 的全部项目

将 {i} 设为 0

重复执行 ({resource distributions} 的项目数 / 4) 次

如果 ({resource distributions} 的第 ({i} + 2) 项 < (0 - {y})) 那么

如果 ((0 - {y}) < {resource distributions} 的第 ({i} + 3) 项) 那么

将 {resource distributions} 的第 ({i} + 1) 项 加入 {resource probabilities}

将 ({resource probabilities} 的第 ({resource probabilities} 的项目数 - 1) 项 + (1 / {resource distributions} 的第 ({i} + 4) 项)) 加入 {resource probabilities}

将 {i} 增加 4

 

定义 render resource overlay for map

将 {i} 设为 0

重复执行 ({resource distributions} 的项目数 / 4) 次

如果 (mn = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#c52665

否则

如果 (ni = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#6dc194

否则

如果 (cu = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#d38132

否则

如果 (co = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#4b72c0

否则

如果 (ag = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#cbcbcb

否则

如果 (ti = {resource distributions} 的第 ({i} + 1) 项) 那么

将笔的颜色设为#4f4f4f

否则

将笔的颜色设为#ffffff

将y坐标设为 ({map scale} * ({# tile size} * ((0 - {resource distributions} 的第 ({i} + 2) 项) - {cam y})))

将笔的粗细设为2

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标增加 -5

将笔的粗细设为8

将笔的透明度 设为 90

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标设为 ({map scale} * ({# tile size} * ((0 - {resource distributions} 的第 ({i} + 3) 项) - {cam y})))

将笔的粗细设为2

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将y坐标增加 5

将笔的粗细设为8

将笔的透明度 设为 90

落笔

将x坐标设为 -300

将x坐标设为 300

抬笔

将 {i} 增加 4

 

定义 resource

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

如果 ({resource dist} < {^ sub drill range}) 那么

如果 ({drill index} = -1) 那么

将 {drill index} 设为 {resource hovered}

否则

如果 ({drill index} = {resource hovered}) 那么

将 {drill progress} 增加 ((10 * {Δt}) * {^ sub drill})

将 {battery} 增加 (0 - ({Δt} * {^ sub drill pwr consumption}))

如果 ({drill progress} > 17) 那么

将 {= total resources mined} 增加 1

删除 {resource data} 的第 (1 + {drill index}) 项

删除 {resource data} 的第 (1 + {drill index}) 项

删除 {resource data} 的第 (1 + {drill index}) 项

将 {resource name} 加入 {@ submersible storage}

将 连接 {resource name} 和 added to storage 加入 {text}

将 5 加入 {text}

如果 ({@ submersible storage} 的项目数 = {^ sub storage slots}) 那么

将 storage now full! 加入 {text}

将 5 加入 {text}

将 {drill index} 设为 -1

将 {drill progress} 设为 0

将 {resource hovered} 设为

将 {wall hovered} 设为

广播 update display inventory

广播 sfx: break resource

否则

将 {drill index} 设为 {resource hovered}

将 {drill progress} 设为 0

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

否则

如果 (0 = {^ sub storage slots}) 那么

将 no storage installed! 加入 {text}

将 5 加入 {text}

否则

将 storage full! return home or drop unneeded items 加入 {text}

将 8 加入 {text}

将 {drill index} 设为 -2

 

定义 resource

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

如果 ({resource dist} < {^ sub drill range}) 那么

如果 ({drill index} = -1) 那么

将 {drill index} 设为 {resource hovered}

否则

如果 ({drill index} = {resource hovered}) 那么

将 {drill progress} 增加 ((10 * {Δt}) * {^ sub drill})

将 {battery} 增加 (0 - ({Δt} * {^ sub drill pwr consumption}))

如果 ({drill progress} > 17) 那么

将 {= total resources mined} 增加 1

删除 {resource data} 的第 (1 + {drill index}) 项

删除 {resource data} 的第 (1 + {drill index}) 项

删除 {resource data} 的第 (1 + {drill index}) 项

将 {resource name} 加入 {@ submersible storage}

将 连接 {resource name} 和 added to storage 加入 {text}

将 5 加入 {text}

如果 ({@ submersible storage} 的项目数 = {^ sub storage slots}) 那么

将 storage now full! 加入 {text}

将 5 加入 {text}

将 {drill index} 设为 -1

将 {drill progress} 设为 0

将 {resource hovered} 设为

将 {wall hovered} 设为

广播 update display inventory

广播 sfx: break resource

否则

将 {drill index} 设为 {resource hovered}

将 {drill progress} 设为 0

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

否则

如果 (0 = {^ sub storage slots}) 那么

将 no storage installed! 加入 {text}

将 5 加入 {text}

否则

将 storage full! return home or drop unneeded items 加入 {text}

将 8 加入 {text}

将 {drill index} 设为 -2

定义 copy read only

执行 // reset resources by loading from read only

删除 {resource data} 的全部项目

 

定义 render achievement resource {item} {costume}

如果 {ship storage} 包含 {item} ? 那么

换成 unknown 造型

图章

换成 {costume} 造型

图章

否则

换成 unknown2 造型

图章

将x坐标增加 30

 

定义 wall

如果 ({wall hovered dist} < {^ sub drill range}) 那么

如果 ({wall data} 的第 (5 + {wall hovered}) 项 > {^ sub drill}) 不成立 那么

如果 ({drill index} = -1) 那么

将 {drill index} 设为 {wall hovered}

否则

如果 ({drill index} = {wall hovered}) 那么

将 {drill progress} 增加 ((5 * {Δt}) * {^ sub drill})

将 {battery} 增加 (0 - ({Δt} * {^ sub drill pwr consumption}))

如果 ({drill progress} > 17) 那么

将 {drill debris x} 设为 (0.5 + {wall data} 的第 (3 + {wall hovered}) 项)

将 {drill debris y} 设为 (0.5 + {wall data} 的第 (4 + {wall hovered}) 项)

广播 ptc: add drill debris

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

将 {drill index} 设为 -1

将 {drill progress} 设为 0

将 {resource hovered} 设为

将 {wall hovered} 设为

广播 sfx: break wall

否则

将 {drill index} 设为 {wall hovered}

将 {drill progress} 设为 0

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

 

定义 place {name} at {x} {y}

执行 // editor mode: places tiles in both lists

将 {name} 加入 {resources READ ONLY}

将 {x} 加入 {resources READ ONLY}

将 {y} 加入 {resources READ ONLY}

将 {name} 加入 {resource data}

将 {x} 加入 {resource data}

将 {y} 加入 {resource data}

 

定义 run drill

如果 (overlay 的 run drill? = 1) 那么

如果 按下鼠标? 那么

如果 (({drill index} = -2) 不成立 与 (({screen} = world) 与 ({$ editor} = ))) 那么

如果 (({^ sub drill} > 0) 不成立 与 ({sub loss reason} = )) 那么

如果 (({wall hovered} = ) 不成立 或 ({resource hovered} = ) 不成立) 那么

将 no drill installed! 加入 {text}

将 5 加入 {text}

将 {drill index} 设为 -2

否则

如果 ({resource hovered} = ) 不成立 那么

执行 resource

否则

如果 ({wall hovered} = ) 不成立 那么

执行 wall

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

 

定义 get tile type at {x} {y}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

将 {tile type} 设为

否则

将 {tile index} 设为 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 increment logger {i}

将 {resources placed logger} 的第 {i} 项替换为 (1 + {resources placed logger} 的第 {i} 项)

 

定义 distribute resources in world

执行 reset distributions

如果 ({$ dev?} = 0) 那么

执行 ​​warn​​

停止 这个脚本

删除 {resources READ ONLY} 的全部项目

删除 {resource data} 的全部项目

将 {total resources placed} 设为 0

 

定义 reset distributions

删除 {resource distributions} 的全部项目

执行 add resource distribution mn depth (min,max) 5 200 sparseness 8

执行 add resource distribution mn depth (min,max) 200 720 sparseness 32

执行 add resource distribution ni depth (min,max) 30 70 sparseness 12

执行 add resource distribution ni depth (min,max) 70 300 sparseness 20

执行 add resource distribution ni depth (min,max) 300 720 sparseness 40

执行 add resource distribution cu depth (min,max) 55 720 sparseness 24

执行 add resource distribution co depth (min,max) 170 740 sparseness 16

执行 add resource distribution ag depth (min,max) 300 750 sparseness 16

执行 add resource distribution ti depth (min,max) 550 800 sparseness 16

删除 {resources placed logger} 的全部项目

将 mn 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ni 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 cu 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 co 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ag 加入 {resources placed logger}

将 0 加入 {resources placed logger}

将 ti 加入 {resources placed logger}

将 0 加入 {resources placed logger}

 

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

 

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

 

定义 // {comment}

 

定义 get hash of chunk {i}

将 {chunk hash} 设为 0

将 {hash i} 设为 {*1 chunk pointers} 的第 {i} 项

将 {hash inc} 设为 1

如果 ({hash i} > 0) 那么

重复执行 ({# chunk size} * {# chunk size}) 次

将 {chunk hash} 增加 ({hash inc} * ({chunk data} 的第 {hash i} 项 = ))

将 {hash i} 增加 1

将 {hash inc} 增加 1

否则

执行 ​​warn​​

 

定义 add resource distribution {name} depth (min,max) {min} {max} sparseness {tile avg}

如果 (1 < {tile avg}) 那么

执行 // sparseness is how many tiles are expected to be seen before a resource is placed

将 {name} 加入 {resource distributions}

将 {min} 加入 {resource distributions}

将 {max} 加入 {resource distributions}

将 {tile avg} 加入 {resource distributions}

 

定义 add resource

将 {scatter i} 设为 0

重复执行 ({resource probabilities} 的项目数 / 2) 次

如果 ({resource probability} < {resource probabilities} 的第 ({scatter i} + 2) 项) 那么

执行 place 连接 {resource probabilities} 的第 ({scatter i} + 1) 项 和 在 0 和 9 之间取随机数 at ((12 * {ix}) + 在 4 和 8 之间取随机数) ((12 * {iy}) + 在 0 和 2 之间取随机数)

执行 increment logger (1 + {resources placed logger} 中第一个 {resource probabilities} 的第 ({scatter i} + 1) 项 的编号)

将 {total resources placed} 增加 1

停止 这个脚本

将 {scatter i} 增加 2

 

定义 sort READ ONLY

如果 ({$ dev?} = 0) 那么

执行 ​​warn​​

停止 这个脚本

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

将 {i} 设为 0

重复执行 ({resources READ ONLY} 的项目数 / 3) 次

执行 // insertion sort code

将 {min} 设为 1

将 {max} 设为 ({sorted y} 的项目数 + 1)

重复执行直到 ({max} = {min})

将 {index} 设为 向下取整((({min} + {max}) / 2))

如果 ({resources READ ONLY} 的第 ({i} + 3) 项 < {sorted y} 的第 {index} 项) 那么

将 {min} 设为 ({index} + 1)

否则

将 {max} 设为 {index}

在 {resources READ ONLY} 的第 ({i} + 1) 项 的第 {min} 项前插入 {sorted type}

在 {resources READ ONLY} 的第 ({i} + 2) 项 的第 {min} 项前插入 {sorted x}

在 {resources READ ONLY} 的第 ({i} + 3) 项 的第 {min} 项前插入 {sorted y}

将 {i} 增加 3

删除 {resources READ ONLY} 的全部项目

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

 

定义 render resources

将 {resource dist} 设为 50

将 {resource mouse dist} 设为 15

将 {resource hovered} 设为

将 {resource type} 设为

将 {i} 设为 0

重复执行 ({resource data} 的项目数 / 3) 次

换成 large 造型

移到 x:({# tile size} * (({resource data} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({resource data} 的第 ({i} + 3) 项 / 12) - {cam y}))

如果 (y坐标 < 200) 那么

如果 ({^ sub drill} > 0) 那么

如果 (到 鼠标指针 的距离 < 15) 那么

如果 (到 鼠标指针 的距离 < {resource mouse dist}) 那么

将 {resource hovered} 设为 {i}

将 {resource dist} 设为 到 submersible 的距离

将 {resource mouse dist} 设为 到 鼠标指针 的距离

将 {resource type} 设为 连接 {resource data} 的第 ({i} + 1) 项 的第 1 个字符 和 {resource data} 的第 ({i} + 1) 项 的第 2 个字符

如果 ({resource mouse dist} < 15) 不成立 那么

如果 (到 submersible 的距离 < {resource dist}) 那么

将 {resource hovered} 设为 {i}

将 {resource dist} 设为 到 submersible 的距离

将 {resource mouse dist} 设为 到 鼠标指针 的距离

将 {resource type} 设为 连接 {resource data} 的第 ({i} + 1) 项 的第 1 个字符 和 {resource data} 的第 ({i} + 1) 项 的第 2 个字符

换成 {resource data} 的第 ({i} + 1) 项 造型

图章

如果 (y坐标 < -200) 那么

停止 这个脚本

将 {i} 增加 3

 

定义 render achievement resource {item} {costume}

如果 {ship storage} 包含 {item} ? 那么

换成 unknown 造型

图章

换成 {costume} 造型

图章

否则

换成 unknown2 造型

图章

将x坐标增加 30

 

定义 wall

如果 ({wall hovered dist} < {^ sub drill range}) 那么

如果 ({wall data} 的第 (5 + {wall hovered}) 项 > {^ sub drill}) 不成立 那么

如果 ({drill index} = -1) 那么

将 {drill index} 设为 {wall hovered}

否则

如果 ({drill index} = {wall hovered}) 那么

将 {drill progress} 增加 ((5 * {Δt}) * {^ sub drill})

将 {battery} 增加 (0 - ({Δt} * {^ sub drill pwr consumption}))

如果 ({drill progress} > 17) 那么

将 {drill debris x} 设为 (0.5 + {wall data} 的第 (3 + {wall hovered}) 项)

将 {drill debris y} 设为 (0.5 + {wall data} 的第 (4 + {wall hovered}) 项)

广播 ptc: add drill debris

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

删除 {wall data} 的第 (1 + {wall hovered}) 项

将 {drill index} 设为 -1

将 {drill progress} 设为 0

将 {resource hovered} 设为

将 {wall hovered} 设为

广播 sfx: break wall

否则

将 {drill index} 设为 {wall hovered}

将 {drill progress} 设为 0

否则

将 {drill index} 设为 -1

将 {drill progress} 设为 0

 

定义 place {name} at {x} {y}

执行 // editor mode: places tiles in both lists

将 {name} 加入 {resources READ ONLY}

将 {x} 加入 {resources READ ONLY}

将 {y} 加入 {resources READ ONLY}

将 {name} 加入 {resource data}

将 {x} 加入 {resource data}

将 {y} 加入 {resource data}

 

定义 sort resources

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

将 {i} 设为 0

重复执行 ({resource data} 的项目数 / 3) 次

将 {min} 设为 1

将 {max} 设为 ({sorted y} 的项目数 + 1)

重复执行直到 ({max} = {min})

将 {index} 设为 向下取整((({min} + {max}) / 2))

如果 ({resource data} 的第 ({i} + 3) 项 < {sorted y} 的第 {index} 项) 那么

将 {min} 设为 ({index} + 1)

否则

将 {max} 设为 {index}

在 {resource data} 的第 ({i} + 1) 项 的第 {min} 项前插入 {sorted type}

在 {resource data} 的第 ({i} + 2) 项 的第 {min} 项前插入 {sorted x}

在 {resource data} 的第 ({i} + 3) 项 的第 {min} 项前插入 {sorted y}

将 {i} 增加 3

删除 {resource data} 的全部项目

删除 {sorted type} 的全部项目

删除 {sorted x} 的全部项目

删除 {sorted y} 的全部项目

 

定义 increment logger {i}

将 {resources placed logger} 的第 {i} 项替换为 (1 + {resources placed logger} 的第 {i} 项)

 

定义 distribute resources in world

执行 reset distributions

如果 ({$ dev?} = 0) 那么

执行 ​​warn​​

停止 这个脚本

删除 {resources READ ONLY} 的全部项目

删除 {resource data} 的全部项目

将 {total resources placed} 设为 0

 

定义 get tile type at {x} {y}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

将 {tile type} 设为

否则

将 {tile index} 设为 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 // {comment}

 

定义 get hash of chunk {i}

将 {chunk hash} 设为 0

将 {hash i} 设为 {*1 chunk pointers} 的第 {i} 项

将 {hash inc} 设为 1

如果 ({hash i} > 0) 那么

重复执行 ({# chunk size} * {# chunk size}) 次

将 {chunk hash} 增加 ({hash inc} * ({chunk data} 的第 {hash i} 项 = ))

将 {hash i} 增加 1

将 {hash inc} 增加 1

否则

执行 ​​warn​​

 

inventory/items

代码

当 绿旗 被点击

隐藏

 

当按下 x 键

如果 ({$ editor} = ) 那么

如果 ({hovered inventory index} = ) 不成立 那么

如果 ({sub loss reason} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

执行 spawn item {display inventory} 的第 {hovered inventory index} 项 at {x} {y} falling? 1

删除 {@ submersible storage} 的第 {@ submersible storage} 中第一个 {display inventory} 的第 {hovered inventory index} 项 的编号 项

执行 update display inventory

播放声音 drop

等待 按下 x 键? 不成立

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 ! reset

删除 {found items worth} 的全部项目

删除 {items} 的全部项目

执行 add item bell 150 at -168 -25

执行 add item old bottle 80 at -164 -25

执行 add item skull fragment 120 at -32 -70

执行 add item large shell 90 at 153.2 -37

执行 add item pink sac 150 at 90 -402

执行 add item pink sac 150 at 79.3 -407

 

当 绿旗 被点击

隐藏

当接收到 update world ui

将 {hovered inventory index} 设为

如果 ({show inventory?} = 1) 那么

执行 render inventory slots

换成 icon 造型

 

当按下 x 键

如果 ({$ editor} = ) 那么

如果 ({hovered inventory index} = ) 不成立 那么

如果 ({sub loss reason} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

执行 spawn item {display inventory} 的第 {hovered inventory index} 项 at {x} {y} falling? 1

删除 {@ submersible storage} 的第 {@ submersible storage} 中第一个 {display inventory} 的第 {hovered inventory index} 项 的编号 项

执行 update display inventory

播放声音 drop

等待 按下 x 键? 不成立

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 ! reset

删除 {found items worth} 的全部项目

删除 {items} 的全部项目

执行 add item bell 150 at -168 -25

执行 add item old bottle 80 at -164 -25

执行 add item skull fragment 120 at -32 -70

执行 add item large shell 90 at 153.2 -37

执行 add item pink sac 150 at 90 -402

执行 add item pink sac 150 at 79.3 -407

 

当接收到 update display inventory

执行 update display inventory

 

当接收到 toggle inventory

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub storage slots} > 0) 那么

将 {show inventory?} 设为 (1 - ({show inventory?} = 1))

将 {show waypoints?} 设为 0

将 {player map?} 设为 0

广播 update display inventory

播放声音 NMS UI_Suit_Voice_01_9344E057

否则

将 {show inventory?} 设为 0

执行 add text no storage slots installed

否则

将 {show inventory?} 设为 0

 

当接收到 update world ui

将 {hovered inventory index} 设为

如果 ({show inventory?} = 1) 那么

执行 render inventory slots

换成 icon 造型

 

当接收到 update display inventory

执行 update display inventory

 

当接收到 salvage items

如果 ({sub loss reason} = ) 那么

执行 salvage

当接收到 toggle inventory

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub storage slots} > 0) 那么

将 {show inventory?} 设为 (1 - ({show inventory?} = 1))

将 {show waypoints?} 设为 0

将 {player map?} 设为 0

广播 update display inventory

播放声音 NMS UI_Suit_Voice_01_9344E057

否则

将 {show inventory?} 设为 0

执行 add text no storage slots installed

否则

将 {show inventory?} 设为 0

 

当接收到 deposit items in ship

执行 deposit

 

当接收到 render world items

执行 render world items

 

当接收到 pick up item

如果 ({sub loss reason} = ) 那么

如果 ({hovered item} = ) 不成立 那么

如果 (50 > ({# tile size} * 平方根((((({items} 的第 (2 + {hovered item}) 项 / 12) - {x}) * (({items} 的第 (2 + {hovered item}) 项 / 12) - {x})) + ((({items} 的第 (3 + {hovered item}) 项 / 12) - {y}) * (({items} 的第 (3 + {hovered item}) 项 / 12) - {y})))))) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

将 {items} 的第 (1 + {hovered item}) 项 加入 {@ submersible storage}

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

执行 update display inventory

播放声音 NMS Console_Switch_01_4BD2034C

否则

将 no storage space 加入 {text}

将 5 加入 {text}

否则

将 out of range 加入 {text}

将 2 加入 {text}

 

当接收到 ! reset

删除 {items} 的全部项目

 

定义 get tile type at {x} {y}

将 {chunk x} 设为 向下取整((向下取整({x}) / {# chunk size}))

将 {chunk y} 设为 向下取整((向下取整({y}) / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

将 {tile type} 设为

否则

将 {tile index} 设为 (((向下取整({y}) 除以 {# chunk size} 的余数 * {# chunk size}) + 向下取整({x}) 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 render inventory slots

换成 icon 造型

将大小设为 200

清除图形特效

将x坐标设为 -220

如果 ({display inventory} 的项目数 > 0) 那么

将 {i} 设为 1

重复执行 13 次

将y坐标设为 160

重复执行 5 次

换成 slot hover 造型

如果 碰到 鼠标指针? 那么

将 {hovered inventory index} 设为 {i}

换成 slot2 造型

图章

否则

换成 slot 造型

图章

换成 unknown 造型

换成 {display inventory} 的第 {i} 项 造型

图章

将y坐标增加 -34

将 {i} 增加 1

如果 ({i} > {display inventory} 的项目数) 那么

停止 这个脚本

将x坐标增加 34

否则

将y坐标设为 160

换成 slot 造型

图章

 

定义 deposit2

将 {i} 设为 1

重复执行 ({@ parts reference} 的项目数 / 14) 次

如果 ({@ parts reference} 的第 {i} 项 = {@ submersible storage} 的第 1 项) 那么

执行 // >>> is a part

将 {@ submersible storage} 的第 1 项 加入 {= owned parts}

删除 {@ submersible storage} 的第 1 项

停止 这个脚本

将 {i} 增加 14

执行 // >>> is sellable

将 {storage index} 设为 {found items worth} 中第一个 {@ submersible storage} 的第 1 项 的编号

如果 ({storage index} > 0) 那么

将 {total deposited funds} 增加 {found items worth} 的第 (1 + {storage index}) 项

将 {funds} 增加 {found items worth} 的第 (1 + {storage index}) 项

否则

执行 ​​error​​

将 连接 unknown item 和 {@ submersible storage} 的第 1 项 加入 {text}

将 4 加入 {text}

执行 // find worth

删除 {@ submersible storage} 的第 1 项

 

定义 deposit

将 {total deposited funds} 设为 0

重复执行 {@ submersible storage} 的项目数 次

如果 {resource names} 包含 {@ submersible storage} 的第 1 项 ? 那么

执行 // >>> is a resource

如果 {ship storage} 包含 {@ submersible storage} 的第 1 项 ? 那么

将 {storage index} 设为 (1 + {ship storage} 中第一个 {@ submersible storage} 的第 1 项 的编号)

将 {ship storage} 的第 {storage index} 项替换为 (1 + {ship storage} 的第 {storage index} 项)

否则

将 {@ submersible storage} 的第 1 项 加入 {ship storage}

将 1 加入 {ship storage}

执行 // delete

删除 {@ submersible storage} 的第 1 项

否则

执行 deposit2

如果 ({total deposited funds} > 0) 那么

将 连接 funds gained: 和 {total deposited funds} 加入 {text}

将 3 加入 {text}

 

执行 // delete 0 items

将 {i} 设为 1

重复执行 {display inventory} 的项目数 次

如果 ({display inventory count} 的第 {i} 项 = 0) 那么

删除 {display inventory} 的第 {i} 项

删除 {display inventory count} 的第 {i} 项

否则

将 {i} 增加 1

执行 // height

将 {y lim} 设为 {display inventory} 的项目数

如果 ({y lim} < 1) 那么

将 {y lim} 设为 1

否则

如果 ({y lim} > 5) 那么

将 {y lim} 设为 5

将 {y lim} 设为 (165 - ({y lim} * 34))

 

定义 spawn item {name} at {x} {y} falling? {falling}

如果 ({falling} = 1) 那么

将 {i} 设为 0

重复执行 400 次

执行 get tile type at {x} ({y} - {i})

如果 ({tile type} = ) 不成立 那么

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 向下取整((3 + (12 * ((向下取整({y}) - {i}) + 1)))) 加入 {items}

停止 这个脚本

将 {i} 增加 1

执行 ​​warn​​

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 向下取整((12 * -1000)) 加入 {items}

否则

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 加入 {items}

 

定义 salvage

执行 // iterate over lost sub data and attempt to add items to current storage

执行 // assumes structure of parts then resources

将 {i} 设为 (8 + {lost sub nearest})

重复执行直到 ({lost sub data} 的第 {i} 项 = inv=)

执行 // find start

将 {i} 增加 1

如果 ({i} > {lost sub data} 的项目数) 那么

将 game error: corrupted lost sub data 加入 {text}

将 5 加入 {text}

执行 ​​error​​

停止 这个脚本

将 {i} 增加 1

重复执行直到 (({i} > {lost sub data} 的项目数) 或 ({lost sub data} 的第 {i} 项 = #))

执行 // add resources or parts

如果 ({lost sub data} 的第 {i} 项 = ) 不成立 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

将 {lost sub data} 的第 {i} 项 加入 {@ submersible storage}

执行 // prevent duping

将 {lost sub data} 的第 {i} 项替换为

否则

将 salvaging stopped: no more storage space 加入 {text}

将 5 加入 {text}

执行 update display inventory

播放声音 drop

停止 这个脚本

将 {i} 增加 1

将 salvaged all items and added to storage 加入 {text}

将 5 加入 {text}

如果 ({@ submersible storage} 的项目数 = {^ sub storage slots}) 那么

将 no more storage space 加入 {text}

将 5 加入 {text}

执行 // now delete sub

将 {= submersibles salvaged} 增加 1

重复执行 ({i} - {lost sub nearest}) 次

删除 {lost sub data} 的第 {lost sub nearest} 项

执行 update display inventory

播放声音 destroy

 

定义 render world items

将 {hovered item} 设为

将 {i} 设为 0

重复执行 ({items} 的项目数 / 4) 次

如果 ({items} 的第 ({i} + 4) 项 = ) 不成立 那么

将 {items} 的第 ({i} + 3) 项替换为 ({items} 的第 ({i} + 3) 项 - ({Δt} * 3))

如果 ({items} 的第 ({i} + 3) 项 < {items} 的第 ({i} + 4) 项) 那么

执行 // stop falling

将 {items} 的第 ({i} + 3) 项替换为 {items} 的第 ({i} + 4) 项

将 {items} 的第 ({i} + 4) 项替换为

换成 large 造型

移到 x:({# tile size} * (({items} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({items} 的第 ({i} + 3) 项 / 12) - {cam y}))

换成 {items} 的第 ({i} + 1) 项 造型

图章

如果 ({^ sub arm} > 0) 那么

如果 (到 鼠标指针 的距离 < 15) 那么

将 {hovered item} 设为 {i}

将 {i} 增加 4

换成 icon 造型

 

定义 add item {name} {worth} at {x} {y}

执行 // for placing items in world

将 {i} 设为 0

重复执行 50 次

执行 get tile type at {x} ({y} - {i})

如果 ({tile type} = ) 不成立 那么

如果 {found items worth} 包含 {name} ? 那么

如果 那么

执行 // this is bad because it will ruin the way items are searched

执行 ​​warn​​

将 连接 duplicate item names! 和 {name} 加入 {text}

将 4 加入 {text}

否则

将 {name} 加入 {found items worth}

将 {worth} 加入 {found items worth}

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((1 + (12 * ((向下取整({y}) - {i}) + 1)))) 加入 {items}

将 加入 {items}

停止 这个脚本

将 {i} 增加 1

执行 ​​error​​

 

定义 // {comment}

 

当接收到 salvage items

如果 ({sub loss reason} = ) 那么

执行 salvage

 

当接收到 deposit items in ship

执行 deposit

 

当接收到 render world items

执行 render world items

 

当接收到 pick up item

如果 ({sub loss reason} = ) 那么

如果 ({hovered item} = ) 不成立 那么

如果 (50 > ({# tile size} * 平方根((((({items} 的第 (2 + {hovered item}) 项 / 12) - {x}) * (({items} 的第 (2 + {hovered item}) 项 / 12) - {x})) + ((({items} 的第 (3 + {hovered item}) 项 / 12) - {y}) * (({items} 的第 (3 + {hovered item}) 项 / 12) - {y})))))) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

将 {items} 的第 (1 + {hovered item}) 项 加入 {@ submersible storage}

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

删除 {items} 的第 (1 + {hovered item}) 项

执行 update display inventory

播放声音 NMS Console_Switch_01_4BD2034C

否则

将 no storage space 加入 {text}

将 5 加入 {text}

否则

将 out of range 加入 {text}

将 2 加入 {text}

 

当接收到 ! reset

删除 {items} 的全部项目

 

定义 render inventory slots

换成 icon 造型

将大小设为 200

清除图形特效

将x坐标设为 -220

如果 ({display inventory} 的项目数 > 0) 那么

将 {i} 设为 1

重复执行 13 次

将y坐标设为 160

重复执行 5 次

换成 slot hover 造型

如果 碰到 鼠标指针? 那么

将 {hovered inventory index} 设为 {i}

换成 slot2 造型

图章

否则

换成 slot 造型

图章

换成 unknown 造型

换成 {display inventory} 的第 {i} 项 造型

图章

将y坐标增加 -34

将 {i} 增加 1

如果 ({i} > {display inventory} 的项目数) 那么

停止 这个脚本

将x坐标增加 34

否则

将y坐标设为 160

换成 slot 造型

图章

 

定义 deposit2

将 {i} 设为 1

重复执行 ({@ parts reference} 的项目数 / 14) 次

如果 ({@ parts reference} 的第 {i} 项 = {@ submersible storage} 的第 1 项) 那么

执行 // >>> is a part

将 {@ submersible storage} 的第 1 项 加入 {= owned parts}

删除 {@ submersible storage} 的第 1 项

停止 这个脚本

将 {i} 增加 14

执行 // >>> is sellable

将 {storage index} 设为 {found items worth} 中第一个 {@ submersible storage} 的第 1 项 的编号

如果 ({storage index} > 0) 那么

将 {total deposited funds} 增加 {found items worth} 的第 (1 + {storage index}) 项

将 {funds} 增加 {found items worth} 的第 (1 + {storage index}) 项

否则

执行 ​​error​​

将 连接 unknown item 和 {@ submersible storage} 的第 1 项 加入 {text}

将 4 加入 {text}

执行 // find worth

删除 {@ submersible storage} 的第 1 项

 

定义 get tile type at {x} {y}

将 {chunk x} 设为 向下取整((向下取整({x}) / {# chunk size}))

将 {chunk y} 设为 向下取整((向下取整({y}) / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 ({index} = 0) 那么

将 {tile index} 设为 0

将 {tile type} 设为

否则

将 {tile index} 设为 (((向下取整({y}) 除以 {# chunk size} 的余数 * {# chunk size}) + 向下取整({x}) 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项)

将 {tile type} 设为 {chunk data} 的第 {tile index} 项

 

定义 salvage

执行 // iterate over lost sub data and attempt to add items to current storage

执行 // assumes structure of parts then resources

将 {i} 设为 (8 + {lost sub nearest})

重复执行直到 ({lost sub data} 的第 {i} 项 = inv=)

执行 // find start

将 {i} 增加 1

如果 ({i} > {lost sub data} 的项目数) 那么

将 game error: corrupted lost sub data 加入 {text}

将 5 加入 {text}

执行 ​​error​​

停止 这个脚本

将 {i} 增加 1

重复执行直到 (({i} > {lost sub data} 的项目数) 或 ({lost sub data} 的第 {i} 项 = #))

执行 // add resources or parts

如果 ({lost sub data} 的第 {i} 项 = ) 不成立 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

将 {lost sub data} 的第 {i} 项 加入 {@ submersible storage}

执行 // prevent duping

将 {lost sub data} 的第 {i} 项替换为

否则

将 salvaging stopped: no more storage space 加入 {text}

将 5 加入 {text}

执行 update display inventory

播放声音 drop

停止 这个脚本

将 {i} 增加 1

将 salvaged all items and added to storage 加入 {text}

将 5 加入 {text}

如果 ({@ submersible storage} 的项目数 = {^ sub storage slots}) 那么

将 no more storage space 加入 {text}

将 5 加入 {text}

执行 // now delete sub

将 {= submersibles salvaged} 增加 1

重复执行 ({i} - {lost sub nearest}) 次

删除 {lost sub data} 的第 {lost sub nearest} 项

执行 update display inventory

播放声音 destroy

 

定义 update display inventory

删除 {display inventory} 的全部项目

删除 {display inventory count} 的全部项目

执行 // for ordering (otherwise the items can jump around)

执行 // counts the total of each item in storage

执行 // delete 0 items

将 {i} 设为 1

重复执行 {display inventory} 的项目数 次

如果 ({display inventory count} 的第 {i} 项 = 0) 那么

删除 {display inventory} 的第 {i} 项

删除 {display inventory count} 的第 {i} 项

否则

将 {i} 增加 1

执行 // height

将 {y lim} 设为 {display inventory} 的项目数

如果 ({y lim} < 1) 那么

将 {y lim} 设为 1

否则

如果 ({y lim} > 5) 那么

将 {y lim} 设为 5

将 {y lim} 设为 (165 - ({y lim} * 34))

 

定义 deposit

将 {total deposited funds} 设为 0

重复执行 {@ submersible storage} 的项目数 次

如果 {resource names} 包含 {@ submersible storage} 的第 1 项 ? 那么

执行 // >>> is a resource

如果 {ship storage} 包含 {@ submersible storage} 的第 1 项 ? 那么

将 {storage index} 设为 (1 + {ship storage} 中第一个 {@ submersible storage} 的第 1 项 的编号)

将 {ship storage} 的第 {storage index} 项替换为 (1 + {ship storage} 的第 {storage index} 项)

否则

将 {@ submersible storage} 的第 1 项 加入 {ship storage}

将 1 加入 {ship storage}

执行 // delete

删除 {@ submersible storage} 的第 1 项

否则

执行 deposit2

如果 ({total deposited funds} > 0) 那么

将 连接 funds gained: 和 {total deposited funds} 加入 {text}

将 3 加入 {text}

 

定义 render world items

将 {hovered item} 设为

将 {i} 设为 0

重复执行 ({items} 的项目数 / 4) 次

如果 ({items} 的第 ({i} + 4) 项 = ) 不成立 那么

将 {items} 的第 ({i} + 3) 项替换为 ({items} 的第 ({i} + 3) 项 - ({Δt} * 3))

如果 ({items} 的第 ({i} + 3) 项 < {items} 的第 ({i} + 4) 项) 那么

执行 // stop falling

将 {items} 的第 ({i} + 3) 项替换为 {items} 的第 ({i} + 4) 项

将 {items} 的第 ({i} + 4) 项替换为

换成 large 造型

移到 x:({# tile size} * (({items} 的第 ({i} + 2) 项 / 12) - {cam x})) y:({# tile size} * (({items} 的第 ({i} + 3) 项 / 12) - {cam y}))

换成 {items} 的第 ({i} + 1) 项 造型

图章

如果 ({^ sub arm} > 0) 那么

如果 (到 鼠标指针 的距离 < 15) 那么

将 {hovered item} 设为 {i}

将 {i} 增加 4

换成 icon 造型

 

定义 add item {name} {worth} at {x} {y}

执行 // for placing items in world

将 {i} 设为 0

重复执行 50 次

执行 get tile type at {x} ({y} - {i})

如果 ({tile type} = ) 不成立 那么

如果 {found items worth} 包含 {name} ? 那么

如果 那么

执行 // this is bad because it will ruin the way items are searched

执行 ​​warn​​

将 连接 duplicate item names! 和 {name} 加入 {text}

将 4 加入 {text}

否则

将 {name} 加入 {found items worth}

将 {worth} 加入 {found items worth}

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((1 + (12 * ((向下取整({y}) - {i}) + 1)))) 加入 {items}

将 加入 {items}

停止 这个脚本

将 {i} 增加 1

执行 ​​error​​

 

定义 spawn item {name} at {x} {y} falling? {falling}

如果 ({falling} = 1) 那么

将 {i} 设为 0

重复执行 400 次

执行 get tile type at {x} ({y} - {i})

如果 ({tile type} = ) 不成立 那么

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 向下取整((3 + (12 * ((向下取整({y}) - {i}) + 1)))) 加入 {items}

停止 这个脚本

将 {i} 增加 1

执行 ​​warn​​

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 向下取整((12 * -1000)) 加入 {items}

否则

将 {name} 加入 {items}

将 向下取整((12 * {x})) 加入 {items}

将 向下取整((12 * {y})) 加入 {items}

将 加入 {items}

 

定义 // {comment}

 

creature

代码

当 绿旗 被点击

隐藏

将旋转方式设为 左右翻转

换成 icon 造型

将大小设为 200

将 {discovered fish total} 设为 0

将笔的颜色设为#ffdd00

将笔的粗细设为20

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 render achievements

执行 // show all scanned fish

执行 render discovered fish

换成 icon 造型

执行 //

 

当 绿旗 被点击

隐藏

将旋转方式设为 左右翻转

换成 icon 造型

将大小设为 200

将 {discovered fish total} 设为 0

将笔的颜色设为#ffdd00

将笔的粗细设为20

 

当接收到 render achievements

执行 // show all scanned fish

执行 render discovered fish

换成 icon 造型

执行 //

 

当接收到 ! reset

执行 reset fish types list

执行 set discovered fish to 0

将 {discovered fish total} 设为 0

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 update fish

如果 (0 = {fish} 的项目数 除以 7 的余数) 不成立 那么

将 error: fish length wrong 加入 {text}

将 5 加入 {text}

执行 ​​error​​

删除 {fish} 的全部项目

清除图形特效

执行 attempt spawn new creature

执行 update creatures

执行 render creatures

如果 ({tutorial phase} = upgrade4) 那么

执行 get discovered fish count

换成 icon 造型

执行 //

 

当接收到 fish: end arrangement

删除此克隆体

 

当接收到 scan fish

如果 (({$ editor} = ) 与 ({screen} = world)) 那么

如果 ({sub loss reason} = ) 那么

如果 ({hovered fish} = ) 不成立 那么

将 {fish index} 设为 (1 + (({fish types} 中第一个 {fish} 的第 {hovered fish} 项 的编号 - 1) / {fish types params} 的项目数))

如果 (0 = {discovered fish} 的第 {fish index} 项) 那么

将 {fish index 2} 设为 {hovered fish}

将 {discovered fish} 的第 {fish index} 项替换为 1

将 new fish discovered 加入 {text}

将 5 加入 {text}

将 {fish index} 设为 {fish types} 的第 (6 + {fish types} 中第一个 {fish} 的第 {fish index 2} 项 的编号) 项

将 {funds} 增加 {fish index}

将 连接 连接 + 和 {fish index} 和 funds 加入 {text}

将 5 加入 {text}

执行 //

将 white circle 加入 {particles}

将 {fish} 的第 (2 + {fish index 2}) 项 加入 {particles}

将 {fish} 的第 (3 + {fish index 2}) 项 加入 {particles}

将 加入 {particles}

将 加入 {particles}

将 50 加入 {particles}

将 20 加入 {particles}

将 90 加入 {particles}

将 加入 {particles}

将 0.5 加入 {particles}

播放声音 scan success

 

定义 render creatures

将 {check for hover?} 设为 0

如果 (({^ sub scanner} > 0) 与 ({sub loss reason} = )) 那么

如果 ((({sub lift state} = ) 或 ({sub lift state} = released)) 与 ({show inventory?} = 0)) 那么

如果 ((绝对值(鼠标的x坐标) < 230) 与 (绝对值(鼠标的y坐标) < 170)) 那么

将 {check for hover?} 设为 1

将 {hovered fish} 设为

将 {i} 设为 1

重复执行 ({fish} 的项目数 / 7) 次

换成 large 造型

移到 x:({# tile size} * ({fish} 的第 ({i} + 2) 项 - {cam x})) y:({# tile size} * ({fish} 的第 ({i} + 3) 项 - {cam y}))

面向 {fish} 的第 ({i} + 1) 项 方向

换成 {fish} 的第 {i} 项 造型

将 颜色 特效设定为 {fish} 的第 ({i} + 4) 项

将 亮度 特效设定为 0

图章

清除图形特效

如果 ({check for hover?} = 1) 那么

如果 (到 鼠标指针 的距离 < 50) 那么

如果 (0 = {discovered fish} 的第 (1 + (({fish types} 中第一个 {fish} 的第 {i} 项 的编号 - 1) / {fish types params} 的项目数)) 项) 那么

将 {hovered fish} 设为 {i}

将 {check for hover?} 设为 0

将 {i} 增加 7

 

定义 set discovered fish to {val}

删除 {discovered fish} 的全部项目

重复执行 ({fish types} 的项目数 / {fish types params} 的项目数) 次

将 {val} 加入 {discovered fish}

 

定义 render discovered fish

移到 x:50 y:20

面向 90 方向

换成 huge shark 造型

将 {discovered fish total} 设为 0

 

定义 reset fish types list

将 {# all fish rarity} 设为 100

删除 {fish} 的全部项目

删除 {fish types params} 的全部项目

将 name 加入 {fish types params}

将 depth min 加入 {fish types params}

将 depth max 加入 {fish types params}

将 occurence 加入 {fish types params}

将 avg speed 加入 {fish types params}

将 grouping 加入 {fish types params}

将 value 加入 {fish types params}

将 ground 加入 {fish types params}

删除 {fish types} 的全部项目

将 {total funds to earn} 设为 0

执行 add fish type micro1 depth range 0 300 occurence 10 spd 14 group avg 6 value fac 1 ground

执行 add fish type micro2 depth range 0 250 occurence 10 spd 14 group avg 4 value fac 1 ground

执行 add fish type micro3 depth range 100 380 occurence 10 spd 14 group avg 3 value fac 1 ground

执行 add fish type tiny blue depth range 0 280 occurence 10 spd 15 group avg 1 value fac 1 ground

执行 add fish type tiny l blue depth range 0 360 occurence 10 spd 16 group avg 1.5 value fac 1 ground

执行 add fish type sml blue depth range 0 380 occurence 10 spd 21 group avg 1.4 value fac 1 ground

执行 add fish type sml brown depth range 20 340 occurence 8 spd 36 group avg 0.5 value fac 1 ground

执行 add fish type sml orange depth range 50 500 occurence 4 spd 15 group avg 1 value fac 1 ground

执行 add fish type med yellow depth range 100 160 occurence 4 spd 12 group avg 0.5 value fac 1 ground

执行 add fish type med white depth range 100 200 occurence 4 spd 10 group avg 1 value fac 1 ground

执行 add fish type med light orange depth range 140 600 occurence 4 spd 15 group avg 0.5 value fac 1 ground

执行 add fish type med bwgrad depth range 180 300 occurence 4 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type large orange depth range 460 500 occurence 4 spd 17 group avg 0.5 value fac 1 ground

执行 add fish type large long blue depth range 0 100 occurence 2 spd 18 group avg 0.5 value fac 0.5 ground

执行 add fish type large green depth range 300 500 occurence 3 spd 12 group avg 0.5 value fac 1 ground

执行 add fish type large brown depth range 630 740 occurence 2 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type large black depth range 630 740 occurence 2 spd 30 group avg 0.5 value fac 1 ground

执行 add fish type large black orange depth range 620 740 occurence 0.3 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type huge shark depth range 0 130 occurence 0.05 spd 40 group avg 0.5 value fac 0.4 ground

执行 add fish type sml dark brown depth range 520 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep depth range 460 740 occurence 1 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep2 depth range 470 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep3 depth range 490 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type med dark brown depth range 550 740 occurence 1 spd 30 group avg 0.5 value fac 1 ground

 

定义 get discovered fish count

将 {discovered fish total} 设为 0

 

定义 attempt spawn new creature

执行 // limit fish in the area for performance

如果 ({fish} 的项目数 < ((200 + (0.25 * {y})) * (1 - (0.5 * ({low quality?} = 1))))) 那么

将 {i} 设为 0

重复执行 ({fish types} 的项目数 / {fish types params} 的项目数) 次

如果 (({y} < {fish types} 的第 (2 + {i}) 项) 与 ({y} > {fish types} 的第 (3 + {i}) 项)) 那么

将 {rand max} 设为 (({fish} 的项目数 / 300) * {# all fish rarity})

如果 (在 0.0 和 ({rand max} * ({rand max} > 0)) 之间取随机数 < ({Δt} * {fish types} 的第 (4 + {i}) 项)) 那么

执行 // spawn fish

将 {fish dir} 设为 在 0 和 359 之间取随机数

重复执行 向上取整((在 0.5 和 1.5 之间取随机数 * {fish types} 的第 (6 + {i}) 项)) 次

执行 // grouping

将 {fish y} 设为 ({y} - (14 * cos({fish dir})))

如果 ({fish y} < 0) 那么

执行 spawn creature {fish types} 的第 (1 + {i}) 项 ground? {fish types} 的第 (7 + {i}) 项 at ({x} - ((15 * sin({fish dir})) + 在 -0.5 和 0.5 之间取随机数)) ({fish y} + 在 -0.5 和 0.5 之间取随机数) dir ({fish dir} + 在 -30 和 30.0 之间取随机数) variation 在 -4.0 和 4.0 之间取随机数 speed ({fish types} 的第 (5 + {i}) 项 * 在 0.8 和 1.2 之间取随机数)

将 {i} 增加 {fish types params} 的项目数

 

定义 generate fish arrangement

广播 fish: show bounds 并等待

移到 x:0 y:0

面向 90 方向

显示

换成 icon 造型

将大小设为 220

换成 huge shark 造型

删除 {fish arrangement} 的全部项目

重复执行 {discovered fish} 的项目数 次

将 {attempts} 设为 0

重复执行直到 (碰到 fish bounds? 不成立 与 碰到 creature? 不成立)

移到 x:在 18 和 200 之间取随机数 y:在 -145 和 22 之间取随机数

将 {attempts} 增加 1

如果 ({attempts} > 100) 那么

播放声音 pop

停止 这个脚本

克隆 自己

将 x坐标 加入 {fish arrangement}

将 y坐标 加入 {fish arrangement}

换成 (造型编号 - 1) 造型

换成 icon 造型

将大小设为 200

移到 x:0 y:0

隐藏

等待 1 秒

广播 fish: end arrangement

播放声音 pop

 

定义 add fish type {name} depth range {min} {max} occurence {occurence} spd {spd} group avg {group} value fac {value fac} ground {ground}

如果 ({occurence} > {# all fish rarity}) 那么

执行 ​​warn​​

将 {name} 加入 {fish types}

将 (0 - {min}) 加入 {fish types}

将 (0 - {max}) 加入 {fish types}

将 {occurence} 加入 {fish types}

将 {spd} 加入 {fish types}

将 {group} 加入 {fish types}

将 向上取整(({value fac} * ((10 + ({min} * 1)) + (100 / (({occurence} * (1 + (({group} - 1) + ({group} < 1)))) * (绝对值(({min} - {max})) / 100)))))) 加入 {fish types}

将 {total funds to earn} 增加 {fish types} 的第 last 项

将 四舍五入({ground}) 加入 {fish types}

 

定义 update creatures

将 {i} 设为 1

重复执行 ({fish} 的项目数 / 7) 次

将 {fish x} 设为 {fish} 的第 ({i} + 2) 项

将 {fish y} 设为 {fish} 的第 ({i} + 3) 项

如果 ((绝对值(({fish x} - {x})) > 20) 或 (绝对值(({fish y} - {y})) > 16)) 那么

重复执行 7 次

删除 {fish} 的第 {i} 项

否则

将 {fish dir} 设为 {fish} 的第 ({i} + 1) 项

将 {fish speed} 设为 ({Δt} * {fish} 的第 ({i} + 5) 项)

将 {fish dx} 设为 ({fish speed} * sin({fish dir}))

将 {fish dy} 设为 ({fish speed} * cos({fish dir}))

如果 ({fish y} > 0) 那么

将 {fish y} 设为 0

将 {fish dir} 设为 在 90 和 270 之间取随机数

否则

如果 ({fish y} < -740) 那么

将 {fish y} 设为 740

执行 get tile type at 向下取整((({fish dx} * 16) + {fish x})) 向下取整((({fish dy} * 8) + {fish y}))

如果 ({tile type} = ) 不成立 那么

将 {fish dir} 增加 在 100 和 380 之间取随机数

将 {tile type} 设为

将 {fish} 的第 ({i} + 1) 项替换为 (在 -5.0 和 5 之间取随机数 + {fish dir})

将 {fish} 的第 ({i} + 2) 项替换为 (({fish dx} * 2) + {fish x})

将 {fish} 的第 ({i} + 3) 项替换为 ({fish dy} + {fish y})

将 {i} 增加 7

 

定义 get tile type at {tx} {ty}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({tx} / {# chunk size})) 和 , 和 向下取整(({ty} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为

否则

将 {tile type} 设为 {chunk data} 的第 (((向下取整({ty}) 除以 {# chunk size} 的余数 * {# chunk size}) + 向下取整({tx}) 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 debug: fence

如果 (x坐标 > 240) 那么

将x坐标设为 240

落笔

抬笔

否则

如果 (x坐标 < -240) 那么

将x坐标设为 -240

落笔

抬笔

如果 (y坐标 > 180) 那么

将y坐标设为 180

落笔

抬笔

否则

如果 (y坐标 < -180) 那么

将y坐标设为 -180

落笔

抬笔

 

定义 spawn creature {type} ground? {gnd} at {x} {y} dir {dir} variation {var} speed {spd}

如果 ({y} > -740) 那么

执行 get tile type at {x} {y}

如果 ({tile type} = ) 那么

将 {type} 加入 {fish}

将 {dir} 加入 {fish}

将 {x} 加入 {fish}

将 {y} 加入 {fish}

将 {var} 加入 {fish}

将 ({spd} / 30) 加入 {fish}

将 {gnd} 加入 {fish}

 

定义 // {comment}

 

当接收到 ! reset

执行 reset fish types list

执行 set discovered fish to 0

将 {discovered fish total} 设为 0

 

当接收到 scan fish

如果 (({$ editor} = ) 与 ({screen} = world)) 那么

如果 ({sub loss reason} = ) 那么

如果 ({hovered fish} = ) 不成立 那么

将 {fish index} 设为 (1 + (({fish types} 中第一个 {fish} 的第 {hovered fish} 项 的编号 - 1) / {fish types params} 的项目数))

如果 (0 = {discovered fish} 的第 {fish index} 项) 那么

将 {fish index 2} 设为 {hovered fish}

将 {discovered fish} 的第 {fish index} 项替换为 1

将 new fish discovered 加入 {text}

将 5 加入 {text}

将 {fish index} 设为 {fish types} 的第 (6 + {fish types} 中第一个 {fish} 的第 {fish index 2} 项 的编号) 项

将 {funds} 增加 {fish index}

将 连接 连接 + 和 {fish index} 和 funds 加入 {text}

将 5 加入 {text}

执行 //

将 white circle 加入 {particles}

将 {fish} 的第 (2 + {fish index 2}) 项 加入 {particles}

将 {fish} 的第 (3 + {fish index 2}) 项 加入 {particles}

将 加入 {particles}

将 加入 {particles}

将 50 加入 {particles}

将 20 加入 {particles}

将 90 加入 {particles}

将 加入 {particles}

将 0.5 加入 {particles}

播放声音 scan success

 

当接收到 fish: end arrangement

删除此克隆体

 

当接收到 update fish

如果 (0 = {fish} 的项目数 除以 7 的余数) 不成立 那么

将 error: fish length wrong 加入 {text}

将 5 加入 {text}

执行 ​​error​​

删除 {fish} 的全部项目

清除图形特效

执行 attempt spawn new creature

执行 update creatures

执行 render creatures

如果 ({tutorial phase} = upgrade4) 那么

执行 get discovered fish count

换成 icon 造型

执行 //

 

定义 render discovered fish

移到 x:50 y:20

面向 90 方向

换成 huge shark 造型

将 {discovered fish total} 设为 0

 

定义 set discovered fish to {val}

删除 {discovered fish} 的全部项目

重复执行 ({fish types} 的项目数 / {fish types params} 的项目数) 次

将 {val} 加入 {discovered fish}

 

定义 get discovered fish count

将 {discovered fish total} 设为 0

 

定义 render creatures

将 {check for hover?} 设为 0

如果 (({^ sub scanner} > 0) 与 ({sub loss reason} = )) 那么

如果 ((({sub lift state} = ) 或 ({sub lift state} = released)) 与 ({show inventory?} = 0)) 那么

如果 ((绝对值(鼠标的x坐标) < 230) 与 (绝对值(鼠标的y坐标) < 170)) 那么

将 {check for hover?} 设为 1

将 {hovered fish} 设为

将 {i} 设为 1

重复执行 ({fish} 的项目数 / 7) 次

换成 large 造型

移到 x:({# tile size} * ({fish} 的第 ({i} + 2) 项 - {cam x})) y:({# tile size} * ({fish} 的第 ({i} + 3) 项 - {cam y}))

面向 {fish} 的第 ({i} + 1) 项 方向

换成 {fish} 的第 {i} 项 造型

将 颜色 特效设定为 {fish} 的第 ({i} + 4) 项

将 亮度 特效设定为 0

图章

清除图形特效

如果 ({check for hover?} = 1) 那么

如果 (到 鼠标指针 的距离 < 50) 那么

如果 (0 = {discovered fish} 的第 (1 + (({fish types} 中第一个 {fish} 的第 {i} 项 的编号 - 1) / {fish types params} 的项目数)) 项) 那么

将 {hovered fish} 设为 {i}

将 {check for hover?} 设为 0

将 {i} 增加 7

 

定义 reset fish types list

将 {# all fish rarity} 设为 100

删除 {fish} 的全部项目

删除 {fish types params} 的全部项目

将 name 加入 {fish types params}

将 depth min 加入 {fish types params}

将 depth max 加入 {fish types params}

将 occurence 加入 {fish types params}

将 avg speed 加入 {fish types params}

将 grouping 加入 {fish types params}

将 value 加入 {fish types params}

将 ground 加入 {fish types params}

删除 {fish types} 的全部项目

将 {total funds to earn} 设为 0

执行 add fish type micro1 depth range 0 300 occurence 10 spd 14 group avg 6 value fac 1 ground

执行 add fish type micro2 depth range 0 250 occurence 10 spd 14 group avg 4 value fac 1 ground

执行 add fish type micro3 depth range 100 380 occurence 10 spd 14 group avg 3 value fac 1 ground

执行 add fish type tiny blue depth range 0 280 occurence 10 spd 15 group avg 1 value fac 1 ground

执行 add fish type tiny l blue depth range 0 360 occurence 10 spd 16 group avg 1.5 value fac 1 ground

执行 add fish type sml blue depth range 0 380 occurence 10 spd 21 group avg 1.4 value fac 1 ground

执行 add fish type sml brown depth range 20 340 occurence 8 spd 36 group avg 0.5 value fac 1 ground

执行 add fish type sml orange depth range 50 500 occurence 4 spd 15 group avg 1 value fac 1 ground

执行 add fish type med yellow depth range 100 160 occurence 4 spd 12 group avg 0.5 value fac 1 ground

执行 add fish type med white depth range 100 200 occurence 4 spd 10 group avg 1 value fac 1 ground

执行 add fish type med light orange depth range 140 600 occurence 4 spd 15 group avg 0.5 value fac 1 ground

执行 add fish type med bwgrad depth range 180 300 occurence 4 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type large orange depth range 460 500 occurence 4 spd 17 group avg 0.5 value fac 1 ground

执行 add fish type large long blue depth range 0 100 occurence 2 spd 18 group avg 0.5 value fac 0.5 ground

执行 add fish type large green depth range 300 500 occurence 3 spd 12 group avg 0.5 value fac 1 ground

执行 add fish type large brown depth range 630 740 occurence 2 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type large black depth range 630 740 occurence 2 spd 30 group avg 0.5 value fac 1 ground

执行 add fish type large black orange depth range 620 740 occurence 0.3 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type huge shark depth range 0 130 occurence 0.05 spd 40 group avg 0.5 value fac 0.4 ground

执行 add fish type sml dark brown depth range 520 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep depth range 460 740 occurence 1 spd 20 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep2 depth range 470 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type sml dark brown deep3 depth range 490 740 occurence 1 spd 22 group avg 0.5 value fac 1 ground

执行 add fish type med dark brown depth range 550 740 occurence 1 spd 30 group avg 0.5 value fac 1 ground

 

定义 add fish type {name} depth range {min} {max} occurence {occurence} spd {spd} group avg {group} value fac {value fac} ground {ground}

如果 ({occurence} > {# all fish rarity}) 那么

执行 ​​warn​​

将 {name} 加入 {fish types}

将 (0 - {min}) 加入 {fish types}

将 (0 - {max}) 加入 {fish types}

将 {occurence} 加入 {fish types}

将 {spd} 加入 {fish types}

将 {group} 加入 {fish types}

将 向上取整(({value fac} * ((10 + ({min} * 1)) + (100 / (({occurence} * (1 + (({group} - 1) + ({group} < 1)))) * (绝对值(({min} - {max})) / 100)))))) 加入 {fish types}

将 {total funds to earn} 增加 {fish types} 的第 last 项

将 四舍五入({ground}) 加入 {fish types}

 

定义 attempt spawn new creature

执行 // limit fish in the area for performance

如果 ({fish} 的项目数 < ((200 + (0.25 * {y})) * (1 - (0.5 * ({low quality?} = 1))))) 那么

将 {i} 设为 0

重复执行 ({fish types} 的项目数 / {fish types params} 的项目数) 次

如果 (({y} < {fish types} 的第 (2 + {i}) 项) 与 ({y} > {fish types} 的第 (3 + {i}) 项)) 那么

将 {rand max} 设为 (({fish} 的项目数 / 300) * {# all fish rarity})

如果 (在 0.0 和 ({rand max} * ({rand max} > 0)) 之间取随机数 < ({Δt} * {fish types} 的第 (4 + {i}) 项)) 那么

执行 // spawn fish

将 {fish dir} 设为 在 0 和 359 之间取随机数

重复执行 向上取整((在 0.5 和 1.5 之间取随机数 * {fish types} 的第 (6 + {i}) 项)) 次

执行 // grouping

将 {fish y} 设为 ({y} - (14 * cos({fish dir})))

如果 ({fish y} < 0) 那么

执行 spawn creature {fish types} 的第 (1 + {i}) 项 ground? {fish types} 的第 (7 + {i}) 项 at ({x} - ((15 * sin({fish dir})) + 在 -0.5 和 0.5 之间取随机数)) ({fish y} + 在 -0.5 和 0.5 之间取随机数) dir ({fish dir} + 在 -30 和 30.0 之间取随机数) variation 在 -4.0 和 4.0 之间取随机数 speed ({fish types} 的第 (5 + {i}) 项 * 在 0.8 和 1.2 之间取随机数)

将 {i} 增加 {fish types params} 的项目数

 

定义 generate fish arrangement

广播 fish: show bounds 并等待

移到 x:0 y:0

面向 90 方向

显示

换成 icon 造型

将大小设为 220

换成 huge shark 造型

删除 {fish arrangement} 的全部项目

重复执行 {discovered fish} 的项目数 次

将 {attempts} 设为 0

重复执行直到 (碰到 fish bounds? 不成立 与 碰到 creature? 不成立)

移到 x:在 18 和 200 之间取随机数 y:在 -145 和 22 之间取随机数

将 {attempts} 增加 1

如果 ({attempts} > 100) 那么

播放声音 pop

停止 这个脚本

克隆 自己

将 x坐标 加入 {fish arrangement}

将 y坐标 加入 {fish arrangement}

换成 (造型编号 - 1) 造型

换成 icon 造型

将大小设为 200

移到 x:0 y:0

隐藏

等待 1 秒

广播 fish: end arrangement

播放声音 pop

 

定义 update creatures

将 {i} 设为 1

重复执行 ({fish} 的项目数 / 7) 次

将 {fish x} 设为 {fish} 的第 ({i} + 2) 项

将 {fish y} 设为 {fish} 的第 ({i} + 3) 项

如果 ((绝对值(({fish x} - {x})) > 20) 或 (绝对值(({fish y} - {y})) > 16)) 那么

重复执行 7 次

删除 {fish} 的第 {i} 项

否则

将 {fish dir} 设为 {fish} 的第 ({i} + 1) 项

将 {fish speed} 设为 ({Δt} * {fish} 的第 ({i} + 5) 项)

将 {fish dx} 设为 ({fish speed} * sin({fish dir}))

将 {fish dy} 设为 ({fish speed} * cos({fish dir}))

如果 ({fish y} > 0) 那么

将 {fish y} 设为 0

将 {fish dir} 设为 在 90 和 270 之间取随机数

否则

如果 ({fish y} < -740) 那么

将 {fish y} 设为 740

执行 get tile type at 向下取整((({fish dx} * 16) + {fish x})) 向下取整((({fish dy} * 8) + {fish y}))

如果 ({tile type} = ) 不成立 那么

将 {fish dir} 增加 在 100 和 380 之间取随机数

将 {tile type} 设为

将 {fish} 的第 ({i} + 1) 项替换为 (在 -5.0 和 5 之间取随机数 + {fish dir})

将 {fish} 的第 ({i} + 2) 项替换为 (({fish dx} * 2) + {fish x})

将 {fish} 的第 ({i} + 3) 项替换为 ({fish dy} + {fish y})

将 {i} 增加 7

 

定义 get tile type at {tx} {ty}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({tx} / {# chunk size})) 和 , 和 向下取整(({ty} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为

否则

将 {tile type} 设为 {chunk data} 的第 (((向下取整({ty}) 除以 {# chunk size} 的余数 * {# chunk size}) + 向下取整({tx}) 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 debug: fence

如果 (x坐标 > 240) 那么

将x坐标设为 240

落笔

抬笔

否则

如果 (x坐标 < -240) 那么

将x坐标设为 -240

落笔

抬笔

如果 (y坐标 > 180) 那么

将y坐标设为 180

落笔

抬笔

否则

如果 (y坐标 < -180) 那么

将y坐标设为 -180

落笔

抬笔

 

定义 spawn creature {type} ground? {gnd} at {x} {y} dir {dir} variation {var} speed {spd}

如果 ({y} > -740) 那么

执行 get tile type at {x} {y}

如果 ({tile type} = ) 那么

将 {type} 加入 {fish}

将 {dir} 加入 {fish}

将 {x} 加入 {fish}

将 {y} 加入 {fish}

将 {var} 加入 {fish}

将 ({spd} / 30) 加入 {fish}

将 {gnd} 加入 {fish}

 

定义 // {comment}

 

breakable walls

代码

当 绿旗 被点击

隐藏

换成 icon 造型

 

当接收到 ! reset

执行 reset walls and load from READ ONLY

 

当接收到 stage clicked

如果 ({$ editor} = wall) 那么

如果 ({screen} = world) 那么

执行 place {selected object} at {mouse x} {mouse y}

 

当接收到 render dev map overlay

执行 render map walls

换成 icon 造型

 

当接收到 render breakable walls

执行 render walls

 

定义 place {tile set} at {x} {y}

如果 ({tile set} = ) 不成立 那么

执行 // tier,name,variation

换成 1a1 造型

换成 连接 {tile set} 和 在 1 和 4 之间取随机数 造型

执行 //

将 造型名称 加入 {wall data READ ONLY}

将 连接 连接 {x} 和 _ 和 {y} 加入 {wall data READ ONLY}

将 {x} 加入 {wall data READ ONLY}

将 {y} 加入 {wall data READ ONLY}

将 造型名称 的第 1 个字符 加入 {wall data READ ONLY}

执行 //

将 造型名称 加入 {wall data}

将 连接 连接 {x} 和 _ 和 {y} 加入 {wall data}

将 {x} 加入 {wall data}

将 {y} 加入 {wall data}

将 造型名称 的第 1 个字符 加入 {wall data}

 

定义 render map walls

换成 large 造型

将笔的颜色设为#ff0000

将笔的粗细设为({# tile size} * {map scale})

将 {i} 设为 0

重复执行 ({wall data READ ONLY} 的项目数 / 5) 次

移到 x:({map scale} * ({# tile size} * ({wall data READ ONLY} 的第 ({i} + 3) 项 - {cam x}))) y:({map scale} * ({# tile size} * ({wall data READ ONLY} 的第 ({i} + 4) 项 - {cam y})))

将笔的颜色 设为 (20 * {wall data READ ONLY} 的第 ({i} + 5) 项)

落笔

抬笔

将 {i} 增加 5

 

定义 render walls

清除图形特效

将 {wall hovered} 设为

将 {wall hovered dist} 设为 50

将 {i} 设为 0

重复执行 ({wall data} 的项目数 / 5) 次

换成 large 造型

移到 x:({# tile size} * (0.5 + ({wall data} 的第 ({i} + 3) 项 - {cam x}))) y:({# tile size} * (0.5 + ({wall data} 的第 ({i} + 4) 项 - {cam y})))

换成 {wall data} 的第 ({i} + 1) 项 造型

图章

如果 ({$ editor} = wall) 那么

换成 outline 造型

图章

如果 按下 x 键? 那么

如果 碰到 鼠标指针? 那么

将 {delete i} 设为 ({wall data READ ONLY} 中第一个 {wall data} 的第 ({i} + 2) 项 的编号 - 1)

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

否则

如果 (({show inventory?} = 0) 与 (({^ sub drill} > 0) 与 (到 submersible 的距离 < {wall hovered dist}))) 那么

将 {wall hovered} 设为 {i}

将 {wall hovered dist} 设为 到 submersible 的距离

将 {i} 增加 5

执行 //

如果 ({$ editor} = wall) 那么

如果 ({selected object} = ) 不成立 那么

清除图形特效

将 虚像 特效设定为 50

移到 x:({# tile size} * (0.5 + ({mouse x} - {cam x}))) y:({# tile size} * (0.5 + ({mouse y} - {cam y})))

换成 icon 造型

换成 连接 {selected object} 和 1 造型

图章

否则

如果 ({^ sub drill} > 0) 那么

如果 {wall data} 包含 连接 连接 {mouse x} 和 _ 和 {mouse y} ? 那么

将 {wall hovered} 设为 ({wall data} 中第一个 连接 连接 {mouse x} 和 _ 和 {mouse y} 的编号 - 2)

移到 x:({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x}))) y:({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))

将 {wall hovered dist} 设为 到 submersible 的距离

换成 icon 造型

 

定义 reset walls and load from READ ONLY

删除 {wall data} 的全部项目

 

定义 // {comment}

 

当 绿旗 被点击

隐藏

换成 icon 造型

 

当接收到 render breakable walls

执行 render walls

 

当接收到 ! reset

执行 reset walls and load from READ ONLY

 

当接收到 stage clicked

如果 ({$ editor} = wall) 那么

如果 ({screen} = world) 那么

执行 place {selected object} at {mouse x} {mouse y}

 

当接收到 render dev map overlay

执行 render map walls

换成 icon 造型

 

定义 reset walls and load from READ ONLY

删除 {wall data} 的全部项目

 

定义 render walls

清除图形特效

将 {wall hovered} 设为

将 {wall hovered dist} 设为 50

将 {i} 设为 0

重复执行 ({wall data} 的项目数 / 5) 次

换成 large 造型

移到 x:({# tile size} * (0.5 + ({wall data} 的第 ({i} + 3) 项 - {cam x}))) y:({# tile size} * (0.5 + ({wall data} 的第 ({i} + 4) 项 - {cam y})))

换成 {wall data} 的第 ({i} + 1) 项 造型

图章

如果 ({$ editor} = wall) 那么

换成 outline 造型

图章

如果 按下 x 键? 那么

如果 碰到 鼠标指针? 那么

将 {delete i} 设为 ({wall data READ ONLY} 中第一个 {wall data} 的第 ({i} + 2) 项 的编号 - 1)

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data READ ONLY} 的第 {delete i} 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

删除 {wall data} 的第 ({i} + 1) 项

否则

如果 (({show inventory?} = 0) 与 (({^ sub drill} > 0) 与 (到 submersible 的距离 < {wall hovered dist}))) 那么

将 {wall hovered} 设为 {i}

将 {wall hovered dist} 设为 到 submersible 的距离

将 {i} 增加 5

执行 //

如果 ({$ editor} = wall) 那么

如果 ({selected object} = ) 不成立 那么

清除图形特效

将 虚像 特效设定为 50

移到 x:({# tile size} * (0.5 + ({mouse x} - {cam x}))) y:({# tile size} * (0.5 + ({mouse y} - {cam y})))

换成 icon 造型

换成 连接 {selected object} 和 1 造型

图章

否则

如果 ({^ sub drill} > 0) 那么

如果 {wall data} 包含 连接 连接 {mouse x} 和 _ 和 {mouse y} ? 那么

将 {wall hovered} 设为 ({wall data} 中第一个 连接 连接 {mouse x} 和 _ 和 {mouse y} 的编号 - 2)

移到 x:({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x}))) y:({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))

将 {wall hovered dist} 设为 到 submersible 的距离

换成 icon 造型

 

定义 render map walls

换成 large 造型

将笔的颜色设为#ff0000

将笔的粗细设为({# tile size} * {map scale})

将 {i} 设为 0

重复执行 ({wall data READ ONLY} 的项目数 / 5) 次

移到 x:({map scale} * ({# tile size} * ({wall data READ ONLY} 的第 ({i} + 3) 项 - {cam x}))) y:({map scale} * ({# tile size} * ({wall data READ ONLY} 的第 ({i} + 4) 项 - {cam y})))

将笔的颜色 设为 (20 * {wall data READ ONLY} 的第 ({i} + 5) 项)

落笔

抬笔

将 {i} 增加 5

 

定义 place {tile set} at {x} {y}

如果 ({tile set} = ) 不成立 那么

执行 // tier,name,variation

换成 1a1 造型

换成 连接 {tile set} 和 在 1 和 4 之间取随机数 造型

执行 //

将 造型名称 加入 {wall data READ ONLY}

将 连接 连接 {x} 和 _ 和 {y} 加入 {wall data READ ONLY}

将 {x} 加入 {wall data READ ONLY}

将 {y} 加入 {wall data READ ONLY}

将 造型名称 的第 1 个字符 加入 {wall data READ ONLY}

执行 //

将 造型名称 加入 {wall data}

将 连接 连接 {x} 和 _ 和 {y} 加入 {wall data}

将 {x} 加入 {wall data}

将 {y} 加入 {wall data}

将 造型名称 的第 1 个字符 加入 {wall data}

 

定义 // {comment}

 

light shafts

代码

当 绿旗 被点击

将旋转方式设为 左右翻转

隐藏

 

当接收到 render light rays

将 虚像 特效设定为 90

将 像素化 特效设定为 24

换成 (2 + 向下取整((18 * {time})) 除以 72 的余数) 造型

面向 90 方向

移到 x:(0 - ({cam x} * {# tile size}) 除以 480 的余数) y:(-90 - ({cam y} * {# tile size}))

图章

将x坐标设为 (480 - ({cam x} * {# tile size}) 除以 480 的余数)

图章

将 虚像 特效增加 4

下一个造型

下一个造型

面向 -90 方向

移到 x:(0 - ({cam x} * {# tile size}) 除以 480 的余数) y:(-90 - ({cam y} * {# tile size}))

图章

将x坐标设为 (480 - ({cam x} * {# tile size}) 除以 480 的余数)

图章

换成 icon 造型

 

当 绿旗 被点击

将旋转方式设为 左右翻转

隐藏

 

当接收到 render light rays

将 虚像 特效设定为 90

将 像素化 特效设定为 24

换成 (2 + 向下取整((18 * {time})) 除以 72 的余数) 造型

面向 90 方向

移到 x:(0 - ({cam x} * {# tile size}) 除以 480 的余数) y:(-90 - ({cam y} * {# tile size}))

图章

将x坐标设为 (480 - ({cam x} * {# tile size}) 除以 480 的余数)

图章

将 虚像 特效增加 4

下一个造型

下一个造型

面向 -90 方向

移到 x:(0 - ({cam x} * {# tile size}) 除以 480 的余数) y:(-90 - ({cam y} * {# tile size}))

图章

将x坐标设为 (480 - ({cam x} * {# tile size}) 除以 480 的余数)

图章

换成 icon 造型

 

background

代码

当 绿旗 被点击

隐藏

换成 blank 造型

将大小设为 1000

换成 large 造型

删除 {water colours} 的全部项目

执行 add colour | depth: 0 rgb: 20 110 190

执行 add colour | depth: 60 rgb: 20 30 50

执行 add colour | depth: 140 rgb: 15 22 50

执行 add colour | depth: 200 rgb: 20 50 40

执行 add colour | depth: 280 rgb: 10 50 30

执行 add colour | depth: 380 rgb: 50 30 70

执行 add colour | depth: 420 rgb: 70 30 70

执行 add colour | depth: 500 rgb: 0 2 30

执行 add colour | depth: 600 rgb: 0 2 25

执行 add colour | depth: 700 rgb: 50 5 0

执行 add colour | depth: 720 rgb: 40 10 0

执行 add colour | depth: 800 rgb: 10 10 10

执行 add colour | depth: 900 rgb: 0 0 0

 

当接收到 render water foreground

换成 blank 造型

将大小设为 1000

换成 large 造型

将笔的粗细设为1000

将笔的颜色设为{water colour}

如果 ({y} > -50) 那么

将笔的透明度 设为 (70 + ({y} / -5))

否则

将笔的透明度 设为 80

将x坐标设为 -800

如果 ({cam y} > -9) 那么

将y坐标设为 (-500 - ({cam y} * {# tile size}))

否则

将y坐标设为 0

落笔

将x坐标设为 800

抬笔

执行 render surface

换成 icon 造型

 

当接收到 render water bg

如果 ({$ map view?} = 1) 那么

执行 render map water

将笔的粗细设为2

将笔的颜色设为#00ffb6

移到 x:0 y:0

落笔

抬笔

否则

执行 get colour at depth (0 - {cam y})

执行 render water

执行 render sky

 

定义 get colour at depth {d}

将 {frac} 设为 0

将 {colour i} 设为 1

重复执行 ({water colours} 的项目数 / 4) 次

如果 ({water colours} 的第 {colour i} 项 > {d}) 那么

将 {water colour} 设为 ((65536 * ({water colours} 的第 (1 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 3) 项 - {water colours} 的第 (1 + {colour i}) 项))))) + ((256 * ({water colours} 的第 (2 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 2) 项 - {water colours} 的第 (2 + {colour i}) 项))))) + ({water colours} 的第 (3 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 1) 项 - {water colours} 的第 (3 + {colour i}) 项))))))

停止 这个脚本

将 {colour i} 增加 4

将 {frac} 设为 (({water colours} 的第 {colour i} 项 - {d}) / ({water colours} 的第 {colour i} 项 - {water colours} 的第 ({colour i} - 4) 项))

 

定义 render map water

将笔的粗细设为11

将y坐标设为 170

将 {lines i} 设为 -18

重复执行 36 次

执行 get colour at depth (({lines i} / (2 * {map scale})) - {cam y})

将笔的颜色设为{water colour}

将x坐标设为 -240

落笔

将x坐标设为 240

抬笔

将 {lines i} 增加 1

将y坐标增加 -10

 

定义 render water

换成 blank 造型

将大小设为 1000

换成 large 造型

移到 x:0 y:0

将笔的粗细设为1000

将笔的颜色设为{water colour}

落笔

抬笔

换成 icon 造型

将大小设为 200

如果 不成立 那么

将 虚像 特效设定为 80

换成 large 造型

移到 x:(240 - ({cam x} * 12) 除以 480 的余数) y:(-150 - ({cam y} * 12))

换成 bg gradient 造型

图章

将 虚像 特效设定为 80

换成 large 造型

移到 x:(240 - ({cam x} * 18) 除以 480 的余数) y:(180 - ({cam y} * 18) 除以 360 的余数)

换成 noise3 造型

图章

清除图形特效

 

定义 render surface

如果 ({cam y} > -25) 那么

换成 blank 造型

将大小设为 1000

换成 large 造型

移到 x:0 y:(0 - ({cam y} * {# tile size}))

将大小设为 100

将 虚像 特效设定为 50

换成 water surface 造型

图章

清除图形特效

 

定义 add colour | depth: {depth} rgb: {r} {g} {b}

将 {depth} 加入 {water colours}

将 {r} 加入 {water colours}

将 {g} 加入 {water colours}

将 {b} 加入 {water colours}

 

定义 render sky

如果 ({$ map view?} = 1) 那么

换成 sky 造型

将大小设为 100

移到 x:0 y:({map scale} * (0 - ({cam y} * {# tile size})))

图章

否则

如果 ({cam y} > -9) 那么

换成 blank 造型

将大小设为 1000

换成 large 造型

将笔的粗细设为400

将笔的颜色设为#b1d8fd

如果 ({cam y} > 8.8) 那么

移到 x:-240 y:0

否则

移到 x:-240 y:(200 - ({cam y} * {# tile size}))

落笔

将x坐标设为 240

抬笔

移到 x:0 y:(0 - ({cam y} * {# tile size}))

换成 sky 造型

将大小设为 100

图章

换成 blank 造型

将大小设为 400

换成 clouds 造型

移到 x:(-3 * {cam x}) y:(140 - (({cam y} + -5) * 12))

图章

 

当 绿旗 被点击

隐藏

换成 blank 造型

将大小设为 1000

换成 large 造型

删除 {water colours} 的全部项目

执行 add colour | depth: 0 rgb: 20 110 190

执行 add colour | depth: 60 rgb: 20 30 50

执行 add colour | depth: 140 rgb: 15 22 50

执行 add colour | depth: 200 rgb: 20 50 40

执行 add colour | depth: 280 rgb: 10 50 30

执行 add colour | depth: 380 rgb: 50 30 70

执行 add colour | depth: 420 rgb: 70 30 70

执行 add colour | depth: 500 rgb: 0 2 30

执行 add colour | depth: 600 rgb: 0 2 25

执行 add colour | depth: 700 rgb: 50 5 0

执行 add colour | depth: 720 rgb: 40 10 0

执行 add colour | depth: 800 rgb: 10 10 10

执行 add colour | depth: 900 rgb: 0 0 0

 

当接收到 render water bg

如果 ({$ map view?} = 1) 那么

执行 render map water

将笔的粗细设为2

将笔的颜色设为#00ffb6

移到 x:0 y:0

落笔

抬笔

否则

执行 get colour at depth (0 - {cam y})

执行 render water

执行 render sky

 

当接收到 render water foreground

换成 blank 造型

将大小设为 1000

换成 large 造型

将笔的粗细设为1000

将笔的颜色设为{water colour}

如果 ({y} > -50) 那么

将笔的透明度 设为 (70 + ({y} / -5))

否则

将笔的透明度 设为 80

将x坐标设为 -800

如果 ({cam y} > -9) 那么

将y坐标设为 (-500 - ({cam y} * {# tile size}))

否则

将y坐标设为 0

落笔

将x坐标设为 800

抬笔

执行 render surface

换成 icon 造型

 

定义 render map water

将笔的粗细设为11

将y坐标设为 170

将 {lines i} 设为 -18

重复执行 36 次

执行 get colour at depth (({lines i} / (2 * {map scale})) - {cam y})

将笔的颜色设为{water colour}

将x坐标设为 -240

落笔

将x坐标设为 240

抬笔

将 {lines i} 增加 1

将y坐标增加 -10

 

定义 render water

换成 blank 造型

将大小设为 1000

换成 large 造型

移到 x:0 y:0

将笔的粗细设为1000

将笔的颜色设为{water colour}

落笔

抬笔

换成 icon 造型

将大小设为 200

如果 不成立 那么

将 虚像 特效设定为 80

换成 large 造型

移到 x:(240 - ({cam x} * 12) 除以 480 的余数) y:(-150 - ({cam y} * 12))

换成 bg gradient 造型

图章

将 虚像 特效设定为 80

换成 large 造型

移到 x:(240 - ({cam x} * 18) 除以 480 的余数) y:(180 - ({cam y} * 18) 除以 360 的余数)

换成 noise3 造型

图章

清除图形特效

 

定义 render surface

如果 ({cam y} > -25) 那么

换成 blank 造型

将大小设为 1000

换成 large 造型

移到 x:0 y:(0 - ({cam y} * {# tile size}))

将大小设为 100

将 虚像 特效设定为 50

换成 water surface 造型

图章

清除图形特效

 

定义 get colour at depth {d}

将 {frac} 设为 0

将 {colour i} 设为 1

重复执行 ({water colours} 的项目数 / 4) 次

如果 ({water colours} 的第 {colour i} 项 > {d}) 那么

将 {water colour} 设为 ((65536 * ({water colours} 的第 (1 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 3) 项 - {water colours} 的第 (1 + {colour i}) 项))))) + ((256 * ({water colours} 的第 (2 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 2) 项 - {water colours} 的第 (2 + {colour i}) 项))))) + ({water colours} 的第 (3 + {colour i}) 项 + 向下取整(({frac} * ({water colours} 的第 ({colour i} - 1) 项 - {water colours} 的第 (3 + {colour i}) 项))))))

停止 这个脚本

将 {colour i} 增加 4

将 {frac} 设为 (({water colours} 的第 {colour i} 项 - {d}) / ({water colours} 的第 {colour i} 项 - {water colours} 的第 ({colour i} - 4) 项))

 

定义 render sky

如果 ({$ map view?} = 1) 那么

换成 sky 造型

将大小设为 100

移到 x:0 y:({map scale} * (0 - ({cam y} * {# tile size})))

图章

否则

如果 ({cam y} > -9) 那么

换成 blank 造型

将大小设为 1000

换成 large 造型

将笔的粗细设为400

将笔的颜色设为#b1d8fd

如果 ({cam y} > 8.8) 那么

移到 x:-240 y:0

否则

移到 x:-240 y:(200 - ({cam y} * {# tile size}))

落笔

将x坐标设为 240

抬笔

移到 x:0 y:(0 - ({cam y} * {# tile size}))

换成 sky 造型

将大小设为 100

图章

换成 blank 造型

将大小设为 400

换成 clouds 造型

移到 x:(-3 * {cam x}) y:(140 - (({cam y} + -5) * 12))

图章

 

定义 add colour | depth: {depth} rgb: {r} {g} {b}

将 {depth} 加入 {water colours}

将 {r} 加入 {water colours}

将 {g} 加入 {water colours}

将 {b} 加入 {water colours}

 

text renderer

代码

当接收到 credits text: art

将 {text x} 设为 -190

将 {text y} 设为 50

执行 stamp ffish.asia and florazia on sketchfab.com at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ies lights pack 和 " - 和 leomoon studios at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 fish animated 和 " - 和 cdmir on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 rainbow trout 和 " - 和 weaponguy on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 underwater diving pack 和 " - 和 ansimuz on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 magic mountain metallic sulfide ore.jpg 和 " - 和 noaa at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 titanium_metal.jpg 和 " - 和 usgs at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 living on the edge: brine pool organisms 和 " - 和 nautilus live at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp ai generated images from craiyon - craiyon.com at {text x} {text y} brightness 1 col

 

当接收到 credits text: sfx

将 {text x} 设为 -220

将 {text y} 设为 100

执行 stamp no man's sky at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp yofrankie! apricot.blender.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 gui sound effects 和 " - 和 lokif on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 75 cc0 breaking falling hit sfx 和 " - 和 rubberduck on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 mechanical, elevator.wav 和 " - 和 calivintage on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui sounds 和 " - 和 haeldb on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui click 和 " - 和 ranner on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui sound 11 和 " - 和 nezuai on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 gui click sfx 和 " - 和 diicorp95 on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 psychedelic soundcard buzzing noises 和 " - 和 unfa on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 explosion_4.ogg 和 " - 和 isaac200000 on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 achievement.wav 和 " - 和 akatukoaut on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 water surfacing splashes.wav 和 " - 和 robinhood76 on on freesound.org at {text x} {text y} brightness 1 col

 

当接收到 render player map text

执行 stamp viewing world map at -232 166 brightness 1 col

执行 stamp m - exit at -232 150 brightness 1 col

执行 stamp wasd - move at -232 140 brightness 1 col

执行 stamp scroll - zoom at -232 130 brightness 1 col

如果 按下鼠标? 不成立 那么

如果 (mapper 的 map hover = waypoint) 那么

执行 stamp waypoint, click to edit at (鼠标的x坐标 + 3) (鼠标的y坐标 + 2) brightness 1 col

否则

执行 stamp mapper 的 map hover at (鼠标的x坐标 + 3) (鼠标的y坐标 + 2) brightness 1 col

 

当接收到 credits text: music

将 {text x} 设为 -165

将 {text y} 设为 80

执行 stamp 连接 连接 连接 " 和 wreckage systems (voxrelic) 和 " - 和 65daysofstatic at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 resiliant 和 " - 和 avapxia at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 solaris 和 " - 和 ion stream at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ocean theme 和 " - 和 jgvex at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - black ice cave 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - egress 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - time room 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 sci-fi chronicles 22 - the celestian guild 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 starlight 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 stellar 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 cave of illusions 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 woodland shadows 和 " - 和 luminist at {text x} {text y} brightness 1 col

 

当接收到 render sub text

执行 stamp 连接 owned parts ( 和 连接 {= owned parts} 的项目数 和 ) at -210 120 brightness 1 col

执行 stamp installed at -35 120 brightness 1 col

执行 stamp {^ sub name} at 70 120 brightness 1 col

执行 stamp selected hull: at 70 20 brightness 1 col

执行 stamp < > at 70 8 brightness 1 col

如果 ({^ selected hull} = 0) 那么

执行 stamp none at 100 8 brightness 1 col

否则

执行 stamp {@ hull types} 的第 (1 + (14 * ({^ selected hull} - 1))) 项 at 100 8 brightness 1 col

执行 stamp 连接 colour: 和 {^ sub colour} at 70 -10 brightness 1 col

执行 //

执行 stamp 连接 连接 mass: 和 {^ sub mass} 和 kg at 70 -40 brightness 1 col

执行 stamp 连接 连接 size: 和 连接 连接 {^ sub size x} 和 * 和 {^ sub size y} 和 m at 70 -50 brightness 1 col

执行 stamp 连接 连接 thrust: 和 {^ sub propulsion f} 和 n at 70 -60 brightness 1 col

执行 stamp 连接 drag: 和 {^ sub drag} at 70 -70 brightness 1 col

执行 stamp 连接 battery capacity: 和 {^ sub battery capacity} at 70 -80 brightness 1 col

执行 stamp 连接 storage capacity: 和 {^ sub storage slots} at 70 -90 brightness 1 col

执行 stamp 连接 health: 和 {^ sub max health} at 70 -100 brightness 1 col

执行 stamp 连接 连接 comms range: 和 {^ sub comms range} 和 m at 70 -110 brightness 1 col

执行 update text list

执行 render parts list for sub

换成 icon 造型

执行 //

 

当接收到 render world text

如果 ((({end animation state} = holding) 或 ({end animation state} = pulling)) 或 ({end animation state} = )) 那么

停止 这个脚本

清除图形特效

如果 ({sub loss reason} = ) 那么

执行 stamp 连接 health: 和 连接 连接 (向上取整(({health} * 10)) / 10) 和 / 和 {^ sub max health} at -232 -173 brightness ({health} / {^ sub max health}) col

执行 stamp 连接 battery: 和 连接 连接 (向上取整(({battery} * 10)) / 10) 和 / 和 {^ sub battery capacity} at -232 -163 brightness (1.5 * ({battery} / {^ sub battery capacity})) col ((({battery} / {^ sub battery capacity}) < 0.1) * (20 * 四舍五入((2000年至今的天数 * 86400) 除以 1 的余数)))

如果 (({sub range} / {^ sub comms range}) > 1) 那么

执行 stamp out of range! return immediately at -232 -153 brightness 0 col (20 * 四舍五入((2000年至今的天数 * 86400) 除以 1 的余数))

否则

执行 stamp 连接 comms range: 和 连接 连接 四舍五入(({^ sub comms range} - {sub range})) 和 / 和 {^ sub comms range} at -232 -153 brightness (5 * (1 - ({sub range} / {^ sub comms range}))) col

如果 (四舍五入(({y} * -10)) / 10) 包含 .? 那么

执行 stamp 连接 depth: 和 (四舍五入(({y} * -10)) / 10) at -232 -143 brightness 1 col

否则

执行 stamp 连接 depth: 和 连接 (四舍五入(({y} * -10)) / 10) 和 .0 at -232 -143 brightness 1 col

执行 stamp 连接 speed: 和 (四舍五入(({speed} * 10)) / 10) at -232 -133 brightness 1 col

如果 ({sub lift state} = lifted) 那么

执行 stamp [space] upgrades at -50 -100 brightness 1 col

执行 stamp [s] lower sub at -42 -115 brightness 1 col

否则

如果 ({sub loss reason} = ) 不成立 那么

执行 stamp [space] abandon submersible at -85 -20 brightness 1 col

执行 stamp {sub loss reason} at -232 -143 brightness col 30

如果 ({^ sub elt} > 0) 那么

执行 stamp elt activated at -232 -153 brightness col 60

执行 stamp recovery by a 2nd sub required at -232 -163 brightness 1 col

执行 stamp collection arm recommended at -232 -173 brightness 1 col

如果 ({$ editor} = terrain) 那么

执行 stamp r - exit at -232 100 brightness 1 col

执行 stamp space - select tile at -232 90 brightness 1 col

执行 stamp z - fill at -232 80 brightness 1 col

执行 stamp k - pick at -232 70 brightness 1 col

执行 stamp 连接 tile: 和 {selected object} at -232 50 brightness 1 col

否则

如果 ({$ editor} = prop) 那么

执行 stamp t - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp z - move to back at -232 80 brightness 1 col

执行 stamp x - delete at -232 70 brightness 1 col

执行 stamp 连接 prop: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ editor} = resource) 那么

执行 stamp y - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp x - delete at -232 80 brightness 1 col

执行 stamp 连接 resource: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ editor} = wall) 那么

执行 stamp u - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp x - delete at -232 80 brightness 1 col

执行 stamp 连接 wall: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ dev?} = 1) 那么

如果 ({$ free cam?} = 1) 那么

执行 stamp q to teleport player at -232 -90 brightness 1 col

如果 (({$ editor} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

执行 world ui hover

执行 update text list

如果 ({$ editor} = ) 不成立 那么

执行 stamp 连接 连接 向下取整({mouse x}) 和 , 和 向下取整({mouse y}) at 0 0 brightness 1 col

执行 render tool bar

如果 (({$ editor} = ) 与 ({show inventory?} = 1)) 那么

执行 render inventory numbers

换成 icon 造型

执行 //

 

当接收到 render menu text

执行 stamp {version} at -170 -140 brightness 1 col

如果 ({$ dev?} = 1) 那么

执行 stamp dev = 1 at -170 -150 brightness 0 col 30

执行 update text list

换成 icon 造型

执行 //

 

当接收到 render vehicles text

执行 get tmt

执行 stamp statistics at 95 115 brightness 1 col

执行 stamp 连接 launches: 和 {= launches} at 40 90 brightness 1 col

执行 stamp 连接 record depth: 和 连接 四舍五入({= record depth}) 和 m at 40 80 brightness 1 col

执行 stamp 连接 total distance: 和 连接 四舍五入({= total distance}) 和 m at 40 70 brightness 1 col

执行 stamp 连接 total mission time: 和 {tmt} at 40 60 brightness 1 col

如果 ({@ sub configs pointers} 的项目数 = 0) 那么

执行 stamp you have no configurations at -178 115 brightness 1 col

否则

执行 stamp configurations at -142 115 brightness 1 col

如果 ({@ sub configs pointers} 的项目数 < 4) 那么

执行 stamp + create new at -138 (68 - (64 * {@ sub configs pointers} 的项目数)) brightness 0 col 28

执行 render config list text

执行 update text list

换成 icon 造型

执行 //

 

当接收到 render achievements text

执行 stamp achievements at -150 115 brightness 1 col

执行 stamp discoveries at 80 115 brightness 1 col

执行 stamp 连接 resources ( 和 连接 连接 连接 ({ship storage} 的项目数 / 2) 和 / 和 6 和 ) at 25 90 brightness 1 col

执行 stamp 连接 marine life ( 和 连接 连接 连接 creature 的 discovered fish total 和 / 和 {discovered fish} 的项目数 和 ) at 25 35 brightness 1 col

执行 render achievement text

换成 icon 造型

执行 //

 

当接收到 render parts text

执行 stamp equipment at -10 115 brightness 1 col

执行 stamp hulls at 150 115 brightness 1 col

执行 stamp resources at -170 115 brightness 1 col

执行 stamp 连接 funds: 和 {funds} at -205 35 brightness 1 col

执行 render resources

如果 ({selected part type (hull/part)} = hull) 那么

将 {i} 设为 {@ hull types} 中第一个 {selected part} 的编号

执行 stamp {selected part} at -205 5 brightness 0 col 30

如果 ({owned count} = 1) 那么

执行 stamp already owned at -205 -5 brightness 0.5 col 100

否则

执行 stamp not owned at -205 -5 brightness 0.5 col 100

执行 stamp 连接 size: 和 连接 连接 {@ hull types} 的第 (1 + {i}) 项 和 * 和 {@ hull types} 的第 (2 + {i}) 项 at -205 -20 brightness 1 col

执行 stamp 连接 part slots: 和 {@ hull types} 的第 (3 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 mass: 和 {@ hull types} 的第 (4 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp 连接 drag: 和 {@ hull types} 的第 (5 + {i}) 项 at -205 -50 brightness 1 col

执行 stamp 连接 strength: 和 {@ hull types} 的第 (6 + {i}) 项 at -205 -60 brightness 1 col

否则

如果 ({selected part type (hull/part)} = part) 那么

将 {stack limit} 设为

将 {i} 设为 {@ parts reference} 中第一个 {selected part} 的编号

执行 stamp {@ parts reference} 的第 (1 + {i}) 项 at -205 5 brightness 0 col 30

执行 stamp 连接 mass: 和 {@ parts reference} 的第 (3 + {i}) 项 at -205 -20 brightness 1 col

如果 ({@ parts reference} 的第 (2 + {i}) 项 = battery) 那么

执行 stamp 连接 capacity: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp energy storage. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = thruster) 那么

执行 stamp 连接 thrust: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp used for propulsion. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = reinforcement) 那么

执行 stamp 连接 strength: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp increases sub health. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = storage) 那么

执行 stamp 连接 capacity: 和 10 at -205 -30 brightness 1 col

执行 stamp required for carrying at -205 -40 brightness 1 col

执行 stamp gathered resources. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = light) 那么

将 {stack limit} 设为 1

执行 stamp 连接 brightness tier: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp a directional light. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = drill) 那么

将 {stack limit} 设为 1

执行 stamp 连接 drill tier: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp resource collection. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = arm) 那么

将 {stack limit} 设为 1

执行 stamp for collecting found at -205 -30 brightness 1 col

执行 stamp or dropped items. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = scanner) 那么

将 {stack limit} 设为 1

执行 stamp discover life and at -205 -30 brightness 1 col

执行 stamp add or view at -205 -40 brightness 1 col

执行 stamp waypoints. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = elt) 那么

将 {stack limit} 设为 2

执行 stamp transmits location at -205 -30 brightness 1 col

执行 stamp of lost sub. improves at -205 -40 brightness 1 col

执行 stamp part recovery rate. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = comms) 那么

将 {stack limit} 设为 2

执行 stamp 连接 range boost: * 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = map) 那么

将 {stack limit} 设为 2

执行 stamp create a map of at -205 -30 brightness 1 col

执行 stamp explored terrain at -205 -40 brightness 1 col

否则

如果 ({stack limit} = ) 那么

执行 stamp 连接 you own 和 {owned count} at -205 -5 brightness 0.5 col 100

否则

如果 ({owned count} = {stack limit}) 那么

如果 ({stack limit} > 1) 那么

执行 stamp 连接 already owned 和 {stack limit} at -205 -5 brightness 0.5 col 100

否则

执行 stamp already owned at -205 -5 brightness 0.5 col 100

否则

执行 stamp 连接 连接 连接 you own 和 {owned count} 和 / 和 {stack limit} at -205 -5 brightness 0.5 col 100

执行 //

如果 ({selected part type (hull/part)} = ) 不成立 那么

执行 render resource cost

执行 // i in use

如果 ({free part?} = 1) 那么

执行 stamp redeem free part (you don't own one and need it to continue) at -184 -160 brightness 0 col 50

否则

如果 ({selected part type (hull/part)} = part) 那么

如果 ({owned count} = {stack limit}) 不成立 那么

如果 ({funds} < {@ parts reference} 的第 (7 + {i}) 项) 那么

执行 stamp purchase (spend funds) at -180 -160 brightness 0.2 col 0

否则

执行 stamp purchase (spend funds) at -180 -160 brightness 0 col 50

如果 ({can be fabricated?} = 1) 那么

执行 stamp fabricate (use resources) at 30 -160 brightness 0 col 50

否则

执行 stamp fabricate (use resources) at 30 -160 brightness 0.2 col 0

否则

如果 (0 = {= owned hulls} 的第 向上取整(({i} / 14)) 项) 那么

如果 (({funds} < {@ hull types} 的第 (7 + {i}) 项) 或 (1 = {= owned hulls} 的第 向上取整(({i} / 14)) 项)) 那么

执行 stamp purchase (spend funds) at -180 -160 brightness 0.2 col 0

否则

执行 stamp purchase (spend funds) at -180 -160 brightness 0 col 50

如果 (({can be fabricated?} = 1) 与 (0 = {= owned hulls} 的第 向上取整(({i} / 14)) 项)) 那么

执行 stamp fabricate (use resources) at 30 -160 brightness 0 col 50

否则

执行 stamp fabricate (use resources) at 30 -160 brightness 0.2 col 0

否则

执行 stamp click on a piece of equipment or hull at -210 -160 brightness 1 col 0

执行 update text list

换成 icon 造型

执行 //

 

当接收到 save settings text

如果 那么

执行 stamp read this carefully! at 0 0 brightness 1 col

执行 stamp make sure you actually copy the entire save code! at 0 0 brightness 1 col

换成 icon 造型

 

当接收到 render credits stats

执行 get tmt

执行 stamp 连接 launches: 和 {= launches} at -140 60 brightness 1 col

执行 stamp 连接 total distance: 和 连接 四舍五入({= total distance}) 和 m at -140 40 brightness 1 col

执行 stamp 连接 total mission time: 和 {tmt} at -140 20 brightness 1 col

执行 stamp 连接 cumulative funds: 和 ({funds} + {= funds spent}) at -140 0 brightness 1 col

执行 stamp 连接 total resources mined: 和 {= total resources mined} at -140 -20 brightness 1 col

执行 stamp 连接 submersibles lost: 和 {= submersibles lost} at -140 -40 brightness 1 col

执行 stamp 连接 submersibles salvaged: 和 {= submersibles salvaged} at -140 -60 brightness 1 col

 

当接收到 render settings text

执行 stamp created by awesome-llama at -205 115 brightness 0.4 col 20

执行 stamp 连接 game version: 和 {version} at -205 100 brightness 1 col

执行 stamp 连接 save version: 和 io 的 # save version at -205 90 brightness 1 col

执行 stamp 连接 dev mode: 和 {$ dev?} at -205 80 brightness 1 col

执行 stamp 连接 连接 low quality mode ( 和 ({low quality?} = 1) 和 ) at -205 40 brightness 1 col

执行 stamp 连接 连接 music volume ( 和 四舍五入((100 * {music volume fac})) 和 ) at -205 0 brightness 1 col

执行 stamp 连接 连接 sfx volume ( 和 四舍五入((100 * {sfx volume fac})) 和 ) at -205 -40 brightness 1 col

执行 stamp reset game (hold for 3 sec) at -200 -108 brightness 0.5 col

执行 stamp quality preview at 74 120 brightness 1 col

执行 update text list

换成 icon 造型

执行 //

 

当接收到 intro text

执行 stamp acquire and pilot a fleet of unmanned submersible vehicles at -200 110 brightness 1 col

执行 stamp to explore the oceans and underwater terrain at -200 95 brightness 1 col

执行 stamp how far can you go? what is down there? at -200 70 brightness 1 col

执行 stamp there's only one way to find out! at -200 55 brightness 1 col

执行 stamp - this game requires a mouse and keyboard at -200 0 brightness 1 col

执行 stamp - turbowarp is recommended but not required at -200 -20 brightness 1 col

执行 stamp - a tutorial is available to get started at -200 -40 brightness 1 col

执行 stamp > start with tutorial at -200 -90 brightness 0 col 50

执行 stamp > i know what i'm doing at -200 -120 brightness 0 col 20

换成 icon 造型

 

当接收到 tutorial text

如果 ((({screen} = vehicles) 或 ({screen} = world)) 或 (({screen} = sub) 或 ({screen} = parts))) 那么

执行 t: config

执行 t: launch

执行 t: upgrade

换成 icon 造型

 

定义 render tool bar

如果 ({$ editor} = ) 那么

如果 ((({sub lift state} = ) 或 ({sub lift state} = released)) 与 ({$ map view?} = 0)) 那么

 

定义 update text list

将 {text list i} 设为 1

重复执行 ({text} 的项目数 / 2) 次

如果 ({text} 的第 (1 + {text list i}) 项 < 0) 那么

删除 {text} 的第 {text list i} 项

删除 {text} 的第 {text list i} 项

否则

如果 (({screen} = sub) 或 ({screen} = parts)) 那么

执行 stamp {text} 的第 {text list i} 项 at -230 ((-170 + (5 * ({text} 的项目数 - {text list i}))) - (190 * {show inventory?})) brightness 1 col

否则

如果 ({screen} = menu) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 (170 - (5 * {text list i})) brightness 0.5 col

否则

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap {text} 的第 {text list i} 项 at 36 (36 - (10 * {text list i})) wrap 29 b 0.5 c

否则

如果 ({show inventory?} = 1) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 ((inventory/items 的 y lim - 30) - (5 * {text list i})) brightness 1 col

否则

如果 ({player map?} = 1) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 (120 - (5 * {text list i})) brightness 1 col

否则

执行 stamp {text} 的第 {text list i} 项 at -232 (170 - (5 * {text list i})) brightness 1 col

将 {text} 的第 (1 + {text list i}) 项替换为 ({text} 的第 (1 + {text list i}) 项 - {Δt})

将 {text list i} 增加 2

 

定义 render resources

 

定义 render achievement text

将 {i} 设为 (5 * 向下取整(((({achievements} 的项目数 / 5) - 6) * {achievements scroll})))

将 {j} 设为 0

重复执行 6 次

如果 ((2 > {achievements} 的第 (4 + {i}) 项) 或 (1 = {achievements} 的第 (5 + {i}) 项)) 那么

执行 stamp {achievements} 的第 (1 + {i}) 项 at -154 (88 - (42 * {j})) brightness 1 col

如果 ((1 > {achievements} 的第 (4 + {i}) 项) 或 (1 = {achievements} 的第 (5 + {i}) 项)) 那么

执行 stamp with word wrap {achievements} 的第 (2 + {i}) 项 at -154 (78 - (42 * {j})) wrap 21 b 1 c

否则

执行 stamp unknown at -154 (78 - (42 * {j})) brightness 1 col

否则

执行 stamp hidden at -154 (78 - (42 * {j})) brightness 1 col

将 {i} 增加 5

将 {j} 增加 1

 

定义 render inventory numbers

执行 stamp 连接 items: 和 连接 连接 {@ submersible storage} 的项目数 和 / 和 {^ sub storage slots} at -232 inventory/items 的 y lim brightness 1 col

如果 ({display inventory} 的项目数 > 0) 那么

将 {i} 设为 0

重复执行 13 次

重复执行 5 次

执行 stamp {display inventory count} 的第 (1 + {i}) 项 at (-228 + (34 * 向下取整(({i} / 5)))) (151 - (34 * {i} 除以 5 的余数)) brightness 1 col

将 {i} 增加 1

如果 ( = inventory/items 的 hovered inventory index) 不成立 那么

执行 stamp 连接 连接 {display inventory} 的第 inventory/items 的 hovered inventory index 项 和 * 和 {display inventory count} 的第 inventory/items 的 hovered inventory index 项 at -232 (inventory/items 的 y lim - 10) brightness 1 col

执行 stamp press x to drop 1 (arm required to recollect) at -232 (inventory/items 的 y lim - 20) brightness 1 col

否则

 

否则

执行 stamp 连接 purchase cost: 和 {@ hull types} 的第 (7 + {i}) 项 at -205 -80 brightness 1 col

将 {y offset} 设为 -105

 

清除图形特效

 

定义 render parts list for sub

 

定义 render config list text

 

清除图形特效

 

定义 world ui hover

如果 ({hovered lost sub marker} = ) 不成立 那么

执行 stamp lost sub at (12 + overlay 的 hovered lost sub screen x) (overlay 的 hovered lost sub screen y - 2) brightness 1 col

执行 stamp 连接 distance: 和 四舍五入(overlay 的 hovered lost sub dist) at (12 + overlay 的 hovered lost sub screen x) (overlay 的 hovered lost sub screen y - 12) brightness 1 col

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint

如果 按下鼠标? 不成立 那么

执行 stamp waypoint at (15 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x}))) (3 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))) brightness 1 col

执行 stamp click and drag to edit at (15 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x}))) (-6 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))) brightness 1 col

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // distant waypoint

执行 stamp waypoint at (8 + overlay 的 dist waypoint x) (overlay 的 dist waypoint y - 2) brightness 1 col

执行 stamp 连接 distance: 和 四舍五入({waypoint dist}) at (8 + overlay 的 dist waypoint x) (overlay 的 dist waypoint y - 12) brightness 1 col

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

执行 stamp {lost sub data} 的第 (1 + {lost sub nearest}) 项 at (20 + ({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x}))) (20 + ({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))) brightness 1 col

执行 stamp [space] salvage items and parts at (20 + ({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x}))) (10 + ({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))) brightness 0 col 60

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

执行 stamp {items} 的第 (1 + {hovered item}) 项 at (25 + ({# tile size} * (({items} 的第 (2 + {hovered item}) 项 / 12) - {cam x}))) (-2 + ({# tile size} * (({items} 的第 (3 + {hovered item}) 项 / 12) - {cam y}))) brightness 1 col

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

执行 stamp undiscovered at (24 + ({# tile size} * ({fish} 的第 (2 + {hovered fish}) 项 - {cam x}))) (3 + ({# tile size} * ({fish} 的第 (3 + {hovered fish}) 项 - {cam y}))) brightness 1 col

执行 stamp fish at (24 + ({# tile size} * ({fish} 的第 (2 + {hovered fish}) 项 - {cam x}))) (-7 + ({# tile size} * ({fish} 的第 (3 + {hovered fish}) 项 - {cam y}))) brightness 1 col

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

执行 stamp {resource name} at (25 + ({# tile size} * (({resource data} 的第 (2 + {resource hovered}) 项 / 12) - {cam x}))) (-2 + ({# tile size} * (({resource data} 的第 (3 + {resource hovered}) 项 / 12) - {cam y}))) brightness 1 col

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

如果 ({wall data} 的第 ({wall hovered} + 5) 项 > {^ sub drill}) 那么

执行 stamp 连接 requires drill tier 和 {wall data} 的第 ({wall hovered} + 5) 项 at (25 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x})))) (-2 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))) brightness 1 col

否则

执行 stamp breakable rock at (25 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x})))) (-2 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))) brightness 1 col

否则

执行 // >>>>>

 

定义 t: config

如果 ({tutorial phase} = config1) 那么

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap you can only launch 1 sub at a time. because of this, owned hulls and parts can be shared across multiple "configurations". at -214 -100 wrap 40 b 0.4 c 50

执行 stamp with word wrap let's create a configuration by clicking "create new". at -214 -150 wrap 40 b 0 c 50

如果 ({@ sub configs} 的项目数 > 0) 那么

将 {tutorial phase} 设为 config2

否则

如果 ({tutorial phase} = config2) 那么

执行 stamp with word wrap now click on the configuration to edit it. at -214 -100 wrap 40 b 0 c 50

如果 ({screen} = sub) 那么

将 {tutorial phase} 设为 config3

否则

如果 ({tutorial phase} = config3) 那么

执行 stamp with word wrap this is the blank configuration. it needs a hull. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap choose one by clicking the big ? panel on the right or the arrow buttons below it. at -214 -110 wrap 40 b 0 c 50

如果 ({^ selected hull} > 0) 那么

将 {tutorial phase} 设为 config4

否则

如果 ({tutorial phase} = config4) 那么

执行 stamp with word wrap now the empty hull needs parts installed on it to function. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap let's install all 4 owned parts onto the sub by clicking them on the left-most panel. if you wanted to remove them, just click again! at -214 -110 wrap 40 b 0 c 50

如果 (({ready to launch} = 1) 与 ({@ installed parts} 包含 drill1 ? 与 {@ installed parts} 包含 storage slot ?)) 那么

将 {tutorial phase} 设为 config5

否则

如果 ({tutorial phase} = config5) 那么

如果 ({screen} = world) 那么

执行 stamp with word wrap a sub needs at least 1 thruster and battery to function. a drill allows you to collect resources and the storage allows you to carry them back home to construct more parts. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap it's time to launch the sub! click the launch button at the bottom-right. at -214 -145 wrap 40 b 0 c 50

将 {tutorial phase} 设为 launch1

否则

 

定义 t: launch

如果 ({tutorial phase} = launch1) 那么

执行 stamp with word wrap your submersible is currently hanging off a crane. this ship is your home, you must return here to upgrade, repair, recharge, and deposit collected resources. at -214 140 wrap 40 b -1 c 50

执行 stamp with word wrap press s to lower the sub at -214 80 wrap 40 b -1 c 50

如果 ({sub lift state} = released) 那么

将 {tutorial phase} 设为 launch2

否则

如果 ({tutorial phase} = launch2) 那么

执行 stamp with word wrap wasd to move around at -214 -40 wrap 40 b 0.4 c 50

执行 stamp with word wrap move your mouse to aim at things at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap look for some resources lying on the ground, get close enough, then click and hold to drill it. at -214 -70 wrap 40 b 0 c 50

如果 ({@ submersible storage} 的项目数 > 0) 那么

将 {tutorial phase} 设为 launch3

否则

如果 ({tutorial phase} = launch3) 那么

执行 stamp with word wrap press e to toggle your inventory or click the button at the bottom of the screen at -214 -40 wrap 40 b 0 c 50

如果 ({show inventory?} = 1) 那么

将 {tutorial phase} 设为 launch4

否则

如果 ({tutorial phase} = launch4) 那么

如果 ({@ submersible storage} 的项目数 = 1) 那么

执行 stamp with word wrap 连接 连接 连接 连接 as you can see, you have 和 1 和 item and a capacity of 和 {^ sub storage slots} 和 items total. at -214 -40 wrap 40 b 0.4 c 50

否则

执行 stamp with word wrap 连接 连接 连接 连接 as you can see, you have 和 {@ submersible storage} 的项目数 和 items and a capacity of 和 {^ sub storage slots} 和 items total. at -214 -40 wrap 40 b 0.4 c 50

执行 stamp with word wrap now let's drill a few more resource nodules to get a total of 5. at -214 -80 wrap 40 b 0 c 50

如果 ({@ submersible storage} 的项目数 > 4) 那么

将 {tutorial phase} 设为 launch5

如果 ({sub lift state} = lifted) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = launch5) 那么

执行 stamp with word wrap now to complete the first mission, return to your ship. at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap move underneath the ship's crane. at -214 -80 wrap 40 b 0 c 50

如果 ({sub lift state} = lifted) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = launch6) 那么

如果 ({sub lift state} = lifted) 那么

执行 stamp with word wrap press space to go back to upgrades at -214 100 wrap 40 b -1 c 50

如果 ({screen} = world) 不成立 那么

将 {tutorial phase} 设为 upgrade1

否则

 

定义 get tmt

将 {tmt} 设为 连接 向下取整(({= total mission time} / 60)) 和 :

如果 (向下取整({= total mission time}) 除以 60 的余数 < 10) 那么

将 {tmt} 设为 连接 {tmt} 和 0

将 {tmt} 设为 连接 {tmt} 和 向下取整({= total mission time}) 除以 60 的余数

将 {tmt} 设为 连接 {tmt} 和 连接 . 和 向下取整((10 * {= total mission time} 除以 1 的余数))

 

定义 t: upgrade

如果 ({tutorial phase} = upgrade1) 那么

执行 stamp with word wrap now go to the parts tab at the top at -214 -80 wrap 40 b 0 c 50

如果 ({screen} = parts) 那么

将 {tutorial phase} 设为 upgrade2

否则

如果 ({screen} = world) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = upgrade2) 那么

如果 (({selected part} = ) 与 ({screen} = parts)) 那么

执行 stamp with word wrap there are 2 ways to get new parts - constructing them with resources or purchasing them with funds. it's up to you to decide what to spend. at -214 0 wrap 23 b 0.4 c 50

执行 stamp with word wrap a scanner would be useful so try getting one. return to your submersible configuration once done. at -214 -80 wrap 23 b 0 c 50

如果 {= owned parts} 包含 scanner1 ? 那么

将 {tutorial phase} 设为 upgrade3

否则

如果 ({tutorial phase} = upgrade3) 那么

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap click your submersible configuration again to edit it at -214 -80 wrap 30 b 0 c 50

否则

如果 ({screen} = sub) 那么

执行 stamp with word wrap install the scanner and launch again. at -214 -120 wrap 23 b 0 c 50

否则

如果 ({screen} = parts) 那么

执行 stamp with word wrap go to the vehicles tab at -214 -120 wrap 23 b 0 c 50

如果 ({@ installed parts} 包含 scanner1 ? 与 ({screen} = world)) 那么

将 {tutorial phase} 设为 upgrade4

否则

如果 ({tutorial phase} = upgrade4) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

执行 stamp with word wrap with the scanner, you are now able to scan marine life. discoveries will earn you funds. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap scan 3 creatures by clicking on them when they are highlighted. at -214 -100 wrap 40 b 0 c 50

如果 (creature 的 discovered fish total > 2) 那么

将 {tutorial phase} 设为 upgrade5

否则

如果 ({tutorial phase} = upgrade5) 那么

如果 ({sub lift state} = ) 那么

执行 stamp with word wrap the scanner also provides waypoints. use them to help navigate. press i to toggle visibility. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap press p or click the button at the bottom of the screen to add one. at -214 -100 wrap 40 b 0 c 50

如果 ({waypoints} 的项目数 > 0) 那么

将 {tutorial phase} 设为 upgrade6

否则

如果 ({tutorial phase} = upgrade6) 那么

如果 ({sub lift state} = ) 那么

执行 stamp with word wrap you also have access to a world map which will display your position and waypoints. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap press m or click the map button at the bottom. at -214 -100 wrap 40 b 0 c 50

如果 ({player map?} = 1) 那么

将 {tutorial phase} 设为 upgrade7

否则

如果 ({tutorial phase} = upgrade7) 那么

执行 stamp with word wrap there is no visible terrain. you need the terrain mapper tool for this to get added. at least you can get approximate positions with waypoints. at -214 -20 wrap 40 b 0.4 c 50

执行 stamp with word wrap press m or click the map button to return to the world. opening your inventory or showing waypoints will also close the map at -214 -70 wrap 40 b 0 c 50

如果 ({player map?} = 0) 那么

将 {tutorial phase} 设为 upgrade8

否则

如果 ({tutorial phase} = upgrade8) 那么

执行 stamp with word wrap nearby waypoints can be clicked to change colour or be deleted. distant waypoints are visible as small dots. the x key will also delete if hovered. at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap try deleting a waypoint. remember to have waypoints visible first. at -214 -100 wrap 40 b 0 c 50

执行 // deleting waypoints should trigger the change too [from that sprite]

如果 ({waypoints} 的项目数 = 0) 那么

将 {tutorial phase} 设为 complete

否则

如果 ({tutorial phase} = complete) 那么

执行 stamp with word wrap the tutorial is now complete. you are free to do anything. be sure to return home before your battery runs out! press x to close this message. at -214 -70 wrap 30 b 0 c 50

如果 按下 x 键? 不成立 那么

将 {tutorial phase} 设为 complete no x

否则

如果 ({tutorial phase} = complete no x) 那么

执行 stamp with word wrap the tutorial is now complete. you are free to do anything. be sure to return home before your battery runs out! press x to close this message. at -214 -70 wrap 30 b 0 c 50

如果 按下 x 键? 那么

将 {tutorial phase} 设为

否则

 

定义 // {comment}

 

当接收到 credits text: art

将 {text x} 设为 -190

将 {text y} 设为 50

执行 stamp ffish.asia and florazia on sketchfab.com at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ies lights pack 和 " - 和 leomoon studios at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 fish animated 和 " - 和 cdmir on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 rainbow trout 和 " - 和 weaponguy on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 underwater diving pack 和 " - 和 ansimuz on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 magic mountain metallic sulfide ore.jpg 和 " - 和 noaa at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 titanium_metal.jpg 和 " - 和 usgs at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 living on the edge: brine pool organisms 和 " - 和 nautilus live at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp ai generated images from craiyon - craiyon.com at {text x} {text y} brightness 1 col

 

当接收到 credits text: music

将 {text x} 设为 -165

将 {text y} 设为 80

执行 stamp 连接 连接 连接 " 和 wreckage systems (voxrelic) 和 " - 和 65daysofstatic at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 resiliant 和 " - 和 avapxia at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 solaris 和 " - 和 ion stream at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ocean theme 和 " - 和 jgvex at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - black ice cave 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - egress 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ambient time - time room 和 " - 和 osc at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 sci-fi chronicles 22 - the celestian guild 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 starlight 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 stellar 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 cave of illusions 和 " - 和 the toadz at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 woodland shadows 和 " - 和 luminist at {text x} {text y} brightness 1 col

 

当接收到 credits text: sfx

将 {text x} 设为 -220

将 {text y} 设为 100

执行 stamp no man's sky at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp yofrankie! apricot.blender.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 gui sound effects 和 " - 和 lokif on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 75 cc0 breaking falling hit sfx 和 " - 和 rubberduck on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 mechanical, elevator.wav 和 " - 和 calivintage on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui sounds 和 " - 和 haeldb on opengameart.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui click 和 " - 和 ranner on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 ui sound 11 和 " - 和 nezuai on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 gui click sfx 和 " - 和 diicorp95 on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 psychedelic soundcard buzzing noises 和 " - 和 unfa on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 explosion_4.ogg 和 " - 和 isaac200000 on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 achievement.wav 和 " - 和 akatukoaut on on freesound.org at {text x} {text y} brightness 1 col

将 {text y} 增加 -20

执行 stamp 连接 连接 连接 " 和 water surfacing splashes.wav 和 " - 和 robinhood76 on on freesound.org at {text x} {text y} brightness 1 col

 

当接收到 render player map text

执行 stamp viewing world map at -232 166 brightness 1 col

执行 stamp m - exit at -232 150 brightness 1 col

执行 stamp wasd - move at -232 140 brightness 1 col

执行 stamp scroll - zoom at -232 130 brightness 1 col

如果 按下鼠标? 不成立 那么

如果 (mapper 的 map hover = waypoint) 那么

执行 stamp waypoint, click to edit at (鼠标的x坐标 + 3) (鼠标的y坐标 + 2) brightness 1 col

否则

执行 stamp mapper 的 map hover at (鼠标的x坐标 + 3) (鼠标的y坐标 + 2) brightness 1 col

 

当接收到 render world text

如果 ((({end animation state} = holding) 或 ({end animation state} = pulling)) 或 ({end animation state} = )) 那么

停止 这个脚本

清除图形特效

如果 ({sub loss reason} = ) 那么

执行 stamp 连接 health: 和 连接 连接 (向上取整(({health} * 10)) / 10) 和 / 和 {^ sub max health} at -232 -173 brightness ({health} / {^ sub max health}) col

执行 stamp 连接 battery: 和 连接 连接 (向上取整(({battery} * 10)) / 10) 和 / 和 {^ sub battery capacity} at -232 -163 brightness (1.5 * ({battery} / {^ sub battery capacity})) col ((({battery} / {^ sub battery capacity}) < 0.1) * (20 * 四舍五入((2000年至今的天数 * 86400) 除以 1 的余数)))

如果 (({sub range} / {^ sub comms range}) > 1) 那么

执行 stamp out of range! return immediately at -232 -153 brightness 0 col (20 * 四舍五入((2000年至今的天数 * 86400) 除以 1 的余数))

否则

执行 stamp 连接 comms range: 和 连接 连接 四舍五入(({^ sub comms range} - {sub range})) 和 / 和 {^ sub comms range} at -232 -153 brightness (5 * (1 - ({sub range} / {^ sub comms range}))) col

如果 (四舍五入(({y} * -10)) / 10) 包含 .? 那么

执行 stamp 连接 depth: 和 (四舍五入(({y} * -10)) / 10) at -232 -143 brightness 1 col

否则

执行 stamp 连接 depth: 和 连接 (四舍五入(({y} * -10)) / 10) 和 .0 at -232 -143 brightness 1 col

执行 stamp 连接 speed: 和 (四舍五入(({speed} * 10)) / 10) at -232 -133 brightness 1 col

如果 ({sub lift state} = lifted) 那么

执行 stamp [space] upgrades at -50 -100 brightness 1 col

执行 stamp [s] lower sub at -42 -115 brightness 1 col

否则

如果 ({sub loss reason} = ) 不成立 那么

执行 stamp [space] abandon submersible at -85 -20 brightness 1 col

执行 stamp {sub loss reason} at -232 -143 brightness col 30

如果 ({^ sub elt} > 0) 那么

执行 stamp elt activated at -232 -153 brightness col 60

执行 stamp recovery by a 2nd sub required at -232 -163 brightness 1 col

执行 stamp collection arm recommended at -232 -173 brightness 1 col

如果 ({$ editor} = terrain) 那么

执行 stamp r - exit at -232 100 brightness 1 col

执行 stamp space - select tile at -232 90 brightness 1 col

执行 stamp z - fill at -232 80 brightness 1 col

执行 stamp k - pick at -232 70 brightness 1 col

执行 stamp 连接 tile: 和 {selected object} at -232 50 brightness 1 col

否则

如果 ({$ editor} = prop) 那么

执行 stamp t - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp z - move to back at -232 80 brightness 1 col

执行 stamp x - delete at -232 70 brightness 1 col

执行 stamp 连接 prop: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ editor} = resource) 那么

执行 stamp y - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp x - delete at -232 80 brightness 1 col

执行 stamp 连接 resource: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ editor} = wall) 那么

执行 stamp u - exit at -232 100 brightness 1 col

执行 stamp click - place at -232 90 brightness 1 col

执行 stamp x - delete at -232 80 brightness 1 col

执行 stamp 连接 wall: 和 {selected object} at -232 60 brightness 1 col

否则

如果 ({$ dev?} = 1) 那么

如果 ({$ free cam?} = 1) 那么

执行 stamp q to teleport player at -232 -90 brightness 1 col

如果 (({$ editor} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

执行 world ui hover

执行 update text list

如果 ({$ editor} = ) 不成立 那么

执行 stamp 连接 连接 向下取整({mouse x}) 和 , 和 向下取整({mouse y}) at 0 0 brightness 1 col

执行 render tool bar

如果 (({$ editor} = ) 与 ({show inventory?} = 1)) 那么

执行 render inventory numbers

换成 icon 造型

执行 //

 

当接收到 render parts text

执行 stamp equipment at -10 115 brightness 1 col

执行 stamp hulls at 150 115 brightness 1 col

执行 stamp resources at -170 115 brightness 1 col

执行 stamp 连接 funds: 和 {funds} at -205 35 brightness 1 col

执行 render resources

如果 ({selected part type (hull/part)} = hull) 那么

将 {i} 设为 {@ hull types} 中第一个 {selected part} 的编号

执行 stamp {selected part} at -205 5 brightness 0 col 30

如果 ({owned count} = 1) 那么

执行 stamp already owned at -205 -5 brightness 0.5 col 100

否则

执行 stamp not owned at -205 -5 brightness 0.5 col 100

执行 stamp 连接 size: 和 连接 连接 {@ hull types} 的第 (1 + {i}) 项 和 * 和 {@ hull types} 的第 (2 + {i}) 项 at -205 -20 brightness 1 col

执行 stamp 连接 part slots: 和 {@ hull types} 的第 (3 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 mass: 和 {@ hull types} 的第 (4 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp 连接 drag: 和 {@ hull types} 的第 (5 + {i}) 项 at -205 -50 brightness 1 col

执行 stamp 连接 strength: 和 {@ hull types} 的第 (6 + {i}) 项 at -205 -60 brightness 1 col

否则

如果 ({selected part type (hull/part)} = part) 那么

将 {stack limit} 设为

将 {i} 设为 {@ parts reference} 中第一个 {selected part} 的编号

执行 stamp {@ parts reference} 的第 (1 + {i}) 项 at -205 5 brightness 0 col 30

执行 stamp 连接 mass: 和 {@ parts reference} 的第 (3 + {i}) 项 at -205 -20 brightness 1 col

如果 ({@ parts reference} 的第 (2 + {i}) 项 = battery) 那么

执行 stamp 连接 capacity: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp energy storage. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = thruster) 那么

执行 stamp 连接 thrust: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp used for propulsion. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = reinforcement) 那么

执行 stamp 连接 strength: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp increases sub health. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = storage) 那么

执行 stamp 连接 capacity: 和 10 at -205 -30 brightness 1 col

执行 stamp required for carrying at -205 -40 brightness 1 col

执行 stamp gathered resources. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = light) 那么

将 {stack limit} 设为 1

执行 stamp 连接 brightness tier: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp a directional light. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = drill) 那么

将 {stack limit} 设为 1

执行 stamp 连接 drill tier: 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

执行 stamp 连接 power usage: 和 {@ parts reference} 的第 (5 + {i}) 项 at -205 -40 brightness 1 col

执行 stamp resource collection. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = arm) 那么

将 {stack limit} 设为 1

执行 stamp for collecting found at -205 -30 brightness 1 col

执行 stamp or dropped items. at -205 -40 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = scanner) 那么

将 {stack limit} 设为 1

执行 stamp discover life and at -205 -30 brightness 1 col

执行 stamp add or view at -205 -40 brightness 1 col

执行 stamp waypoints. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = elt) 那么

将 {stack limit} 设为 2

执行 stamp transmits location at -205 -30 brightness 1 col

执行 stamp of lost sub. improves at -205 -40 brightness 1 col

执行 stamp part recovery rate. at -205 -50 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = comms) 那么

将 {stack limit} 设为 2

执行 stamp 连接 range boost: * 和 {@ parts reference} 的第 (4 + {i}) 项 at -205 -30 brightness 1 col

否则

如果 ({@ parts reference} 的第 (2 + {i}) 项 = map) 那么

将 {stack limit} 设为 2

执行 stamp create a map of at -205 -30 brightness 1 col

执行 stamp explored terrain at -205 -40 brightness 1 col

否则

如果 ({stack limit} = ) 那么

执行 stamp 连接 you own 和 {owned count} at -205 -5 brightness 0.5 col 100

否则

如果 ({owned count} = {stack limit}) 那么

如果 ({stack limit} > 1) 那么

执行 stamp 连接 already owned 和 {stack limit} at -205 -5 brightness 0.5 col 100

否则

执行 stamp already owned at -205 -5 brightness 0.5 col 100

否则

执行 stamp 连接 连接 连接 you own 和 {owned count} 和 / 和 {stack limit} at -205 -5 brightness 0.5 col 100

执行 //

如果 ({selected part type (hull/part)} = ) 不成立 那么

执行 render resource cost

执行 // i in use

如果 ({free part?} = 1) 那么

执行 stamp redeem free part (you don't own one and need it to continue) at -184 -160 brightness 0 col 50

否则

如果 ({selected part type (hull/part)} = part) 那么

如果 ({owned count} = {stack limit}) 不成立 那么

如果 ({funds} < {@ parts reference} 的第 (7 + {i}) 项) 那么

执行 stamp purchase (spend funds) at -180 -160 brightness 0.2 col 0

否则

执行 stamp purchase (spend funds) at -180 -160 brightness 0 col 50

如果 ({can be fabricated?} = 1) 那么

执行 stamp fabricate (use resources) at 30 -160 brightness 0 col 50

否则

执行 stamp fabricate (use resources) at 30 -160 brightness 0.2 col 0

否则

如果 (0 = {= owned hulls} 的第 向上取整(({i} / 14)) 项) 那么

如果 (({funds} < {@ hull types} 的第 (7 + {i}) 项) 或 (1 = {= owned hulls} 的第 向上取整(({i} / 14)) 项)) 那么

执行 stamp purchase (spend funds) at -180 -160 brightness 0.2 col 0

否则

执行 stamp purchase (spend funds) at -180 -160 brightness 0 col 50

如果 (({can be fabricated?} = 1) 与 (0 = {= owned hulls} 的第 向上取整(({i} / 14)) 项)) 那么

执行 stamp fabricate (use resources) at 30 -160 brightness 0 col 50

否则

执行 stamp fabricate (use resources) at 30 -160 brightness 0.2 col 0

否则

执行 stamp click on a piece of equipment or hull at -210 -160 brightness 1 col 0

执行 update text list

换成 icon 造型

执行 //

 

当接收到 render menu text

执行 stamp {version} at -170 -140 brightness 1 col

如果 ({$ dev?} = 1) 那么

执行 stamp dev = 1 at -170 -150 brightness 0 col 30

执行 update text list

换成 icon 造型

执行 //

 

当接收到 render vehicles text

执行 get tmt

执行 stamp statistics at 95 115 brightness 1 col

执行 stamp 连接 launches: 和 {= launches} at 40 90 brightness 1 col

执行 stamp 连接 record depth: 和 连接 四舍五入({= record depth}) 和 m at 40 80 brightness 1 col

执行 stamp 连接 total distance: 和 连接 四舍五入({= total distance}) 和 m at 40 70 brightness 1 col

执行 stamp 连接 total mission time: 和 {tmt} at 40 60 brightness 1 col

如果 ({@ sub configs pointers} 的项目数 = 0) 那么

执行 stamp you have no configurations at -178 115 brightness 1 col

否则

执行 stamp configurations at -142 115 brightness 1 col

如果 ({@ sub configs pointers} 的项目数 < 4) 那么

执行 stamp + create new at -138 (68 - (64 * {@ sub configs pointers} 的项目数)) brightness 0 col 28

执行 render config list text

执行 update text list

换成 icon 造型

执行 //

 

当接收到 render achievements text

执行 stamp achievements at -150 115 brightness 1 col

执行 stamp discoveries at 80 115 brightness 1 col

执行 stamp 连接 resources ( 和 连接 连接 连接 ({ship storage} 的项目数 / 2) 和 / 和 6 和 ) at 25 90 brightness 1 col

执行 stamp 连接 marine life ( 和 连接 连接 连接 creature 的 discovered fish total 和 / 和 {discovered fish} 的项目数 和 ) at 25 35 brightness 1 col

执行 render achievement text

换成 icon 造型

执行 //

 

当接收到 render sub text

执行 stamp 连接 owned parts ( 和 连接 {= owned parts} 的项目数 和 ) at -210 120 brightness 1 col

执行 stamp installed at -35 120 brightness 1 col

执行 stamp {^ sub name} at 70 120 brightness 1 col

执行 stamp selected hull: at 70 20 brightness 1 col

执行 stamp < > at 70 8 brightness 1 col

如果 ({^ selected hull} = 0) 那么

执行 stamp none at 100 8 brightness 1 col

否则

执行 stamp {@ hull types} 的第 (1 + (14 * ({^ selected hull} - 1))) 项 at 100 8 brightness 1 col

执行 stamp 连接 colour: 和 {^ sub colour} at 70 -10 brightness 1 col

执行 //

执行 stamp 连接 连接 mass: 和 {^ sub mass} 和 kg at 70 -40 brightness 1 col

执行 stamp 连接 连接 size: 和 连接 连接 {^ sub size x} 和 * 和 {^ sub size y} 和 m at 70 -50 brightness 1 col

执行 stamp 连接 连接 thrust: 和 {^ sub propulsion f} 和 n at 70 -60 brightness 1 col

执行 stamp 连接 drag: 和 {^ sub drag} at 70 -70 brightness 1 col

执行 stamp 连接 battery capacity: 和 {^ sub battery capacity} at 70 -80 brightness 1 col

执行 stamp 连接 storage capacity: 和 {^ sub storage slots} at 70 -90 brightness 1 col

执行 stamp 连接 health: 和 {^ sub max health} at 70 -100 brightness 1 col

执行 stamp 连接 连接 comms range: 和 {^ sub comms range} 和 m at 70 -110 brightness 1 col

执行 update text list

执行 render parts list for sub

换成 icon 造型

执行 //

 

当接收到 render settings text

执行 stamp created by awesome-llama at -205 115 brightness 0.4 col 20

执行 stamp 连接 game version: 和 {version} at -205 100 brightness 1 col

执行 stamp 连接 save version: 和 io 的 # save version at -205 90 brightness 1 col

执行 stamp 连接 dev mode: 和 {$ dev?} at -205 80 brightness 1 col

执行 stamp 连接 连接 low quality mode ( 和 ({low quality?} = 1) 和 ) at -205 40 brightness 1 col

执行 stamp 连接 连接 music volume ( 和 四舍五入((100 * {music volume fac})) 和 ) at -205 0 brightness 1 col

执行 stamp 连接 连接 sfx volume ( 和 四舍五入((100 * {sfx volume fac})) 和 ) at -205 -40 brightness 1 col

执行 stamp reset game (hold for 3 sec) at -200 -108 brightness 0.5 col

执行 stamp quality preview at 74 120 brightness 1 col

执行 update text list

换成 icon 造型

执行 //

 

当接收到 intro text

执行 stamp acquire and pilot a fleet of unmanned submersible vehicles at -200 110 brightness 1 col

执行 stamp to explore the oceans and underwater terrain at -200 95 brightness 1 col

执行 stamp how far can you go? what is down there? at -200 70 brightness 1 col

执行 stamp there's only one way to find out! at -200 55 brightness 1 col

执行 stamp - this game requires a mouse and keyboard at -200 0 brightness 1 col

执行 stamp - turbowarp is recommended but not required at -200 -20 brightness 1 col

执行 stamp - a tutorial is available to get started at -200 -40 brightness 1 col

执行 stamp > start with tutorial at -200 -90 brightness 0 col 50

执行 stamp > i know what i'm doing at -200 -120 brightness 0 col 20

换成 icon 造型

 

当接收到 tutorial text

如果 ((({screen} = vehicles) 或 ({screen} = world)) 或 (({screen} = sub) 或 ({screen} = parts))) 那么

执行 t: config

执行 t: launch

执行 t: upgrade

换成 icon 造型

 

当接收到 save settings text

如果 那么

执行 stamp read this carefully! at 0 0 brightness 1 col

执行 stamp make sure you actually copy the entire save code! at 0 0 brightness 1 col

换成 icon 造型

 

当接收到 render credits stats

执行 get tmt

执行 stamp 连接 launches: 和 {= launches} at -140 60 brightness 1 col

执行 stamp 连接 total distance: 和 连接 四舍五入({= total distance}) 和 m at -140 40 brightness 1 col

执行 stamp 连接 total mission time: 和 {tmt} at -140 20 brightness 1 col

执行 stamp 连接 cumulative funds: 和 ({funds} + {= funds spent}) at -140 0 brightness 1 col

执行 stamp 连接 total resources mined: 和 {= total resources mined} at -140 -20 brightness 1 col

执行 stamp 连接 submersibles lost: 和 {= submersibles lost} at -140 -40 brightness 1 col

执行 stamp 连接 submersibles salvaged: 和 {= submersibles salvaged} at -140 -60 brightness 1 col

 

定义 update text list

将 {text list i} 设为 1

重复执行 ({text} 的项目数 / 2) 次

如果 ({text} 的第 (1 + {text list i}) 项 < 0) 那么

删除 {text} 的第 {text list i} 项

删除 {text} 的第 {text list i} 项

否则

如果 (({screen} = sub) 或 ({screen} = parts)) 那么

执行 stamp {text} 的第 {text list i} 项 at -230 ((-170 + (5 * ({text} 的项目数 - {text list i}))) - (190 * {show inventory?})) brightness 1 col

否则

如果 ({screen} = menu) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 (170 - (5 * {text list i})) brightness 0.5 col

否则

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap {text} 的第 {text list i} 项 at 36 (36 - (10 * {text list i})) wrap 29 b 0.5 c

否则

如果 ({show inventory?} = 1) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 ((inventory/items 的 y lim - 30) - (5 * {text list i})) brightness 1 col

否则

如果 ({player map?} = 1) 那么

执行 stamp {text} 的第 {text list i} 项 at -232 (120 - (5 * {text list i})) brightness 1 col

否则

执行 stamp {text} 的第 {text list i} 项 at -232 (170 - (5 * {text list i})) brightness 1 col

将 {text} 的第 (1 + {text list i}) 项替换为 ({text} 的第 (1 + {text list i}) 项 - {Δt})

将 {text list i} 增加 2

 

定义 render resources

 

定义 render tool bar

如果 ({$ editor} = ) 那么

如果 ((({sub lift state} = ) 或 ({sub lift state} = released)) 与 ({$ map view?} = 0)) 那么

 

定义 render achievement text

将 {i} 设为 (5 * 向下取整(((({achievements} 的项目数 / 5) - 6) * {achievements scroll})))

将 {j} 设为 0

重复执行 6 次

如果 ((2 > {achievements} 的第 (4 + {i}) 项) 或 (1 = {achievements} 的第 (5 + {i}) 项)) 那么

执行 stamp {achievements} 的第 (1 + {i}) 项 at -154 (88 - (42 * {j})) brightness 1 col

如果 ((1 > {achievements} 的第 (4 + {i}) 项) 或 (1 = {achievements} 的第 (5 + {i}) 项)) 那么

执行 stamp with word wrap {achievements} 的第 (2 + {i}) 项 at -154 (78 - (42 * {j})) wrap 21 b 1 c

否则

执行 stamp unknown at -154 (78 - (42 * {j})) brightness 1 col

否则

执行 stamp hidden at -154 (78 - (42 * {j})) brightness 1 col

将 {i} 增加 5

将 {j} 增加 1

 

定义 render inventory numbers

执行 stamp 连接 items: 和 连接 连接 {@ submersible storage} 的项目数 和 / 和 {^ sub storage slots} at -232 inventory/items 的 y lim brightness 1 col

如果 ({display inventory} 的项目数 > 0) 那么

将 {i} 设为 0

重复执行 13 次

重复执行 5 次

执行 stamp {display inventory count} 的第 (1 + {i}) 项 at (-228 + (34 * 向下取整(({i} / 5)))) (151 - (34 * {i} 除以 5 的余数)) brightness 1 col

将 {i} 增加 1

如果 ( = inventory/items 的 hovered inventory index) 不成立 那么

执行 stamp 连接 连接 {display inventory} 的第 inventory/items 的 hovered inventory index 项 和 * 和 {display inventory count} 的第 inventory/items 的 hovered inventory index 项 at -232 (inventory/items 的 y lim - 10) brightness 1 col

执行 stamp press x to drop 1 (arm required to recollect) at -232 (inventory/items 的 y lim - 20) brightness 1 col

否则

 

定义 render resource cost

执行 stamp fabrication cost: at -205 -95 brightness 1 col

如果 ({selected part type (hull/part)} = part) 那么

执行 stamp 连接 purchase cost: 和 {@ parts reference} 的第 (7 + {i}) 项 at -205 -80 brightness 1 col

将 {y offset} 设为 -105

否则

执行 stamp 连接 purchase cost: 和 {@ hull types} 的第 (7 + {i}) 项 at -205 -80 brightness 1 col

将 {y offset} 设为 -105

 

定义 stamp {text} at {x} {y} brightness {b} col {c}

如果 ({low quality?} = 0) 那么

换成 icon 造型

将大小设为 130

将 虚像 特效设定为 70

将 亮度 特效设定为 -100

换成 large 造型

移到 x:({x} - 1) y:({y} - 2)

换成 icon 造型

将大小设为 100

将 虚像 特效设定为 0

将 亮度 特效设定为 (100 * {b})

将 颜色 特效设定为 {c}

换成 large 造型

移到 x:{x} y:{y}

清除图形特效

 

定义 render parts list for sub

 

定义 stamp with word wrap {text} at {x} {y} wrap {wrap} b {b} c {c}

如果 ({low quality?} = 0) 那么

换成 icon 造型

将大小设为 130

将 虚像 特效设定为 70

如果 ({b} < 0) 那么

将 亮度 特效设定为 100

否则

将 亮度 特效设定为 -100

换成 large 造型

移到 x:({x} - 1) y:({y} - 2)

将 {print x} 设为 1

将 {print j} 设为 0

清除图形特效

换成 icon 造型

将大小设为 100

将 虚像 特效设定为 0

将 亮度 特效设定为 (100 * {b})

将 颜色 特效设定为 {c}

换成 large 造型

移到 x:{x} y:{y}

将 {print x} 设为 1

将 {print j} 设为 0

清除图形特效

 

定义 render config list text

 

定义 world ui hover

如果 ({hovered lost sub marker} = ) 不成立 那么

执行 stamp lost sub at (12 + overlay 的 hovered lost sub screen x) (overlay 的 hovered lost sub screen y - 2) brightness 1 col

执行 stamp 连接 distance: 和 四舍五入(overlay 的 hovered lost sub dist) at (12 + overlay 的 hovered lost sub screen x) (overlay 的 hovered lost sub screen y - 12) brightness 1 col

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint

如果 按下鼠标? 不成立 那么

执行 stamp waypoint at (15 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x}))) (3 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))) brightness 1 col

执行 stamp click and drag to edit at (15 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x}))) (-6 + ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))) brightness 1 col

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // distant waypoint

执行 stamp waypoint at (8 + overlay 的 dist waypoint x) (overlay 的 dist waypoint y - 2) brightness 1 col

执行 stamp 连接 distance: 和 四舍五入({waypoint dist}) at (8 + overlay 的 dist waypoint x) (overlay 的 dist waypoint y - 12) brightness 1 col

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

执行 stamp {lost sub data} 的第 (1 + {lost sub nearest}) 项 at (20 + ({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x}))) (20 + ({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))) brightness 1 col

执行 stamp [space] salvage items and parts at (20 + ({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x}))) (10 + ({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))) brightness 0 col 60

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

执行 stamp {items} 的第 (1 + {hovered item}) 项 at (25 + ({# tile size} * (({items} 的第 (2 + {hovered item}) 项 / 12) - {cam x}))) (-2 + ({# tile size} * (({items} 的第 (3 + {hovered item}) 项 / 12) - {cam y}))) brightness 1 col

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

执行 stamp undiscovered at (24 + ({# tile size} * ({fish} 的第 (2 + {hovered fish}) 项 - {cam x}))) (3 + ({# tile size} * ({fish} 的第 (3 + {hovered fish}) 项 - {cam y}))) brightness 1 col

执行 stamp fish at (24 + ({# tile size} * ({fish} 的第 (2 + {hovered fish}) 项 - {cam x}))) (-7 + ({# tile size} * ({fish} 的第 (3 + {hovered fish}) 项 - {cam y}))) brightness 1 col

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

执行 stamp {resource name} at (25 + ({# tile size} * (({resource data} 的第 (2 + {resource hovered}) 项 / 12) - {cam x}))) (-2 + ({# tile size} * (({resource data} 的第 (3 + {resource hovered}) 项 / 12) - {cam y}))) brightness 1 col

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

如果 ({wall data} 的第 ({wall hovered} + 5) 项 > {^ sub drill}) 那么

执行 stamp 连接 requires drill tier 和 {wall data} 的第 ({wall hovered} + 5) 项 at (25 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x})))) (-2 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))) brightness 1 col

否则

执行 stamp breakable rock at (25 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x})))) (-2 + ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))) brightness 1 col

否则

执行 // >>>>>

 

定义 t: config

如果 ({tutorial phase} = config1) 那么

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap you can only launch 1 sub at a time. because of this, owned hulls and parts can be shared across multiple "configurations". at -214 -100 wrap 40 b 0.4 c 50

执行 stamp with word wrap let's create a configuration by clicking "create new". at -214 -150 wrap 40 b 0 c 50

如果 ({@ sub configs} 的项目数 > 0) 那么

将 {tutorial phase} 设为 config2

否则

如果 ({tutorial phase} = config2) 那么

执行 stamp with word wrap now click on the configuration to edit it. at -214 -100 wrap 40 b 0 c 50

如果 ({screen} = sub) 那么

将 {tutorial phase} 设为 config3

否则

如果 ({tutorial phase} = config3) 那么

执行 stamp with word wrap this is the blank configuration. it needs a hull. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap choose one by clicking the big ? panel on the right or the arrow buttons below it. at -214 -110 wrap 40 b 0 c 50

如果 ({^ selected hull} > 0) 那么

将 {tutorial phase} 设为 config4

否则

如果 ({tutorial phase} = config4) 那么

执行 stamp with word wrap now the empty hull needs parts installed on it to function. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap let's install all 4 owned parts onto the sub by clicking them on the left-most panel. if you wanted to remove them, just click again! at -214 -110 wrap 40 b 0 c 50

如果 (({ready to launch} = 1) 与 ({@ installed parts} 包含 drill1 ? 与 {@ installed parts} 包含 storage slot ?)) 那么

将 {tutorial phase} 设为 config5

否则

如果 ({tutorial phase} = config5) 那么

如果 ({screen} = world) 那么

执行 stamp with word wrap a sub needs at least 1 thruster and battery to function. a drill allows you to collect resources and the storage allows you to carry them back home to construct more parts. at -214 -80 wrap 40 b 0.4 c 50

执行 stamp with word wrap it's time to launch the sub! click the launch button at the bottom-right. at -214 -145 wrap 40 b 0 c 50

将 {tutorial phase} 设为 launch1

否则

 

定义 get tmt

将 {tmt} 设为 连接 向下取整(({= total mission time} / 60)) 和 :

如果 (向下取整({= total mission time}) 除以 60 的余数 < 10) 那么

将 {tmt} 设为 连接 {tmt} 和 0

将 {tmt} 设为 连接 {tmt} 和 向下取整({= total mission time}) 除以 60 的余数

将 {tmt} 设为 连接 {tmt} 和 连接 . 和 向下取整((10 * {= total mission time} 除以 1 的余数))

 

定义 t: launch

如果 ({tutorial phase} = launch1) 那么

执行 stamp with word wrap your submersible is currently hanging off a crane. this ship is your home, you must return here to upgrade, repair, recharge, and deposit collected resources. at -214 140 wrap 40 b -1 c 50

执行 stamp with word wrap press s to lower the sub at -214 80 wrap 40 b -1 c 50

如果 ({sub lift state} = released) 那么

将 {tutorial phase} 设为 launch2

否则

如果 ({tutorial phase} = launch2) 那么

执行 stamp with word wrap wasd to move around at -214 -40 wrap 40 b 0.4 c 50

执行 stamp with word wrap move your mouse to aim at things at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap look for some resources lying on the ground, get close enough, then click and hold to drill it. at -214 -70 wrap 40 b 0 c 50

如果 ({@ submersible storage} 的项目数 > 0) 那么

将 {tutorial phase} 设为 launch3

否则

如果 ({tutorial phase} = launch3) 那么

执行 stamp with word wrap press e to toggle your inventory or click the button at the bottom of the screen at -214 -40 wrap 40 b 0 c 50

如果 ({show inventory?} = 1) 那么

将 {tutorial phase} 设为 launch4

否则

如果 ({tutorial phase} = launch4) 那么

如果 ({@ submersible storage} 的项目数 = 1) 那么

执行 stamp with word wrap 连接 连接 连接 连接 as you can see, you have 和 1 和 item and a capacity of 和 {^ sub storage slots} 和 items total. at -214 -40 wrap 40 b 0.4 c 50

否则

执行 stamp with word wrap 连接 连接 连接 连接 as you can see, you have 和 {@ submersible storage} 的项目数 和 items and a capacity of 和 {^ sub storage slots} 和 items total. at -214 -40 wrap 40 b 0.4 c 50

执行 stamp with word wrap now let's drill a few more resource nodules to get a total of 5. at -214 -80 wrap 40 b 0 c 50

如果 ({@ submersible storage} 的项目数 > 4) 那么

将 {tutorial phase} 设为 launch5

如果 ({sub lift state} = lifted) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = launch5) 那么

执行 stamp with word wrap now to complete the first mission, return to your ship. at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap move underneath the ship's crane. at -214 -80 wrap 40 b 0 c 50

如果 ({sub lift state} = lifted) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = launch6) 那么

如果 ({sub lift state} = lifted) 那么

执行 stamp with word wrap press space to go back to upgrades at -214 100 wrap 40 b -1 c 50

如果 ({screen} = world) 不成立 那么

将 {tutorial phase} 设为 upgrade1

否则

 

定义 t: upgrade

如果 ({tutorial phase} = upgrade1) 那么

执行 stamp with word wrap now go to the parts tab at the top at -214 -80 wrap 40 b 0 c 50

如果 ({screen} = parts) 那么

将 {tutorial phase} 设为 upgrade2

否则

如果 ({screen} = world) 那么

将 {tutorial phase} 设为 launch6

否则

如果 ({tutorial phase} = upgrade2) 那么

如果 (({selected part} = ) 与 ({screen} = parts)) 那么

执行 stamp with word wrap there are 2 ways to get new parts - constructing them with resources or purchasing them with funds. it's up to you to decide what to spend. at -214 0 wrap 23 b 0.4 c 50

执行 stamp with word wrap a scanner would be useful so try getting one. return to your submersible configuration once done. at -214 -80 wrap 23 b 0 c 50

如果 {= owned parts} 包含 scanner1 ? 那么

将 {tutorial phase} 设为 upgrade3

否则

如果 ({tutorial phase} = upgrade3) 那么

如果 ({screen} = vehicles) 那么

执行 stamp with word wrap click your submersible configuration again to edit it at -214 -80 wrap 30 b 0 c 50

否则

如果 ({screen} = sub) 那么

执行 stamp with word wrap install the scanner and launch again. at -214 -120 wrap 23 b 0 c 50

否则

如果 ({screen} = parts) 那么

执行 stamp with word wrap go to the vehicles tab at -214 -120 wrap 23 b 0 c 50

如果 ({@ installed parts} 包含 scanner1 ? 与 ({screen} = world)) 那么

将 {tutorial phase} 设为 upgrade4

否则

如果 ({tutorial phase} = upgrade4) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

执行 stamp with word wrap with the scanner, you are now able to scan marine life. discoveries will earn you funds. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap scan 3 creatures by clicking on them when they are highlighted. at -214 -100 wrap 40 b 0 c 50

如果 (creature 的 discovered fish total > 2) 那么

将 {tutorial phase} 设为 upgrade5

否则

如果 ({tutorial phase} = upgrade5) 那么

如果 ({sub lift state} = ) 那么

执行 stamp with word wrap the scanner also provides waypoints. use them to help navigate. press i to toggle visibility. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap press p or click the button at the bottom of the screen to add one. at -214 -100 wrap 40 b 0 c 50

如果 ({waypoints} 的项目数 > 0) 那么

将 {tutorial phase} 设为 upgrade6

否则

如果 ({tutorial phase} = upgrade6) 那么

如果 ({sub lift state} = ) 那么

执行 stamp with word wrap you also have access to a world map which will display your position and waypoints. at -214 -60 wrap 40 b 0.4 c 50

执行 stamp with word wrap press m or click the map button at the bottom. at -214 -100 wrap 40 b 0 c 50

如果 ({player map?} = 1) 那么

将 {tutorial phase} 设为 upgrade7

否则

如果 ({tutorial phase} = upgrade7) 那么

执行 stamp with word wrap there is no visible terrain. you need the terrain mapper tool for this to get added. at least you can get approximate positions with waypoints. at -214 -20 wrap 40 b 0.4 c 50

执行 stamp with word wrap press m or click the map button to return to the world. opening your inventory or showing waypoints will also close the map at -214 -70 wrap 40 b 0 c 50

如果 ({player map?} = 0) 那么

将 {tutorial phase} 设为 upgrade8

否则

如果 ({tutorial phase} = upgrade8) 那么

执行 stamp with word wrap nearby waypoints can be clicked to change colour or be deleted. distant waypoints are visible as small dots. the x key will also delete if hovered. at -214 -50 wrap 40 b 0.4 c 50

执行 stamp with word wrap try deleting a waypoint. remember to have waypoints visible first. at -214 -100 wrap 40 b 0 c 50

执行 // deleting waypoints should trigger the change too [from that sprite]

如果 ({waypoints} 的项目数 = 0) 那么

将 {tutorial phase} 设为 complete

否则

如果 ({tutorial phase} = complete) 那么

执行 stamp with word wrap the tutorial is now complete. you are free to do anything. be sure to return home before your battery runs out! press x to close this message. at -214 -70 wrap 30 b 0 c 50

如果 按下 x 键? 不成立 那么

将 {tutorial phase} 设为 complete no x

否则

如果 ({tutorial phase} = complete no x) 那么

执行 stamp with word wrap the tutorial is now complete. you are free to do anything. be sure to return home before your battery runs out! press x to close this message. at -214 -70 wrap 30 b 0 c 50

如果 按下 x 键? 那么

将 {tutorial phase} 设为

否则

 

定义 // {comment}

 

overlay

代码

当 绿旗 被点击

隐藏

将 {run drill?} 设为 0

将 {edit waypoint?} 设为 0

将 {delete waypoint?} 设为 0

 

当按下 x 键

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

如果 (mapper 的 map hover = waypoint) 那么

如果 (mapper 的 map hover index > 0) 那么

执行 delete waypoint at index mapper 的 map hover index

否则

如果 ({hovered waypoint} = ) 不成立 那么

执行 delete waypoint at index {hovered waypoint}

 

当接收到 render world overlay

清除图形特效

如果 (({$ editor} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

如果 ({edit waypoint?} = 0) 那么

将 {hovered waypoint} 设为

将 {hovered waypoint (distant)} 设为

如果 ({show waypoints?} = 1) 那么

执行 render waypoints

执行 render deaths

将 虚像 特效设定为 50

将 亮度 特效设定为 100

如果 那么

执行 // lost sub with beacon (skip it here because the render deaths script does it)

否则

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint (skip it here because the render waypoints script does it)

将 虚像 特效设定为 10

执行 stamp waypoint1 at ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x})) ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // waypoint (skip it here because the render waypoints script does it)

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

移到 x:({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x})) y:({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))

如果 ({lost sub data} 的第 (5 + {lost sub nearest}) 项 = 1) 那么

换成 sub small 造型

否则

如果 ({lost sub data} 的第 (5 + {lost sub nearest}) 项 > 2) 那么

换成 sub large 造型

否则

换成 sub medium 造型

图章

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

执行 stamp item at ({# tile size} * (({items} 的第 (2 + {hovered item}) 项 / 12) - {cam x})) ({# tile size} * (({items} 的第 (3 + {hovered item}) 项 / 12) - {cam y}))

如果 (50 > 到 submersible 的距离) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

换成 can be drilled 造型

图章

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

执行 stamp fish dot at ({# tile size} * ({fish} 的第 ({hovered fish} + 2) 项 - {cam x})) ({# tile size} * ({fish} 的第 ({hovered fish} + 3) 项 - {cam y}))

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

执行 stamp (4 + 向下取整({drill progress})) at ({# tile size} * (({resource data} 的第 (2 + {resource hovered}) 项 / 12) - {cam x})) ({# tile size} * (({resource data} 的第 (3 + {resource hovered}) 项 / 12) - {cam y}))

如果 ({resource dist} < {^ sub drill range}) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

换成 can be drilled 造型

图章

清除图形特效

如果 ({resource mouse dist} < 30) 那么

换成 {resource name} 造型

图章

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

执行 stamp (4 + 向下取整({drill progress})) at ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x}))) ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))

如果 ({wall hovered dist} < {^ sub drill range}) 那么

如果 ({wall data} 的第 ({wall hovered} + 5) 项 > {^ sub drill}) 不成立 那么

换成 can be drilled 造型

图章

否则

执行 // >>>

换成 icon 造型

执行 //

 

当接收到 stage clicked

将 {run drill?} 设为 0

将 {edit waypoint?} 设为 0

如果 (({$ editor} = ) 与 ({screen} = world)) 那么

如果 (({hovered function button} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

执行 // split into all world ui functions

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint

将 {edit waypoint?} 设为 1

将 {delete waypoint?} 设为 0

等待 按下鼠标? 不成立

将 {edit waypoint?} 设为 0

如果 ({delete waypoint?} = 1) 那么

执行 delete waypoint at index {hovered waypoint}

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // waypoint far (deliberately blank, has no interaction)

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

广播 salvage items

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

广播 pick up item

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

广播 scan fish

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

将 {run drill?} 设为 1

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

将 {run drill?} 设为 1

否则

 

当接收到 ! reset

删除 {waypoints} 的全部项目

将 {hovered lost sub screen x} 设为 0

将 {hovered lost sub screen y} 设为 0

 

当接收到 add waypoint

将 {show inventory?} 设为 0

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub scanner} > 0) 那么

如果 ({battery} > 0) 那么

如果 ({player map?} = 1) 那么

如果 ({place new waypoint on map?} = 0) 那么

将 {show waypoints?} 设为 1

将 {place new waypoint on map?} 设为 1

将 click on the map to place a new waypoint 加入 {text}

将 3 加入 {text}

否则

将 {place new waypoint on map?} 设为 0

否则

如果 {waypoints} 包含 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) ? 那么

执行 delete waypoint at index ({waypoints} 中第一个 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) 的编号 - 1)

否则

将 {^ sub colour} 加入 {waypoints}

将 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) 加入 {waypoints}

将 向下取整({x}) 加入 {waypoints}

将 向下取整({y}) 加入 {waypoints}

将 waypoint added at sub 加入 {text}

将 3 加入 {text}

将 {show waypoints?} 设为 1

播放声音 NMS UI_Credit_Increase_01_9344E057

否则

执行 add text no power

否则

执行 add text no scanner installed

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 sfx: delete waypoint

播放声音 534795_diicorp95_gui-click-sfx

 

当接收到 sfx: add waypoint

播放声音 NMS UI_Credit_Increase_01_9344E057

 

定义 render waypoints

将 {i} 设为 1

重复执行 ({waypoints} 的项目数 / 4) 次

将 {offset x} 设为 ({# tile size} * ((0.5 + {waypoints} 的第 ({i} + 2) 项) - {cam x}))

将 {offset y} 设为 ({# tile size} * ((0.5 + {waypoints} 的第 ({i} + 3) 项) - {cam y}))

清除图形特效

换成 large 造型

移到 x:{offset x} y:{offset y}

如果 ((绝对值(x坐标) < 220) 与 (绝对值(y坐标) < 160)) 那么

换成 waypoint3 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

图章

如果 (到 鼠标指针 的距离 < 12) 那么

如果 ({edit waypoint?} = 0) 那么

将 {hovered waypoint} 设为 {i}

将 {hovered waypoint (distant)} 设为

否则

移到 x:0 y:0

面向 (atan(({offset x} / {offset y})) + (180 * ({offset y} > 0))) 方向

移动 -140 步

面向 90 方向

清除图形特效

换成 waypoint tiny3 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

图章

如果 (到 鼠标指针 的距离 < 7) 那么

将 {waypoint dist} 设为 平方根(((({waypoints} 的第 ({i} + 2) 项 - {cam x}) * ({waypoints} 的第 ({i} + 2) 项 - {cam x})) + (({waypoints} 的第 ({i} + 3) 项 - {cam y}) * ({waypoints} 的第 ({i} + 3) 项 - {cam y}))))

将 {hovered waypoint (distant)} 设为 {i}

将 {dist waypoint x} 设为 x坐标

将 {dist waypoint y} 设为 y坐标

将 {i} 增加 4

如果 ({edit waypoint?} = 1) 那么

清除图形特效

移到 x:({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x})) y:({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))

换成 hue circle 造型

图章

如果 (到 鼠标指针 的距离 > 5) 那么

面向 鼠标指针

将 {waypoints} 的第 {hovered waypoint} 项替换为 四舍五入((200 * (方向 / 360)))

面向 90 方向

换成 delete waypoint 造型

将 {delete waypoint?} 设为 0

如果 碰到 鼠标指针? 那么

将 {delete waypoint?} 设为 1

换成 delete waypoint visible 造型

图章

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 delete waypoint at index {i}

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

将 waypoint deleted 加入 {text}

将 3 加入 {text}

如果 ({tutorial phase} = upgrade8) 那么

将 {tutorial phase} 设为 complete

播放声音 534795_diicorp95_gui-click-sfx

 

定义 stamp {costume id} at {x} {y}

换成 {costume id} 造型

移到 x:{x} y:{y}

图章

 

定义 render deaths

将 {hovered lost sub marker} 设为

将 {i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {i} 项 = #) 那么

如果 (1 = {lost sub data} 的第 ({i} + 7) 项) 那么

将 {offset x} 设为 ({# tile size} * ((0.5 + {lost sub data} 的第 ({i} + 2) 项) - {cam x}))

将 {offset y} 设为 ({# tile size} * ((0.5 + {lost sub data} 的第 ({i} + 3) 项) - {cam y}))

清除图形特效

换成 large 造型

移到 x:{offset x} y:{offset y}

如果 ((绝对值(x坐标) < 220) 与 (绝对值(y坐标) < 160)) 不成立 那么

移到 x:0 y:0

面向 (atan(({offset x} / {offset y})) + (180 * ({offset y} > 0))) 方向

移动 -155 步

面向 90 方向

清除图形特效

换成 death 造型

将 颜色 特效设定为 {lost sub data} 的第 ({i} + 6) 项

图章

如果 (({hovered lost sub marker} = ) 与 (到 鼠标指针 的距离 < 10)) 那么

将 {hovered lost sub marker} 设为 {i}

将 {hovered lost sub dist} 设为 平方根(((({lost sub data} 的第 ({i} + 2) 项 - {x}) * ({lost sub data} 的第 ({i} + 2) 项 - {x})) + (({lost sub data} 的第 ({i} + 3) 项 - {y}) * ({lost sub data} 的第 ({i} + 3) 项 - {y}))))

将 亮度 特效设定为 100

换成 death2 造型

图章

将 {hovered lost sub screen x} 设为 x坐标

将 {hovered lost sub screen y} 设为 y坐标

将 {i} 增加 8

将 {i} 增加 1

 

定义 // {comment}

 

当 绿旗 被点击

隐藏

将 {run drill?} 设为 0

将 {edit waypoint?} 设为 0

将 {delete waypoint?} 设为 0

 

当按下 x 键

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

如果 (mapper 的 map hover = waypoint) 那么

如果 (mapper 的 map hover index > 0) 那么

执行 delete waypoint at index mapper 的 map hover index

否则

如果 ({hovered waypoint} = ) 不成立 那么

执行 delete waypoint at index {hovered waypoint}

 

当接收到 render world overlay

清除图形特效

如果 (({$ editor} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

如果 ({edit waypoint?} = 0) 那么

将 {hovered waypoint} 设为

将 {hovered waypoint (distant)} 设为

如果 ({show waypoints?} = 1) 那么

执行 render waypoints

执行 render deaths

将 虚像 特效设定为 50

将 亮度 特效设定为 100

如果 那么

执行 // lost sub with beacon (skip it here because the render deaths script does it)

否则

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint (skip it here because the render waypoints script does it)

将 虚像 特效设定为 10

执行 stamp waypoint1 at ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x})) ({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // waypoint (skip it here because the render waypoints script does it)

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

移到 x:({# tile size} * ({lost sub data} 的第 (2 + {lost sub nearest}) 项 - {cam x})) y:({# tile size} * ({lost sub data} 的第 (3 + {lost sub nearest}) 项 - {cam y}))

如果 ({lost sub data} 的第 (5 + {lost sub nearest}) 项 = 1) 那么

换成 sub small 造型

否则

如果 ({lost sub data} 的第 (5 + {lost sub nearest}) 项 > 2) 那么

换成 sub large 造型

否则

换成 sub medium 造型

图章

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

执行 stamp item at ({# tile size} * (({items} 的第 (2 + {hovered item}) 项 / 12) - {cam x})) ({# tile size} * (({items} 的第 (3 + {hovered item}) 项 / 12) - {cam y}))

如果 (50 > 到 submersible 的距离) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

换成 can be drilled 造型

图章

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

执行 stamp fish dot at ({# tile size} * ({fish} 的第 ({hovered fish} + 2) 项 - {cam x})) ({# tile size} * ({fish} 的第 ({hovered fish} + 3) 项 - {cam y}))

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

执行 stamp (4 + 向下取整({drill progress})) at ({# tile size} * (({resource data} 的第 (2 + {resource hovered}) 项 / 12) - {cam x})) ({# tile size} * (({resource data} 的第 (3 + {resource hovered}) 项 / 12) - {cam y}))

如果 ({resource dist} < {^ sub drill range}) 那么

如果 ({@ submersible storage} 的项目数 < {^ sub storage slots}) 那么

换成 can be drilled 造型

图章

清除图形特效

如果 ({resource mouse dist} < 30) 那么

换成 {resource name} 造型

图章

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

执行 stamp (4 + 向下取整({drill progress})) at ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 3) 项 - {cam x}))) ({# tile size} * (0.5 + ({wall data} 的第 ({wall hovered} + 4) 项 - {cam y})))

如果 ({wall hovered dist} < {^ sub drill range}) 那么

如果 ({wall data} 的第 ({wall hovered} + 5) 项 > {^ sub drill}) 不成立 那么

换成 can be drilled 造型

图章

否则

执行 // >>>

换成 icon 造型

执行 //

 

当接收到 stage clicked

将 {run drill?} 设为 0

将 {edit waypoint?} 设为 0

如果 (({$ editor} = ) 与 ({screen} = world)) 那么

如果 (({hovered function button} = ) 与 (({sub lift state} = ) 或 ({sub lift state} = released))) 那么

执行 // split into all world ui functions

如果 ({hovered waypoint} = ) 不成立 那么

执行 // waypoint

将 {edit waypoint?} 设为 1

将 {delete waypoint?} 设为 0

等待 按下鼠标? 不成立

将 {edit waypoint?} 设为 0

如果 ({delete waypoint?} = 1) 那么

执行 delete waypoint at index {hovered waypoint}

否则

如果 ({hovered waypoint (distant)} = ) 不成立 那么

执行 // waypoint far (deliberately blank, has no interaction)

否则

如果 ({lost sub nearest} = ) 不成立 那么

执行 // sub

广播 salvage items

否则

如果 ({hovered item} = ) 不成立 那么

执行 // item

广播 pick up item

否则

如果 ({hovered fish} = ) 不成立 那么

执行 // fish

广播 scan fish

否则

如果 ({resource hovered} = ) 不成立 那么

执行 // resource

将 {run drill?} 设为 1

否则

如果 ({wall hovered} = ) 不成立 那么

执行 // wall

将 {run drill?} 设为 1

否则

 

当接收到 ! reset

删除 {waypoints} 的全部项目

将 {hovered lost sub screen x} 设为 0

将 {hovered lost sub screen y} 设为 0

 

当接收到 add waypoint

将 {show inventory?} 设为 0

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub scanner} > 0) 那么

如果 ({battery} > 0) 那么

如果 ({player map?} = 1) 那么

如果 ({place new waypoint on map?} = 0) 那么

将 {show waypoints?} 设为 1

将 {place new waypoint on map?} 设为 1

将 click on the map to place a new waypoint 加入 {text}

将 3 加入 {text}

否则

将 {place new waypoint on map?} 设为 0

否则

如果 {waypoints} 包含 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) ? 那么

执行 delete waypoint at index ({waypoints} 中第一个 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) 的编号 - 1)

否则

将 {^ sub colour} 加入 {waypoints}

将 连接 连接 向下取整({x}) 和 _ 和 向下取整({y}) 加入 {waypoints}

将 向下取整({x}) 加入 {waypoints}

将 向下取整({y}) 加入 {waypoints}

将 waypoint added at sub 加入 {text}

将 3 加入 {text}

将 {show waypoints?} 设为 1

播放声音 NMS UI_Credit_Increase_01_9344E057

否则

执行 add text no power

否则

执行 add text no scanner installed

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 sfx: delete waypoint

播放声音 534795_diicorp95_gui-click-sfx

 

当接收到 sfx: add waypoint

播放声音 NMS UI_Credit_Increase_01_9344E057

 

定义 render waypoints

将 {i} 设为 1

重复执行 ({waypoints} 的项目数 / 4) 次

将 {offset x} 设为 ({# tile size} * ((0.5 + {waypoints} 的第 ({i} + 2) 项) - {cam x}))

将 {offset y} 设为 ({# tile size} * ((0.5 + {waypoints} 的第 ({i} + 3) 项) - {cam y}))

清除图形特效

换成 large 造型

移到 x:{offset x} y:{offset y}

如果 ((绝对值(x坐标) < 220) 与 (绝对值(y坐标) < 160)) 那么

换成 waypoint3 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

图章

如果 (到 鼠标指针 的距离 < 12) 那么

如果 ({edit waypoint?} = 0) 那么

将 {hovered waypoint} 设为 {i}

将 {hovered waypoint (distant)} 设为

否则

移到 x:0 y:0

面向 (atan(({offset x} / {offset y})) + (180 * ({offset y} > 0))) 方向

移动 -140 步

面向 90 方向

清除图形特效

换成 waypoint tiny3 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

图章

如果 (到 鼠标指针 的距离 < 7) 那么

将 {waypoint dist} 设为 平方根(((({waypoints} 的第 ({i} + 2) 项 - {cam x}) * ({waypoints} 的第 ({i} + 2) 项 - {cam x})) + (({waypoints} 的第 ({i} + 3) 项 - {cam y}) * ({waypoints} 的第 ({i} + 3) 项 - {cam y}))))

将 {hovered waypoint (distant)} 设为 {i}

将 {dist waypoint x} 设为 x坐标

将 {dist waypoint y} 设为 y坐标

将 {i} 增加 4

如果 ({edit waypoint?} = 1) 那么

清除图形特效

移到 x:({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 2) 项) - {cam x})) y:({# tile size} * ((0.5 + {waypoints} 的第 ({hovered waypoint} + 3) 项) - {cam y}))

换成 hue circle 造型

图章

如果 (到 鼠标指针 的距离 > 5) 那么

面向 鼠标指针

将 {waypoints} 的第 {hovered waypoint} 项替换为 四舍五入((200 * (方向 / 360)))

面向 90 方向

换成 delete waypoint 造型

将 {delete waypoint?} 设为 0

如果 碰到 鼠标指针? 那么

将 {delete waypoint?} 设为 1

换成 delete waypoint visible 造型

图章

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 delete waypoint at index {i}

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

删除 {waypoints} 的第 {i} 项

将 waypoint deleted 加入 {text}

将 3 加入 {text}

如果 ({tutorial phase} = upgrade8) 那么

将 {tutorial phase} 设为 complete

播放声音 534795_diicorp95_gui-click-sfx

 

定义 stamp {costume id} at {x} {y}

换成 {costume id} 造型

移到 x:{x} y:{y}

图章

 

定义 render deaths

将 {hovered lost sub marker} 设为

将 {i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {i} 项 = #) 那么

如果 (1 = {lost sub data} 的第 ({i} + 7) 项) 那么

将 {offset x} 设为 ({# tile size} * ((0.5 + {lost sub data} 的第 ({i} + 2) 项) - {cam x}))

将 {offset y} 设为 ({# tile size} * ((0.5 + {lost sub data} 的第 ({i} + 3) 项) - {cam y}))

清除图形特效

换成 large 造型

移到 x:{offset x} y:{offset y}

如果 ((绝对值(x坐标) < 220) 与 (绝对值(y坐标) < 160)) 不成立 那么

移到 x:0 y:0

面向 (atan(({offset x} / {offset y})) + (180 * ({offset y} > 0))) 方向

移动 -155 步

面向 90 方向

清除图形特效

换成 death 造型

将 颜色 特效设定为 {lost sub data} 的第 ({i} + 6) 项

图章

如果 (({hovered lost sub marker} = ) 与 (到 鼠标指针 的距离 < 10)) 那么

将 {hovered lost sub marker} 设为 {i}

将 {hovered lost sub dist} 设为 平方根(((({lost sub data} 的第 ({i} + 2) 项 - {x}) * ({lost sub data} 的第 ({i} + 2) 项 - {x})) + (({lost sub data} 的第 ({i} + 3) 项 - {y}) * ({lost sub data} 的第 ({i} + 3) 项 - {y}))))

将 亮度 特效设定为 100

换成 death2 造型

图章

将 {hovered lost sub screen x} 设为 x坐标

将 {hovered lost sub screen y} 设为 y坐标

将 {i} 增加 8

将 {i} 增加 1

 

定义 // {comment}

 

darkness overlay

代码

当 绿旗 被点击

隐藏

 

当接收到 ! reset

将 {light toggle} 设为 0

将 {light direction} 设为 90

删除 {world brightness} 的全部项目

执行 add brightness | depth: 10 brightness: 1

执行 add brightness | depth: 100 brightness: 0.05

执行 add brightness | depth: 140 brightness: 0.08

执行 add brightness | depth: 220 brightness: 0.5

执行 add brightness | depth: 260 brightness: 0.5

执行 add brightness | depth: 300 brightness: 0.1

执行 add brightness | depth: 380 brightness: 0.1

执行 add brightness | depth: 400 brightness: 0.9

执行 add brightness | depth: 450 brightness: 0.8

执行 add brightness | depth: 520 brightness: 0.03

执行 add brightness | depth: 650 brightness: 0.02

执行 add brightness | depth: 730 brightness: 0.5

执行 add brightness | depth: 750 brightness: 0.1

执行 add brightness | depth: 800 brightness: 0

 

当接收到 update lighting

执行 get brightness at depth (0 - {cam y})

如果 ({$ free cam?} = 0) 那么

将 虚像 特效设定为 (100 * {world brightness})

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

执行 get dir

换成 icon 造型

将大小设为 300

如果 (({light toggle} = 1) 与 (({sub loss reason} = ) 与 ( 或 ({end animation state} = )) 不成立)) 那么

换成 连接 light 和 {^ sub light} 造型

将 {battery} 增加 ({Δt} * -0.03)

如果 ({battery} < 0) 那么

将 {battery} 设为 0

将 {light toggle} 设为 0

图章

换成 glare1 造型

将大小设为 200

将 虚像 特效设定为 80

图章

否则

换成 dark 造型

图章

换成 icon 造型

如果 ({^ sub light} = 0) 那么

将 {light toggle} 设为 0

如果 (({end animation state} = pulling) 或 ({end animation state} = holding)) 那么

移到 x:0 y:0

将 虚像 特效设定为 50

换成 dark 造型

图章

 

当接收到 toggle light

如果 ({battery} > 0) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub light} > 0) 那么

如果 ({light toggle} = 1) 那么

将 {light toggle} 设为 0

将 light off 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_01_9344E057

否则

如果 ({sub loss reason} = ) 那么

将 {light toggle} 设为 1

将 light on 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_01_9344E057

否则

将 unavailable 加入 {text}

将 2 加入 {text}

否则

执行 add text no light installed

否则

将 {light toggle} 设为 0

否则

执行 add text no power

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

定义 add brightness | depth: {depth} brightness: {brightness}

将 {depth} 加入 {world brightness}

将 {brightness} 加入 {world brightness}

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 get dir

如果 (({battery} > 0) 与 ({health} > 0)) 那么

如果 (({end animation state} = waiting) 或 ({end animation state} = chasing)) 那么

将 {rotation speed} 设为 (180 * {Δt})

如果 (({sub lift state} = released) 或 ({sub lift state} = )) 那么

将 {light direction} 设为 方向

面向 鼠标指针

将 {difference} 设为 (((方向 - {light direction}) + 180) 除以 360 的余数 - 180)

如果 ({difference} < (0 - {rotation speed})) 那么

面向 {light direction} 方向

左转 {rotation speed} 度

否则

如果 ({difference} > {rotation speed}) 那么

面向 {light direction} 方向

右转 {rotation speed} 度

否则

将 {light toggle} 设为 0

 

定义 get brightness at depth {d}

将 {frac} 设为 0

将 {brightness i} 设为 1

重复执行 ({world brightness} 的项目数 / 2) 次

如果 ({world brightness} 的第 {brightness i} 项 > {d}) 那么

将 {world brightness} 设为 ({world brightness} 的第 (1 + {brightness i}) 项 + ({frac} * ({world brightness} 的第 ({brightness i} - 1) 项 - {world brightness} 的第 (1 + {brightness i}) 项)))

如果 ({world brightness} > 1) 那么

将 {world brightness} 设为 1

否则

如果 ({world brightness} < 0) 那么

将 {world brightness} 设为 0

停止 这个脚本

将 {brightness i} 增加 2

将 {frac} 设为 (({world brightness} 的第 {brightness i} 项 - {d}) / ({world brightness} 的第 {brightness i} 项 - {world brightness} 的第 ({brightness i} - 2) 项))

 

当 绿旗 被点击

隐藏

 

当接收到 update lighting

执行 get brightness at depth (0 - {cam y})

如果 ({$ free cam?} = 0) 那么

将 虚像 特效设定为 (100 * {world brightness})

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

执行 get dir

换成 icon 造型

将大小设为 300

如果 (({light toggle} = 1) 与 (({sub loss reason} = ) 与 ( 或 ({end animation state} = )) 不成立)) 那么

换成 连接 light 和 {^ sub light} 造型

将 {battery} 增加 ({Δt} * -0.03)

如果 ({battery} < 0) 那么

将 {battery} 设为 0

将 {light toggle} 设为 0

图章

换成 glare1 造型

将大小设为 200

将 虚像 特效设定为 80

图章

否则

换成 dark 造型

图章

换成 icon 造型

如果 ({^ sub light} = 0) 那么

将 {light toggle} 设为 0

如果 (({end animation state} = pulling) 或 ({end animation state} = holding)) 那么

移到 x:0 y:0

将 虚像 特效设定为 50

换成 dark 造型

图章

 

当接收到 toggle light

如果 ({battery} > 0) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({^ sub light} > 0) 那么

如果 ({light toggle} = 1) 那么

将 {light toggle} 设为 0

将 light off 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_01_9344E057

否则

如果 ({sub loss reason} = ) 那么

将 {light toggle} 设为 1

将 light on 加入 {text}

将 2 加入 {text}

播放声音 NMS UI_Click_Generic_01_9344E057

否则

将 unavailable 加入 {text}

将 2 加入 {text}

否则

执行 add text no light installed

否则

将 {light toggle} 设为 0

否则

执行 add text no power

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 ! reset

将 {light toggle} 设为 0

将 {light direction} 设为 90

删除 {world brightness} 的全部项目

执行 add brightness | depth: 10 brightness: 1

执行 add brightness | depth: 100 brightness: 0.05

执行 add brightness | depth: 140 brightness: 0.08

执行 add brightness | depth: 220 brightness: 0.5

执行 add brightness | depth: 260 brightness: 0.5

执行 add brightness | depth: 300 brightness: 0.1

执行 add brightness | depth: 380 brightness: 0.1

执行 add brightness | depth: 400 brightness: 0.9

执行 add brightness | depth: 450 brightness: 0.8

执行 add brightness | depth: 520 brightness: 0.03

执行 add brightness | depth: 650 brightness: 0.02

执行 add brightness | depth: 730 brightness: 0.5

执行 add brightness | depth: 750 brightness: 0.1

执行 add brightness | depth: 800 brightness: 0

 

定义 get dir

如果 (({battery} > 0) 与 ({health} > 0)) 那么

如果 (({end animation state} = waiting) 或 ({end animation state} = chasing)) 那么

将 {rotation speed} 设为 (180 * {Δt})

如果 (({sub lift state} = released) 或 ({sub lift state} = )) 那么

将 {light direction} 设为 方向

面向 鼠标指针

将 {difference} 设为 (((方向 - {light direction}) + 180) 除以 360 的余数 - 180)

如果 ({difference} < (0 - {rotation speed})) 那么

面向 {light direction} 方向

左转 {rotation speed} 度

否则

如果 ({difference} > {rotation speed}) 那么

面向 {light direction} 方向

右转 {rotation speed} 度

否则

将 {light toggle} 设为 0

 

定义 add brightness | depth: {depth} brightness: {brightness}

将 {depth} 加入 {world brightness}

将 {brightness} 加入 {world brightness}

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 get brightness at depth {d}

将 {frac} 设为 0

将 {brightness i} 设为 1

重复执行 ({world brightness} 的项目数 / 2) 次

如果 ({world brightness} 的第 {brightness i} 项 > {d}) 那么

将 {world brightness} 设为 ({world brightness} 的第 (1 + {brightness i}) 项 + ({frac} * ({world brightness} 的第 ({brightness i} - 1) 项 - {world brightness} 的第 (1 + {brightness i}) 项)))

如果 ({world brightness} > 1) 那么

将 {world brightness} 设为 1

否则

如果 ({world brightness} < 0) 那么

将 {world brightness} 设为 0

停止 这个脚本

将 {brightness i} 增加 2

将 {frac} 设为 (({world brightness} 的第 {brightness i} 项 - {d}) / ({world brightness} 的第 {brightness i} 项 - {world brightness} 的第 ({brightness i} - 2) 项))

 

water edge

代码

当接收到 render water edge

换成 (2 + 向下取整((30 * {time}) 除以 100 的余数)) 造型

移到 x:(240 - ({cam x} * {# tile size}) 除以 480 的余数) y:(0 - ({cam y} * {# tile size}))

图章

换成 icon 造型

 

当接收到 render water edge

换成 (2 + 向下取整((30 * {time}) 除以 100 的余数)) 造型

移到 x:(240 - ({cam x} * {# tile size}) 除以 480 的余数) y:(0 - ({cam y} * {# tile size}))

图章

换成 icon 造型

 

vignette

代码

当 绿旗 被点击

换成 light vignette 造型

将大小设为 110

隐藏

 

当接收到 render vignette

清除图形特效

换成 light vignette 造型

移到 x:0 y:0

如果 ({$ free cam?} = 1) 那么

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

图章

 

当接收到 render black cover

如果 ({black cover} > 0) 那么

将 虚像 特效设定为 (100 - {black cover})

换成 black 造型

移到 x:0 y:0

图章

将 {black cover} 增加 (-250 * {Δt})

 

当接收到 STOP

换成 stopped 造型

移到 x:0 y:0

显示

图章

停止 全部脚本

 

当 绿旗 被点击

换成 light vignette 造型

将大小设为 110

隐藏

 

当接收到 render black cover

如果 ({black cover} > 0) 那么

将 虚像 特效设定为 (100 - {black cover})

换成 black 造型

移到 x:0 y:0

图章

将 {black cover} 增加 (-250 * {Δt})

 

当接收到 render vignette

清除图形特效

换成 light vignette 造型

移到 x:0 y:0

如果 ({$ free cam?} = 1) 那么

移到 x:({# tile size} * ({x} - {cam x})) y:({# tile size} * ({y} - {cam y}))

图章

 

当接收到 STOP

换成 stopped 造型

移到 x:0 y:0

显示

图章

停止 全部脚本

 

particles

代码

当 绿旗 被点击

等待 0 秒

重复执行

等待 ({y} < -700)

执行 add particle smoke1 pos 51.8 -731.2 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

执行 add particle smoke1 pos 47.2 -733 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

执行 add particle smoke1 pos 39.2 -731.3 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

等待 0.3 秒

 

当接收到 ptc: add drill debris

重复执行 10 次

执行 add particle 连接 debris 和 在 1 和 3 之间取随机数 pos (在 -0.2 和 0.2 之间取随机数 + resources 的 drill debris x) (在 -0.2 和 0.2 之间取随机数 + resources 的 drill debris y) speed 在 -0.1 和 0.1 之间取随机数 在 -1 和 -2.0 之间取随机数 size 在 100 和 130 之间取随机数 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

 

当接收到 ! reset

删除 {particles} 的全部项目

删除 {particles params} 的全部项目

将 type 加入 {particles params}

将 x 加入 {particles params}

将 y 加入 {particles params}

将 vx 加入 {particles params}

将 vy 加入 {particles params}

将 size 加入 {particles params}

将 size change 加入 {particles params}

将 dir 加入 {particles params}

将 dir change 加入 {particles params}

将 life 加入 {particles params}

 

当接收到 thud

执行 add particle dust1 pos {x} {y} speed size 100 150 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

执行 add particle dust1 pos {x} {y} speed size 80 200 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

 

当接收到 update particles

如果 ({low quality?} = 0) 那么

如果 ({drill progress} > 0) 那么

如果 ({time} 除以 0.2 的余数 < 0.05) 那么

如果 ({wall hovered} = ) 不成立 那么

执行 add particle dust1 pos (0.5 + {wall data} 的第 (3 + {drill index}) 项) (0.5 + {wall data} 的第 (4 + {drill index}) 项) speed 在 -1 和 1.0 之间取随机数 在 -1 和 1.0 之间取随机数 size 在 80 和 100 之间取随机数 100 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

否则

执行 add particle dust1 pos ({resource data} 的第 (2 + {drill index}) 项 / 12) ({resource data} 的第 (3 + {drill index}) 项 / 12) speed 在 -1 和 1.0 之间取随机数 在 -1 和 1.0 之间取随机数 size 在 50 和 80 之间取随机数 100 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

如果 ({prop thrust} > 0.1) 那么

如果 ({time} 除以 0.2 的余数 < 0.05) 那么

执行 add particle bubbles1 pos {x} {y} speed (-1 * ({prop thrust} * sin(submersible 的 prop dir))) (-1 * ({prop thrust} * cos(submersible 的 prop dir))) size 在 30 和 70 之间取随机数 50 dir 在 1 和 360 之间取随机数 在 -10 和 10 之间取随机数 life 1

执行 render particles

换成 icon 造型

执行 //

 

定义 render particles

清除图形特效

将 {i} 设为 0

重复执行 ({particles} 的项目数 / {particles params} 的项目数) 次

如果 (({particles} 的第 (10 + {i}) 项 > 0) 与 ({particles} 的第 (3 + {i}) 项 < 0)) 那么

换成 {particles} 的第 (1 + {i}) 项 造型

将 虚像 特效设定为 (100 - (100 * {particles} 的第 (10 + {i}) 项))

移到 x:({# tile size} * ({particles} 的第 (2 + {i}) 项 - {cam x})) y:({# tile size} * ({particles} 的第 (3 + {i}) 项 - {cam y}))

将大小设为 {particles} 的第 (6 + {i}) 项

面向 {particles} 的第 (8 + {i}) 项 方向

图章

将 {particles} 的第 (2 + {i}) 项替换为 (({Δt} * {particles} 的第 (4 + {i}) 项) + {particles} 的第 (2 + {i}) 项)

将 {particles} 的第 (3 + {i}) 项替换为 (({Δt} * {particles} 的第 (5 + {i}) 项) + {particles} 的第 (3 + {i}) 项)

将 {particles} 的第 (6 + {i}) 项替换为 (({Δt} * {particles} 的第 (7 + {i}) 项) + {particles} 的第 (6 + {i}) 项)

将 {particles} 的第 (8 + {i}) 项替换为 (({Δt} * {particles} 的第 (9 + {i}) 项) + {particles} 的第 (8 + {i}) 项)

将 {particles} 的第 (10 + {i}) 项替换为 ({particles} 的第 (10 + {i}) 项 - {Δt})

将 {i} 增加 {particles params} 的项目数

否则

重复执行 {particles params} 的项目数 次

删除 {particles} 的第 (1 + {i}) 项

 

定义 add particle {name} pos {x} {y} speed {vx} {vy} size {size} {size change} dir {dir} {dir change} life {life}

将 {name} 加入 {particles}

将 {x} 加入 {particles}

将 {y} 加入 {particles}

将 {vx} 加入 {particles}

将 {vy} 加入 {particles}

如果 ({size} = ) 那么

将 100 加入 {particles}

否则

将 {size} 加入 {particles}

将 {size change} 加入 {particles}

如果 ({dir} = ) 那么

将 90 加入 {particles}

否则

将 {dir} 加入 {particles}

将 {dir change} 加入 {particles}

如果 ({life} = ) 那么

将 1 加入 {particles}

否则

将 {life} 加入 {particles}

 

定义 // {comment}

 

当 绿旗 被点击

等待 0 秒

重复执行

等待 ({y} < -700)

执行 add particle smoke1 pos 51.8 -731.2 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

执行 add particle smoke1 pos 47.2 -733 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

执行 add particle smoke1 pos 39.2 -731.3 speed 0 在 1.0 和 3 之间取随机数 size 在 50 和 90 之间取随机数 20 dir 在 1 和 360 之间取随机数 在 -30 和 30 之间取随机数 life 3

等待 0.3 秒

 

当接收到 update particles

如果 ({low quality?} = 0) 那么

如果 ({drill progress} > 0) 那么

如果 ({time} 除以 0.2 的余数 < 0.05) 那么

如果 ({wall hovered} = ) 不成立 那么

执行 add particle dust1 pos (0.5 + {wall data} 的第 (3 + {drill index}) 项) (0.5 + {wall data} 的第 (4 + {drill index}) 项) speed 在 -1 和 1.0 之间取随机数 在 -1 和 1.0 之间取随机数 size 在 80 和 100 之间取随机数 100 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

否则

执行 add particle dust1 pos ({resource data} 的第 (2 + {drill index}) 项 / 12) ({resource data} 的第 (3 + {drill index}) 项 / 12) speed 在 -1 和 1.0 之间取随机数 在 -1 和 1.0 之间取随机数 size 在 50 和 80 之间取随机数 100 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

如果 ({prop thrust} > 0.1) 那么

如果 ({time} 除以 0.2 的余数 < 0.05) 那么

执行 add particle bubbles1 pos {x} {y} speed (-1 * ({prop thrust} * sin(submersible 的 prop dir))) (-1 * ({prop thrust} * cos(submersible 的 prop dir))) size 在 30 和 70 之间取随机数 50 dir 在 1 和 360 之间取随机数 在 -10 和 10 之间取随机数 life 1

执行 render particles

换成 icon 造型

执行 //

 

当接收到 ! reset

删除 {particles} 的全部项目

删除 {particles params} 的全部项目

将 type 加入 {particles params}

将 x 加入 {particles params}

将 y 加入 {particles params}

将 vx 加入 {particles params}

将 vy 加入 {particles params}

将 size 加入 {particles params}

将 size change 加入 {particles params}

将 dir 加入 {particles params}

将 dir change 加入 {particles params}

将 life 加入 {particles params}

 

当接收到 thud

执行 add particle dust1 pos {x} {y} speed size 100 150 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

执行 add particle dust1 pos {x} {y} speed size 80 200 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

 

当接收到 ptc: add drill debris

重复执行 10 次

执行 add particle 连接 debris 和 在 1 和 3 之间取随机数 pos (在 -0.2 和 0.2 之间取随机数 + resources 的 drill debris x) (在 -0.2 和 0.2 之间取随机数 + resources 的 drill debris y) speed 在 -0.1 和 0.1 之间取随机数 在 -1 和 -2.0 之间取随机数 size 在 100 和 130 之间取随机数 dir 在 1 和 360 之间取随机数 在 -2 和 2.0 之间取随机数 life

 

定义 render particles

清除图形特效

将 {i} 设为 0

重复执行 ({particles} 的项目数 / {particles params} 的项目数) 次

如果 (({particles} 的第 (10 + {i}) 项 > 0) 与 ({particles} 的第 (3 + {i}) 项 < 0)) 那么

换成 {particles} 的第 (1 + {i}) 项 造型

将 虚像 特效设定为 (100 - (100 * {particles} 的第 (10 + {i}) 项))

移到 x:({# tile size} * ({particles} 的第 (2 + {i}) 项 - {cam x})) y:({# tile size} * ({particles} 的第 (3 + {i}) 项 - {cam y}))

将大小设为 {particles} 的第 (6 + {i}) 项

面向 {particles} 的第 (8 + {i}) 项 方向

图章

将 {particles} 的第 (2 + {i}) 项替换为 (({Δt} * {particles} 的第 (4 + {i}) 项) + {particles} 的第 (2 + {i}) 项)

将 {particles} 的第 (3 + {i}) 项替换为 (({Δt} * {particles} 的第 (5 + {i}) 项) + {particles} 的第 (3 + {i}) 项)

将 {particles} 的第 (6 + {i}) 项替换为 (({Δt} * {particles} 的第 (7 + {i}) 项) + {particles} 的第 (6 + {i}) 项)

将 {particles} 的第 (8 + {i}) 项替换为 (({Δt} * {particles} 的第 (9 + {i}) 项) + {particles} 的第 (8 + {i}) 项)

将 {particles} 的第 (10 + {i}) 项替换为 ({particles} 的第 (10 + {i}) 项 - {Δt})

将 {i} 增加 {particles params} 的项目数

否则

重复执行 {particles params} 的项目数 次

删除 {particles} 的第 (1 + {i}) 项

 

定义 add particle {name} pos {x} {y} speed {vx} {vy} size {size} {size change} dir {dir} {dir change} life {life}

将 {name} 加入 {particles}

将 {x} 加入 {particles}

将 {y} 加入 {particles}

将 {vx} 加入 {particles}

将 {vy} 加入 {particles}

如果 ({size} = ) 那么

将 100 加入 {particles}

否则

将 {size} 加入 {particles}

将 {size change} 加入 {particles}

如果 ({dir} = ) 那么

将 90 加入 {particles}

否则

将 {dir} 加入 {particles}

将 {dir change} 加入 {particles}

如果 ({life} = ) 那么

将 1 加入 {particles}

否则

将 {life} 加入 {particles}

 

定义 // {comment}

 

parts

代码

当 绿旗 被点击

将 {sub parts scroll} 设为 0

删除 {@ parts reference} 的全部项目

执行 // ALL PART NAMES (first input) MUST BE UNIQUE

执行 // pwr consumption in second property

执行 // order matters with unlocked parts!

将 {total funds to spend} 设为 0

执行 add part to reference battery small display name small battery function battery mass 40 custom properties 50

执行 add costs 1 | 5 2

执行 add part to reference battery medium display name medium battery function battery mass 60 custom properties 80

执行 add costs 1 | 8 4 2

执行 add part to reference battery large display name large battery function battery mass 80 custom properties 120

执行 add costs 1 | 5 10 4

执行 add part to reference thruster small display name small thruster function thruster mass 30 custom properties 250 0.12

执行 add costs 1 | 7

执行 add part to reference thruster medium display name medium thruster function thruster mass 60 custom properties 450 0.3

执行 add costs 1 | 5 4 8

执行 add part to reference thruster large display name large thruster function thruster mass 90 custom properties 800 0.55

执行 add costs 1 | 10 2 2 5

执行 add part to reference reinforcement1 display name reinforcement 1 function reinforcement mass 100 custom properties 10

执行 add costs 1 | 10 5

执行 add part to reference reinforcement2 display name reinforcement 2 function reinforcement mass 150 custom properties 20

执行 add costs 1 | 10 5 2

执行 add part to reference reinforcement3 display name reinforcement 3 function reinforcement mass 300 custom properties 30

执行 add costs 1 | 10 2 5

执行 add part to reference light1 display name light 1 function light mass 3 custom properties 1 0.01

执行 add costs 1 | 3 5

执行 add part to reference light2 display name light 2 function light mass 5 custom properties 2 0.03

执行 add costs 1 | 2 4 2

执行 add part to reference light3 display name light 3 function light mass 7 custom properties 2 0.05

执行 add costs 1 | 2 2 3

执行 add part to reference storage slot display name storage function storage mass 20 custom properties

执行 add costs 1 | 3

执行 add part to reference scanner1 display name scanner function scanner mass 10 custom properties

执行 add costs 1 | 5

执行 add part to reference collection arm display name collection arm function arm mass 50 custom properties

执行 add costs 1 | 10 2

执行 add part to reference elt1 display name locator beacon function elt mass 15 custom properties

执行 add costs 1 | 5 5

执行 add part to reference comms1 display name comms booster function comms mass 30 custom properties 2

执行 add costs 1 | 5 8

执行 add part to reference mapper display name terrain mapper function map mass 15 custom properties

执行 add costs 1 | 1 4 2

执行 add part to reference drill1 display name drill 1 function drill mass 30 custom properties 1 0.1

执行 add costs 1 | 10

执行 add part to reference drill2 display name drill 2 function drill mass 60 custom properties 2 0.2

执行 add costs 1 | 5 5 8

执行 add part to reference drill3 display name drill 3 function drill mass 60 custom properties 3 0.2

执行 add costs 1 | 8 5 3

执行 add part to reference drill4 display name drill 4 function drill mass 60 custom properties 4 0.2

执行 add costs 1 | 5 5 5 4

 

当按下 ↑ 键

如果 ({screen} = sub) 那么

如果 ({= owned parts} 的项目数 > 5) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

将 {sub parts scroll} 增加 (-20 / ((40 * {= owned parts} 的项目数) - 220))

如果 ({sub parts scroll} < 0) 那么

将 {sub parts scroll} 设为 0

否则

将 {sub parts scroll} 设为 0

否则

如果 ({screen} = world) 那么

如果 ({$ map view?} = 1) 那么

将 {map scale} 设为 (1.2 * {map scale})

如果 ({map scale} > 1) 那么

将 {map scale} 设为 1

否则

 

当按下 ↓ 键

如果 ({screen} = sub) 那么

如果 ({= owned parts} 的项目数 > 5) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

将 {sub parts scroll} 增加 (20 / ((40 * {= owned parts} 的项目数) - 220))

如果 ({sub parts scroll} > 1) 那么

将 {sub parts scroll} 设为 1

否则

将 {sub parts scroll} 设为 0

否则

如果 ({screen} = world) 那么

如果 ({$ map view?} = 1) 那么

将 {map scale} 设为 ({map scale} / 1.2)

如果 ({map scale} < 0.1) 那么

将 {map scale} 设为 0.1

否则

 

当接收到 update audio

将音量设为 (100 * {sfx volume fac})%

 

当接收到 render sub slots

执行 render sub slots

 

当接收到 render parts list

执行 render parts list for shop

 

当接收到 render parts list for sub

执行 render parts list for sub

 

当 绿旗 被点击

将 {sub parts scroll} 设为 0

删除 {@ parts reference} 的全部项目

执行 // ALL PART NAMES (first input) MUST BE UNIQUE

执行 // pwr consumption in second property

执行 // order matters with unlocked parts!

将 {total funds to spend} 设为 0

执行 add part to reference battery small display name small battery function battery mass 40 custom properties 50

执行 add costs 1 | 5 2

执行 add part to reference battery medium display name medium battery function battery mass 60 custom properties 80

执行 add costs 1 | 8 4 2

执行 add part to reference battery large display name large battery function battery mass 80 custom properties 120

执行 add costs 1 | 5 10 4

执行 add part to reference thruster small display name small thruster function thruster mass 30 custom properties 250 0.12

执行 add costs 1 | 7

执行 add part to reference thruster medium display name medium thruster function thruster mass 60 custom properties 450 0.3

执行 add costs 1 | 5 4 8

执行 add part to reference thruster large display name large thruster function thruster mass 90 custom properties 800 0.55

执行 add costs 1 | 10 2 2 5

执行 add part to reference reinforcement1 display name reinforcement 1 function reinforcement mass 100 custom properties 10

执行 add costs 1 | 10 5

执行 add part to reference reinforcement2 display name reinforcement 2 function reinforcement mass 150 custom properties 20

执行 add costs 1 | 10 5 2

执行 add part to reference reinforcement3 display name reinforcement 3 function reinforcement mass 300 custom properties 30

执行 add costs 1 | 10 2 5

执行 add part to reference light1 display name light 1 function light mass 3 custom properties 1 0.01

执行 add costs 1 | 3 5

执行 add part to reference light2 display name light 2 function light mass 5 custom properties 2 0.03

执行 add costs 1 | 2 4 2

执行 add part to reference light3 display name light 3 function light mass 7 custom properties 2 0.05

执行 add costs 1 | 2 2 3

执行 add part to reference storage slot display name storage function storage mass 20 custom properties

执行 add costs 1 | 3

执行 add part to reference scanner1 display name scanner function scanner mass 10 custom properties

执行 add costs 1 | 5

执行 add part to reference collection arm display name collection arm function arm mass 50 custom properties

执行 add costs 1 | 10 2

执行 add part to reference elt1 display name locator beacon function elt mass 15 custom properties

执行 add costs 1 | 5 5

执行 add part to reference comms1 display name comms booster function comms mass 30 custom properties 2

执行 add costs 1 | 5 8

执行 add part to reference mapper display name terrain mapper function map mass 15 custom properties

执行 add costs 1 | 1 4 2

执行 add part to reference drill1 display name drill 1 function drill mass 30 custom properties 1 0.1

执行 add costs 1 | 10

执行 add part to reference drill2 display name drill 2 function drill mass 60 custom properties 2 0.2

执行 add costs 1 | 5 5 8

执行 add part to reference drill3 display name drill 3 function drill mass 60 custom properties 3 0.2

执行 add costs 1 | 8 5 3

执行 add part to reference drill4 display name drill 4 function drill mass 60 custom properties 4 0.2

执行 add costs 1 | 5 5 5 4

 

当接收到 stage clicked

当按下 ↑ 键

如果 ({screen} = sub) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

如果 ({hovered part (for sub)} > 0) 那么

如果 ({= part availability} 的第 {hovered part (for sub)} 项 = 1) 那么

执行 // install

如果 ({@ installed parts} 的项目数 < {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

执行 check for duplicate parts installed

将 {= owned parts} 的第 {hovered part (for sub)} 项 加入 {@ installed parts}

将 {= part availability} 的第 {hovered part (for sub)} 项替换为 0

播放声音 install

否则

如果 ({^ selected hull} = 0) 那么

执行 print message no slots duration limit? 1 error? 1

否则

执行 print message no more empty slots duration limit? 1 error? 1

否则

执行 // uninstall

删除 {@ installed parts} 的第 {@ installed parts} 中第一个 {= owned parts} 的第 {hovered part (for sub)} 项 的编号 项

将 {= part availability} 的第 {hovered part (for sub)} 项替换为 1

播放声音 uninstall

广播 update sub specs

如果 ({= owned parts} 的项目数 > 5) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

将 {sub parts scroll} 增加 (-20 / ((40 * {= owned parts} 的项目数) - 220))

如果 ({sub parts scroll} < 0) 那么

将 {sub parts scroll} 设为 0

否则

执行 // uninstall from right side (better UX)

如果 (((-45 < 鼠标的x坐标) 与 (鼠标的x坐标 < 65)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

如果 ({hovered installed part (for sub)} > 0) 那么

执行 // uninstall

执行 uninstall from installed parts

播放声音 uninstall

广播 update sub specs

将 {sub parts scroll} 设为 0

否则

如果 ({screen} = parts) 那么

如果 (鼠标的y坐标 < -143) 那么

如果 (鼠标的y坐标 > -170) 那么

执行 get stack limit

如果 ({owned count} = {stack limit}) 不成立 那么

如果 ({free part?} = 1) 那么

如果 ((鼠标的x坐标 > -230) 与 (鼠标的x坐标 < 230)) 那么

执行 print message redeemed duration limit? error?

如果 ({selected part type (hull/part)} = part) 那么

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

将 {free part?} 设为 0

将 {part highlight age} 设为 0

否则

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 增加 1

将 {free part?} 设为 0

将 {part highlight age} 设为 0

播放声音 purchase

否则

如果 (鼠标的x坐标 < -26) 那么

如果 (鼠标的x坐标 > -203) 那么

执行 // purchase

如果 ({selected part type (hull/part)} = part) 那么

执行 //

如果 ({funds} < {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项) 那么

执行 print message not enough funds duration limit? 1 error? 1

否则

将 {funds} 增加 (0 - {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项)

将 {= funds spent} 增加 {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

执行 print message part purchased duration limit? error?

将 {part highlight name} 设为 {selected part}

将 {part highlight age} 设为 0

播放声音 purchase

否则

执行 //

如果 ({funds} < {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项) 那么

执行 print message not enough funds duration limit? 1 error? 1

否则

如果 ({owned count} = 0) 那么

将 {funds} 增加 (0 - {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项)

将 {= funds spent} 增加 {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 设为 1

执行 print message hull purchased duration limit? error?

播放声音 purchase

否则

执行 print message you can only own 1 of each hull duration limit? 1 error? 1

否则

如果 (鼠标的x坐标 > 10) 那么

如果 (鼠标的x坐标 < 203) 那么

执行 // fabricate

如果 ({can be fabricated?} = 1) 那么

执行 spend resources

如果 ({selected part type (hull/part)} = part) 那么

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

执行 print message part fabricated duration limit? error?

将 {part highlight name} 设为 {selected part}

将 {part highlight age} 设为 0

播放声音 purchase

执行 check fabrication

否则

如果 ({owned count} = 0) 那么

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 设为 1

执行 print message hull fabricated duration limit? error?

播放声音 purchase

执行 check fabrication

否则

执行 print message you can only own 1 of each hull duration limit? 1 error? 1

否则

执行 print message not enough resources duration limit? 1 error? 1

如果 ({screen} = world) 那么

如果 ({$ map view?} = 1) 那么

将 {map scale} 设为 (1.2 * {map scale})

如果 ({map scale} > 1) 那么

将 {map scale} 设为 1

否则

执行 // click a part

如果 ({hovered part type (shop)} = ) 不成立 那么

将 {selected part type (hull/part)} 设为 {hovered part type (shop)}

如果 ({hovered part type (shop)} = part) 那么

将 {selected part} 设为 {@ parts reference} 的第 ((14 * ({hovered part list (shop)} - 1)) + 1) 项

否则

将 {selected part} 设为 {@ hull types} 的第 (1 + (14 * ({hovered part list (shop)} - 1))) 项

执行 count owned

执行 check fabrication

执行 check if free

播放声音 part click

否则

将 {selected part type (hull/part)} 设为

将 {selected part} 设为

将 {owned count} 设为 0

 

当接收到 unlock parts

执行 unlock parts

 

当按下 ↓ 键

如果 ({screen} = sub) 那么

如果 ({= owned parts} 的项目数 > 5) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

将 {sub parts scroll} 增加 (20 / ((40 * {= owned parts} 的项目数) - 220))

如果 ({sub parts scroll} > 1) 那么

将 {sub parts scroll} 设为 1

否则

将 {sub parts scroll} 设为 0

否则

如果 ({screen} = world) 那么

如果 ({$ map view?} = 1) 那么

将 {map scale} 设为 ({map scale} / 1.2)

如果 ({map scale} < 0.1) 那么

将 {map scale} 设为 0.1

否则

 

当接收到 update audio

将音量设为 (100 * {sfx volume fac})%

 

当接收到 stage clicked

如果 ({screen} = sub) 那么

如果 (((鼠标的x坐标 < -50) 与 (鼠标的x坐标 > -230)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

如果 ({hovered part (for sub)} > 0) 那么

如果 ({= part availability} 的第 {hovered part (for sub)} 项 = 1) 那么

执行 // install

如果 ({@ installed parts} 的项目数 < {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

执行 check for duplicate parts installed

将 {= owned parts} 的第 {hovered part (for sub)} 项 加入 {@ installed parts}

将 {= part availability} 的第 {hovered part (for sub)} 项替换为 0

播放声音 install

否则

如果 ({^ selected hull} = 0) 那么

执行 print message no slots duration limit? 1 error? 1

否则

执行 print message no more empty slots duration limit? 1 error? 1

否则

执行 // uninstall

删除 {@ installed parts} 的第 {@ installed parts} 中第一个 {= owned parts} 的第 {hovered part (for sub)} 项 的编号 项

将 {= part availability} 的第 {hovered part (for sub)} 项替换为 1

播放声音 uninstall

广播 update sub specs

否则

执行 // uninstall from right side (better UX)

如果 (((-45 < 鼠标的x坐标) 与 (鼠标的x坐标 < 65)) 与 ((鼠标的y坐标 < 110) 与 (鼠标的y坐标 > -130))) 那么

如果 ({hovered installed part (for sub)} > 0) 那么

执行 // uninstall

执行 uninstall from installed parts

播放声音 uninstall

广播 update sub specs

否则

如果 ({screen} = parts) 那么

如果 (鼠标的y坐标 < -143) 那么

如果 (鼠标的y坐标 > -170) 那么

执行 get stack limit

如果 ({owned count} = {stack limit}) 不成立 那么

如果 ({free part?} = 1) 那么

如果 ((鼠标的x坐标 > -230) 与 (鼠标的x坐标 < 230)) 那么

执行 print message redeemed duration limit? error?

如果 ({selected part type (hull/part)} = part) 那么

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

将 {free part?} 设为 0

将 {part highlight age} 设为 0

否则

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 增加 1

将 {free part?} 设为 0

将 {part highlight age} 设为 0

播放声音 purchase

否则

如果 (鼠标的x坐标 < -26) 那么

如果 (鼠标的x坐标 > -203) 那么

执行 // purchase

如果 ({selected part type (hull/part)} = part) 那么

执行 //

如果 ({funds} < {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项) 那么

执行 print message not enough funds duration limit? 1 error? 1

否则

将 {funds} 增加 (0 - {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项)

将 {= funds spent} 增加 {@ parts reference} 的第 (7 + {@ parts reference} 中第一个 {selected part} 的编号) 项

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

执行 print message part purchased duration limit? error?

将 {part highlight name} 设为 {selected part}

将 {part highlight age} 设为 0

播放声音 purchase

否则

执行 //

如果 ({funds} < {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项) 那么

执行 print message not enough funds duration limit? 1 error? 1

否则

如果 ({owned count} = 0) 那么

将 {funds} 增加 (0 - {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项)

将 {= funds spent} 增加 {@ hull types} 的第 (7 + {@ hull types} 中第一个 {selected part} 的编号) 项

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 设为 1

执行 print message hull purchased duration limit? error?

播放声音 purchase

否则

执行 print message you can only own 1 of each hull duration limit? 1 error? 1

否则

如果 (鼠标的x坐标 > 10) 那么

如果 (鼠标的x坐标 < 203) 那么

执行 // fabricate

如果 ({can be fabricated?} = 1) 那么

执行 spend resources

如果 ({selected part type (hull/part)} = part) 那么

在 {selected part} 的第 (1 + {= owned parts} 中第一个 {selected part} 的编号) 项前插入 {= owned parts}

将 {owned count} 增加 1

执行 print message part fabricated duration limit? error?

将 {part highlight name} 设为 {selected part}

将 {part highlight age} 设为 0

播放声音 purchase

执行 check fabrication

否则

如果 ({owned count} = 0) 那么

将 {= owned hulls} 的第 向上取整(({@ hull types} 中第一个 {selected part} 的编号 / 14)) 项替换为 1

将 {owned count} 设为 1

执行 print message hull fabricated duration limit? error?

播放声音 purchase

执行 check fabrication

否则

执行 print message you can only own 1 of each hull duration limit? 1 error? 1

否则

执行 print message not enough resources duration limit? 1 error? 1

否则

执行 // click a part

如果 ({hovered part type (shop)} = ) 不成立 那么

将 {selected part type (hull/part)} 设为 {hovered part type (shop)}

如果 ({hovered part type (shop)} = part) 那么

将 {selected part} 设为 {@ parts reference} 的第 ((14 * ({hovered part list (shop)} - 1)) + 1) 项

否则

将 {selected part} 设为 {@ hull types} 的第 (1 + (14 * ({hovered part list (shop)} - 1))) 项

执行 count owned

执行 check fabrication

执行 check if free

播放声音 part click

否则

将 {selected part type (hull/part)} 设为

将 {selected part} 设为

将 {owned count} 设为 0

 

当接收到 render parts list for sub

执行 render parts list for sub

 

当接收到 render sub slots

执行 render sub slots

 

当接收到 render parts list

执行 render parts list for shop

 

当接收到 unlock parts

执行 unlock parts

 

定义 unlock parts

 

定义 add costs {purchase cost fac} | {mn} {ni} {cu} {co} {ag} {ti}

将 {purchase cost} 设为 (30 * {mn})

将 {purchase cost} 增加 (45 * {ni})

将 {purchase cost} 增加 (70 * {cu})

将 {purchase cost} 增加 (90 * {co})

将 {purchase cost} 增加 (140 * {ag})

将 {purchase cost} 增加 (180 * {ti})

将 (5 * 四舍五入((({purchase cost fac} * {purchase cost}) / 5))) 加入 {@ parts reference}

将 {total funds to spend} 增加 {@ parts reference} 的第 {@ parts reference} 的项目数 项

将 {mn} 加入 {@ parts reference}

将 {ni} 加入 {@ parts reference}

将 {cu} 加入 {@ parts reference}

将 {co} 加入 {@ parts reference}

将 {ag} 加入 {@ parts reference}

将 {ti} 加入 {@ parts reference}

执行 // 14 items total

 

如果 (submersible 的 hovered hull = ) 不成立 那么

将 {hovered part type (shop)} 设为 hull

将 {hovered part list (shop)} 设为 submersible 的 hovered hull

换成 icon 造型

执行 //

 

定义 // {comment}

 

定义 get stack limit

将 {stack limit} 设为

将 {type} 设为 {@ parts reference} 的第 (2 + {@ parts reference} 中第一个 {selected part} 的编号) 项

如果 ({type} = light) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = drill) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = arm) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = scanner) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = elt) 那么

将 {stack limit} 设为 2

否则

如果 ({type} = comms) 那么

将 {stack limit} 设为 2

否则

如果 ({type} = map) 那么

将 {stack limit} 设为 2

否则

 

定义 check if free

将 {free part?} 设为 0

如果 ({owned count} = 0) 那么

如果 ({selected part} = battery small) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = thruster small) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = storage slot) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = drill1) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = tiny) 那么

执行 // hull

将 {free part?} 设为 1

否则

 

定义 uninstall from installed parts

如果 ( = {@ installed parts} 的第 {hovered installed part (for sub)} 项) 那么

停止 这个脚本

将 {i} 设为 1

重复执行 {= owned parts} 的项目数 次

如果 ((0 = {= part availability} 的第 {i} 项) 与 ({@ installed parts} 的第 {hovered installed part (for sub)} 项 = {= owned parts} 的第 {i} 项)) 那么

将 {= part availability} 的第 {i} 项替换为 1

删除 {@ installed parts} 的第 {hovered installed part (for sub)} 项

停止 这个脚本

将 {i} 增加 1

删除 {@ installed parts} 的第 {hovered installed part (for sub)} 项

 

清除图形特效

换成 icon 造型

执行 //

 

定义 set all unlock {val}

删除 {unlocked parts} 的全部项目

重复执行 ({@ parts reference} 的项目数 / 14) 次

将 {val} 加入 {unlocked parts}

删除 {unlocked hulls} 的全部项目

重复执行 ({@ hull types} 的项目数 / 14) 次

将 {val} 加入 {unlocked hulls}

 

定义 check fabrication

如果 ({selected part type (hull/part)} = ) 那么

将 {can be fabricated?} 设为 0

否则

将 {can be fabricated?} 设为 1

 

定义 render sub slots

如果 按下鼠标? 不成立 那么

将 {hovered installed part (for sub)} 设为 0

清除图形特效

换成 empty 造型

将大小设为 200

将 {i} 设为 0

重复执行 18 次

如果 ((1 + {i}) > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

将 虚像 特效设定为 85

移到 x:(-24 + (36 * {i} 除以 3 的余数)) y:(92 - (36 * 向下取整(({i} / 3))))

换成 empty 造型

如果 碰到 鼠标指针? 那么

如果 按下鼠标? 不成立 那么

将 {hovered installed part (for sub)} 设为 (1 + {i})

图章

换成 unknown 造型

换成 {@ installed parts} 的第 (1 + {i}) 项 造型

图章

将 {i} 增加 1

移到 x:0 y:0

换成 icon 造型

执行 //

 

定义 add part to reference {name} display name {name2} function {func} mass {mass} custom properties {c1} {c2} {c3}

将 {name} 加入 {@ parts reference}

将 {name2} 加入 {@ parts reference}

将 {func} 加入 {@ parts reference}

将 {mass} 加入 {@ parts reference}

将 {c1} 加入 {@ parts reference}

将 {c2} 加入 {@ parts reference}

将 {c3} 加入 {@ parts reference}

 

定义 print message {text} duration {time} limit? {limit} error? {error}

如果 ({text} 包含 {text} ? 与 ({limit} = 1)) 不成立 那么

将 {text} 加入 {text}

如果 ({time} = ) 不成立 那么

将 {time} 加入 {text}

否则

将 5 加入 {text}

如果 ({error} = 1) 那么

播放声音 error

 

定义 unlock parts

 

定义 add costs {purchase cost fac} | {mn} {ni} {cu} {co} {ag} {ti}

将 {purchase cost} 设为 (30 * {mn})

将 {purchase cost} 增加 (45 * {ni})

将 {purchase cost} 增加 (70 * {cu})

将 {purchase cost} 增加 (90 * {co})

将 {purchase cost} 增加 (140 * {ag})

将 {purchase cost} 增加 (180 * {ti})

将 (5 * 四舍五入((({purchase cost fac} * {purchase cost}) / 5))) 加入 {@ parts reference}

将 {total funds to spend} 增加 {@ parts reference} 的第 {@ parts reference} 的项目数 项

将 {mn} 加入 {@ parts reference}

将 {ni} 加入 {@ parts reference}

将 {cu} 加入 {@ parts reference}

将 {co} 加入 {@ parts reference}

将 {ag} 加入 {@ parts reference}

将 {ti} 加入 {@ parts reference}

执行 // 14 items total

 

定义 // {comment}

 

定义 uninstall from installed parts

如果 ( = {@ installed parts} 的第 {hovered installed part (for sub)} 项) 那么

停止 这个脚本

将 {i} 设为 1

重复执行 {= owned parts} 的项目数 次

如果 ((0 = {= part availability} 的第 {i} 项) 与 ({@ installed parts} 的第 {hovered installed part (for sub)} 项 = {= owned parts} 的第 {i} 项)) 那么

将 {= part availability} 的第 {i} 项替换为 1

删除 {@ installed parts} 的第 {hovered installed part (for sub)} 项

停止 这个脚本

将 {i} 增加 1

删除 {@ installed parts} 的第 {hovered installed part (for sub)} 项

 

定义 get stack limit

将 {stack limit} 设为

将 {type} 设为 {@ parts reference} 的第 (2 + {@ parts reference} 中第一个 {selected part} 的编号) 项

如果 ({type} = light) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = drill) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = arm) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = scanner) 那么

将 {stack limit} 设为 1

否则

如果 ({type} = elt) 那么

将 {stack limit} 设为 2

否则

如果 ({type} = comms) 那么

将 {stack limit} 设为 2

否则

如果 ({type} = map) 那么

将 {stack limit} 设为 2

否则

 

定义 check if free

将 {free part?} 设为 0

如果 ({owned count} = 0) 那么

如果 ({selected part} = battery small) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = thruster small) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = storage slot) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = drill1) 那么

将 {free part?} 设为 1

否则

如果 ({selected part} = tiny) 那么

执行 // hull

将 {free part?} 设为 1

否则

 

定义 set all unlock {val}

删除 {unlocked parts} 的全部项目

重复执行 ({@ parts reference} 的项目数 / 14) 次

将 {val} 加入 {unlocked parts}

删除 {unlocked hulls} 的全部项目

重复执行 ({@ hull types} 的项目数 / 14) 次

将 {val} 加入 {unlocked hulls}

 

定义 check fabrication

如果 ({selected part type (hull/part)} = ) 那么

将 {can be fabricated?} 设为 0

否则

将 {can be fabricated?} 设为 1

 

定义 render parts list for sub

如果 按下鼠标? 不成立 那么

将 {hovered part (for sub)} 设为 0

换成 empty 造型

将大小设为 200

将x坐标设为 -180

将 {scroll y} 设为 (85 + ({sub parts scroll} * ((36 * {= owned parts} 的项目数) - 220)))

清除图形特效

换成 icon 造型

执行 //

 

定义 render parts list for shop

执行 // for shop

如果 按下鼠标? 不成立 那么

将 {hovered part type (shop)} 设为

将 {hovered part list (shop)} 设为

清除图形特效

换成 empty 造型

将大小设为 200

移到 x:-35 y:90

如果 (submersible 的 hovered hull = ) 不成立 那么

将 {hovered part type (shop)} 设为 hull

将 {hovered part list (shop)} 设为 submersible 的 hovered hull

换成 icon 造型

执行 //

 

定义 render sub slots

如果 按下鼠标? 不成立 那么

将 {hovered installed part (for sub)} 设为 0

清除图形特效

换成 empty 造型

将大小设为 200

将 {i} 设为 0

重复执行 18 次

如果 ((1 + {i}) > {@ hull types} 的第 (4 + (14 * ({^ selected hull} - 1))) 项) 那么

将 虚像 特效设定为 85

移到 x:(-24 + (36 * {i} 除以 3 的余数)) y:(92 - (36 * 向下取整(({i} / 3))))

换成 empty 造型

如果 碰到 鼠标指针? 那么

如果 按下鼠标? 不成立 那么

将 {hovered installed part (for sub)} 设为 (1 + {i})

图章

换成 unknown 造型

换成 {@ installed parts} 的第 (1 + {i}) 项 造型

图章

将 {i} 增加 1

移到 x:0 y:0

换成 icon 造型

执行 //

 

定义 add part to reference {name} display name {name2} function {func} mass {mass} custom properties {c1} {c2} {c3}

将 {name} 加入 {@ parts reference}

将 {name2} 加入 {@ parts reference}

将 {func} 加入 {@ parts reference}

将 {mass} 加入 {@ parts reference}

将 {c1} 加入 {@ parts reference}

将 {c2} 加入 {@ parts reference}

将 {c3} 加入 {@ parts reference}

 

定义 check shop part availability {i}

如果 ({@ parts reference} 的第 {i} 项 = battery small) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = thruster small) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = storage slot) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = drill1) 那么

将 虚像 特效设定为 0

停止 这个脚本

将 虚像 特效设定为 95

如果 ({funds} < {@ parts reference} 的第 (7 + {i}) 项) 那么

执行 // purchase (resources only)

将 虚像 特效设定为 0

否则

执行 // purchase (funds or possibly resources)

将 虚像 特效设定为 0

定义 print message {text} duration {time} limit? {limit} error? {error}

如果 ({text} 包含 {text} ? 与 ({limit} = 1)) 不成立 那么

将 {text} 加入 {text}

如果 ({time} = ) 不成立 那么

将 {time} 加入 {text}

否则

将 5 加入 {text}

如果 ({error} = 1) 那么

播放声音 error

 

定义 spend resources

 

定义 check for duplicate parts installed

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 drill? 那么

如果 ({@ installed parts} 包含 drill1 ? 或 ({@ installed parts} 包含 drill2 ? 或 {@ installed parts} 包含 drill3 ?)) 那么

执行 print message 连接 连接 only the highest level 和 drill 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 light? 那么

如果 ({@ installed parts} 包含 light1 ? 或 ({@ installed parts} 包含 light2 ? 或 {@ installed parts} 包含 light3 ?)) 那么

执行 print message 连接 连接 only the highest level 和 light 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 arm? 那么

如果 {@ installed parts} 包含 arm1 ? 那么

执行 print message 连接 连接 only one 和 arm 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 elt1? 那么

如果 {@ installed parts} 包含 elt1 ? 那么

执行 print message 连接 连接 only one 和 elt 和 is used duration limit? 1 error?

否则

 

否则

如果 (1 = {= owned hulls} 的第 {hovered part list (shop)} 项) 那么

将 {owned count} 设为 1

 

定义 check for duplicate parts installed

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 drill? 那么

如果 ({@ installed parts} 包含 drill1 ? 或 ({@ installed parts} 包含 drill2 ? 或 {@ installed parts} 包含 drill3 ?)) 那么

执行 print message 连接 连接 only the highest level 和 drill 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 light? 那么

如果 ({@ installed parts} 包含 light1 ? 或 ({@ installed parts} 包含 light2 ? 或 {@ installed parts} 包含 light3 ?)) 那么

执行 print message 连接 连接 only the highest level 和 light 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 arm? 那么

如果 {@ installed parts} 包含 arm1 ? 那么

执行 print message 连接 连接 only one 和 arm 和 is used duration limit? 1 error?

否则

如果 {= owned parts} 的第 {hovered part (for sub)} 项 包含 elt1? 那么

如果 {@ installed parts} 包含 elt1 ? 那么

执行 print message 连接 连接 only one 和 elt 和 is used duration limit? 1 error?

否则

 

定义 spend resources

 

定义 check shop part availability {i}

如果 ({@ parts reference} 的第 {i} 项 = battery small) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = thruster small) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = storage slot) 那么

将 虚像 特效设定为 0

停止 这个脚本

如果 ({@ parts reference} 的第 {i} 项 = drill1) 那么

将 虚像 特效设定为 0

停止 这个脚本

将 虚像 特效设定为 95

如果 ({funds} < {@ parts reference} 的第 (7 + {i}) 项) 那么

执行 // purchase (resources only)

将 虚像 特效设定为 0

否则

执行 // purchase (funds or possibly resources)

将 虚像 特效设定为 0

 

定义 count owned

将 {owned count} 设为 0

如果 ({selected part type (hull/part)} = part) 那么

否则

如果 (1 = {= owned hulls} 的第 {hovered part list (shop)} 项) 那么

将 {owned count} 设为 1

 

achievements

代码

当按下 ↓ 键

如果 ({screen} = achievements) 那么

如果 (((鼠标的x坐标 < 0) 与 (鼠标的x坐标 > -234)) 与 ((鼠标的y坐标 < 142) 与 (鼠标的y坐标 > -171))) 那么

将 {achievements scroll} 增加 0.08

如果 ({achievements scroll} > 1) 那么

将 {achievements scroll} 设为 1

 

当按下 ↑ 键

如果 ({screen} = achievements) 那么

如果 (((鼠标的x坐标 < 0) 与 (鼠标的x坐标 > -234)) 与 ((鼠标的y坐标 < 142) 与 (鼠标的y坐标 > -171))) 那么

将 {achievements scroll} 增加 -0.08

如果 ({achievements scroll} < 0) 那么

将 {achievements scroll} 设为 0

 

当接收到 check for all ach completion

执行 all complete?

 

当接收到 save achievements

执行 save achievements

 

当接收到 run credits

如果 (0 = {achievements} 的第 (16 * 5) 项) 那么

将 {achievements} 的第 (16 * 5) 项替换为 1

将 {funds} 增加 四舍五入({achievements} 的第 ((16 * 5) - 2) 项)

执行 save achievements

执行 all complete?

 

当接收到 ! reset

将 {all complete} 设为 0

将 {achievements scroll} 设为 0

删除 {achievements} 的全部项目

执行 // 1-5

执行 create achievement shallows desc visit the shallows reward 200 hidden? 2 complete?

执行 create achievement brine pools desc visit the brine pools reward 300 hidden? 2 complete?

执行 create achievement algae caves desc visit the algae caves reward 300 hidden? 2 complete?

执行 create achievement glowing caves desc visit the glowing caves reward 400 hidden? 2 complete?

执行 create achievement the abyss desc visit the dark abyss reward 400 hidden? 2 complete?

执行 // 6-10

执行 create achievement hydrothermal vents desc visit the hydrothermal vents reward 400 hidden? 2 complete?

执行 create achievement depth record 1 desc reach a depth of 100m reward 300 hidden? complete?

执行 create achievement depth record 2 desc reach a depth of 250m reward 500 hidden? 1 complete?

执行 create achievement depth record 3 desc reach a depth of 400m reward 600 hidden? 1 complete?

执行 create achievement depth record 4 desc reach a depth of 600m reward 600 hidden? 1 complete?

执行 // 11-15

执行 create achievement distance record 1 desc travel 1000m total reward 200 hidden? complete?

执行 create achievement distance record 2 desc travel 5000m total reward 400 hidden? complete?

执行 create achievement distance record 3 desc travel 10000m total reward 800 hidden? complete?

执行 create achievement fast desc reach a speed of 8 reward 500 hidden? complete?

执行 create achievement heavy desc launch a 500kg sub reward 500 hidden? complete?

执行 // 16-20

执行 create achievement game completion desc maximum depth reached! reward 3000 hidden? 2 complete?

执行 save achievements

执行 all complete?

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 render achievements

执行 render achievements

换成 icon 造型

执行 //

 

当接收到 monitor achievements

执行 // vars

将 {depth} 设为 (0 - {y})

如果 ({y} < 0) 那么

将 {= total distance} 增加 ({Δt} * {speed})

如果 ({depth} > {= record depth}) 那么

将 {= record depth} 设为 {depth}

执行 // biomes

如果 (({depth} > 2) 与 ({depth} < 12)) 那么

如果 ({x} < -30) 那么

执行 set achievement status 1 to 1

如果 ({depth} > 128) 那么

执行 set achievement status 2 to 1

如果 ({depth} > 180) 那么

执行 set achievement status 3 to 1

如果 ({depth} > 388) 那么

执行 set achievement status 4 to 1

如果 ({depth} > 540) 那么

执行 set achievement status 5 to 1

如果 ({depth} > 685) 那么

执行 set achievement status 6 to 1

执行 // depth records

如果 ({depth} > 600) 那么

执行 set achievement status 10 to 1

否则

如果 ({depth} > 400) 那么

执行 set achievement status 9 to 1

否则

如果 ({depth} > 250) 那么

执行 set achievement status 8 to 1

否则

如果 ({depth} > 100) 那么

执行 set achievement status 7 to 1

执行 // distance

如果 ({= total distance} > 10000) 那么

执行 set achievement status 13 to 1

否则

如果 ({= total distance} > 5000) 那么

执行 set achievement status 12 to 1

否则

如果 ({= total distance} > 1500) 那么

执行 set achievement status 11 to 1

执行 // general

如果 ({speed} > 1) 那么

如果 ({speed} > 8) 那么

执行 // fast

执行 set achievement status 14 to 1

如果 ({^ sub mass} > 500) 那么

执行 // heavy

执行 set achievement status 15 to 1

执行 //

 

定义 // {comment}

 

定义 create achievement {name} desc {desc} reward {reward} hidden? {h} complete? {c}

将 {name} 加入 {achievements}

将 {desc} 加入 {achievements}

将 (0 + {reward}) 加入 {achievements}

将 (0 + {h}) 加入 {achievements}

将 (0 + {c}) 加入 {achievements}

 

定义 all complete?

执行 // used for rainbow

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

如果 ({achievements} 的第 {i} 项 = 0) 那么

将 {all complete} 设为 0

停止 这个脚本

将 {i} 增加 5

将 {all complete} 设为 1

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 save achievements

执行 // string of achievement states

将 {all achievement completion} 设为

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

将 {all achievement completion} 设为 连接 {all achievement completion} 和 (0 + {achievements} 的第 {i} 项)

将 {i} 增加 5

 

定义 render achievements

清除图形特效

将x坐标设为 -174

将y坐标设为 80

将 {i} 设为 (5 * 向下取整(((({achievements} 的项目数 / 5) - 6) * {achievements scroll})))

如果 ({all complete} = 0) 那么

重复执行 6 次

换成 icon template 造型

将 亮度 特效设定为 100

如果 (1 = {achievements} 的第 (5 + {i}) 项) 那么

换成 {achievements} 的第 (1 + {i}) 项 造型

否则

将 虚像 特效设定为 80

如果 ({achievements} 的第 (4 + {i}) 项 < 2) 那么

换成 {achievements} 的第 (1 + {i}) 项 造型

否则

换成 unknown 造型

图章

清除图形特效

如果 (1 = {achievements} 的第 (5 + {i}) 项) 那么

执行 // unlocked, display normally

换成 border complete 造型

否则

换成 border grey 造型

将 虚像 特效设定为 80

图章

将 {i} 增加 5

将y坐标增加 -42

清除图形特效

否则

执行 // rainbow!

将 亮度 特效设定为 50

重复执行 6 次

将 颜色 特效设定为 ((3 * {i}) + (40 * {time} 除以 5 的余数))

换成 icon template 造型

换成 {achievements} 的第 (1 + {i}) 项 造型

图章

将 颜色 特效增加 -10

换成 border red 造型

图章

将 {i} 增加 5

将y坐标增加 -42

 

定义 set achievement status {ach} to {val}

如果 ({val} = {achievements} 的第 ({ach} * 5) 项) 不成立 那么

将 {achievements} 的第 ({ach} * 5) 项替换为 {val}

如果 ({val} = 1) 那么

执行 add text 连接 achievement complete: 和 {achievements} 的第 (({ach} * 5) - 4) 项 8

执行 add text 连接 连接 " 和 {achievements} 的第 (({ach} * 5) - 3) 项 和 " 8

执行 add text 连接 连接 reward: 和 四舍五入({achievements} 的第 (({ach} * 5) - 2) 项) 和 funds 8

将 {funds} 增加 四舍五入({achievements} 的第 (({ach} * 5) - 2) 项)

播放声音 achievement

执行 save achievements

执行 all complete?

 

当按下 ↑ 键

如果 ({screen} = achievements) 那么

如果 (((鼠标的x坐标 < 0) 与 (鼠标的x坐标 > -234)) 与 ((鼠标的y坐标 < 142) 与 (鼠标的y坐标 > -171))) 那么

将 {achievements scroll} 增加 -0.08

如果 ({achievements scroll} < 0) 那么

将 {achievements scroll} 设为 0

 

当按下 ↓ 键

如果 ({screen} = achievements) 那么

如果 (((鼠标的x坐标 < 0) 与 (鼠标的x坐标 > -234)) 与 ((鼠标的y坐标 < 142) 与 (鼠标的y坐标 > -171))) 那么

将 {achievements scroll} 增加 0.08

如果 ({achievements scroll} > 1) 那么

将 {achievements scroll} 设为 1

 

当接收到 ! reset

将 {all complete} 设为 0

将 {achievements scroll} 设为 0

删除 {achievements} 的全部项目

执行 // 1-5

执行 create achievement shallows desc visit the shallows reward 200 hidden? 2 complete?

执行 create achievement brine pools desc visit the brine pools reward 300 hidden? 2 complete?

执行 create achievement algae caves desc visit the algae caves reward 300 hidden? 2 complete?

执行 create achievement glowing caves desc visit the glowing caves reward 400 hidden? 2 complete?

执行 create achievement the abyss desc visit the dark abyss reward 400 hidden? 2 complete?

执行 // 6-10

执行 create achievement hydrothermal vents desc visit the hydrothermal vents reward 400 hidden? 2 complete?

执行 create achievement depth record 1 desc reach a depth of 100m reward 300 hidden? complete?

执行 create achievement depth record 2 desc reach a depth of 250m reward 500 hidden? 1 complete?

执行 create achievement depth record 3 desc reach a depth of 400m reward 600 hidden? 1 complete?

执行 create achievement depth record 4 desc reach a depth of 600m reward 600 hidden? 1 complete?

执行 // 11-15

执行 create achievement distance record 1 desc travel 1000m total reward 200 hidden? complete?

执行 create achievement distance record 2 desc travel 5000m total reward 400 hidden? complete?

执行 create achievement distance record 3 desc travel 10000m total reward 800 hidden? complete?

执行 create achievement fast desc reach a speed of 8 reward 500 hidden? complete?

执行 create achievement heavy desc launch a 500kg sub reward 500 hidden? complete?

执行 // 16-20

执行 create achievement game completion desc maximum depth reached! reward 3000 hidden? 2 complete?

执行 save achievements

执行 all complete?

 

当接收到 render achievements

执行 render achievements

换成 icon 造型

执行 //

 

当接收到 monitor achievements

执行 // vars

将 {depth} 设为 (0 - {y})

如果 ({y} < 0) 那么

将 {= total distance} 增加 ({Δt} * {speed})

如果 ({depth} > {= record depth}) 那么

将 {= record depth} 设为 {depth}

执行 // biomes

如果 (({depth} > 2) 与 ({depth} < 12)) 那么

如果 ({x} < -30) 那么

执行 set achievement status 1 to 1

如果 ({depth} > 128) 那么

执行 set achievement status 2 to 1

如果 ({depth} > 180) 那么

执行 set achievement status 3 to 1

如果 ({depth} > 388) 那么

执行 set achievement status 4 to 1

如果 ({depth} > 540) 那么

执行 set achievement status 5 to 1

如果 ({depth} > 685) 那么

执行 set achievement status 6 to 1

执行 // depth records

如果 ({depth} > 600) 那么

执行 set achievement status 10 to 1

否则

如果 ({depth} > 400) 那么

执行 set achievement status 9 to 1

否则

如果 ({depth} > 250) 那么

执行 set achievement status 8 to 1

否则

如果 ({depth} > 100) 那么

执行 set achievement status 7 to 1

执行 // distance

如果 ({= total distance} > 10000) 那么

执行 set achievement status 13 to 1

否则

如果 ({= total distance} > 5000) 那么

执行 set achievement status 12 to 1

否则

如果 ({= total distance} > 1500) 那么

执行 set achievement status 11 to 1

执行 // general

如果 ({speed} > 1) 那么

如果 ({speed} > 8) 那么

执行 // fast

执行 set achievement status 14 to 1

如果 ({^ sub mass} > 500) 那么

执行 // heavy

执行 set achievement status 15 to 1

执行 //

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 check for all ach completion

执行 all complete?

 

当接收到 save achievements

执行 save achievements

 

当接收到 run credits

如果 (0 = {achievements} 的第 (16 * 5) 项) 那么

将 {achievements} 的第 (16 * 5) 项替换为 1

将 {funds} 增加 四舍五入({achievements} 的第 ((16 * 5) - 2) 项)

执行 save achievements

执行 all complete?

 

定义 // {comment}

 

定义 render achievements

清除图形特效

将x坐标设为 -174

将y坐标设为 80

将 {i} 设为 (5 * 向下取整(((({achievements} 的项目数 / 5) - 6) * {achievements scroll})))

如果 ({all complete} = 0) 那么

重复执行 6 次

换成 icon template 造型

将 亮度 特效设定为 100

如果 (1 = {achievements} 的第 (5 + {i}) 项) 那么

换成 {achievements} 的第 (1 + {i}) 项 造型

否则

将 虚像 特效设定为 80

如果 ({achievements} 的第 (4 + {i}) 项 < 2) 那么

换成 {achievements} 的第 (1 + {i}) 项 造型

否则

换成 unknown 造型

图章

清除图形特效

如果 (1 = {achievements} 的第 (5 + {i}) 项) 那么

执行 // unlocked, display normally

换成 border complete 造型

否则

换成 border grey 造型

将 虚像 特效设定为 80

图章

将 {i} 增加 5

将y坐标增加 -42

清除图形特效

否则

执行 // rainbow!

将 亮度 特效设定为 50

重复执行 6 次

将 颜色 特效设定为 ((3 * {i}) + (40 * {time} 除以 5 的余数))

换成 icon template 造型

换成 {achievements} 的第 (1 + {i}) 项 造型

图章

将 颜色 特效增加 -10

换成 border red 造型

图章

将 {i} 增加 5

将y坐标增加 -42

 

定义 create achievement {name} desc {desc} reward {reward} hidden? {h} complete? {c}

将 {name} 加入 {achievements}

将 {desc} 加入 {achievements}

将 (0 + {reward}) 加入 {achievements}

将 (0 + {h}) 加入 {achievements}

将 (0 + {c}) 加入 {achievements}

 

定义 all complete?

执行 // used for rainbow

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

如果 ({achievements} 的第 {i} 项 = 0) 那么

将 {all complete} 设为 0

停止 这个脚本

将 {i} 增加 5

将 {all complete} 设为 1

 

定义 add text {text} {duration}

如果 {text} 包含 {text} ? 不成立 那么

将 {text} 加入 {text}

如果 ({duration} = ) 那么

将 5 加入 {text}

否则

将 {duration} 加入 {text}

 

定义 save achievements

执行 // string of achievement states

将 {all achievement completion} 设为

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

将 {all achievement completion} 设为 连接 {all achievement completion} 和 (0 + {achievements} 的第 {i} 项)

将 {i} 增加 5

 

定义 set achievement status {ach} to {val}

如果 ({val} = {achievements} 的第 ({ach} * 5) 项) 不成立 那么

将 {achievements} 的第 ({ach} * 5) 项替换为 {val}

如果 ({val} = 1) 那么

执行 add text 连接 achievement complete: 和 {achievements} 的第 (({ach} * 5) - 4) 项 8

执行 add text 连接 连接 " 和 {achievements} 的第 (({ach} * 5) - 3) 项 和 " 8

执行 add text 连接 连接 reward: 和 四舍五入({achievements} 的第 (({ach} * 5) - 2) 项) 和 funds 8

将 {funds} 增加 四舍五入({achievements} 的第 (({ach} * 5) - 2) 项)

播放声音 achievement

执行 save achievements

执行 all complete?

 

music

代码

当 绿旗 被点击

等待 0.1 秒

将 {current music volume} 设为 0

将音量设为 (30 * {music volume fac})%

将 音调 音效设为 0

将 左右平衡 音效设为 0

如果 ({screen} = intro) 那么

等待 ({screen} = menu)

如果 ({screen} = menu) 那么

播放声音 No Man's Sky SS_Chord_23_4BD2034C 等待播完

等待 ({screen} = world)

等待 10 秒

将 {play sound} 设为 1

重复执行

等待 ((({screen} = world) 与 ({cam y} > -740)) 与 ({sub loss reason} = ))

等待 在 2 和 5 之间取随机数 秒

执行 find next music

播放声音 {play sound} 等待播完

等待 在 10 和 30 之间取随机数 秒

 

当按下 1 键

停止所有声音

 

当接收到 ! reset

删除 {music} 的全部项目

执行 add sound 1 for depth -100 -100

执行 add sound 2 for depth 0 300

执行 add sound 3 for depth 0 400

执行 add sound 4 for depth 50 500

执行 add sound 5 for depth 100 740

执行 add sound 6 for depth 200 740

执行 add sound 7 for depth 300 740

执行 add sound 8 for depth 500 740

执行 add sound 9 for depth 0 740

执行 add sound 10 for depth 0 740

执行 add sound 11 for depth 300 470

执行 add sound 12 for depth 0 470

执行 add sound 13 for depth 0 500

 

当接收到 end music

停止所有声音

等待 0 秒

将音量设为 (30 * {music volume fac})%

等待 0 秒

播放声音 The Toadz - Cave of Illusions

 

当接收到 update audio

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

将 {music target} 设为 (0.7 * {music volume fac})

否则

将 {music target} 设为 (1 * {music volume fac})

如果 ({cam y} < -740) 那么

将 {music target} 设为 ({music target} * (({y} + 770) / 30))

如果 ({music target} < 0) 那么

将 {music target} 设为 0

否则

如果 ({cam y} < -740) 那么

将 {music target} 设为 0

否则

将 {music target} 设为 (0.4 * {music volume fac})

如果 ({current music volume} > {music target}) 那么

将 {current music volume} 增加 ({Δt} * -1)

如果 ({current music volume} < {music target}) 那么

将 {current music volume} 设为 {music target}

否则

如果 ({current music volume} < {music target}) 那么

将 {current music volume} 增加 ({Δt} * 1)

如果 ({current music volume} > {music target}) 那么

将 {current music volume} 设为 {music target}

将音量设为 (30 * {current music volume})%

将 音调 音效设为 0

 

定义 add sound {id} for depth {d min} {d max}

将 {id} 加入 {music}

将 {d min} 加入 {music}

将 {d max} 加入 {music}

将 加入 {music}

 

定义 find next music

将 {last played} 设为 {play sound}

重复执行 25 次

将 {play sound} 设为 在 2 和 ({music} 的项目数 / 4) 之间取随机数

如果 ({play sound} = {last played}) 不成立 那么

如果 (({music} 的第 (2 + (4 * ({play sound} - 2))) 项 < (0 - {cam y})) 与 ((0 - {cam y}) < {music} 的第 (3 + (4 * ({play sound} - 2))) 项)) 那么

停止 这个脚本

如果 ({$ dev?} = 1) 那么

执行 ​​log​​

执行 ​​log​​

执行 ​​log​​

将 {play sound} 设为 {last played}

 

当 绿旗 被点击

等待 0.1 秒

将 {current music volume} 设为 0

将音量设为 (30 * {music volume fac})%

将 音调 音效设为 0

将 左右平衡 音效设为 0

如果 ({screen} = intro) 那么

等待 ({screen} = menu)

如果 ({screen} = menu) 那么

播放声音 No Man's Sky SS_Chord_23_4BD2034C 等待播完

等待 ({screen} = world)

等待 10 秒

将 {play sound} 设为 1

重复执行

等待 ((({screen} = world) 与 ({cam y} > -740)) 与 ({sub loss reason} = ))

等待 在 2 和 5 之间取随机数 秒

执行 find next music

播放声音 {play sound} 等待播完

等待 在 10 和 30 之间取随机数 秒

 

当按下 1 键

停止所有声音

 

当接收到 ! reset

删除 {music} 的全部项目

执行 add sound 1 for depth -100 -100

执行 add sound 2 for depth 0 300

执行 add sound 3 for depth 0 400

执行 add sound 4 for depth 50 500

执行 add sound 5 for depth 100 740

执行 add sound 6 for depth 200 740

执行 add sound 7 for depth 300 740

执行 add sound 8 for depth 500 740

执行 add sound 9 for depth 0 740

执行 add sound 10 for depth 0 740

执行 add sound 11 for depth 300 470

执行 add sound 12 for depth 0 470

执行 add sound 13 for depth 0 500

 

当接收到 update audio

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

将 {music target} 设为 (0.7 * {music volume fac})

否则

将 {music target} 设为 (1 * {music volume fac})

如果 ({cam y} < -740) 那么

将 {music target} 设为 ({music target} * (({y} + 770) / 30))

如果 ({music target} < 0) 那么

将 {music target} 设为 0

否则

如果 ({cam y} < -740) 那么

将 {music target} 设为 0

否则

将 {music target} 设为 (0.4 * {music volume fac})

如果 ({current music volume} > {music target}) 那么

将 {current music volume} 增加 ({Δt} * -1)

如果 ({current music volume} < {music target}) 那么

将 {current music volume} 设为 {music target}

否则

如果 ({current music volume} < {music target}) 那么

将 {current music volume} 增加 ({Δt} * 1)

如果 ({current music volume} > {music target}) 那么

将 {current music volume} 设为 {music target}

将音量设为 (30 * {current music volume})%

将 音调 音效设为 0

 

当接收到 end music

停止所有声音

等待 0 秒

将音量设为 (30 * {music volume fac})%

等待 0 秒

播放声音 The Toadz - Cave of Illusions

 

定义 find next music

将 {last played} 设为 {play sound}

重复执行 25 次

将 {play sound} 设为 在 2 和 ({music} 的项目数 / 4) 之间取随机数

如果 ({play sound} = {last played}) 不成立 那么

如果 (({music} 的第 (2 + (4 * ({play sound} - 2))) 项 < (0 - {cam y})) 与 ((0 - {cam y}) < {music} 的第 (3 + (4 * ({play sound} - 2))) 项)) 那么

停止 这个脚本

如果 ({$ dev?} = 1) 那么

执行 ​​log​​

执行 ​​log​​

执行 ​​log​​

将 {play sound} 设为 {last played}

 

定义 add sound {id} for depth {d min} {d max}

将 {id} 加入 {music}

将 {d min} 加入 {music}

将 {d max} 加入 {music}

将 加入 {music}

 

audio loops

代码

当 绿旗 被点击

隐藏

将音量设为 0%

将 左右平衡 音效设为 0

执行 add channel wind

执行 add channel ship

 

当接收到 update audio

如果 ({screen} = world) 不成立 那么

将音量设为 0%

停止 这个脚本

如果 ({audio channel} = wind) 那么

将音量设为 ({sfx volume fac} * (30 - 绝对值({cam y})))%

如果 ({cam y} > 0) 那么

将 音调 音效设为 0

否则

将 音调 音效设为 (20 * {cam y})

否则

如果 ({audio channel} = ship) 那么

将音量设为 ({sfx volume fac} * (10 - (1 * ((0.2 * 绝对值({cam x})) + 绝对值({cam y})))))%

将 音调 音效设为 0

否则

 

当作为克隆体启动时

将音量设为 0%

重复执行

播放声音 {audio channel} 等待播完

 

定义 add channel {name}

将 {audio channel} 设为 {name}

克隆 自己

将 {audio channel} 设为

 

当 绿旗 被点击

隐藏

将音量设为 0%

将 左右平衡 音效设为 0

执行 add channel wind

执行 add channel ship

 

当接收到 update audio

如果 ({screen} = world) 不成立 那么

将音量设为 0%

停止 这个脚本

如果 ({audio channel} = wind) 那么

将音量设为 ({sfx volume fac} * (30 - 绝对值({cam y})))%

如果 ({cam y} > 0) 那么

将 音调 音效设为 0

否则

将 音调 音效设为 (20 * {cam y})

否则

如果 ({audio channel} = ship) 那么

将音量设为 ({sfx volume fac} * (10 - (1 * ((0.2 * 绝对值({cam x})) + 绝对值({cam y})))))%

将 音调 音效设为 0

否则

 

当作为克隆体启动时

将音量设为 0%

重复执行

播放声音 {audio channel} 等待播完

 

定义 add channel {name}

将 {audio channel} 设为 {name}

克隆 自己

将 {audio channel} 设为

 

sub motor

代码

当 绿旗 被点击

将音量设为 0%

将 音调 音效设为 0

将 左右平衡 音效设为 0

重复执行

播放声音 sub motor 1 等待播完

等待 ((({$ map view?} = 0) 与 ({player map?} = 0)) 与 ({screen} = world))

 

当接收到 update audio

将音量设为 ({sfx volume fac} * (50 * ({prop thrust} * ({player map?} = 0))))%

如果 ((({end animation state} = holding) 或 ({end animation state} = pulling)) 或 ({end animation state} = )) 那么

将 音调 音效设为 -100

如果 ({end animation state} = ) 那么

将音量设为 0%

否则

将 音调 音效设为 (50 * {prop thrust})

 

当 绿旗 被点击

将音量设为 0%

将 音调 音效设为 0

将 左右平衡 音效设为 0

重复执行

播放声音 sub motor 1 等待播完

等待 ((({$ map view?} = 0) 与 ({player map?} = 0)) 与 ({screen} = world))

 

当接收到 update audio

将音量设为 ({sfx volume fac} * (50 * ({prop thrust} * ({player map?} = 0))))%

如果 ((({end animation state} = holding) 或 ({end animation state} = pulling)) 或 ({end animation state} = )) 那么

将 音调 音效设为 -100

如果 ({end animation state} = ) 那么

将音量设为 0%

否则

将 音调 音效设为 (50 * {prop thrust})

 

io

代码

当 绿旗 被点击

广播 hide save

将 {# save version} 设为 1

 

当接收到 LOAD

如果 (回答 的字符数 > 3) 那么

执行 load 回答

 

当接收到 stage clicked

如果 ({screen} = save warn) 那么

如果 ((鼠标的x坐标 < -168) 与 (鼠标的y坐标 > 147)) 不成立 那么

将 {screen} 设为 save

将 {errors} 设为

广播 save achievements 并等待

广播 save player map 并等待

执行 generate save

删除 {save code} 的全部项目

将 {save} 加入 {save code}

将 {WARNING} 设为 连接 The entire save code is 和 连接 {save code} 的第 1 项 的字符数 和 characters long!

显示列表 {save code}

显示变量 {WARNING}

如果 ({errors} = ) 不成立 那么

显示变量 {errors}

将 {save} 设为

 

当接收到 hide save

隐藏列表 {save code}

隐藏变量 {WARNING}

隐藏变量 {errors}

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 ! reset

删除 {save code} 的全部项目

删除 {unpacked save} 的全部项目

删除 {unpacked subsave} 的全部项目

将 {save} 设为

 

定义 // {comment}

 

定义

 

执行 //

执行 // END (double redundancy)

将 {save} 设为 连接 {save} 和 ,|,|

执行 // END

 

定义 load: set generic vars

将 {$ dev?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 dev 的编号) 项

将 {$ map view?} 设为 0

将 {player map?} 设为 0

执行

将 {= funds spent} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 funds_spent 的编号) 项

将 {= launches} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 launches 的编号) 项

将 {= record depth} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 record_depth 的编号) 项

将 {= submersibles lost} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 submersibles_lost 的编号) 项

将 {= submersibles salvaged} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 submersibles_salvaged 的编号) 项

将 {= total distance} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_distance 的编号) 项

将 {= total mission time} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_mission_time 的编号) 项

将 {= total resources mined} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_resources_mined 的编号) 项

执行

将 {tutorial phase} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 tutorial_phase 的编号) 项

将 {game complete?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 game_complete 的编号) 项

将 {low quality?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 low_quality 的编号) 项

将 {funds} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 funds 的编号) 项

将 {sfx volume fac} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sfx_volume_fac 的编号) 项

将 {music volume fac} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 music_volume_fac 的编号) 项

执行

将 {x} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 x 的编号) 项

将 {y} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 y 的编号) 项

将 {sub lift state} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sub_lift_state 的编号) 项

将 {battery} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 battery 的编号) 项

将 {health} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 health 的编号) 项

执行

将 {^ selected hull} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 selected_hull 的编号) 项

将 {^ sub arm} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 arm 的编号) 项

将 {^ sub battery capacity} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 battery_capacity 的编号) 项

将 {^ sub colour} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 colour 的编号) 项

将 {^ sub comms range} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 comms_range 的编号) 项

将 {^ sub drag} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drag 的编号) 项

将 {^ sub drill} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill 的编号) 项

将 {^ sub drill pwr consumption} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill_pwr_consumption 的编号) 项

将 {^ sub drill range} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill_range 的编号) 项

将 {^ sub elt} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 elt 的编号) 项

将 {^ sub light} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 light 的编号) 项

将 {^ sub mapper} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 mapper 的编号) 项

将 {^ sub mass} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 mass 的编号) 项

将 {^ sub max health} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 max_health 的编号) 项

将 {^ sub name} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 name 的编号) 项

将 {^ sub propulsion f} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 propulsion_f 的编号) 项

将 {^ sub scanner} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 scanner 的编号) 项

将 {^ sub size x} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 size_x 的编号) 项

将 {^ sub size y} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 size_y 的编号) 项

将 {^ sub storage slots} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 storage_slots 的编号) 项

将 {^ sub thrust pwr consumption} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 thrust_pwr_consumption 的编号) 项

 

定义 load {str}

删除 {text} 的全部项目

执行 unpack save {str}

执行 // validate (don't continue if something's wrong)

如果 (1 = {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 test_data_mode 的编号) 项) 那么

执行 // tdm:1,

如果 ({$ dev?} = 1) 那么

将 test data 加入 {text}

将 5 加入 {text}

否则

将 test data only! dev=1 to load 加入 {text}

将 5 加入 {text}

停止 这个脚本

如果 ({unpacked save} 包含 | ? 或 {unpacked save} 包含 | ?) 不成立 那么

将 error: save code invalid! missing data 加入 {text}

将 5 加入 {text}

停止 这个脚本

将 {! save state} 设为 active

执行 // now read from each part

执行 load: set generic vars

执行 load: set concatenated lists

执行 load: set generic lists

执行 // now continue game from save

将 {! save state} 设为 active

如果 ({sub lift state} = ) 那么

执行 // data loss likely

将 {screen} 设为 menu

将 {sub lift state} 设为 lifted

将 save loaded, data loss likely 加入 {text}

将 8 加入 {text}

否则

如果 ({sub lift state} = lifted) 那么

执行 // sensitive to tp to home glitches, fail-safe to world seems to be the best option

将 {screen} 设为 vehicles

否则

将 {screen} 设为 world

将 {player map?} 设为 0

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

将 {unlocked parts} 的第 1 项替换为 1

将 {unlocked parts} 的第 4 项替换为 1

将 {unlocked parts} 的第 13 项替换为 1

将 {unlocked parts} 的第 19 项替换为 1

执行 //

将 {unlocked hulls} 的第 1 项替换为 1

执行 //

广播 sort resources 并等待

播放声音 loaded

 

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 achievements 的编号) 项

执行 check for valid data length ({achievements} 的项目数 / 5) name achievements

执行 // DO NOT RESET ACHIEVEMENTS

如果 ({temp1} 的字符数 = 80) 那么

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

将 {achievements} 的第 {i} 项替换为 四舍五入({temp1} 的第 {i} 个字符)

将 {i} 增加 5

否则

 

当 绿旗 被点击

广播 hide save

将 {# save version} 设为 3

 

当接收到 stage clicked

如果 ({screen} = save warn) 那么

如果 ((鼠标的x坐标 < -168) 与 (鼠标的y坐标 > 147)) 不成立 那么

将 {screen} 设为 save

将 {errors} 设为

广播 save achievements 并等待

广播 save player map 并等待

执行 generate save

删除 {save code} 的全部项目

将 {save} 加入 {save code}

将 {WARNING} 设为 连接 The entire save code is 和 连接 {save code} 的第 1 项 的字符数 和 characters long!

显示列表 {save code}

显示变量 {WARNING}

如果 ({errors} = ) 不成立 那么

显示变量 {errors}

将 {save} 设为

 

当接收到 hide save

隐藏列表 {save code}

隐藏变量 {WARNING}

隐藏变量 {errors}

 

当接收到 LOAD

如果 (回答 的字符数 > 3) 那么

执行 load 回答

 

当接收到 ! reset

删除 {save code} 的全部项目

删除 {unpacked save} 的全部项目

删除 {unpacked subsave} 的全部项目

将 {save} 设为

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

定义 // {comment}

 

定义

 

定义 generate save

执行 // note: do not directly run this script, broadcasts are run before it

将 {save} 设为 连接 SUB,v: 和 {version}

删除 {save log} 的全部项目

执行 > add kv pair sv {# save version}

执行 > add kv pair t 四舍五入({time})

执行 > add kv pair dev {$ dev?}

执行 > add kv pair screen {screen}

执行 > add kv pair p 连接 用户名 的第 1 个字符 和 用户名 的第 2 个字符

执行

执行 > add kv pair funds_spent 四舍五入({= funds spent})

执行 > add kv pair launches {= launches}

执行 > add kv pair record_depth (四舍五入((1000 * {= record depth})) / 1000)

执行 > add kv pair submersibles_lost 四舍五入({= submersibles lost})

执行 > add kv pair submersibles_salvaged 四舍五入({= submersibles salvaged})

执行 > add kv pair total_distance (四舍五入((1000 * {= total distance})) / 1000)

执行 > add kv pair total_mission_time (四舍五入((1000 * {= total mission time})) / 1000)

执行 > add kv pair total_resources_mined 四舍五入({= total resources mined})

执行

执行 > add kv pair tutorial_phase {tutorial phase}

执行 > add kv pair game_complete {game complete?}

执行 > add kv pair low_quality {low quality?}

执行 > add kv pair funds 四舍五入({funds})

执行 > add kv pair sfx_volume_fac {sfx volume fac}

执行 > add kv pair music_volume_fac {music volume fac}

执行

执行 > add kv pair x {x}

执行 > add kv pair y {y}

执行 > add kv pair sub_lift_state {sub lift state}

执行 > add kv pair battery {battery}

执行 > add kv pair health {health}

执行

执行 > add kv pair sub_cfg_index {sub cfg index}

执行 > add kv pair selected_hull {^ selected hull}

执行 > add kv pair arm {^ sub arm}

执行 > add kv pair battery_capacity {^ sub battery capacity}

执行 > add kv pair colour {^ sub colour}

执行 > add kv pair comms_range {^ sub comms range}

执行 > add kv pair drag {^ sub drag}

执行 > add kv pair drill {^ sub drill}

执行 > add kv pair drill_pwr_consumption {^ sub drill pwr consumption}

执行 > add kv pair drill_range {^ sub drill range}

执行 > add kv pair elt {^ sub elt}

执行 > add kv pair light {^ sub light}

执行 > add kv pair mapper {^ sub mapper}

执行 > add kv pair mass {^ sub mass}

执行 > add kv pair max_health {^ sub max health}

执行 > add kv pair name {^ sub name}

执行 > add kv pair propulsion_f {^ sub propulsion f}

执行 > add kv pair scanner {^ sub scanner}

执行 > add kv pair size_x {^ sub size x}

执行 > add kv pair size_y {^ sub size y}

执行 > add kv pair storage_slots {^ sub storage slots}

执行 > add kv pair thrust_pwr_consumption {^ sub thrust pwr consumption}

执行

执行 > add kv pair cs1 ({game complete?} + (四舍五入({funds}) + ({= owned parts} 的项目数 + {= owned hulls} 的项目数)))

执行 > add kv pair user 用户名

执行 > add kv pair used debug info 的 used

执行

执行 // BEGIN LIST DATA

执行

执行 add k unlocked_parts :

执行 add k unlocked_hulls :

执行 add k owned_hulls :

执行 add k discovered_fish :

执行 add k map_discovered :

执行

执行 add k achievements :

执行

执行 add k available_functions :

执行 add k ship_storage :

执行 add k owned_parts :

执行 add k sub_configs_pointers :

执行 add k sub_configs :

执行 add k sub_storage :

执行 add k lost_subs :

执行 add k waypoints :

执行 add k items :

执行

执行 save resources compressed in px dom 400 800

执行 save walls compressed

执行

执行 add k save_log :

执行

执行 // END (double redundancy)

将 {save} 设为 连接 {save} 和 ,|,|

执行 // END

删除 {save log} 的全部项目

 

定义 load {str}

删除 {text} 的全部项目

执行 unpack save {str}

执行 // validate (don't continue if something's wrong)

如果 (1 = {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 test_data_mode 的编号) 项) 那么

执行 // tdm:1,

如果 ({$ dev?} = 1) 那么

将 test data 加入 {text}

将 5 加入 {text}

否则

将 test data only! dev=1 to load 加入 {text}

将 5 加入 {text}

停止 这个脚本

如果 ({unpacked save} 包含 | ? 或 {unpacked save} 包含 | ?) 不成立 那么

将 error: save code invalid! missing data 加入 {text}

将 5 加入 {text}

停止 这个脚本

将 {loaded save version} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sv 的编号) 项

如果 ({loaded save version} > {# save version}) 那么

执行 // loaded save shouldn't be newer than the project

将 warn: loaded save is newer than the project 加入 {text}

将 5 加入 {text}

将 {! save state} 设为 active

执行 // now read from each part

执行 load: set generic vars

执行 load: set concatenated lists

执行 load: set generic lists

执行 // now continue game from save

将 {! save state} 设为 active

如果 {unpacked save} 包含 连接 ! 和 sub_lift_state ? 不成立 那么

执行 // data loss likely

将 {screen} 设为 menu

将 {sub lift state} 设为 lifted

将 save loaded, data loss likely 加入 {text}

将 8 加入 {text}

否则

如果 ({sub lift state} = lifted) 那么

执行 // sensitive to tp to home glitches, fail-safe to world seems to be the best option

将 {screen} 设为 vehicles

否则

将 {screen} 设为 world

将 {player map?} 设为 0

将 {show inventory?} 设为 0

将 {show waypoints?} 设为 0

将 {unlocked parts} 的第 1 项替换为 1

将 {unlocked parts} 的第 4 项替换为 1

将 {unlocked parts} 的第 13 项替换为 1

将 {unlocked parts} 的第 19 项替换为 1

执行 //

将 {unlocked hulls} 的第 1 项替换为 1

执行 //

广播 sort resources 并等待

播放声音 loaded

 

定义 unpack subsave {str}

删除 {unpacked subsave} 的全部项目

执行 // put save in unpack list

将 {save} 设为

如果 ({save} = ) 不成立 那么

将 {save} 加入 {unpacked subsave}

 

定义 save resources compressed in px dom {x offset} {width}

执行 // coord range: x -500 to 500

执行 // y 0 to -1000

执行 // +x-y

将 {save} 设为 连接 {save} 和 连接 , 和 resource_data:

将 {i} 设为 1

重复执行 ({resource data} 的项目数 / 3) 次

如果 (({resource data} 的第 ({i} + 1) 项 < (-12 * {x offset})) 或 ({resource data} 的第 ({i} + 1) 项 > (12 * ({width} - {x offset})))) 那么

执行 ​​error​​

执行 ​​log​​

执行 add save log resource out of domain x

将 {errors} 设为 resource data was out of range (x)

如果 ({resource data} 的第 ({i} + 2) 项 > 0) 那么

执行 ​​error​​

执行 ​​log​​

执行 add save log resource out of domain y

将 {errors} 设为 resource data was out of range (y)

将 {temp1} 设为 连接 {resource data} 的第 {i} 项 的第 1 个字符 和 {resource data} 的第 {i} 项 的第 2 个字符

如果 ({temp1} = mn) 那么

将 {save} 设为 连接 {save} 和 A

否则

如果 ({temp1} = ni) 那么

将 {save} 设为 连接 {save} 和 B

否则

如果 ({temp1} = cu) 那么

将 {save} 设为 连接 {save} 和 C

否则

如果 ({temp1} = co) 那么

将 {save} 设为 连接 {save} 和 D

否则

如果 ({temp1} = ag) 那么

将 {save} 设为 连接 {save} 和 E

否则

如果 ({temp1} = ti) 那么

将 {save} 设为 连接 {save} 和 F

否则

将 {save} 设为 连接 {save} 和 ?

将 {save} 设为 连接 {save} 和 连接 (((12 * {width}) * (0 - {resource data} 的第 ({i} + 2) 项)) + ({resource data} 的第 ({i} + 1) 项 + (12 * {x offset}))) 和 /

将 {i} 增加 3

 

定义 unpack save {str}

删除 {unpacked save} 的全部项目

执行 // buffer (for key indexing failure)

将 加入 {unpacked save}

将 加入 {unpacked save}

执行 // put save in unpack list

将 {save} 设为

将 {save} 加入 {unpacked save}

 

定义 check for valid data length {valid length} name {name}

执行 clear spaces from data {temp1} {name}

如果 ({temp1} 的字符数 = {valid length}) 不成立 那么

将 连接 连接 {name} 和 invalid length 和 连接 连接 {temp1} 的字符数 和 != 和 {valid length} 加入 {text}

将 5 加入 {text}

如果 ({temp1} 的字符数 < {valid length}) 那么

执行 ​​log​​

重复执行 ({valid length} - {temp1} 的字符数) 次

将 {temp1} 设为 连接 {temp1} 和 0

 

定义 > add kv pair {key} {value}

将 {save} 设为 连接 {save} 和 连接 , 和 连接 连接 {key} 和 : 和 {value}

 

定义 add k {key} :

将 {save} 设为 连接 {save} 和 连接 , 和 连接 {key} 和 :

 

定义 unpack save {str}

删除 {unpacked save} 的全部项目

执行 // buffer (for key indexing failure)

将 加入 {unpacked save}

将 加入 {unpacked save}

执行 // put save in unpack list

将 {save} 设为

将 {save} 加入 {unpacked save}

定义 load: set generic vars

将 {$ dev?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 dev 的编号) 项

将 {$ map view?} 设为 0

将 {player map?} 设为 0

执行

将 {= funds spent} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 funds_spent 的编号) 项

将 {= launches} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 launches 的编号) 项

将 {= record depth} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 record_depth 的编号) 项

将 {= submersibles lost} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 submersibles_lost 的编号) 项

将 {= submersibles salvaged} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 submersibles_salvaged 的编号) 项

将 {= total distance} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_distance 的编号) 项

将 {= total mission time} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_mission_time 的编号) 项

将 {= total resources mined} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 total_resources_mined 的编号) 项

执行

将 {tutorial phase} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 tutorial_phase 的编号) 项

将 {game complete?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 game_complete 的编号) 项

将 {low quality?} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 low_quality 的编号) 项

将 {funds} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 funds 的编号) 项

将 {sfx volume fac} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sfx_volume_fac 的编号) 项

将 {music volume fac} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 music_volume_fac 的编号) 项

执行

将 {x} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 x 的编号) 项

将 {y} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 y 的编号) 项

将 {sub lift state} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sub_lift_state 的编号) 项

将 {battery} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 battery 的编号) 项

将 {health} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 health 的编号) 项

执行

将 {^ selected hull} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 selected_hull 的编号) 项

将 {^ sub arm} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 arm 的编号) 项

将 {^ sub battery capacity} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 battery_capacity 的编号) 项

将 {^ sub colour} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 colour 的编号) 项

将 {^ sub comms range} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 comms_range 的编号) 项

将 {^ sub drag} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drag 的编号) 项

将 {^ sub drill} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill 的编号) 项

将 {^ sub drill pwr consumption} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill_pwr_consumption 的编号) 项

将 {^ sub drill range} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 drill_range 的编号) 项

将 {^ sub elt} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 elt 的编号) 项

将 {^ sub light} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 light 的编号) 项

将 {^ sub mapper} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 mapper 的编号) 项

将 {^ sub mass} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 mass 的编号) 项

将 {^ sub max health} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 max_health 的编号) 项

将 {^ sub name} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 name 的编号) 项

将 {^ sub propulsion f} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 propulsion_f 的编号) 项

将 {^ sub scanner} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 scanner 的编号) 项

将 {^ sub size x} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 size_x 的编号) 项

将 {^ sub size y} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 size_y 的编号) 项

将 {^ sub storage slots} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 storage_slots 的编号) 项

将 {^ sub thrust pwr consumption} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 thrust_pwr_consumption 的编号) 项

 

定义 load resource {resource code}

如果 (A = {resource code} 的第 1 个字符) 那么

将 连接 mn 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (B = {resource code} 的第 1 个字符) 那么

将 连接 ni 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (C = {resource code} 的第 1 个字符) 那么

将 连接 cu 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (D = {resource code} 的第 1 个字符) 那么

将 连接 co 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (E = {resource code} 的第 1 个字符) 那么

将 连接 ag 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (F = {resource code} 的第 1 个字符) 那么

将 连接 ti 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

将 连接 mn 和 在 0 和 9 之间取随机数 加入 {resource data}

执行 ​​warn​​

将 {temp1} 设为

将 {j} 设为 2

重复执行 ({resource code} 的字符数 - 1) 次

将 {temp1} 设为 连接 {temp1} 和 {resource code} 的第 {j} 个字符

将 {j} 增加 1

将 ({temp1} 除以 (12 * 800) 的余数 - (12 * 400)) 加入 {resource data}

将 (0 - 向下取整(({temp1} / (12 * 800)))) 加入 {resource data}

 

如果 ({save} = ) 不成立 那么

将 {save} 加入 {unpacked subsave}

 

定义 save resources compressed in px dom {x offset} {width}

执行 // coord range: x -500 to 500

执行 // y 0 to -1000

执行 // +x-y

将 {save} 设为 连接 {save} 和 连接 , 和 resource_data:

将 {i} 设为 1

重复执行 ({resource data} 的项目数 / 3) 次

如果 (({resource data} 的第 ({i} + 1) 项 < (-12 * {x offset})) 或 ({resource data} 的第 ({i} + 1) 项 > (12 * ({width} - {x offset})))) 那么

执行 ​​error​​

执行 ​​log​​

将 {errors} 设为 resource data was out of range (x)

如果 ({resource data} 的第 ({i} + 2) 项 > 0) 那么

执行 ​​error​​

执行 ​​log​​

将 {errors} 设为 resource data was out of range (y)

将 {temp1} 设为 连接 {resource data} 的第 {i} 项 的第 1 个字符 和 {resource data} 的第 {i} 项 的第 2 个字符

如果 ({temp1} = mn) 那么

将 {save} 设为 连接 {save} 和 A

否则

如果 ({temp1} = ni) 那么

将 {save} 设为 连接 {save} 和 B

否则

如果 ({temp1} = cu) 那么

将 {save} 设为 连接 {save} 和 C

否则

如果 ({temp1} = co) 那么

将 {save} 设为 连接 {save} 和 D

否则

如果 ({temp1} = ag) 那么

将 {save} 设为 连接 {save} 和 E

否则

如果 ({temp1} = ti) 那么

将 {save} 设为 连接 {save} 和 F

否则

将 {save} 设为 连接 {save} 和 ?

将 {save} 设为 连接 {save} 和 连接 (((12 * {width}) * (0 - {resource data} 的第 ({i} + 2) 项)) + ({resource data} 的第 ({i} + 1) 项 + (12 * {x offset}))) 和 /

将 {i} 增加 3

 

定义 > add kv pair {key} {value}

将 {save} 设为 连接 {save} 和 连接 , 和 连接 连接 {key} 和 : 和 {value}

 

定义 add k {key} :

将 {save} 设为 连接 {save} 和 连接 , 和 连接 {key} 和 :

 

定义 check for valid data length {valid length} name {name}

执行 clear spaces from data {temp1} {name}

如果 ({temp1} 的字符数 = {valid length}) 不成立 那么

将 连接 连接 {name} 和 invalid length 和 连接 连接 {temp1} 的字符数 和 != 和 {valid length} 加入 {text}

将 5 加入 {text}

如果 ({temp1} 的字符数 < {valid length}) 那么

执行 ​​log​​

重复执行 ({valid length} - {temp1} 的字符数) 次

将 {temp1} 设为 连接 {temp1} 和 0

 

定义 save walls compressed

执行 // save only type, x, y

执行 // rest can be generated

将 {save} 设为 连接 {save} 和 连接 , 和 连接 walls: 和

将 {i} 设为 0

重复执行 ({wall data} 的项目数 / 5) 次

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 1) 项 和 /

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 3) 项 和 /

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 4) 项 和 /

将 {i} 增加 5

 

执行

 

如果 ({temp2} > 0) 那么

将 连接 repaired outdated data for 和 {name} 加入 {text}

将 5 加入 {text}

如果 ({$ dev?} = 1) 那么

执行 ​​log​​

执行 ​​log​​

将 连接 连接 deleted 和 {temp2} 和 spaces 加入 {text}

将 5 加入 {text}

 

定义 save walls compressed

执行 // save only type, x, y

执行 // rest can be generated

将 {save} 设为 连接 {save} 和 连接 , 和 连接 walls: 和

将 {i} 设为 0

重复执行 ({wall data} 的项目数 / 5) 次

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 1) 项 和 /

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 3) 项 和 /

将 {save} 设为 连接 {save} 和 连接 {wall data} 的第 ({i} + 4) 项 和 /

将 {i} 增加 5

 

定义 load resource {resource code}

如果 (A = {resource code} 的第 1 个字符) 那么

将 连接 mn 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (B = {resource code} 的第 1 个字符) 那么

将 连接 ni 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (C = {resource code} 的第 1 个字符) 那么

将 连接 cu 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (D = {resource code} 的第 1 个字符) 那么

将 连接 co 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (E = {resource code} 的第 1 个字符) 那么

将 连接 ag 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

如果 (F = {resource code} 的第 1 个字符) 那么

将 连接 ti 和 在 0 和 9 之间取随机数 加入 {resource data}

否则

将 连接 mn 和 在 0 和 9 之间取随机数 加入 {resource data}

执行 ​​warn​​

将 {temp1} 设为

将 {j} 设为 2

重复执行 ({resource code} 的字符数 - 1) 次

将 {temp1} 设为 连接 {temp1} 和 {resource code} 的第 {j} 个字符

将 {j} 增加 1

将 ({temp1} 除以 (12 * 800) 的余数 - (12 * 400)) 加入 {resource data}

将 (0 - 向下取整(({temp1} / (12 * 800)))) 加入 {resource data}

 

定义 load: set concatenated lists

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 unlocked_parts 的编号) 项

执行 check for valid data length 22 name unlocked parts

删除 {unlocked parts} 的全部项目

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 unlocked_hulls 的编号) 项

执行 check for valid data length 6 name unlocked hulls

删除 {unlocked hulls} 的全部项目

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 owned_hulls 的编号) 项

执行 check for valid data length 6 name owned hulls

删除 {= owned hulls} 的全部项目

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 discovered_fish 的编号) 项

执行 check for valid data length ({fish types} 的项目数 / {fish types params} 的项目数) name discovered fish

删除 {discovered fish} 的全部项目

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 map_discovered 的编号) 项

执行 check for valid data length {*0 existing chunks} 的项目数 name map discovered

删除 {player map discovered} 的全部项目

执行

将 {temp1} 设为 {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 achievements 的编号) 项

执行 check for valid data length ({achievements} 的项目数 / 5) name achievements

执行 // DO NOT RESET ACHIEVEMENTS

如果 ({temp1} 的字符数 = 80) 那么

将 {i} 设为 5

重复执行 ({achievements} 的项目数 / 5) 次

将 {achievements} 的第 {i} 项替换为 四舍五入({temp1} 的第 {i} 个字符)

将 {i} 增加 5

否则

 

定义 load: set generic lists

执行 // for lists that are stored with a / separator

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 available_functions 的编号) 项

删除 {available functions} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 ship_storage 的编号) 项

删除 {ship storage} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 owned_parts 的编号) 项

删除 {= owned parts} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sub_configs_pointers 的编号) 项

删除 {@ sub configs pointers} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sub_configs 的编号) 项

删除 {@ sub configs} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 sub_storage 的编号) 项

删除 {@ submersible storage} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 lost_subs 的编号) 项

删除 {lost sub data} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 waypoints 的编号) 项

删除 {waypoints} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 items 的编号) 项

删除 {items} 的全部项目

执行

执行

执行 // SPECIAL HANDLING REQUIRED

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 resource_data 的编号) 项

删除 {resource data} 的全部项目

执行

执行 unpack subsave {unpacked save} 的第 (1 + {unpacked save} 中第一个 连接 ! 和 walls 的编号) 项

删除 {wall data} 的全部项目

将 {i} 设为 1

重复执行 ({unpacked subsave} 的项目数 / 3) 次

将 {unpacked subsave} 的第 {i} 项 加入 {wall data}

将 连接 连接 {unpacked subsave} 的第 ({i} + 1) 项 和 _ 和 {unpacked subsave} 的第 ({i} + 2) 项 加入 {wall data}

将 {unpacked subsave} 的第 ({i} + 1) 项 加入 {wall data}

将 {unpacked subsave} 的第 ({i} + 2) 项 加入 {wall data}

将 {unpacked subsave} 的第 {i} 项 的第 1 个字符 加入 {wall data}

将 {i} 增加 3

执行

 

定义 clear spaces from data {data} {name}

将 {temp1} 设为

将 {temp2} 设为 0

如果 ({temp2} > 0) 那么

将 连接 repaired outdated data for 和 {name} 加入 {text}

将 5 加入 {text}

如果 ({$ dev?} = 1) 那么

执行 ​​log​​

执行 ​​log​​

将 连接 连接 deleted 和 {temp2} 和 spaces 加入 {text}

将 5 加入 {text}

 

定义 add save log {log}

如果 {save log} 包含 {log} ? 不成立 那么

如果 ({save log} 的项目数 < 10) 那么

将 {log} 加入 {save log}

 

single sfx

代码

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 sfx: break wall

播放声音 wallbreak1

 

当接收到 sfx: break resource

播放声音 连接 break 和 在 1 和 6 之间取随机数

 

当接收到 sfx: break wall

播放声音 wallbreak1

 

当接收到 sfx: break resource

播放声音 连接 break 和 在 1 和 6 之间取随机数

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

debug info

代码

当按下 / 键

如果 ({$ dev?} = 1) 那么

询问 input command 并等待

执行 command to list

如果 (({string} = rth) 或 ({string} = home)) 那么

将 {x} 设为 0

将 {y} 设为 0

将 {vx} 设为 0

将 {vy} 设为 0

否则

如果 (({string} = reset) 或 ({string} = new)) 那么

广播 reset game to new 并等待

删除 {text} 的全部项目

将 {output} 设为 "Submersible" created by awesome-llama

将 {output} 加入 {text}

将 3 加入 {text}

等待 0 秒

停止 全部脚本

否则

如果 ({string} = x) 那么

将 {x} 设为 {command data} 的第 1 项

否则

如果 ({string} = y) 那么

将 {y} 设为 {command data} 的第 1 项

否则

如果 (({string} = pos) 或 (({string} = position) 或 ({string} = tp))) 那么

将 {x} 设为 {command data} 的第 1 项

将 {y} 设为 {command data} 的第 2 项

否则

如果 ({string} = battery) 那么

将 {battery} 设为 {command data} 的第 1 项

否则

如果 ({string} = health) 那么

将 {health} 设为 {command data} 的第 1 项

否则

如果 (({string} = funds) 或 ({string} = money)) 那么

将 {funds} 设为 {command data} 的第 1 项

将 set funds 加入 {text}

将 3 加入 {text}

否则

如果 (({string} = r) 或 ({string} = resource)) 那么

如果 (clear = {command data} 的第 1 项) 那么

删除 {ship storage} 的全部项目

将 cleared resources 加入 {text}

将 3 加入 {text}

否则

如果 (add = {command data} 的第 1 项) 那么

如果 {ship storage} 包含 {command data} 的第 2 项 ? 那么

将 {ship storage} 的第 (1 + {ship storage} 中第一个 {command data} 的第 2 项 的编号) 项替换为 ({command data} 的第 3 项 + {ship storage} 的第 (1 + {ship storage} 中第一个 {command data} 的第 2 项 的编号) 项)

否则

将 {command data} 的第 2 项 加入 {ship storage}

将 {command data} 的第 3 项 加入 {ship storage}

将 added resource 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = install) 那么

将 command data 加入 {@ installed parts}

广播 update sub specs

将 installed part 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = dev) 那么

将 {$ dev?} 设为 {command data} 的第 1 项

将 连接 dev= 和 {$ dev?} 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = quality) 那么

将 {low quality?} 设为 {command data} 的第 1 项

将 连接 quality= 和 {low quality?} 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = clearstorage) 那么

删除 {@ submersible storage} 的全部项目

将 storage cleared 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = load) 那么

询问 paste save: 并等待

广播 LOAD

否则

如果 (({string} = update) 或 ({string} = specs)) 那么

广播 update sub specs

将 updated specs 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = add) 那么

如果 ({command data} 的第 2 项 > 0) 那么

重复执行 {command data} 的第 2 项 次

将 {command data} 的第 1 项 加入 {@ submersible storage}

否则

将 {command data} 的第 1 项 加入 {@ submersible storage}

广播 update display inventory

将 连接 added 和 {command data} 的第 1 项 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = cheat) 那么

执行 cheat

否则

如果 ({string} = mute) 那么

将 {music volume fac} 设为 0

否则

如果 ({string} = music) 那么

将 {music volume fac} 设为 {command data} 的第 1 项

否则

如果 ({string} = sfx) 那么

将 {sfx volume fac} 设为 {command data} 的第 1 项

否则

 

当接收到 render debug info

将 亮度 特效设定为 100

移到 x:0 y:0

如果 ({$ free cam?} = 1) 那么

换成 free cam 造型

图章

如果 ({$ map view?} = 1) 那么

换成 map view 造型

图章

如果 ({$ editor} = terrain) 那么

换成 terrain editor 造型

图章

否则

如果 ({$ editor} = prop) 那么

换成 prop editor 造型

图章

否则

如果 ({$ editor} = resource) 那么

换成 resource editor 造型

图章

否则

如果 ({$ editor} = wall) 那么

换成 wall editor 造型

图章

否则

换成 icon 造型

 

将 {string} 加入 {command data}

将 {string} 设为 {command data} 的第 1 项

删除 {command data} 的第 1 项

 

定义 cheat

将 {funds} 设为 100000

删除 {ship storage} 的全部项目

将 manganese 加入 {ship storage}

将 100 加入 {ship storage}

将 nickel 加入 {ship storage}

将 100 加入 {ship storage}

将 copper 加入 {ship storage}

将 100 加入 {ship storage}

将 cobalt 加入 {ship storage}

将 100 加入 {ship storage}

将 silver 加入 {ship storage}

将 100 加入 {ship storage}

将 titanium 加入 {ship storage}

将 100 加入 {ship storage}

 

当按下 / 键

如果 ({$ dev?} = 1) 那么

询问 input command 并等待

如果 (回答 = ) 那么

停止 这个脚本

将 {used} 增加 1

执行 command to list

如果 (({string} = rth) 或 ({string} = home)) 那么

将 {x} 设为 0

将 {y} 设为 0

将 {vx} 设为 0

将 {vy} 设为 0

否则

如果 (({string} = reset) 或 ({string} = new)) 那么

广播 reset game to new 并等待

删除 {text} 的全部项目

将 {output} 设为 "Submersible" created by awesome-llama

将 {output} 加入 {text}

将 3 加入 {text}

等待 0 秒

停止 全部脚本

否则

如果 ({string} = x) 那么

将 {x} 设为 {command data} 的第 1 项

否则

如果 ({string} = y) 那么

将 {y} 设为 {command data} 的第 1 项

否则

如果 (({string} = pos) 或 (({string} = position) 或 ({string} = tp))) 那么

将 {x} 设为 {command data} 的第 1 项

将 {y} 设为 {command data} 的第 2 项

否则

如果 ({string} = battery) 那么

将 {battery} 设为 {command data} 的第 1 项

否则

如果 ({string} = health) 那么

将 {health} 设为 {command data} 的第 1 项

否则

如果 (({string} = funds) 或 ({string} = money)) 那么

将 {funds} 设为 {command data} 的第 1 项

将 set funds 加入 {text}

将 3 加入 {text}

否则

如果 (({string} = r) 或 ({string} = resource)) 那么

如果 (clear = {command data} 的第 1 项) 那么

删除 {ship storage} 的全部项目

将 cleared resources 加入 {text}

将 3 加入 {text}

否则

如果 (add = {command data} 的第 1 项) 那么

如果 {ship storage} 包含 {command data} 的第 2 项 ? 那么

将 {ship storage} 的第 (1 + {ship storage} 中第一个 {command data} 的第 2 项 的编号) 项替换为 ({command data} 的第 3 项 + {ship storage} 的第 (1 + {ship storage} 中第一个 {command data} 的第 2 项 的编号) 项)

否则

将 {command data} 的第 2 项 加入 {ship storage}

将 {command data} 的第 3 项 加入 {ship storage}

将 added resource 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = install) 那么

将 command data 加入 {@ installed parts}

广播 update sub specs

将 installed part 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = dev) 那么

将 {$ dev?} 设为 {command data} 的第 1 项

将 连接 dev= 和 {$ dev?} 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = quality) 那么

将 {low quality?} 设为 {command data} 的第 1 项

将 连接 quality= 和 {low quality?} 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = clearstorage) 那么

删除 {@ submersible storage} 的全部项目

将 storage cleared 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = load) 那么

询问 paste save: 并等待

广播 LOAD

否则

如果 (({string} = update) 或 ({string} = specs)) 那么

广播 update sub specs

将 updated specs 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = add) 那么

如果 ({command data} 的第 2 项 > 0) 那么

重复执行 {command data} 的第 2 项 次

将 {command data} 的第 1 项 加入 {@ submersible storage}

否则

将 {command data} 的第 1 项 加入 {@ submersible storage}

广播 update display inventory

将 连接 added 和 {command data} 的第 1 项 加入 {text}

将 3 加入 {text}

否则

如果 ({string} = cheat) 那么

执行 cheat

否则

如果 ({string} = mute) 那么

将 {music volume fac} 设为 0

否则

如果 ({string} = music) 那么

将 {music volume fac} 设为 {command data} 的第 1 项

否则

如果 ({string} = sfx) 那么

将 {sfx volume fac} 设为 {command data} 的第 1 项

否则

如果 (({string} = regenerate world data) 或 ({string} = rwd)) 那么

执行 // terrain processor, is destructive

广播 regenerate world data 并等待

否则

 

当接收到 ! reset

将 {used} 设为 0

 

当接收到 render debug info

将 亮度 特效设定为 100

移到 x:0 y:0

如果 ({$ free cam?} = 1) 那么

换成 free cam 造型

图章

如果 ({$ map view?} = 1) 那么

换成 map view 造型

图章

如果 ({$ editor} = terrain) 那么

换成 terrain editor 造型

图章

否则

如果 ({$ editor} = prop) 那么

换成 prop editor 造型

图章

否则

如果 ({$ editor} = resource) 那么

换成 resource editor 造型

图章

否则

如果 ({$ editor} = wall) 那么

换成 wall editor 造型

图章

否则

换成 icon 造型

 

定义 // {comment}

 

定义 cheat

将 {funds} 设为 100000

删除 {ship storage} 的全部项目

将 manganese 加入 {ship storage}

将 100 加入 {ship storage}

将 nickel 加入 {ship storage}

将 100 加入 {ship storage}

将 copper 加入 {ship storage}

将 100 加入 {ship storage}

将 cobalt 加入 {ship storage}

将 100 加入 {ship storage}

将 silver 加入 {ship storage}

将 100 加入 {ship storage}

将 titanium 加入 {ship storage}

将 100 加入 {ship storage}

 

定义 command to list

删除 {command data} 的全部项目

将 {string} 设为

将 {string} 加入 {command data}

将 {string} 设为 {command data} 的第 1 项

删除 {command data} 的第 1 项

 

mapper

代码

当按下 ↑ 键

如果 ({player map?} = 1) 那么

将 {player map scale} 设为 ({player map scale} * 1.2)

如果 ({player map scale} > 0.5) 那么

将 {player map scale} 设为 0.5

 

当按下 ↓ 键

如果 ({player map?} = 1) 那么

将 {player map scale} 设为 ({player map scale} / 1.2)

如果 ({player map scale} < 0.05) 那么

将 {player map scale} 设为 0.05

 

当接收到 toggle player map

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

将 {player map?} 设为 0

将 {place new waypoint on map?} 设为 0

否则

如果 ({sub loss reason} = ) 那么

执行 rematch explored length

将 {player map?} 设为 1

将 {player map x} 设为 {cam x}

将 {player map y} 设为 {cam y}

将 {player map scale} 设为 0.1

将 {show inventory?} 设为 0

将 {black cover} 设为 50

将 {edited waypoint} 设为

将 {place new waypoint on map?} 设为 0

否则

如果 {text} 包含 no power! ? 不成立 那么

将 no power! 加入 {text}

将 5 加入 {text}

 

当接收到 render player map

将 {map hover} 设为

将 {map hover index} 设为 0

如果 ({player map?} = 1) 那么

清除图形特效

执行 motion

执行 render map main

执行 render grid

执行 render water

执行 render waypoints and lost subs

执行 render map decorations

执行 render waypoint edit

换成 icon 造型

 

当接收到 explore player map

如果 ({^ sub mapper} > 0) 那么

如果 ({sub lift state} = ) 那么

执行 check exploration of chunk at tile (8 + {x}) ( + {y})

执行 check exploration of chunk at tile (-8 + {x}) ( + {y})

执行 check exploration of chunk at tile ( + {x}) (8 + {y})

执行 check exploration of chunk at tile ( + {x}) (-8 + {y})

如果 ({^ sub mapper} > 1) 那么

执行 check exploration of chunk at tile (8 + {x}) (8 + {y})

执行 check exploration of chunk at tile (8 + {x}) (-8 + {y})

执行 check exploration of chunk at tile (-8 + {x}) (8 + {y})

执行 check exploration of chunk at tile (-8 + {x}) (-8 + {y})

 

当接收到 stage clicked

如果 ({place new waypoint on map?} = 1) 那么

如果 ({hovered function button} = ) 那么

将 {place new waypoint on map?} 设为 0

将 {i} 设为 {text} 中第一个 click on the map to place a new waypoint 的编号

如果 ({i} > 0) 那么

删除 {text} 的第 {i} 项

删除 {text} 的第 {i} 项

将 {^ sub colour} 加入 {waypoints}

将 连接 连接 向下取整(向下取整(({player map x} + (鼠标的x坐标 / ({player map scale} * {# tile size}))))) 和 _ 和 向下取整(向下取整(({player map y} + (鼠标的y坐标 / ({player map scale} * {# tile size}))))) 加入 {waypoints}

将 向下取整(({player map x} + (鼠标的x坐标 / ({player map scale} * {# tile size})))) 加入 {waypoints}

将 向下取整(({player map y} + (鼠标的y坐标 / ({player map scale} * {# tile size})))) 加入 {waypoints}

将 waypoint added 加入 {text}

将 3 加入 {text}

广播 sfx: add waypoint

否则

如果 ({map hover} = waypoint) 那么

将 {edited waypoint} 设为 {map hover index}

重复执行直到 按下鼠标? 不成立

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {edited waypoint}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {edited waypoint}) 项 - {player map y}))

面向 鼠标指针

如果 (到 鼠标指针 的距离 > 5) 那么

将 {waypoints} 的第 {edited waypoint} 项替换为 四舍五入((200 * (方向 / 360)))

面向 90 方向

如果 ({delete waypoint?} = 1) 那么

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

将 waypoint deleted 加入 {text}

将 3 加入 {text}

广播 sfx: delete waypoint

将 {edited waypoint} 设为

将 {delete waypoint?} 设为 0

 

当接收到 ! reset

执行 set map discovery to 0

 

当接收到 save player map

执行 rematch explored length

 

定义 // {comment}

 

执行 set map discovery to 0

 

定义 get geometry for chunk {i}

将 (1 + {map data} 的项目数) 加入 {map pointers}

将 {count} 设为 0

将 {iy} 设为 ({# chunk size} * {existing chunks y} 的第 {i} 项)

重复执行 {# chunk size} 次

将 {ix} 设为 ({# chunk size} * {existing chunks x} 的第 {i} 项)

重复执行 {# chunk size} 次

执行 get tile type at {ix} {iy}

如果 ({tile type} = ) 不成立 那么

执行 check

将 {ix} 增加 1

将 {iy} 增加 1

将 {count} 加入 {map lengths}

 

定义 render waypoints and lost subs

如果 ({show waypoints?} = 1) 那么

将 {i} 设为 1

重复执行 ({waypoints} 的项目数 / 4) 次

换成 waypoint 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {i}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {i}) 项 - {player map y}))

图章

如果 (({map hover} = ) 与 ({place new waypoint on map?} = 0)) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 waypoint

将 {map hover index} 设为 {i}

换成 waypoint2 造型

图章

将 {i} 增加 4

执行 //

将 {i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {i} 项 = #) 那么

如果 (1 = {lost sub data} 的第 (7 + {i}) 项) 那么

换成 lost sub 造型

将 颜色 特效设定为 {lost sub data} 的第 (6 + {i}) 项

移到 x:(({player map scale} * {# tile size}) * ({lost sub data} 的第 (2 + {i}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({lost sub data} 的第 (3 + {i}) 项 - {player map y}))

图章

如果 (({map hover} = ) 与 ({place new waypoint on map?} = 0)) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 lost sub

将 {map hover index} 设为 {i}

换成 waypoint2 造型

图章

将 {i} 增加 8

将 {i} 增加 1

 

定义 motion

将 {player map x} 增加 ((0.4 * (按下 d 键? - 按下 a 键?)) / {player map scale})

将 {player map y} 增加 ((0.4 * (按下 w 键? - 按下 s 键?)) / {player map scale})

如果 ({player map y} < -800) 那么

将 {player map y} 设为 -800

否则

如果 ({player map y} > 0) 那么

将 {player map y} 设为 0

如果 ({player map x} < -200) 那么

将 {player map x} 设为 -200

否则

如果 ({player map x} > 200) 那么

将 {player map x} 设为 200

 

定义 render map main

将笔的颜色设为#00ffff

将笔的粗细设为({player map scale} * {# tile size})

 

定义 render map decorations

将 颜色 特效设定为 {^ sub colour}

换成 player 造型

面向 darkness overlay 的 方向 方向

移到 x:(({player map scale} * {# tile size}) * ({x} - {player map x})) y:(({player map scale} * {# tile size}) * ({y} - {player map y}))

如果 ({^ sub mapper} > 0) 那么

换成 pulse 造型

将大小设为 ({player map scale} * (1200 + (2400 * (2000年至今的天数 * (86400 / 2)) 除以 1 的余数)))

将 虚像 特效设定为 (100 * (2000年至今的天数 * (86400 / 2)) 除以 1 的余数)

图章

将大小设为 100

换成 player 造型

将 虚像 特效设定为 0

图章

面向 90 方向

如果 ({map hover} = ) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 you

将 亮度 特效设定为 100

换成 waypoint2 造型

图章

移到 x:(({player map scale} * {# tile size}) * (0 - {player map x})) y:(({player map scale} * {# tile size}) * (0 - {player map y}))

将笔的颜色设为#ffffff

将笔的粗细设为8

落笔

抬笔

 

定义 get tile type at {x} {y}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({x} / {# chunk size})) 和 , 和 向下取整(({y} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为 void

否则

将 {tile type} 设为 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 check

执行 get tile type at ({ix} + 0) ({iy} + -1)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + 0) ({iy} + 1)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + -1) ({iy} + 0)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + 1) ({iy} + 0)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

 

定义 rematch explored length

如果 ({*1 chunk pointers} 的项目数 = {player map discovered} 的项目数) 不成立 那么

如果 ({player map discovered} 的项目数 > {*1 chunk pointers} 的项目数) 那么

重复执行 ({player map discovered} 的项目数 - {*1 chunk pointers} 的项目数) 次

删除 {player map discovered} 的第 {player map discovered} 的项目数 项

否则

重复执行 ({*1 chunk pointers} 的项目数 - {player map discovered} 的项目数) 次

将 0 加入 {player map discovered}

执行 ​​log​​

 

定义 render grid

换成 blank 造型

将大小设为 (1 / )

换成 icon 造型

执行 //

将 {# grid size} 设为 ({# chunk size} * {# tile size})

将笔的颜色设为#ffffff

将笔的透明度 设为 95

将笔的粗细设为1

将x坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map x} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((240 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将y坐标设为 400

落笔

将y坐标设为 -400

抬笔

将x坐标增加 ({player map scale} * {# grid size})

将y坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map y} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((180 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将x坐标设为 400

落笔

将x坐标设为 -400

抬笔

将y坐标增加 ({player map scale} * {# grid size})

执行 //

将 {# grid size} 设为 (4 * ({# chunk size} * {# tile size}))

将笔的颜色设为#ffffff

将笔的透明度 设为 80

将笔的粗细设为1

将x坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map x} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((240 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将y坐标设为 400

落笔

将y坐标设为 -400

抬笔

将x坐标增加 ({player map scale} * {# grid size})

将y坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map y} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((180 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将x坐标设为 400

落笔

将x坐标设为 -400

抬笔

将y坐标增加 ({player map scale} * {# grid size})

执行 //

将大小设为 100

 

定义 render water

如果 那么

执行 // end barriers

将笔的颜色设为#14182b

将笔的粗细设为1

移到 x:(({player map scale} * {# tile size}) * (-208 - {player map x})) y:(({player map scale} * {# tile size}) * (-35 - {player map y}))

落笔

将y坐标设为 (({player map scale} * {# tile size}) * (0 - {player map y}))

抬笔

将x坐标设为 (({player map scale} * {# tile size}) * (208 - {player map x}))

落笔

将y坐标设为 (({player map scale} * {# tile size}) * (-27 - {player map y}))

抬笔

执行 //

换成 sky 造型

移到 x:0 y:(({player map scale} * {# tile size}) * (0 - {player map y}))

图章

将笔的颜色设为#e6f9ff

移到 x:-240 y:(({player map scale} * {# tile size}) * (0 - {player map y}))

落笔

将x坐标设为 240

抬笔

执行 //

 

定义 set map discovery to {value}

删除 {player map discovered} 的全部项目

重复执行 {map pointers} 的项目数 次

将 (0 + {value}) 加入 {player map discovered}

 

定义 check exploration of chunk at tile {x} {y}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 (0 = {player map discovered} 的第 {index} 项) 那么

将 {player map discovered} 的第 {index} 项替换为 1

 

定义 render waypoint edit

将 {delete waypoint?} 设为 0

如果 ({edited waypoint} = ) 不成立 那么

清除图形特效

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {edited waypoint}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {edited waypoint}) 项 - {player map y}))

换成 hue circle 造型

将大小设为 200

图章

将 颜色 特效设定为 {waypoints} 的第 {edited waypoint} 项

换成 waypoint 造型

图章

换成 delete waypoint 造型

如果 碰到 鼠标指针? 那么

换成 delete waypoint visible 造型

图章

将 {delete waypoint?} 设为 1

将大小设为 100

如果 ({place new waypoint on map?} = 1) 那么

清除图形特效

换成 waypoint 造型

将 颜色 特效设定为 {^ sub colour}

移到 鼠标指针

图章

 

当按下 ↑ 键

如果 ({player map?} = 1) 那么

将 {player map scale} 设为 ({player map scale} * 1.2)

如果 ({player map scale} > 0.5) 那么

将 {player map scale} 设为 0.5

 

当按下 ↓ 键

如果 ({player map?} = 1) 那么

将 {player map scale} 设为 ({player map scale} / 1.2)

如果 ({player map scale} < 0.05) 那么

将 {player map scale} 设为 0.05

 

当接收到 toggle player map

如果 ({$ editor} = ) 那么

如果 (({sub lift state} = ) 或 ({sub lift state} = released)) 那么

如果 ({screen} = world) 那么

如果 ({player map?} = 1) 那么

将 {player map?} 设为 0

将 {place new waypoint on map?} 设为 0

否则

如果 ({sub loss reason} = ) 那么

执行 rematch explored length

将 {player map?} 设为 1

将 {player map x} 设为 {cam x}

将 {player map y} 设为 {cam y}

将 {player map scale} 设为 0.1

将 {show inventory?} 设为 0

将 {black cover} 设为 50

将 {edited waypoint} 设为

将 {place new waypoint on map?} 设为 0

否则

如果 {text} 包含 no power! ? 不成立 那么

将 no power! 加入 {text}

将 5 加入 {text}

 

当接收到 render player map

将 {map hover} 设为

将 {map hover index} 设为 0

如果 ({player map?} = 1) 那么

清除图形特效

执行 motion

执行 render map main

执行 render grid

执行 render water

执行 render waypoints and lost subs

执行 render map decorations

执行 render waypoint edit

换成 icon 造型

 

当接收到 ! reset

执行 set map discovery to 0

 

当接收到 explore player map

如果 ({^ sub mapper} > 0) 那么

如果 ({sub lift state} = ) 那么

执行 check exploration of chunk at tile (8 + {x}) ( + {y})

执行 check exploration of chunk at tile (-8 + {x}) ( + {y})

执行 check exploration of chunk at tile ( + {x}) (8 + {y})

执行 check exploration of chunk at tile ( + {x}) (-8 + {y})

如果 ({^ sub mapper} > 1) 那么

执行 check exploration of chunk at tile (8 + {x}) (8 + {y})

执行 check exploration of chunk at tile (8 + {x}) (-8 + {y})

执行 check exploration of chunk at tile (-8 + {x}) (8 + {y})

执行 check exploration of chunk at tile (-8 + {x}) (-8 + {y})

 

当接收到 save player map

执行 rematch explored length

 

当接收到 stage clicked

如果 ({place new waypoint on map?} = 1) 那么

如果 ({hovered function button} = ) 那么

将 {place new waypoint on map?} 设为 0

将 {i} 设为 {text} 中第一个 click on the map to place a new waypoint 的编号

如果 ({i} > 0) 那么

删除 {text} 的第 {i} 项

删除 {text} 的第 {i} 项

将 {^ sub colour} 加入 {waypoints}

将 连接 连接 向下取整(向下取整(({player map x} + (鼠标的x坐标 / ({player map scale} * {# tile size}))))) 和 _ 和 向下取整(向下取整(({player map y} + (鼠标的y坐标 / ({player map scale} * {# tile size}))))) 加入 {waypoints}

将 向下取整(({player map x} + (鼠标的x坐标 / ({player map scale} * {# tile size})))) 加入 {waypoints}

将 向下取整(({player map y} + (鼠标的y坐标 / ({player map scale} * {# tile size})))) 加入 {waypoints}

将 waypoint added 加入 {text}

将 3 加入 {text}

广播 sfx: add waypoint

否则

如果 ({map hover} = waypoint) 那么

将 {edited waypoint} 设为 {map hover index}

重复执行直到 按下鼠标? 不成立

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {edited waypoint}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {edited waypoint}) 项 - {player map y}))

面向 鼠标指针

如果 (到 鼠标指针 的距离 > 5) 那么

将 {waypoints} 的第 {edited waypoint} 项替换为 四舍五入((200 * (方向 / 360)))

面向 90 方向

如果 ({delete waypoint?} = 1) 那么

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

删除 {waypoints} 的第 {edited waypoint} 项

将 waypoint deleted 加入 {text}

将 3 加入 {text}

广播 sfx: delete waypoint

将 {edited waypoint} 设为

将 {delete waypoint?} 设为 0

 

定义 // {comment}

 

定义 render map decorations

将 颜色 特效设定为 {^ sub colour}

换成 player 造型

面向 darkness overlay 的 方向 方向

移到 x:(({player map scale} * {# tile size}) * ({x} - {player map x})) y:(({player map scale} * {# tile size}) * ({y} - {player map y}))

如果 ({^ sub mapper} > 0) 那么

换成 pulse 造型

将大小设为 ({player map scale} * (1200 + (2400 * (2000年至今的天数 * (86400 / 2)) 除以 1 的余数)))

将 虚像 特效设定为 (100 * (2000年至今的天数 * (86400 / 2)) 除以 1 的余数)

图章

将大小设为 100

换成 player 造型

将 虚像 特效设定为 0

图章

面向 90 方向

如果 ({map hover} = ) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 you

将 亮度 特效设定为 100

换成 waypoint2 造型

图章

移到 x:(({player map scale} * {# tile size}) * (0 - {player map x})) y:(({player map scale} * {# tile size}) * (0 - {player map y}))

将笔的颜色设为#ffffff

将笔的粗细设为8

落笔

抬笔

 

定义 render map main

将笔的颜色设为#00ffff

将笔的粗细设为({player map scale} * {# tile size})

 

定义 get tile type at {x} {y}

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 向下取整(({x} / {# chunk size})) 和 , 和 向下取整(({y} / {# chunk size})) 的编号

如果 ({index} = 0) 那么

将 {tile type} 设为 void

否则

将 {tile type} 设为 {chunk data} 的第 ((({y} 除以 {# chunk size} 的余数 * {# chunk size}) + {x} 除以 {# chunk size} 的余数) + {*1 chunk pointers} 的第 {index} 项) 项

 

定义 check

执行 get tile type at ({ix} + 0) ({iy} + -1)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + 0) ({iy} + 1)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + -1) ({iy} + 0)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

执行 get tile type at ({ix} + 1) ({iy} + 0)

如果 ({tile type} = ) 那么

将 (0.5 + {ix}) 加入 {map data}

将 (0.5 + {iy}) 加入 {map data}

将 {count} 增加 1

停止 这个脚本

 

定义 generate map cache

删除 {map data} 的全部项目

删除 {map pointers} 的全部项目

删除 {map lengths} 的全部项目

执行 set map discovery to 0

 

定义 get geometry for chunk {i}

将 (1 + {map data} 的项目数) 加入 {map pointers}

将 {count} 设为 0

将 {iy} 设为 ({# chunk size} * {existing chunks y} 的第 {i} 项)

重复执行 {# chunk size} 次

将 {ix} 设为 ({# chunk size} * {existing chunks x} 的第 {i} 项)

重复执行 {# chunk size} 次

执行 get tile type at {ix} {iy}

如果 ({tile type} = ) 不成立 那么

执行 check

将 {ix} 增加 1

将 {iy} 增加 1

将 {count} 加入 {map lengths}

 

定义 set map discovery to {value}

删除 {player map discovered} 的全部项目

重复执行 {map pointers} 的项目数 次

将 (0 + {value}) 加入 {player map discovered}

 

定义 check exploration of chunk at tile {x} {y}

将 {chunk x} 设为 向下取整(({x} / {# chunk size}))

将 {chunk y} 设为 向下取整(({y} / {# chunk size}))

将 {index} 设为 {*0 existing chunks} 中第一个 连接 连接 {chunk x} 和 , 和 {chunk y} 的编号

如果 (0 = {player map discovered} 的第 {index} 项) 那么

将 {player map discovered} 的第 {index} 项替换为 1

 

定义 rematch explored length

如果 ({*1 chunk pointers} 的项目数 = {player map discovered} 的项目数) 不成立 那么

如果 ({player map discovered} 的项目数 > {*1 chunk pointers} 的项目数) 那么

重复执行 ({player map discovered} 的项目数 - {*1 chunk pointers} 的项目数) 次

删除 {player map discovered} 的第 {player map discovered} 的项目数 项

否则

重复执行 ({*1 chunk pointers} 的项目数 - {player map discovered} 的项目数) 次

将 0 加入 {player map discovered}

执行 ​​log​​

 

定义 render water

如果 那么

执行 // end barriers

将笔的颜色设为#14182b

将笔的粗细设为1

移到 x:(({player map scale} * {# tile size}) * (-208 - {player map x})) y:(({player map scale} * {# tile size}) * (-35 - {player map y}))

落笔

将y坐标设为 (({player map scale} * {# tile size}) * (0 - {player map y}))

抬笔

将x坐标设为 (({player map scale} * {# tile size}) * (208 - {player map x}))

落笔

将y坐标设为 (({player map scale} * {# tile size}) * (-27 - {player map y}))

抬笔

执行 //

换成 sky 造型

移到 x:0 y:(({player map scale} * {# tile size}) * (0 - {player map y}))

图章

将笔的颜色设为#e6f9ff

移到 x:-240 y:(({player map scale} * {# tile size}) * (0 - {player map y}))

落笔

将x坐标设为 240

抬笔

执行 //

 

定义 render grid

换成 blank 造型

将大小设为 (1 / )

换成 icon 造型

执行 //

将 {# grid size} 设为 ({# chunk size} * {# tile size})

将笔的颜色设为#ffffff

将笔的透明度 设为 95

将笔的粗细设为1

将x坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map x} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((240 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将y坐标设为 400

落笔

将y坐标设为 -400

抬笔

将x坐标增加 ({player map scale} * {# grid size})

将y坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map y} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((180 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将x坐标设为 400

落笔

将x坐标设为 -400

抬笔

将y坐标增加 ({player map scale} * {# grid size})

执行 //

将 {# grid size} 设为 (4 * ({# chunk size} * {# tile size}))

将笔的颜色设为#ffffff

将笔的透明度 设为 80

将笔的粗细设为1

将x坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map x} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((240 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将y坐标设为 400

落笔

将y坐标设为 -400

抬笔

将x坐标增加 ({player map scale} * {# grid size})

将y坐标设为 (0 - ({player map scale} * ({# grid size} * (({player map y} / ({# grid size} / {# tile size})) 除以 1 的余数 + 向下取整(((180 / {player map scale}) / {# grid size}))))))

重复执行 (1 + 向上取整((480 / ({player map scale} * {# grid size})))) 次

将x坐标设为 400

落笔

将x坐标设为 -400

抬笔

将y坐标增加 ({player map scale} * {# grid size})

执行 //

将大小设为 100

 

定义 motion

将 {player map x} 增加 ((0.4 * (按下 d 键? - 按下 a 键?)) / {player map scale})

将 {player map y} 增加 ((0.4 * (按下 w 键? - 按下 s 键?)) / {player map scale})

如果 ({player map y} < -800) 那么

将 {player map y} 设为 -800

否则

如果 ({player map y} > 0) 那么

将 {player map y} 设为 0

如果 ({player map x} < -200) 那么

将 {player map x} 设为 -200

否则

如果 ({player map x} > 200) 那么

将 {player map x} 设为 200

 

定义 render waypoints and lost subs

如果 ({show waypoints?} = 1) 那么

将 {i} 设为 1

重复执行 ({waypoints} 的项目数 / 4) 次

换成 waypoint 造型

将 颜色 特效设定为 {waypoints} 的第 {i} 项

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {i}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {i}) 项 - {player map y}))

图章

如果 (({map hover} = ) 与 ({place new waypoint on map?} = 0)) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 waypoint

将 {map hover index} 设为 {i}

换成 waypoint2 造型

图章

将 {i} 增加 4

执行 //

将 {i} 设为 1

重复执行 {lost sub data} 的项目数 次

如果 ({lost sub data} 的第 {i} 项 = #) 那么

如果 (1 = {lost sub data} 的第 (7 + {i}) 项) 那么

换成 lost sub 造型

将 颜色 特效设定为 {lost sub data} 的第 (6 + {i}) 项

移到 x:(({player map scale} * {# tile size}) * ({lost sub data} 的第 (2 + {i}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({lost sub data} 的第 (3 + {i}) 项 - {player map y}))

图章

如果 (({map hover} = ) 与 ({place new waypoint on map?} = 0)) 那么

如果 (到 鼠标指针 的距离 < 10) 那么

将 {map hover} 设为 lost sub

将 {map hover index} 设为 {i}

换成 waypoint2 造型

图章

将 {i} 增加 8

将 {i} 增加 1

 

定义 render waypoint edit

将 {delete waypoint?} 设为 0

如果 ({edited waypoint} = ) 不成立 那么

清除图形特效

移到 x:(({player map scale} * {# tile size}) * ({waypoints} 的第 (2 + {edited waypoint}) 项 - {player map x})) y:(({player map scale} * {# tile size}) * ({waypoints} 的第 (3 + {edited waypoint}) 项 - {player map y}))

换成 hue circle 造型

将大小设为 200

图章

将 颜色 特效设定为 {waypoints} 的第 {edited waypoint} 项

换成 waypoint 造型

图章

换成 delete waypoint 造型

如果 碰到 鼠标指针? 那么

换成 delete waypoint visible 造型

图章

将 {delete waypoint?} 设为 1

将大小设为 100

如果 ({place new waypoint on map?} = 1) 那么

清除图形特效

换成 waypoint 造型

将 颜色 特效设定为 {^ sub colour}

移到 鼠标指针

图章

 

fish bounds

代码

当 绿旗 被点击

隐藏

 

当接收到 fish: show bounds

移到 x:0 y:0

将 虚像 特效设定为 50

显示

 

当接收到 fish: end arrangement

隐藏

 

当 绿旗 被点击

隐藏

 

当接收到 fish: show bounds

移到 x:0 y:0

将 虚像 特效设定为 50

显示

 

当接收到 fish: end arrangement

隐藏

 

end

代码

当 绿旗 被点击

换成 squid0001 造型

将 {start anim number} 设为 造型编号

换成 icon 造型

将大小设为 200

隐藏

 

当接收到 update fish

执行 movement

清除图形特效

换成 icon 造型

将大小设为 10000

移到 x:({# tile size} * ({squid x} - {cam x})) y:({# tile size} * ({squid y} - {cam y}))

如果 ({end animation state} = chasing) 那么

换成 squid0001 造型

将 亮度 特效设定为 ({squid y} - {y})

将大小设为 200

图章

否则

换成 向下取整({animation frame}) 造型

将大小设为 200

图章

换成 icon 造型

 

当接收到 ! reset

换成 squid0001 造型

将 {start anim number} 设为 造型编号

将 {squid x} 设为 62

将 {squid y} 设为 -900

将 {animation frame} 设为 {start anim number}

换成 icon 造型

 

当接收到 stage clicked

如果 ({screen} = credits) 那么

如果 ({credits timer} > 37) 那么

广播 deposit items in ship

将 {battery} 设为 10

将 {health} 设为 10

将 {x} 设为 0

将 {y} 设为 -3

将 {sub lift state} 设为 lifted

将 {end animation state} 设为 waiting

将 {game complete?} 设为 1

等待 按下鼠标? 不成立

将 {screen} 设为 menu

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

当接收到 render world text

如果 ({end animation state} = holding) 那么

清除图形特效

移到 x:0 y:0

将 虚像 特效设定为 0

如果 ({animation frame} < 18) 那么

换成 corrupt2 造型

否则

如果 ({animation frame} < 20) 那么

换成 corrupt3 造型

否则

换成 corrupt4 造型

将大小设为 100

图章

清除图形特效

如果 ({end animation state} = ) 那么

如果 ({credits timer} < 0.1) 那么

移到 x:0 y:在 -5 和 5 之间取随机数

换成 corrupt 造型

否则

移到 x:0 y:0

换成 connection 造型

将大小设为 100

图章

换成 icon 造型

 

当接收到 run credits

清除图形特效

移到 x:0 y:0

换成 icon 造型

将大小设为 100

执行 display end bg between 12 Infinity with fade 10

执行 display c title between 1 5 with fade 0.5

执行 display c name between 7 10 with fade 0.5

将 亮度 特效设定为 100

执行 display c music between 11.5 16.5 with fade 0.1

如果 ((12 < {credits timer}) 与 ({credits timer} < 16)) 那么

广播 credits text: music

执行 display c sfx between 18 26.5 with fade 0.1

如果 ((18.5 < {credits timer}) 与 ({credits timer} < 26)) 那么

广播 credits text: sfx

执行 display c art between 28 33 with fade 0.1

如果 ((28.5 < {credits timer}) 与 ({credits timer} < 32.5)) 那么

广播 credits text: art

将 亮度 特效设定为 100

执行 display finish between 34.5 Infinity with fade 0.2

如果 ({credits timer} > 35) 那么

广播 render credits stats

将 亮度 特效设定为 100

执行 display continue end between 37 Infinity with fade 0.2

将 {credits timer} 增加 {Δt}

 

定义 // {comment}

 

定义 display {name} between {start} {end} with fade {fade}

换成 {name} 造型

如果 ({credits timer} < {start}) 那么

将 虚像 特效设定为 (({start} - {credits timer}) * (100 / {fade}))

否则

如果 ({credits timer} > {end}) 那么

将 虚像 特效设定为 (({credits timer} - {end}) * (100 / {fade}))

否则

将 虚像 特效设定为 0

图章

 

定义 map range {val} | {in min} {in max} {out min} {out max}

将 {return} 设为 ({out min} + (({out max} - {out min}) * (({val} - {in min}) / ({in max} - {in min}))))

 

定义 movement

如果 ({end animation state} = waiting) 那么

如果 ({y} < -820) 那么

将 {squid x} 设为 {x}

将 {squid y} 设为 ({y} - 15)

将 {end animation state} 设为 chasing

播放声音 NMS fish attack

否则

如果 ({end animation state} = chasing) 那么

如果 (({y} - {squid y}) > 0) 那么

将 {squid vy} 设为 8

将 {squid y} 增加 ({Δt} * {squid vy})

将 {squid x} 设为 {x}

否则

将 {end animation state} 设为 holding

将 {animation frame} 设为 {start anim number}

播放声音 damage (hit long) low

否则

如果 ({end animation state} = holding) 那么

将 {animation frame} 增加 ({Δt} * 50)

将 {y} 设为 ({squid y} + 0)

将 {squid x} 设为 {x}

将 {squid vy} 增加 ({Δt} * -5)

将 {squid y} 增加 ({Δt} * {squid vy})

如果 ({animation frame} > ({start anim number} + 33)) 那么

将 {animation frame} 设为 ({start anim number} + 33)

将 {end animation state} 设为 pulling

将 {grab timer} 设为 0

否则

如果 ({end animation state} = pulling) 那么

将 {grab timer} 增加 {Δt}

将 {squid vy} 增加 ({Δt} * -5)

如果 ({squid vy} < -20) 那么

将 {squid vy} 增加 -20

将 {squid y} 增加 ({Δt} * {squid vy})

将 {vx} 设为 0

将 {vy} 设为 0

将 {y} 设为 ({squid y} + 0)

如果 ((({cam y} - {squid y}) > 15) 或 ({grab timer} > 4)) 那么

将 {end animation state} 设为

将 {credits timer} 设为 0

广播 end music

播放声音 end error

否则

如果 ({end animation state} = ) 那么

将 {credits timer} 增加 {Δt}

如果 ({credits timer} > 4.5) 那么

将 {screen} 设为 credits

将 {credits timer} 设为 0

将 {black cover} 设为 100

清除图形特效

播放声音 OSC - Ambient Time - 05 Time Room 30 sec

 

当 绿旗 被点击

换成 squid0001 造型

将 {start anim number} 设为 造型编号

换成 icon 造型

将大小设为 200

隐藏

 

当接收到 render world text

如果 ({end animation state} = holding) 那么

清除图形特效

移到 x:0 y:0

将 虚像 特效设定为 0

如果 ({animation frame} < 18) 那么

换成 corrupt2 造型

否则

如果 ({animation frame} < 20) 那么

换成 corrupt3 造型

否则

换成 corrupt4 造型

将大小设为 100

图章

清除图形特效

如果 ({end animation state} = ) 那么

如果 ({credits timer} < 0.1) 那么

移到 x:0 y:在 -5 和 5 之间取随机数

换成 corrupt 造型

否则

移到 x:0 y:0

换成 connection 造型

将大小设为 100

图章

换成 icon 造型

 

当接收到 run credits

清除图形特效

移到 x:0 y:0

换成 icon 造型

将大小设为 100

执行 display end bg between 12 Infinity with fade 10

执行 display c title between 1 5 with fade 0.5

执行 display c name between 7 10 with fade 0.5

将 亮度 特效设定为 100

执行 display c music between 11.5 16.5 with fade 0.1

如果 ((12 < {credits timer}) 与 ({credits timer} < 16)) 那么

广播 credits text: music

执行 display c sfx between 18 26.5 with fade 0.1

如果 ((18.5 < {credits timer}) 与 ({credits timer} < 26)) 那么

广播 credits text: sfx

执行 display c art between 28 33 with fade 0.1

如果 ((28.5 < {credits timer}) 与 ({credits timer} < 32.5)) 那么

广播 credits text: art

将 亮度 特效设定为 100

执行 display finish between 34.5 Infinity with fade 0.2

如果 ({credits timer} > 35) 那么

广播 render credits stats

将 亮度 特效设定为 100

执行 display continue end between 37 Infinity with fade 0.2

将 {credits timer} 增加 {Δt}

 

当接收到 update fish

执行 movement

清除图形特效

换成 icon 造型

将大小设为 10000

移到 x:({# tile size} * ({squid x} - {cam x})) y:({# tile size} * ({squid y} - {cam y}))

如果 ({end animation state} = chasing) 那么

换成 squid0001 造型

将 亮度 特效设定为 ({squid y} - {y})

将大小设为 200

图章

否则

换成 向下取整({animation frame}) 造型

将大小设为 200

图章

换成 icon 造型

 

当接收到 ! reset

换成 squid0001 造型

将 {start anim number} 设为 造型编号

将 {squid x} 设为 62

将 {squid y} 设为 -900

将 {animation frame} 设为 {start anim number}

换成 icon 造型

 

当接收到 stage clicked

如果 ({screen} = credits) 那么

如果 ({credits timer} > 37) 那么

广播 deposit items in ship

将 {battery} 设为 10

将 {health} 设为 10

将 {x} 设为 0

将 {y} 设为 -3

将 {sub lift state} 设为 lifted

将 {end animation state} 设为 waiting

将 {game complete?} 设为 1

等待 按下鼠标? 不成立

将 {screen} 设为 menu

 

当接收到 update audio

将音量设为 ({sfx volume fac} * 100)%

 

定义 // {comment}

 

定义 movement

如果 ({end animation state} = waiting) 那么

如果 ({y} < -820) 那么

将 {squid x} 设为 {x}

将 {squid y} 设为 ({y} - 15)

将 {end animation state} 设为 chasing

播放声音 NMS fish attack

否则

如果 ({end animation state} = chasing) 那么

如果 (({y} - {squid y}) > 0) 那么

将 {squid vy} 设为 8

将 {squid y} 增加 ({Δt} * {squid vy})

将 {squid x} 设为 {x}

否则

将 {end animation state} 设为 holding

将 {animation frame} 设为 {start anim number}

播放声音 damage (hit long) low

否则

如果 ({end animation state} = holding) 那么

将 {animation frame} 增加 ({Δt} * 50)

将 {y} 设为 ({squid y} + 0)

将 {squid x} 设为 {x}

将 {squid vy} 增加 ({Δt} * -5)

将 {squid y} 增加 ({Δt} * {squid vy})

如果 ({animation frame} > ({start anim number} + 33)) 那么

将 {animation frame} 设为 ({start anim number} + 33)

将 {end animation state} 设为 pulling

将 {grab timer} 设为 0

否则

如果 ({end animation state} = pulling) 那么

将 {grab timer} 增加 {Δt}

将 {squid vy} 增加 ({Δt} * -5)

如果 ({squid vy} < -20) 那么

将 {squid vy} 增加 -20

将 {squid y} 增加 ({Δt} * {squid vy})

将 {vx} 设为 0

将 {vy} 设为 0

将 {y} 设为 ({squid y} + 0)

如果 ((({cam y} - {squid y}) > 15) 或 ({grab timer} > 4)) 那么

将 {end animation state} 设为

将 {credits timer} 设为 0

广播 end music

播放声音 end error

否则

如果 ({end animation state} = ) 那么

将 {credits timer} 增加 {Δt}

如果 ({credits timer} > 4.5) 那么

将 {screen} 设为 credits

将 {credits timer} 设为 0

将 {black cover} 设为 100

清除图形特效

播放声音 OSC - Ambient Time - 05 Time Room 30 sec

 

定义 map range {val} | {in min} {in max} {out min} {out max}

将 {return} 设为 ({out min} + (({out max} - {out min}) * (({val} - {in min}) / ({in max} - {in min}))))

 

定义 display {name} between {start} {end} with fade {fade}

换成 {name} 造型

如果 ({credits timer} < {start}) 那么

将 虚像 特效设定为 (({start} - {credits timer}) * (100 / {fade}))

否则

如果 ({credits timer} > {end}) 那么

将 虚像 特效设定为 (({credits timer} - {end}) * (100 / {fade}))

否则

将 虚像 特效设定为 0

图章