Module:NMSgog

-- I don't speak lua. -- I don't speak lua.

local p = {}

function p.coucou (frame) return("Cou-cou!") end

-- UTIL. -- -- init(var, "", "Euclid") function init (val, invalid, default) if (val == invalid) then return default; else return val; end end

-- -- Player Base -- -- pb_gog_prefix("1234:5678:90AB:CDEF") -> "EF" function pb_goginize_name (coord, base) return "[GoG-" .. string.sub(coord, #coord-1, #coord) .. "] " .. base end

function pb_create (owner,		-- 1					image,		-- 2					basename,	-- 3					galaxy,		-- 4					region,		-- 5					system,		-- 6					planet,		-- 7					galactic_coordinates, -- 8					planetary_coordinates, -- 9					title,				  -- 10					release,			   -- 11					gamemode,			   -- 12					prologue,			   -- 13					description,		   -- 14					additional_information) -- 15 local s = {} local r = "" basename = pb_goginize_name(galactic_coordinates, basename) -- ignore param title title = basename -- init (title, " ", basename)

s[#s+1] = "'''" .. basename .. " is a player base in GOGinized Space. It's located in " .. system .. ", on planet " .. planet .. "'''." ..	 "\n\n==Prologue==\n" .. prologue .. "\n\n==Description==\n" .. description .. "\n\n==Additional Information==\n" .. additional_information .. '\n\n==Galery==\n\n' .. "" -- The End -- return "create ok?" return r end

-- -- EXPORT --

function p.make_player_base (frame) local args = frame.args local owner = init( args.owner, "", "???" ) -- 1 local image = init( args.image, "", "GreatBase001.jpg" ) -- 2 local basename = init( args.basename, "", "???" )		-- 3 local galaxy = init( args.galaxy, "", "Euclid" )			-- 4 local region = init( args.region, "", "Kodimset Expanse" ) -- 5 local system = init( args.system, "", "???" )			  -- 6 local planet = init( args.planet, "", "???" )			  -- 7 local galactic_coordinates = init( args.galactic_coordinates, "", "???" ) -- 8 local planetary_coordinates = init( args.planetary_coordinates, "", "???" ) -- 9 local title = init( args.title, "", "") -- 10, will become goginised basenam local release = init( args.release, "", "Beyond" ) -- 11 local gamemode = init( args.gamemode, "", "Normal" )		 -- 12 local prologue = init( args.prologue, "", "Got a story to tell about your base ? Knock yourself out telling it, or simply remove this section." ) -- 13 local description = init( args.description, "", "So, this is your first base ? Want visitors to wait for sunrise because of the great colours ? You have a pool ? A bar ? Things up for grabs for visitors ? Do visitors need a powerful jetpack or hold their breath for like 10 minutes to get to your base ? Odd or simply beautiful fauna, flora, caves or landscape around ? You have a Race Track or offer rides on tamed creatures ? Toilets ? Souvenir shop ?\n\nAll goes into this section." ) -- 14 local additional_information = init (args.additional_information, "", "Any mods you used for building this ? Which ones ? Used glitch-building ? Does the game barf on occassion, so visitors will only see half of your base ? Any engineering disputes with the game during the build ? You're OCD, and we need to keep our feet parallel at all times, when visiting ?\n\nThe more technical side of things goes into this section." ) -- 15

local r = pb_create (owner,		-- 1   						image,		-- 2    						basename,	-- 3    						galaxy,		-- 4    						region,		-- 5    						system,		-- 6    						planet,		-- 7    						galactic_coordinates, -- 8    						planetary_coordinates, -- 9    						title,				   -- 10    						release,			   -- 11    						gamemode,			   -- 12    						prologue,			   -- 13    						description,		   -- 14    						additional_information) -- 15 -- return "ok?" return r end

return p