@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgAlley,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgAlley,
|
||||
Path: "assets/bg/alley.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgBBSTerminal,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgBBSTerminal,
|
||||
Path: "assets/bg/bbs_terminal.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgBVKBranch,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgBVKBranch,
|
||||
Path: "assets/bg/bvk_branch.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgColumbarium,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgColumbarium,
|
||||
Path: "assets/bg/columbarium.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgCuratorShop,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgCuratorShop,
|
||||
Path: "assets/bg/curator_shop.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgHackerspace,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgHackerspace,
|
||||
Path: "assets/bg/hackerspace.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgHospital,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgHospital,
|
||||
Path: "assets/bg/hospital.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgIceCreamShop,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgIceCreamShop,
|
||||
Path: "assets/bg/ice_cream_shop.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,7 +1,9 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Background = inkwell.Asset
|
||||
|
||||
var Manager = inkwell.NewManager[Background]()
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgNoodleHouse,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgNoodleHouse,
|
||||
Path: "assets/bg/noodle_house.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgNormanApartment,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgNormanApartment,
|
||||
Path: "assets/bg/norman_apartment.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgPaulShop,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgPaulShop,
|
||||
Path: "assets/bg/paul_shop.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgPoliceStation,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgPoliceStation,
|
||||
Path: "assets/bg/police_station.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgPublicBBS,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgPublicBBS,
|
||||
Path: "assets/bg/public_bbs.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgRooftopHideout,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgRooftopHideout,
|
||||
Path: "assets/bg/rooftop_hideout.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgSamizdatPress,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgSamizdatPress,
|
||||
Path: "assets/bg/samizdat_press.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgScrapMarket,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgScrapMarket,
|
||||
Path: "assets/bg/scrap_market.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgSecretClub,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgSecretClub,
|
||||
Path: "assets/bg/secret_club.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgSecretLab,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgSecretLab,
|
||||
Path: "assets/bg/secret_lab.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgSelector,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgSelector,
|
||||
Path: "assets/bg/selector.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgServerFarm,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgServerFarm,
|
||||
Path: "assets/bg/server_farm.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgShowroom,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgShowroom,
|
||||
Path: "assets/bg/showroom.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgSmallRestaurant,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgSmallRestaurant,
|
||||
Path: "assets/bg/small_restaurant.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgStreet,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgStreet,
|
||||
Path: "assets/bg/street.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
@@ -1,12 +1,13 @@
|
||||
package inc
|
||||
package background
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
BackgroundManager.Register(Background{
|
||||
Name: BgTrinketShop,
|
||||
Manager.Register(Background{
|
||||
Name: inc.BgTrinketShop,
|
||||
Path: "assets/bg/trinket_shop.png",
|
||||
Kind: inkwell.AssetImage,
|
||||
})
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
var (
|
||||
BackgroundManager = inkwell.NewManager[Background]()
|
||||
CharacterManager = inkwell.NewManager[Character]()
|
||||
DialogManager = inkwell.NewManager[Dialog]()
|
||||
ItemManager = inkwell.NewManager[Item]()
|
||||
SceneManager = inkwell.NewManager[Scene]()
|
||||
ScriptManager = inkwell.NewManager[Script]()
|
||||
TapeManager = inkwell.NewManager[Tape]()
|
||||
ThemeManager = inkwell.NewManager[Theme]()
|
||||
WidgetManager = inkwell.NewManager[Widget]()
|
||||
)
|
||||
|
||||
type Opts struct {
|
||||
Scene string
|
||||
Finale bool
|
||||
}
|
||||
|
||||
func New(o Opts) *inkwell.Game {
|
||||
start := o.Scene
|
||||
if start == "" {
|
||||
start = SceneAlley
|
||||
}
|
||||
|
||||
fillSelectorPins()
|
||||
|
||||
g := inkwell.NewGame("Real World", ScreenW, ScreenH)
|
||||
g.MaxLogLines = 64
|
||||
g.WindowScale = 2
|
||||
g.SceneRect = inkwell.Rect(0, TopBarH, ScreenW, HUDTop-TopBarH)
|
||||
g.Player = Paul
|
||||
g.Walkboxes = sceneFloor
|
||||
g.ExitLook = func(e inkwell.Exit) inkwell.Action {
|
||||
return inkwell.Say(Paul, "That way: "+e.Label+".")
|
||||
}
|
||||
g.ExitTake = func(inkwell.Exit) inkwell.Action {
|
||||
return inkwell.Say(Paul, "It's a way out, not a thing.")
|
||||
}
|
||||
g.UseWithFail = useWithFail
|
||||
|
||||
g.AssetManager = BackgroundManager
|
||||
g.CharacterManager = CharacterManager
|
||||
g.DialogueManager = DialogManager
|
||||
g.ItemManager = ItemManager
|
||||
g.SceneManager = SceneManager
|
||||
g.ScriptManager = ScriptManager
|
||||
g.WidgetManager = WidgetManager
|
||||
ThemeManager.Each(g.ThemeManager.Register)
|
||||
|
||||
World.attach(g)
|
||||
g.UseTheme(RealWorld)
|
||||
|
||||
g.StartAt(start)
|
||||
g.OnStart(ScriptOpening)
|
||||
if o.Finale {
|
||||
g.OnFinale(ScriptFinale)
|
||||
}
|
||||
return g
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package boot
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/background"
|
||||
"git.teletypegames.org/games/realworld/inc/character"
|
||||
"git.teletypegames.org/games/realworld/inc/dialog"
|
||||
"git.teletypegames.org/games/realworld/inc/item"
|
||||
"git.teletypegames.org/games/realworld/inc/scene"
|
||||
"git.teletypegames.org/games/realworld/inc/script"
|
||||
_ "git.teletypegames.org/games/realworld/inc/tape"
|
||||
"git.teletypegames.org/games/realworld/inc/theme"
|
||||
"git.teletypegames.org/games/realworld/inc/widget"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
type Opts struct {
|
||||
Scene string
|
||||
Finale bool
|
||||
}
|
||||
|
||||
func New(o Opts) *inkwell.Game {
|
||||
start := o.Scene
|
||||
if start == "" {
|
||||
start = inc.SceneAlley
|
||||
}
|
||||
|
||||
scene.FillSelectorPins()
|
||||
|
||||
g := inkwell.NewGame("Real World", widget.ScreenW, widget.ScreenH)
|
||||
g.MaxLogLines = 64
|
||||
g.WindowScale = 2
|
||||
g.SceneRect = inkwell.Rect(0, widget.TopBarH, widget.ScreenW, widget.HUDTop-widget.TopBarH)
|
||||
g.Player = inc.Paul
|
||||
g.Walkboxes = scene.Floor
|
||||
g.ExitLook = func(e inkwell.Exit) inkwell.Action {
|
||||
return inkwell.Say(inc.Paul, "That way: "+e.Label+".")
|
||||
}
|
||||
g.ExitTake = func(inkwell.Exit) inkwell.Action {
|
||||
return inkwell.Say(inc.Paul, "It's a way out, not a thing.")
|
||||
}
|
||||
g.UseWithFail = script.UseWithFail
|
||||
|
||||
g.AssetManager = background.Manager
|
||||
g.CharacterManager = character.Manager
|
||||
g.DialogueManager = dialog.Manager
|
||||
g.ItemManager = item.Manager
|
||||
g.SceneManager = scene.Manager
|
||||
g.ScriptManager = script.Manager
|
||||
g.WidgetManager = widget.Manager
|
||||
theme.Manager.Each(g.ThemeManager.Register)
|
||||
|
||||
world.Attach(g)
|
||||
g.UseTheme(inc.RealWorld)
|
||||
|
||||
g.StartAt(start)
|
||||
g.OnStart(inc.ScriptOpening)
|
||||
if o.Finale {
|
||||
g.OnFinale(inc.ScriptFinale)
|
||||
}
|
||||
return g
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
CharacterManager.Register(Character{
|
||||
Name: Dex,
|
||||
Label: "DEX",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: Amber,
|
||||
})
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
CharacterManager.Register(Character{
|
||||
Name: TapeMystery,
|
||||
Label: "UNKNOWN TAPE",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: RGB(0xB9A98A),
|
||||
})
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
CharacterManager.Register(Character{
|
||||
Name: Paul,
|
||||
Speed: 96,
|
||||
W: 28,
|
||||
H: 68,
|
||||
Start: inkwell.Point{
|
||||
X: 320,
|
||||
Y: 232,
|
||||
},
|
||||
SpeechColor: Ink,
|
||||
})
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
CharacterManager.Register(Character{
|
||||
Name: TapeSupport,
|
||||
Label: "TECH SUPPORT",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: RGB(0xE8C86A),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package character
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/theme"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Character{
|
||||
Name: inc.Dex,
|
||||
Label: "DEX",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: theme.Amber,
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package inc
|
||||
package character
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Character = inkwell.Character
|
||||
|
||||
var Manager = inkwell.NewManager[Character]()
|
||||
@@ -0,0 +1,16 @@
|
||||
package character
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/theme"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Character{
|
||||
Name: inc.TapeMystery,
|
||||
Label: "UNKNOWN TAPE",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: theme.RGB(0xB9A98A),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package character
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/theme"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Character{
|
||||
Name: inc.Paul,
|
||||
Speed: 96,
|
||||
W: 28,
|
||||
H: 68,
|
||||
Start: inkwell.Point{
|
||||
X: 320,
|
||||
Y: 232,
|
||||
},
|
||||
SpeechColor: theme.Ink,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package character
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/theme"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Character{
|
||||
Name: inc.TapeSupport,
|
||||
Label: "TECH SUPPORT",
|
||||
Voice: inkwell.VoiceLog,
|
||||
SpeechColor: theme.RGB(0xE8C86A),
|
||||
})
|
||||
}
|
||||
@@ -14,6 +14,11 @@ const (
|
||||
ItemBlackArmilla = "black_market_armilla"
|
||||
)
|
||||
|
||||
const (
|
||||
RealWorld = "realworld-93"
|
||||
NokiaPunk = "nokia-punk"
|
||||
)
|
||||
|
||||
const (
|
||||
DlgDex = "dex_talk"
|
||||
DlgMysteryTape = "mystery_tape_silent"
|
||||
@@ -1,40 +1,41 @@
|
||||
package inc
|
||||
package dialog
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
DialogManager.Register(Dialog{
|
||||
Name: DlgDex,
|
||||
Manager.Register(Dialog{
|
||||
Name: inc.DlgDex,
|
||||
Start: "root",
|
||||
Nodes: []inkwell.DialogueNode{{
|
||||
Name: "root",
|
||||
Lines: []inkwell.DialogueLine{{
|
||||
Speaker: Dex,
|
||||
Speaker: inc.Dex,
|
||||
Text: "Talk.",
|
||||
}},
|
||||
Choices: []inkwell.DialogueChoice{
|
||||
{
|
||||
Text: "What am I doing here, Dex?",
|
||||
Actions: []inkwell.Action{
|
||||
inkwell.Say(Dex, "You got a letter from a man you hadn't seen in twenty years. And you came. That says more about you than it does about him."),
|
||||
inkwell.Say(inc.Dex, "You got a letter from a man you hadn't seen in twenty years. And you came. That says more about you than it does about him."),
|
||||
inkwell.GotoNode("root"),
|
||||
},
|
||||
},
|
||||
{
|
||||
Text: "What do you know about Noodle?",
|
||||
Show: inkwell.Not(inkwell.Flag(FlagHasTape)),
|
||||
Show: inkwell.Not(inkwell.Flag(inc.FlagHasTape)),
|
||||
Actions: []inkwell.Action{
|
||||
inkwell.Say(Dex, "He traded cracked Armillas. That isn't charity, Paul, that's a business. The kind they take you in for."),
|
||||
inkwell.Say(inc.Dex, "He traded cracked Armillas. That isn't charity, Paul, that's a business. The kind they take you in for."),
|
||||
inkwell.GotoNode("root"),
|
||||
},
|
||||
},
|
||||
{
|
||||
Text: "What do you make of this tape?",
|
||||
Show: inkwell.Flag(FlagHasTape),
|
||||
Show: inkwell.Flag(inc.FlagHasTape),
|
||||
Actions: []inkwell.Action{
|
||||
inkwell.Say(Dex, "I make of it that you found a password-locked tape in a gap between two bins, on a tip from a government office. Count how many times that has ended well."),
|
||||
inkwell.Say(inc.Dex, "I make of it that you found a password-locked tape in a gap between two bins, on a tip from a government office. Count how many times that has ended well."),
|
||||
inkwell.GotoNode("root"),
|
||||
},
|
||||
},
|
||||
@@ -42,7 +43,7 @@ func init() {
|
||||
Text: "I miss you.",
|
||||
Once: true,
|
||||
Actions: []inkwell.Action{
|
||||
inkwell.Say(Dex, "I'm four kilobytes of a dead man. Don't do this to yourself."),
|
||||
inkwell.Say(inc.Dex, "I'm four kilobytes of a dead man. Don't do this to yourself."),
|
||||
inkwell.GotoNode("root"),
|
||||
},
|
||||
},
|
||||
@@ -1,7 +1,9 @@
|
||||
package inc
|
||||
package dialog
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Dialog = inkwell.Dialogue
|
||||
|
||||
var Manager = inkwell.NewManager[Dialog]()
|
||||
@@ -1,24 +1,25 @@
|
||||
package inc
|
||||
package dialog
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
DialogManager.Register(Dialog{
|
||||
Name: DlgMysteryTape,
|
||||
Manager.Register(Dialog{
|
||||
Name: inc.DlgMysteryTape,
|
||||
Start: "root",
|
||||
Nodes: []inkwell.DialogueNode{{
|
||||
Name: "root",
|
||||
Lines: []inkwell.DialogueLine{{
|
||||
Speaker: Dex,
|
||||
Speaker: inc.Dex,
|
||||
Text: "Nothing. Warm, spinning, and silent.",
|
||||
}},
|
||||
Choices: []inkwell.DialogueChoice{
|
||||
{
|
||||
Text: "Are you sure it works?",
|
||||
Actions: []inkwell.Action{
|
||||
inkwell.Say(Dex, "It works. It just isn't talking to you. That is not the same as silence."),
|
||||
inkwell.Say(inc.Dex, "It works. It just isn't talking to you. That is not the same as silence."),
|
||||
inkwell.GotoNode("root"),
|
||||
},
|
||||
},
|
||||
@@ -1,22 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ItemManager.Register(Item{
|
||||
Name: ItemBlackArmilla,
|
||||
Description: "black-market Armilla",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(Paul, "Jailbroken. Pushes ads, but it was cheap."),
|
||||
inkwell.Say(Dex, "Two slots, and both of them lie about the temperature. Don't trade me in for it."),
|
||||
),
|
||||
OnUseWith: map[string]inkwell.Action{
|
||||
ItemNoodleLetter: inkwell.Seq(
|
||||
inkwell.Say(Paul, "A letter and a bracelet. Brilliant."),
|
||||
inkwell.Say(Dex, "Nothing. Which is what I'd charge for it."),
|
||||
),
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ItemManager.Register(Item{
|
||||
Name: ItemMysteryTape,
|
||||
Description: "unmarked Personal Tape",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(Paul, "Password-locked. Of course."),
|
||||
inkwell.Say(Dex, "Put it in the second slot if you care that much. I did warn you."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ItemManager.Register(Item{
|
||||
Name: ItemNoodleLetter,
|
||||
Description: "Noodle's letter",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(Paul, "“Come out, Paul. Not a phone conversation.” That's all it says."),
|
||||
inkwell.Say(Dex, "And now you're here. And he isn't."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Item{
|
||||
Name: inc.ItemBlackArmilla,
|
||||
Description: "black-market Armilla",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "Jailbroken. Pushes ads, but it was cheap."),
|
||||
inkwell.Say(inc.Dex, "Two slots, and both of them lie about the temperature. Don't trade me in for it."),
|
||||
),
|
||||
OnUseWith: map[string]inkwell.Action{
|
||||
inc.ItemNoodleLetter: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "A letter and a bracelet. Brilliant."),
|
||||
inkwell.Say(inc.Dex, "Nothing. Which is what I'd charge for it."),
|
||||
),
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package inc
|
||||
package item
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Item = inkwell.Item
|
||||
|
||||
var Manager = inkwell.NewManager[Item]()
|
||||
@@ -0,0 +1,17 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Item{
|
||||
Name: inc.ItemMysteryTape,
|
||||
Description: "unmarked Personal Tape",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "Password-locked. Of course."),
|
||||
inkwell.Say(inc.Dex, "Put it in the second slot if you care that much. I did warn you."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Item{
|
||||
Name: inc.ItemNoodleLetter,
|
||||
Description: "Noodle's letter",
|
||||
OnUseSelf: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "“Come out, Paul. Not a phone conversation.” That's all it says."),
|
||||
inkwell.Say(inc.Dex, "And now you're here. And he isn't."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneAlley,
|
||||
Title: "ALLEY — BEHIND NOODLE'S HOUSE",
|
||||
Background: BgAlley,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: SceneNoodleHouse,
|
||||
Label: "back out to the street",
|
||||
Side: inkwell.ExitLeft,
|
||||
},
|
||||
},
|
||||
Actors: []inkwell.SceneActor{
|
||||
{
|
||||
CharacterName: Paul,
|
||||
At: inkwell.Point{
|
||||
X: 120,
|
||||
Y: 232,
|
||||
},
|
||||
},
|
||||
},
|
||||
OnEnter: setVarIfEmpty(VarArmillaStrip, "SRP: 1 tape"),
|
||||
Hotspots: []inkwell.Hotspot{hidingPlace(), backDoor(), bin(), fireEscape()},
|
||||
})
|
||||
}
|
||||
|
||||
func hidingPlace() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "hiding_place",
|
||||
Label: "gap at the foot of the wall",
|
||||
Area: inkwell.Rect(416, 150, 68, 52),
|
||||
OnLook: inkwell.If(inkwell.Flag(FlagHasTape),
|
||||
inkwell.Say(Paul, "Empty. Whatever was in there is on me now."),
|
||||
inkwell.Say(Paul, "Loose brick. There's a gap behind it."),
|
||||
),
|
||||
OnUse: inkwell.If(inkwell.Flag(FlagPoliceTip),
|
||||
inkwell.If(inkwell.Flag(FlagHasTape),
|
||||
inkwell.Say(Paul, "There's nothing else in there."),
|
||||
inkwell.Seq(
|
||||
inkwell.Say(Paul, "“Behind the brick.” All right then."),
|
||||
inkwell.Give(ItemMysteryTape),
|
||||
inkwell.SetFlag(FlagHasTape),
|
||||
inkwell.Say(Paul, "A Personal Tape. No label, no seal."),
|
||||
inkwell.Say(Dex, "Password-locked. And somebody very much did not want it found."),
|
||||
),
|
||||
),
|
||||
inkwell.Say(Paul, "One loose brick. I'm not taking the alley apart over it."),
|
||||
),
|
||||
OnTake: inkwell.Say(Paul, "I'm not carrying a wall."),
|
||||
}
|
||||
}
|
||||
|
||||
func backDoor() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "back_door",
|
||||
Label: "locked back door",
|
||||
Area: inkwell.Rect(72, 106, 80, 124),
|
||||
OnLook: inkwell.Say(Paul, "Keypad. Four digits, worn keys."),
|
||||
OnUse: inkwell.Seq(
|
||||
inkwell.Say(Paul, "Locked. And I'm not guessing four digits."),
|
||||
inkwell.Say(Dex, "The wear is heaviest on the two and the seven. That isn't a code. It's fewer options."),
|
||||
),
|
||||
OnTalk: inkwell.Say(Paul, "To the door? I'm not there yet."),
|
||||
OnUseWith: map[string]inkwell.Action{
|
||||
ItemBlackArmilla: inkwell.Seq(
|
||||
inkwell.Say(Paul, "A black-market bracelet doesn't open a keypad."),
|
||||
inkwell.Say(Dex, "But you do get an advert out of it."),
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func bin() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "bin",
|
||||
Label: "toppled bin",
|
||||
Area: inkwell.Rect(240, 170, 88, 60),
|
||||
OnLook: inkwell.Say(Paul, "Somebody's been through it. Thoroughly."),
|
||||
OnUse: inkwell.Seq(
|
||||
inkwell.Say(Paul, "Already turned out. I'm not going to be the second one."),
|
||||
inkwell.Say(Dex, "The police don't go through bins. So who did?"),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func fireEscape() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "fire_escape",
|
||||
Label: "fire escape",
|
||||
Area: inkwell.Rect(528, 44, 88, 160),
|
||||
OnLook: inkwell.Say(Paul, "Runs all the way to the roof. Bottom rung is two metres over my head."),
|
||||
OnUse: inkwell.Say(Paul, "Can't reach it. I'd need something to stand on."),
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneTrinketShop,
|
||||
Title: "CHINATOWN — TRINKET SHOP",
|
||||
Background: BgTrinketShop,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
{
|
||||
To: SceneSmallRestaurant,
|
||||
Label: "the eating place next door",
|
||||
Side: inkwell.ExitRight,
|
||||
},
|
||||
{
|
||||
To: SceneSecretClub,
|
||||
Label: "the way in at the back",
|
||||
Side: inkwell.ExitBack,
|
||||
Needs: FlagClubEntry,
|
||||
Blocked: inkwell.Say(Paul, "Just a shop, as far as the man behind the counter is concerned."),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneAlley,
|
||||
Title: "ALLEY — BEHIND NOODLE'S HOUSE",
|
||||
Background: inc.BgAlley,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: inc.SceneNoodleHouse,
|
||||
Label: "back out to the street",
|
||||
Side: inkwell.ExitLeft,
|
||||
},
|
||||
},
|
||||
Actors: []inkwell.SceneActor{
|
||||
{
|
||||
CharacterName: inc.Paul,
|
||||
At: inkwell.Point{
|
||||
X: 120,
|
||||
Y: 232,
|
||||
},
|
||||
},
|
||||
},
|
||||
OnEnter: setVarIfEmpty(inc.VarArmillaStrip, "SRP: 1 tape"),
|
||||
Hotspots: []inkwell.Hotspot{hidingPlace(), backDoor(), bin(), fireEscape()},
|
||||
})
|
||||
}
|
||||
|
||||
func hidingPlace() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "hiding_place",
|
||||
Label: "gap at the foot of the wall",
|
||||
Area: inkwell.Rect(416, 150, 68, 52),
|
||||
OnLook: inkwell.If(inkwell.Flag(inc.FlagHasTape),
|
||||
inkwell.Say(inc.Paul, "Empty. Whatever was in there is on me now."),
|
||||
inkwell.Say(inc.Paul, "Loose brick. There's a gap behind it."),
|
||||
),
|
||||
OnUse: inkwell.If(inkwell.Flag(inc.FlagPoliceTip),
|
||||
inkwell.If(inkwell.Flag(inc.FlagHasTape),
|
||||
inkwell.Say(inc.Paul, "There's nothing else in there."),
|
||||
inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "“Behind the brick.” All right then."),
|
||||
inkwell.Give(inc.ItemMysteryTape),
|
||||
inkwell.SetFlag(inc.FlagHasTape),
|
||||
inkwell.Say(inc.Paul, "A Personal Tape. No label, no seal."),
|
||||
inkwell.Say(inc.Dex, "Password-locked. And somebody very much did not want it found."),
|
||||
),
|
||||
),
|
||||
inkwell.Say(inc.Paul, "One loose brick. I'm not taking the alley apart over it."),
|
||||
),
|
||||
OnTake: inkwell.Say(inc.Paul, "I'm not carrying a wall."),
|
||||
}
|
||||
}
|
||||
|
||||
func backDoor() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "back_door",
|
||||
Label: "locked back door",
|
||||
Area: inkwell.Rect(72, 106, 80, 124),
|
||||
OnLook: inkwell.Say(inc.Paul, "Keypad. Four digits, worn keys."),
|
||||
OnUse: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "Locked. And I'm not guessing four digits."),
|
||||
inkwell.Say(inc.Dex, "The wear is heaviest on the two and the seven. That isn't a code. It's fewer options."),
|
||||
),
|
||||
OnTalk: inkwell.Say(inc.Paul, "To the door? I'm not there yet."),
|
||||
OnUseWith: map[string]inkwell.Action{
|
||||
inc.ItemBlackArmilla: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "A black-market bracelet doesn't open a keypad."),
|
||||
inkwell.Say(inc.Dex, "But you do get an advert out of it."),
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func bin() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "bin",
|
||||
Label: "toppled bin",
|
||||
Area: inkwell.Rect(240, 170, 88, 60),
|
||||
OnLook: inkwell.Say(inc.Paul, "Somebody's been through it. Thoroughly."),
|
||||
OnUse: inkwell.Seq(
|
||||
inkwell.Say(inc.Paul, "Already turned out. I'm not going to be the second one."),
|
||||
inkwell.Say(inc.Dex, "The police don't go through bins. So who did?"),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func fireEscape() inkwell.Hotspot {
|
||||
return inkwell.Hotspot{
|
||||
Name: "fire_escape",
|
||||
Label: "fire escape",
|
||||
Area: inkwell.Rect(528, 44, 88, 160),
|
||||
OnLook: inkwell.Say(inc.Paul, "Runs all the way to the roof. Bottom rung is two metres over my head."),
|
||||
OnUse: inkwell.Say(inc.Paul, "Can't reach it. I'd need something to stand on."),
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneBBSTerminal,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneBBSTerminal,
|
||||
Title: "TERMINAL — BBS ACCESS POINT",
|
||||
Background: BgBBSTerminal,
|
||||
Background: inc.BgBBSTerminal,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
Label: "step back from the terminal",
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneBVKBranch,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneBVKBranch,
|
||||
Title: "BVK — SAN FRANCISCO BRANCH",
|
||||
Background: BgBVKBranch,
|
||||
Background: inc.BgBVKBranch,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneColumbarium,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneColumbarium,
|
||||
Title: "COLUMBARIUM — DEX'S MEMORIAL",
|
||||
Background: BgColumbarium,
|
||||
Background: inc.BgColumbarium,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneCuratorShop,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneCuratorShop,
|
||||
Title: "CURATOR SERVICE — THE MASTER'S WORKSHOP",
|
||||
Background: BgCuratorShop,
|
||||
Background: inc.BgCuratorShop,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneHackerspace,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneHackerspace,
|
||||
Title: "HACKERSPACE",
|
||||
Background: BgHackerspace,
|
||||
Background: inc.BgHackerspace,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneHospital,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneHospital,
|
||||
Title: "HOSPITAL — PSYCHIATRIC WING",
|
||||
Background: BgHospital,
|
||||
Background: inc.BgHospital,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneIceCreamShop,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneIceCreamShop,
|
||||
Title: "ICE CREAM SHOP — WHERE THE BAR WAS",
|
||||
Background: BgIceCreamShop,
|
||||
Background: inc.BgIceCreamShop,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,12 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
type Scene = inkwell.Scene
|
||||
|
||||
var sceneFloor = []inkwell.Polygon{
|
||||
var Manager = inkwell.NewManager[Scene]()
|
||||
|
||||
var Floor = []inkwell.Polygon{
|
||||
inkwell.Poly(
|
||||
inkwell.Point{
|
||||
X: 16,
|
||||
@@ -26,7 +29,7 @@ var sceneFloor = []inkwell.Polygon{
|
||||
}
|
||||
|
||||
func setVarIfEmpty(name string, v any) inkwell.Action {
|
||||
return Fn(func(ctx *inkwell.Ctx) {
|
||||
return world.Fn(func(ctx *inkwell.Ctx) {
|
||||
if ctx.Game.State.Var(name) == nil {
|
||||
ctx.Game.State.SetVar(name, v)
|
||||
}
|
||||
@@ -1,18 +1,19 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneNoodleHouse,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneNoodleHouse,
|
||||
Title: "NOODLE'S HOUSE — SEALED",
|
||||
Background: BgNoodleHouse,
|
||||
Background: inc.BgNoodleHouse,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
{
|
||||
To: SceneAlley,
|
||||
To: inc.SceneAlley,
|
||||
Label: "the alley behind the house",
|
||||
Side: inkwell.ExitRight,
|
||||
},
|
||||
@@ -1,23 +1,24 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneNormanApartment,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneNormanApartment,
|
||||
Title: "NORMAN'S APARTMENT",
|
||||
Background: BgNormanApartment,
|
||||
Background: inc.BgNormanApartment,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
{
|
||||
To: SceneRooftopHideout,
|
||||
To: inc.SceneRooftopHideout,
|
||||
Label: "the stairs up to the roof",
|
||||
Side: inkwell.ExitBack,
|
||||
},
|
||||
{
|
||||
To: SceneBBSTerminal,
|
||||
To: inc.SceneBBSTerminal,
|
||||
Label: "Norman's terminal",
|
||||
Side: inkwell.ExitRight,
|
||||
},
|
||||
@@ -1,17 +1,18 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: ScenePaulShop,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.ScenePaulShop,
|
||||
Title: "PAUL'S SHOP — JUNK AND GARAGE",
|
||||
Background: BgPaulShop,
|
||||
Background: inc.BgPaulShop,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: SceneNoodleHouse,
|
||||
To: inc.SceneNoodleHouse,
|
||||
Label: "the bus to San Francisco",
|
||||
Side: inkwell.ExitNear,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: ScenePoliceStation,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.ScenePoliceStation,
|
||||
Title: "SFPD — STATION AND HOLDING",
|
||||
Background: BgPoliceStation,
|
||||
Background: inc.BgPoliceStation,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: ScenePublicBBS,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.ScenePublicBBS,
|
||||
Title: "PUBLIC BBS TERMINAL",
|
||||
Background: BgPublicBBS,
|
||||
Background: inc.BgPublicBBS,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,22 +1,23 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneRooftopHideout,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneRooftopHideout,
|
||||
Title: "NORMAN'S ROOFTOP HIDEOUT",
|
||||
Background: BgRooftopHideout,
|
||||
Background: inc.BgRooftopHideout,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: SceneNormanApartment,
|
||||
To: inc.SceneNormanApartment,
|
||||
Label: "back down into the flat",
|
||||
Side: inkwell.ExitNear,
|
||||
},
|
||||
{
|
||||
To: SceneBBSTerminal,
|
||||
To: inc.SceneBBSTerminal,
|
||||
Label: "the old terminal",
|
||||
Side: inkwell.ExitRight,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneSamizdatPress,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneSamizdatPress,
|
||||
Title: "SAMIZDAT PRINTING HOUSE",
|
||||
Background: BgSamizdatPress,
|
||||
Background: inc.BgSamizdatPress,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneScrapMarket,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneScrapMarket,
|
||||
Title: "SCRAP MARKET",
|
||||
Background: BgScrapMarket,
|
||||
Background: inc.BgScrapMarket,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,22 +1,23 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneSecretClub,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneSecretClub,
|
||||
Title: "SECRET CLUB — THE UNDERWATER SUN",
|
||||
Background: BgSecretClub,
|
||||
Background: inc.BgSecretClub,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: SceneBBSTerminal,
|
||||
To: inc.SceneBBSTerminal,
|
||||
Label: "the terminal in the corner",
|
||||
Side: inkwell.ExitBack,
|
||||
},
|
||||
{
|
||||
To: SceneTrinketShop,
|
||||
To: inc.SceneTrinketShop,
|
||||
Label: "back out through the shop",
|
||||
Side: inkwell.ExitNear,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneSecretLab,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneSecretLab,
|
||||
Title: "SECRET RESEARCH LABORATORY",
|
||||
Background: BgSecretLab,
|
||||
Background: inc.BgSecretLab,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,34 +1,35 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
var exitToSelector = inkwell.Exit{
|
||||
To: SceneSelector,
|
||||
To: inc.SceneSelector,
|
||||
Label: "the rest of the city",
|
||||
Side: inkwell.ExitNear,
|
||||
}
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneSelector,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneSelector,
|
||||
Title: "SAN FRANCISCO",
|
||||
Background: BgSelector,
|
||||
Background: inc.BgSelector,
|
||||
Actors: []inkwell.SceneActor{},
|
||||
Walkboxes: []inkwell.Polygon{},
|
||||
})
|
||||
}
|
||||
|
||||
func fillSelectorPins() {
|
||||
selector, ok := SceneManager.Get(SceneSelector)
|
||||
func FillSelectorPins() {
|
||||
selector, ok := Manager.Get(inc.SceneSelector)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
var exits []inkwell.Exit
|
||||
for _, entity := range SceneManager.All() {
|
||||
for _, entity := range Manager.All() {
|
||||
if !leadsToSelector(entity) {
|
||||
continue
|
||||
}
|
||||
@@ -39,12 +40,12 @@ func fillSelectorPins() {
|
||||
})
|
||||
}
|
||||
selector.Exits = exits
|
||||
SceneManager.Set(selector)
|
||||
Manager.Set(selector)
|
||||
}
|
||||
|
||||
func leadsToSelector(s Scene) bool {
|
||||
for _, e := range s.Exits {
|
||||
if e.To == SceneSelector {
|
||||
if e.To == inc.SceneSelector {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneServerFarm,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneServerFarm,
|
||||
Title: "SERVER FARM",
|
||||
Background: BgServerFarm,
|
||||
Background: inc.BgServerFarm,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneShowroom,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneShowroom,
|
||||
Title: "NEUMATRONIC SHOWROOM",
|
||||
Background: BgShowroom,
|
||||
Background: inc.BgShowroom,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -1,17 +1,18 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneSmallRestaurant,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneSmallRestaurant,
|
||||
Title: "SMALL RESTAURANT — NEXT DOOR",
|
||||
Background: BgSmallRestaurant,
|
||||
Background: inc.BgSmallRestaurant,
|
||||
Exits: []inkwell.Exit{
|
||||
{
|
||||
To: SceneTrinketShop,
|
||||
To: inc.SceneTrinketShop,
|
||||
Label: "back to the trinket shop",
|
||||
Side: inkwell.ExitLeft,
|
||||
},
|
||||
@@ -1,14 +1,15 @@
|
||||
package inc
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
SceneManager.Register(Scene{
|
||||
Name: SceneStreet,
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneStreet,
|
||||
Title: "STREET",
|
||||
Background: BgStreet,
|
||||
Background: inc.BgStreet,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
},
|
||||
@@ -0,0 +1,29 @@
|
||||
package scene
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Scene{
|
||||
Name: inc.SceneTrinketShop,
|
||||
Title: "CHINATOWN — TRINKET SHOP",
|
||||
Background: inc.BgTrinketShop,
|
||||
Exits: []inkwell.Exit{
|
||||
exitToSelector,
|
||||
{
|
||||
To: inc.SceneSmallRestaurant,
|
||||
Label: "the eating place next door",
|
||||
Side: inkwell.ExitRight,
|
||||
},
|
||||
{
|
||||
To: inc.SceneSecretClub,
|
||||
Label: "the way in at the back",
|
||||
Side: inkwell.ExitBack,
|
||||
Needs: inc.FlagClubEntry,
|
||||
Blocked: inkwell.Say(inc.Paul, "Just a shop, as far as the man behind the counter is concerned."),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ScriptManager.Register(Script{
|
||||
Name: ScriptFinale,
|
||||
Actions: inkwell.Seq(
|
||||
SetMode(ModeCutscene),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(Paul, "I'm putting it in. That's all this is."),
|
||||
inkwell.Wait(0.4),
|
||||
UseTheme(NokiaPunk),
|
||||
inkwell.Say("norman", "No — this isn't what you were supposed to do!"),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(TapeMystery, "Thank you, Paul. You did exactly what I asked, the whole way through."),
|
||||
inkwell.Wait(1.0),
|
||||
inkwell.ShowEnd("REAL WORLD — end of game two"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ScriptManager.Register(Script{
|
||||
Name: ScriptOpening,
|
||||
Actions: inkwell.Seq(
|
||||
inkwell.SetFlag(FlagPoliceTip),
|
||||
inkwell.Say(Paul, "Back alley. Just like the clerk said."),
|
||||
inkwell.Say(Dex, "A government office tipped you off to remove something from a scene. That doesn't strike you as odd?"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ScriptManager.Register(Script{
|
||||
Name: ScriptTapeInsert,
|
||||
Actions: inkwell.Seq(
|
||||
Fn(func(ctx *inkwell.Ctx) {
|
||||
item := World.TakePending()
|
||||
if item == "" {
|
||||
return
|
||||
}
|
||||
World.SetSlot2(item)
|
||||
ctx.Game.Inventory.Remove(item)
|
||||
ctx.Game.State.SetVar(VarArmillaStrip, "SLOT2: READING")
|
||||
}),
|
||||
inkwell.Say(Paul, "Right. Let's see who you are."),
|
||||
inkwell.Say(Dex, "Clicked in. Spinning. And now: nothing."),
|
||||
inkwell.Say(Dex, "A stranger's tape in your own Armilla, Paul. I hope you know what you're doing."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptFinale,
|
||||
Actions: inkwell.Seq(
|
||||
world.SetMode(world.ModeCutscene),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(inc.Paul, "I'm putting it in. That's all this is."),
|
||||
inkwell.Wait(0.4),
|
||||
world.UseTheme(inc.NokiaPunk),
|
||||
inkwell.Say("norman", "No — this isn't what you were supposed to do!"),
|
||||
inkwell.Wait(0.6),
|
||||
inkwell.Say(inc.TapeMystery, "Thank you, Paul. You did exactly what I asked, the whole way through."),
|
||||
inkwell.Wait(1.0),
|
||||
inkwell.ShowEnd("REAL WORLD — end of game two"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package inc
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
type Script = inkwell.Script
|
||||
|
||||
var Manager = inkwell.NewManager[Script]()
|
||||
@@ -0,0 +1,17 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptOpening,
|
||||
Actions: inkwell.Seq(
|
||||
inkwell.SetFlag(inc.FlagPoliceTip),
|
||||
inkwell.Say(inc.Paul, "Back alley. Just like the clerk said."),
|
||||
inkwell.Say(inc.Dex, "A government office tipped you off to remove something from a scene. That doesn't strike you as odd?"),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package script
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Script{
|
||||
Name: inc.ScriptTapeInsert,
|
||||
Actions: inkwell.Seq(
|
||||
world.Fn(func(ctx *inkwell.Ctx) {
|
||||
item := world.TakePending()
|
||||
if item == "" {
|
||||
return
|
||||
}
|
||||
world.SetSlot2(item)
|
||||
ctx.Game.Inventory.Remove(item)
|
||||
ctx.Game.State.SetVar(inc.VarArmillaStrip, "SLOT2: READING")
|
||||
}),
|
||||
inkwell.Say(inc.Paul, "Right. Let's see who you are."),
|
||||
inkwell.Say(inc.Dex, "Clicked in. Spinning. And now: nothing."),
|
||||
inkwell.Say(inc.Dex, "A stranger's tape in your own Armilla, Paul. I hope you know what you're doing."),
|
||||
),
|
||||
})
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
package inc
|
||||
package script
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
"git.teletypegames.org/games/realworld/inc/world"
|
||||
)
|
||||
|
||||
func useWithFail(item string, h *inkwell.Hotspot) inkwell.Action {
|
||||
func UseWithFail(item string, h *inkwell.Hotspot) inkwell.Action {
|
||||
key := "fail." + item + "." + h.Name
|
||||
World.G.State.NoteTalked(key)
|
||||
n := World.G.State.Talked(key)
|
||||
world.Game().State.NoteTalked(key)
|
||||
n := world.Game().State.Talked(key)
|
||||
|
||||
return inkwell.Seq(
|
||||
inkwell.Say(Paul, pick(paulFails, n)),
|
||||
inkwell.Say(Dex, dexFail(n)),
|
||||
inkwell.Say(inc.Paul, pick(paulFails, n)),
|
||||
inkwell.Say(inc.Dex, dexFail(n)),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package inc
|
||||
|
||||
func init() {
|
||||
TapeManager.Register(Tape{
|
||||
Name: Dex,
|
||||
Dialogue: DlgDex,
|
||||
})
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package inc
|
||||
|
||||
type Tape struct {
|
||||
Name string
|
||||
Item string
|
||||
Dialogue string
|
||||
}
|
||||
|
||||
func (t Tape) GetName() string { return t.Name }
|
||||
|
||||
func IsTape(name string) bool { return TapeManager.Has(name) }
|
||||
|
||||
func TapeOf(item string) (Tape, bool) {
|
||||
for _, t := range TapeManager.All() {
|
||||
if t.Item != "" && t.Item == item {
|
||||
return t, true
|
||||
}
|
||||
}
|
||||
return Tape{}, false
|
||||
}
|
||||
|
||||
func IsTapeItem(item string) bool {
|
||||
_, ok := TapeOf(item)
|
||||
return ok
|
||||
}
|
||||
|
||||
func TapeDialogue(item string) string {
|
||||
if t, ok := TapeOf(item); ok && t.Dialogue != "" {
|
||||
return t.Dialogue
|
||||
}
|
||||
return DlgDex
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package inc
|
||||
|
||||
func init() {
|
||||
TapeManager.Register(Tape{
|
||||
Name: TapeMystery,
|
||||
Item: ItemMysteryTape,
|
||||
Dialogue: DlgMysteryTape,
|
||||
})
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package inc
|
||||
|
||||
func init() {
|
||||
TapeManager.Register(Tape{
|
||||
Name: TapeSupport,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package tape
|
||||
|
||||
import (
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Tape{
|
||||
Name: inc.Dex,
|
||||
Dialogue: inc.DlgDex,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package tape
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
type Tape struct {
|
||||
Name string
|
||||
Item string
|
||||
Dialogue string
|
||||
}
|
||||
|
||||
var Manager = inkwell.NewManager[Tape]()
|
||||
|
||||
func (t Tape) GetName() string { return t.Name }
|
||||
|
||||
func Is(name string) bool { return Manager.Has(name) }
|
||||
|
||||
func Of(item string) (Tape, bool) {
|
||||
for _, t := range Manager.All() {
|
||||
if t.Item != "" && t.Item == item {
|
||||
return t, true
|
||||
}
|
||||
}
|
||||
return Tape{}, false
|
||||
}
|
||||
|
||||
func IsItem(item string) bool {
|
||||
_, ok := Of(item)
|
||||
return ok
|
||||
}
|
||||
|
||||
func Dialogue(item string) string {
|
||||
if t, ok := Of(item); ok && t.Dialogue != "" {
|
||||
return t.Dialogue
|
||||
}
|
||||
return inc.DlgDex
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package tape
|
||||
|
||||
import (
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Tape{
|
||||
Name: inc.TapeMystery,
|
||||
Item: inc.ItemMysteryTape,
|
||||
Dialogue: inc.DlgMysteryTape,
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package tape
|
||||
|
||||
import (
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Manager.Register(Tape{
|
||||
Name: inc.TapeSupport,
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package inc
|
||||
package theme
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
@@ -8,10 +8,7 @@ import (
|
||||
|
||||
type Theme = inkwell.Theme
|
||||
|
||||
const (
|
||||
RealWorld = "realworld-93"
|
||||
NokiaPunk = "nokia-punk"
|
||||
)
|
||||
var Manager = inkwell.NewManager[Theme]()
|
||||
|
||||
func RGB(hex uint32) color.Color {
|
||||
return color.RGBA{
|
||||
@@ -1,4 +1,8 @@
|
||||
package inc
|
||||
package theme
|
||||
|
||||
import (
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
var (
|
||||
Green = RGB(0x3BE86B)
|
||||
@@ -7,8 +11,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
ThemeManager.Register(Theme{
|
||||
Name: NokiaPunk,
|
||||
Manager.Register(Theme{
|
||||
Name: inc.NokiaPunk,
|
||||
PanelBG: npBlack,
|
||||
StatusText: Green,
|
||||
FlashText: RGB(0xD8F06A),
|
||||
@@ -1,4 +1,8 @@
|
||||
package inc
|
||||
package theme
|
||||
|
||||
import (
|
||||
"git.teletypegames.org/games/realworld/inc"
|
||||
)
|
||||
|
||||
var (
|
||||
Ink = RGB(0xDCD5C4)
|
||||
@@ -11,8 +15,8 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
ThemeManager.Register(Theme{
|
||||
Name: RealWorld,
|
||||
Manager.Register(Theme{
|
||||
Name: inc.RealWorld,
|
||||
PanelBG: black,
|
||||
StatusText: Ink,
|
||||
FlashText: Amber,
|
||||
@@ -1,15 +0,0 @@
|
||||
package inc
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.TopBar{
|
||||
Name: "topbar",
|
||||
When: whenPlaying,
|
||||
Height: TopBarH,
|
||||
TimeVar: VarArmillaStrip,
|
||||
NoteVar: VarNote,
|
||||
})
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.Cursor{
|
||||
Manager.Register(&inkwell.Cursor{
|
||||
Name: "cursor",
|
||||
})
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.DialogBox{
|
||||
Manager.Register(&inkwell.DialogBox{
|
||||
Name: "dialog",
|
||||
Bounds: inkwell.Rect(0, ScreenH-LineH*9, DividerX, LineH*9),
|
||||
LineHeight: LineH,
|
||||
@@ -1,11 +1,11 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.EndCard{
|
||||
Manager.Register(&inkwell.EndCard{
|
||||
Name: "endcard",
|
||||
})
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.HotspotDebug{
|
||||
Manager.Register(&inkwell.HotspotDebug{
|
||||
Name: "hotspot_debug",
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&hudFrame{
|
||||
Manager.Register(&hudFrame{
|
||||
Name: "hudframe",
|
||||
})
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package inc
|
||||
package widget
|
||||
|
||||
import (
|
||||
inkwell "git.teletypegames.org/engines/inkwell"
|
||||
)
|
||||
|
||||
func init() {
|
||||
WidgetManager.Register(&inkwell.InventoryBar{
|
||||
Manager.Register(&inkwell.InventoryBar{
|
||||
Name: "inventory",
|
||||
When: whenPlaying,
|
||||
Origin: inkwell.Point{
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user