Commit Graph

138 Commits

Author SHA1 Message Date
Danila Shutov 3a6dfda358
Make shading of CAOs optional (#10033) 2020-06-16 20:48:31 +01:00
sfan5 732c8008f4 CSM: Fix crashing minetest.get_item_def()
fixes #9884
2020-05-20 20:15:09 +02:00
Wuzzy c94d37827d
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
Lars Müller 9ba24f89f5
Damage texture modifier (#9833)
Adds a new object property "damage_texture_modifier"
2020-05-11 21:41:36 +02:00
Wuzzy 6e1372bd89
Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
sfan5 b6b80f55c8 Expose collided objects in moveresult
closes #9787
2020-05-06 14:03:52 +02:00
SmallJoker 1b6f40c356 Rename moveresult speed to velocity 2020-05-05 08:37:04 +02:00
sfan5 3475759d1a Expose collision information to LuaEntity on_step 2020-04-27 20:45:46 +02:00
SmallJoker be71e70a91
Script: Enforce type checks if not nil (#9748)
* Script: Enforce type checks if not nil
2020-04-27 07:02:39 +02:00
sfan5 8ae8c1600a
Fix parsing JSON with large integers (#9674) 2020-04-15 08:01:28 +02:00
sfan5 2d5bd3bf79
scriptapi: Some small optimizations to value pushing (#9669) 2020-04-14 20:44:18 +02:00
Lars Müller af2e6a6a10
Improve waypoints and add image variant (#9480) 2020-04-11 22:09:46 +01:00
Loic Blot 894a34aef4 Move PlayerSAO to dedicated files 2020-04-11 16:07:17 +02:00
Loic Blot 6d43736172 Move serveractiveobject & unitsao
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h}
Move UnitSAO class to dedicated files
2020-04-11 16:07:17 +02:00
sfan5 ace3c76112 Improve core.sound_play with ephemeral sounds and player exclusion 2020-02-01 20:31:41 +01:00
Wuzzy e05b7dbb3c Remove unused weight property from objects (#9320) 2020-01-22 10:19:27 +01:00
Pierre-Yves Rollo cf7fda0083 Add z-index management to HUD 2019-12-06 20:31:26 +00:00
random-geek f2e62298a5 Change some usages of "deprecated" to "obsolete" (#9062)
"Deprecated" means that something is still in use, but is unsupported and needs to be removed.
"Obsolete" means it is already out of use.
2019-10-29 19:23:12 +01:00
sfan5 70f9e1aafa
Punchwear (improved) (#8959) 2019-09-22 22:12:21 +02:00
Beha 4d7f296717 Do not add group values of zero to group lists. (#8751)
This fixes an issue where when the engine looked up groups (for example,
in ABM node names), NodeDefManager's m_group_to_items would contain nodes
with a group value of zero, resulting in nodes with flammable = 0 being
burned by a fire mod with a group:flammable checking ABM.

It brings consistency to the behaviour described in the api
documentation, where zero and nil groups should be the same.
2019-08-07 10:48:04 +02:00
Beha b8aaef704d Move the clamping of hp/breath when their maximums change to read_object_properties(). (#8689)
This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
2019-07-30 17:29:45 +02:00
HybridDog 431d8a9b83 Abort when trying to set a not registered node (#7011)
I removed the MapNode constructor which takes a nodename and gives the node's id or CONTENT_IGNORE
The code which used this constructor (two places) now handles the situation of not registered nodes correctly:
* minetest.set_node and similar functions make minetest crash when a not registered node is passed
* reverting a node with rollback aborts if the node is not registered
2019-03-07 08:31:25 +01:00
SmallJoker ffb17f1c9a Consistent HP and damage types (#8167)
Remove deprecated HUDs and chat message handling.
Remove unused m_damage variable (compat break).
HP: s32 for setter/calculations, u16 for getter.
2019-02-10 23:03:26 +00:00
SmallJoker a122ba0ef4 Fix various bugs (Anticheat, Lua helpers) (#8013)
* Fix various bugs (Anticheat, Lua helpers)

Anticheat: Use camera position instead of player position for shoot line calculations
Lua helpers: Increase 'i' to not overwrite earlier added table values

* Remove lag compensation

* * 1.5 for larger selection boxes
2019-01-06 10:24:44 +01:00
SmallJoker bba4563d89 Proselytize the network. Use IEEE F32 (#8030)
* Proselytize the network. Use IEEE F32
* Remove unused V2F1000 functions
2019-01-03 17:04:26 +01:00
Dániel Juhász 325bf68041 Raycast: export exact pointing location (#6304)
* Return intersection point in node coordinates.
* Clarify 'intersection_point' documentation
2018-08-16 20:10:08 +02:00
stujones11 821e3f7072 Optional alpha channel support for entities 2018-03-29 14:53:12 +01:00
Dániel Juhász 3face01a20 Node definition manager refactor (#7016)
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
2018-02-10 21:04:16 +01:00
lisacvuk 4f5090ff68 Make hud_get return aligment, offset and size. (#7006)
* Make hud_get return aligment and offset.

* Return size aswell.
2018-02-04 10:17:46 +01:00
red-001 9649e47214 [CSM] Add basic HUD manipulation. (#6067)
* [CSM] Add basic HUD manipulation.

Workaround for on_connect not working right now.
2018-01-20 14:09:58 +01:00
Thomas--S f3b9d87076 Connected Nodeboxes: Add `disconnected` boxes
The `disconnected_*` boxes are the opposites of the `connect_*` ones,
i.e. when a node has no suitable neighbours on the respective side, the
according disconnected box is drawn.

* disconnected_top
* disconnected_bottom
* disconnected_front
* disconnected_left
* disconnected_back
* disconnected_right
* disconnected (when there is *no* neighbour)
* disconnected_sides (when there are *no* neighbours to the sides)
2018-01-03 04:05:21 +00:00
paramat f470cb7270 Zoom: Set zoom FOV per-player using a player object property
Remove player object property 'can zoom'.
Add player object property 'zoom fov'.
Remove clientside setting for 'zoom fov'.
Object property default is 15 degrees in creative mode, zoom disabled
in survival mode.

Needed due to zoom now loading and/or generating distant world
according to zoom FOV.

Update object properties serialisation version to 3.
2017-12-04 02:25:10 +00:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
paramat 4c40e0775c Player eye height: Make this a settable player object property 2017-11-06 12:54:00 +00:00
Muhammad Rifqi Priyo Susanto a1e1a19ac3 Improvements/fixes for noise parameter input in advanced settings
Formspec input for each individual noise parameter and flag.
Allow noise flags to be set in advanced settings, previously only settable
in minetest.conf.

Standardise 'group format' for noise parameters set in minetest.conf, as
only these support noise flags. However the older 'single line' format is
still accepted to support existing minetest.conf files.
Therefore auto-generate minetest.conf.example with noise parameters in
'group format'.

Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or
'noise_params_3D', the dimension number is displayed in the advanced
settings edit page.
2017-10-23 01:28:13 +01:00
Vitaliy 75320e7e88 Real global textures (#6105)
* Real global textures

* Add world-aligned textures
* Update minimal to support world-aligned tiles
* Update minimal
2017-10-15 09:34:14 +02:00
orwell96 08846cd05c Add static_save property to luaentites to not save them statically. (#5112)
* Add no_static_save property to luaentites to not save them statically.
This allows for temporary objects that would get deleted anyway as soon as they are loaded again without the static saving overhead.

* Use positive meaning for static_save object property

* Invert meaning also for the LUA parameter
Note: getboolfield() does not change &result when field does not exist, so it defaults to the default value in the header file, which is 'true'.

* Extend push_object_properties()
2017-09-28 17:11:51 +02:00
SmallJoker edbc533414 Customizeable max breath for players (#6411)
* Customizeable maximal breath for players
2017-09-15 12:18:47 +02:00
Rob Blanckaert a9d43a0471 Object properties: Add 'glow', disables light's effect if negative
The 'glow' value is added to the ambient light value.
Negative 'glow' disables light's effect on object colour, for faking
self-lighting, UI-style entities, or programmatic colouring in mods.
2017-09-14 04:06:05 +01:00
Auke Kok 5b3fbf9cf7 Implement client node dig prediction
Dig prediction allows clients to remove dug nodes without
waiting for server acknowledgement.
This patch allows mods to override dig prediction,
it can either be turned off or a different "prediction node"
can be selected.
2017-09-11 20:54:20 +02:00
SmallJoker 5f489efc69 Object properties: Fix loss of custom selectionbox
Only adjust it to the collisionbox value when the collisionbox was really set.
2017-09-10 20:26:03 +02:00
paramat 561a01cc2a Zoom: Move enabling zoom to a new player object property
Default enabled for no change in default behaviour.
Remove 'zoom' privilege.
2017-08-30 19:39:05 +01:00
Dániel Juhász f6a33a1a7a Overlays for wield and inventory images (#6107)
* Overlays for wield and inventory images
2017-08-25 13:20:53 +02:00
stujones11 ac4884c3d6 Make entity selection and collision boxes independently settable (#6218)
* Make entity selection and collision boxes independently settable
2017-08-24 10:01:16 +02:00
SmallJoker f7d50a8078 Respect object property hp_max field for players (#6287)
* Respect object property hp_max field for players
This allows modders to configure the maximal HP per player

* Statbars: Downscale bar to full 20 HP when exceeding this value
Add default max HP for players and breath constants to builtin
Document the constants

* Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
2017-08-23 22:32:10 +02:00
Loïc Blot 1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
number Zero ef285b2815 Add 'plantlike_rooted' drawtype
Useful for underwater plants.
Node consists of a base cube plus a plantlike extension that can pass through
liquid nodes above without creating air bubbles or interfering with liquid flow.
Uses paramtype2 'leveled', param2 defines height of plantlike extension.
2017-07-11 01:02:22 +01:00
Rui ff73c7a5da Sound: Add pitch option (#5960)
* Sound: Add pitch option
2017-06-11 13:58:26 +02:00
Loïc Blot a98baef5e4 C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821) 2017-06-04 21:00:04 +02:00
bigfoot547 dfa0c15ce0 [CSM] Add function to get the definition of items (#5732)
Add node def and item def documentation.

Please be ready for merge!
2017-05-21 14:40:55 +02:00