bubble

package module
v0.0.0-...-2419f44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2017 License: MPL-2.0 Imports: 11 Imported by: 0

README

Base

This will contain the base of what all Bubble projects will call on.

In order for this system to work you must also have the trickyunits_go files. These are located on github, but you cannot install them with the regular "go get" command!

Documentation

Overview

        bubble-api.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.26

        bubble-call.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.24

        bubble-console.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.24

        bubble-externallibs.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.24

        bubble-preprocessor.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.22

        bubble_getdata.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.21

        bubble_main.go
	(c) 2017 Jeroen Petrus Broks.

	This Source Code Form is subject to the terms of the
	Mozilla Public License, v. 2.0. If a copy of the MPL was not
	distributed with this file, You can obtain one at
	http://mozilla.org/MPL/2.0/.
        Version: 17.12.26

Index

Constants

This section is empty.

Variables

View Source
var CompileChat = true

When set true the styem will note what it compiles. When set to false it will keep this silent.

View Source
var Console tBubbleConsole

Contains the functions you can use to output log data.

Functions

func BREG

func BREG(f func(l *lua.State))

Registers a function that needs to be executed when a new Lua VM is created. Basically this routine has to make sure all libraries added to Lua are automatically added.

func Call

func Call(l *lua.State, ac, rc int)

Works like a regular Lua call, but in stead of regular Lua crashouts through the panic system and such, this routine will still crash, but through all regularly set up routines, meaning you will see error messages the way the creator of the engine intended and that the any undo routines can run like planned. If you need not to crashout, you can still use Lua's own protected call. For most bubble engines it's however best that you never use the regular Call as "panic" can cause memory leaks.

func ConsoleToDefault

func ConsoleToDefault()

Resets the console to the default setting, which is through the standard "log" out put of Go.

func CreateBubble

func CreateBubble(id string) *lua.State

func Error

func Error(txt string)

Throws an error

func Fatal

func Fatal(txt string)

Throws a fatal error

func GetBubble

func GetBubble(id string) *lua.State

func GetData

func GetData(a string) []byte

func LoadScript

func LoadScript(id, script string)

Loads a script to a VM with id <id> If the script does not exist it will be created, if it does exist the current stuff will be added.

func QCall

func QCall(l *lua.State, f string, rc int, funcargs ...string)

This routine accepts a function and a line of strings as parameters. Please note strings only for parameters here. Values returned by the lua call are ignored, BUT they can still read out with regular lua routines.

func QPCall

func QPCall(l *lua.State, f string, rc, eh int, funcargs ...string) error

Protected veresion of QCall

func SetConsole

func SetConsole(wrt, wrtln func(col, txt string), er func(txt string, fatal ...bool), wr func(txt string))

You can set your own functions with this to make Bubble write its logs and throw its errors.

func SetJCR

func SetJCR(jcrfile string) jcr6main.TJCR6Dir

func TextScript

func TextScript(id, script, name string)

func Warn

func Warn(txt string)

Throws a warning

func Write

func Write(col, txt string)

Writes to the console

func WriteLn

func WriteLn(col, txt string)

Writes to the console and goes to a new line

Types

type TBubble

type TBubble struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL