Add punch/die functions for chicken

master
Solebull 2019-01-02 01:41:15 +01:00
parent 24c8f560b0
commit b30cf2319e
2 changed files with 21 additions and 3 deletions

15
ROADMAP
View File

@ -221,20 +221,29 @@ It's really fast. May be used on a website, to show the actual map.
[mg_villages] ERROR: Did not find a suitable replacement for cottages:hatch_steel (suggested but inexistant: cottages:hatch_steel). Building: chateau_without_garden.
[mg_villages] ERROR: Did not find a suitable replacement for cottages:barrel_lying (suggested but inexistant: cottages:barrel_lying). Building: chateau_without_garden.
[mg_villages] ERROR: Did not find a suitable replacement for cottages:barrel (suggested but inexistant: cottages:barrel). Building: chateau_without_garden.
**** kill_xp/ Gain XPs by killing mobs
- [ ] We're not gaining XP while killing monsters : for example slimes
**** [feature_XpMobs] kill_xp/ Gain XPs by killing mobs
CLOCK: [2019-01-02 mer. 01:23]
*We're not gaining XP while killing monsters : for example slimes*
Is there handled in the code. No we have to create it by ourselves
- [ ] kill_xp/ mod
when killing mob (on_punchmode)
- peace one : 10XP + table
- hostile one : XP table
or killing another player : XP
- [ ] For mobs, see the mods creating them
searching in mobs/mods_redo : ther is a on_die custom function
Maybe on do_punch to have the hiter name ?
then in mobs_animal/chicken
- [ ] For player, see onpunchplayer
- [ ] There is a "singleplayer punches object 29: LuaEntitySAO at ..."
log message ?
- [ ] May remove chicken from mobs_animal mod (not used)
**** TODO [fix_DoorProtection] Fix the door protection issue
CLOCK: [2018-12-31 lun. 15:26]--[2018-12-31 lun. 15:40] => 0:14
*We can't open doors when created by another player*
- [X] First, try to remove "Own by [playername]" message
Ok, bt it doesn't remove existing meta
- [X] Added a craft for super lucly block
- [X] Added a craft for super lucky block
?? is this working
- [ ] Then, remove protection. Other players should be able to open doors
Works in local multiplayer test. Should be tested with another players

View File

@ -67,6 +67,15 @@ mobs:register_mob("mobs_mc:chicken", {
if mobs:protect(self, clicker) then return end
if mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end
end,
do_punch = function (self, hitter, time_from_last_punch,
tool_capabilities, direction)
minetest.log("error", "Chicken punched")
end,
on_die = function(self, pos)
minetest.log("error", "Chicken killed")
end,
do_custom = function(self, dtime)