minenice55 / xitemlib Goto Github PK
View Code? Open in Web Editor NEWLua custom item framework for SRB2Kart
License: MIT License
Lua custom item framework for SRB2Kart
License: MIT License
xItemLib should override SRB2Kart's existing K_GetItemPatch
function.
This will allow addons that use this function to access item hud graphics to work with additional items without modification.
Modification of these addons would still be required to use xItemLib's additional item graphics features (eg. skin colour remapping.)
A certain line of code breaks the item roulette display for spectators once it gets to the penultimate conditional in the function. It should be removed.
The effect where the roulette seems to stop when you just died also seems to be nonexistent.
With xItemLib
https://github.com/minenice55/xItemLib/assets/126386046/c56a3d02-6af0-4406-a4da-355d3bbcfc2f
Without xItemLib
https://github.com/minenice55/xItemLib/assets/126386046/cd4770b2-cce2-4766-8585-664a146ec7e5
Source reference: https://git.do.srb2.org/KartKrew/Kart-Public/-/blob/master/src/p_mobj.c#L10789
The height should be mobj.z + P_GetPlayerHeight(p)+16*FRACUNIT
by default.
Players are able to "pick up" a cutout item regardless of what they are currently carrying. Picking up cutout items that match your current item continues to work as expected.
Version used:
v112r5
Example of the bug:
https://imgur.com/0tW12EH
Filling this as an issue instead of a PR since it should be simple enough to put into the library proper.
Due to a bug from Ash's script, its TouchSpecial
hook is guaranteed to load last meaning that it will never limit any pickups if xItem is loaded.
This snippet can be added in floatingXItemSpecial
just before the player is given the item to remedy this:
-- Only kick in if floating item spawner is loaded + item is from spawner.
-- The bug we're trying to fix is from pickup limiting, don't run this if not the case.
-- Don't run the collision hook if we'd be picking more than we have.
if floatingitemspawner and s.spawnedbyspawner and s.limitpickup then
if kartstuff[k_itemamount] >= thing.movecount then return true end
s.movecount = $ - kartstuff[k_itemamount] -- Adjust to get the desired amount from the limited amount of pickups.
end
This should limit pickups properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.