Code Monkey home page Code Monkey logo

fractured's People

Contributors

heroofthewinds avatar kilarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fractured's Issues

wildweapons ignoring armor

ATM, wildweapons assumes, every entity has the fleshy armour group of 100. The correct damage calculation is stated here https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1212
This also respects the full punch interval, so you damage less when you wait too short.

Additionally, this mod only overrides tools that have been registered before it loads. To get all tools, you would have to override minetest.register_tool with something like this:

local old_register_tool = minetest.register_tool
minetest.register_tool = function(name, item_definition)
           local old_on_use = item_definition.on_use
           item_definition.on_use = function(itemstack, user, pointed_thing)
            wildweapon_onuse(itemstack, user, pointed_thing)
                if old_on_use then
                  old_on_use(itemstack, user, pointed_thing)
                end
            end
           old_register_tool(name, item_definition)
end

I haven't tested it yet, but I think it should work.

wildweapons doesn't handle modifications by the old_on_use function

on_use returns a modified itemstack, so you would set itemstack to the return value of old_on_use(...) and return itemstack at the end.
But since there are other, more severe problems, this isn't as urgent. Maybe even not necessary since the whole system doesn't seem to work like it should (well, it does for weapons, but only for them)

wildweapons disables digging

Since wildweapons overwrites the default behaviour of tools with the fleshy damage group, every tool with this group becomes useless for digging. But in default, every(?) tool has the fleshy damage group, so you can't dig with a shovel any more.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.