From 73689024f0b480afb84eeb898b3c429237359cab Mon Sep 17 00:00:00 2001 From: Muhammad Kaisar Arkhan Date: Tue, 25 Sep 2018 03:32:47 +0700 Subject: Add BurnsInDaylight to Lua API and Monsters.ini (#4295) * Monster.h: Export SetBurnsInDaylight This commit also adds BurnsInDaylight to check if the Monster burns in daylight or not. Closes https://github.com/cuberite/cuberite/issues/4294 * MonsterConfig.cpp: Add BurnsInDaylight Closes https://github.com/cuberite/cuberite/issues/4294 --- Server/Plugins/APIDump/APIDesc.lua | 21 +++++++++++++++++++++ Server/monsters.ini | 2 ++ 2 files changed, 23 insertions(+) (limited to 'Server') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index b6a4ec81e..193a58285 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -8771,6 +8771,16 @@ a_Player:OpenWindow(Window); ]], Functions = { + BurnsInDaylight = + { + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns whether the mob burns in daylight.", + }, CanBeLeashed = { Returns = @@ -8990,6 +9000,17 @@ a_Player:OpenWindow(Window); }, Notes = "Sets the age of the monster", }, + SetBurnsInDaylight = + { + Params = + { + { + Name = "BurnsInDaylight", + Type = "boolean", + }, + }, + Notes = "Sets whether the mob burns in daylight. Only evaluated at next burn-decision tick", + }, SetCanBeLeashed = { Params = diff --git a/Server/monsters.ini b/Server/monsters.ini index 2c8950a0c..ea6b68fba 100644 --- a/Server/monsters.ini +++ b/Server/monsters.ini @@ -147,6 +147,7 @@ AttackRange=15.0 AttackRate=1 MaxHealth=20 SightDistance=40.0 +BurnsInDaylight=1 [Slime] AttackDamage=4.0 @@ -203,6 +204,7 @@ AttackRange=2.0 AttackRate=1 MaxHealth=20 SightDistance=25.0 +BurnsInDaylight=1 [ZombiePigman] AttackDamage=7.0 -- cgit v1.2.3