Jump to content

Bubbet

Members
  • Posts

    23
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bubbet

  1. function getRealBonuses(seed, rarity, permanent)
    	local ok, plan = pcall(Plan)
    	if not plan then return 0 end
    	local transporterBlocks = plan:getBlocksByType(BlockType.Transporter)
    	local transporterVolume = 0
    	for k, v in pairs(transporterBlocks) do
    		local block = plan:getBlock(v)
    		transporterVolume = transporterVolume + length(block.box.size)
    	end
    	return transporterVolume
    end
    2021-03-17 18-31-03| T: 28
    2021-03-17 18-31-03| Object: Unknown
    2021-03-17 18-31-03| Execution Context (inner to outer):
    2021-03-17 18-31-03| #0: makeTooltip data/scripts/systems/transportersoftware.lua
    2021-03-17 18-31-03| 
    2021-03-17 18-31-03| Error constructing Plan: component can only be created in context of a scene
    2021-03-17 18-31-03| 
    2021-03-17 18-31-03| stack traceback:
    2021-03-17 18-31-03|     [C]:-1: in function ?
    2021-03-17 18-31-03|     [C]:-1: in function pcall
    2021-03-17 18-31-03|     C:\Users\Bubbet\AppData\Roaming\Avorion\mods\TransponderRangeFromBlocks\data/scripts/systems/transportersoftware.lua:4: in function getRealBonuses

    A function for getting the current 'scene context' so i can stop this error from showing in the console/logs, considering pcall doesn't do that.

  2. Add iteration metamethods to the enum userdatas like KeyboardKey

    • __pairs - (Lua 5.2+) Handle iteration through table pairs when for k,v in pairs(tbl) do ... end is called (See GeneralizedPairsAndIpairs).
    • __ipairs - (Lua 5.2+) Handle iteration through table pairs when for k,v in ipairs(tbl) do ... end is called (See GeneralizedPairsAndIpairs).

    Also KeyboardKey has some values in the documentation that don't exist in game like QuoteDBL

    Maybe a function for getting the readable value of a keycode. I'm recreating a keybinding window for other mods to attach onto and set up binds that can be remapped by the end user.

    Key pressed/released callbacks?

  3. Some method to get the camera position in 3d space so i can do projections onto the 2d screen. Was planning on making lead indicators. Or alternatively a vec3/matrix method to project to screenspace so i don't have to do all the math 😛

  4. Add the parameter for onShotHit to return the turret that shot the bullet/beam with this i could get information about the turret and open up a whole ton of doors for cooler weapons.

    Currently the callback only returns the two ships in question and where the shot hit, surely the game keeps track of which turret also shot the bullet.

    I requested this during the play with the devs event but haven't seen much for news on it, so I'm making a suggestion here.

    • Like 3
  5. I suppose that makes sense, but then you've got no way to disable things like the hangar. The devs have mentioned that they cannot go back on making fighters craftable. But without being able to disable that tab i don't see a way as a modder to disable fighter production.

  6. I'm requesting two things with this post:

    1. An external tool for uploading to the workshop so you can automate the updating via github or something.

    2. Taking advantage of the steam workshop collaborators which currently do nothing and are unable to update the mod.

  7. getTab and getActiveTab both error in a player attached script (not in context of menu) and return non valid tabs in entity attached script meaning you cant do anything with them like disable them.

    The exact result i was attempting to get to was disabling the hangar tab. But neither approach allowed me to do that.

  8. function table getmodids()

    Returns

        Returns a table of the mod-ids of mods that have modified the top-level script file that this function is called from.

     

    A function kind of similar to the getScriptPath() we already have, except instead of returning the full path to the file in question, it returns the mod-ids of mods that have made modifications to said file.

     

    It'd probably be nice to have a function similar to scriptPath() too, returning the mod-ids of the mods affecting the current file not the top level file.

×
×
  • Create New...