Fixes and Features
* Player.SteamID, Player.GameID, Player.UID, Player.IP, Player.Name, Entity.Name, Entity.OwnerID, NPC.Name, DamageEvent.WeaponName, DeathEvent.DropItems should all be safe to access at any time, as long as the instance itself isn't null. They are assigned to static fields when the object is instanced.
*
Magma plugins with the keyword "NOMANGLE" in a comment on the first line will bypass Magma's Javascript fixups. This means that the "new" keyword will work on Javascript objects, the Magma namespace is not aliased to the Fougerite namespace, the global toLowerCase() method is gone, and DataStore must be spelled with correct case. Most original Magma scripts will not work in "NOMANGLE" mode. This is for new Javascript plugins that don't want the Magma emulation and don't want to code for Jint2.
* Zone3D uses its own datastore
* DataStore.ToIni converts Vector2/3/4, Quaternion, Bounds to string, but restoring from string is up to the plugin.
* HurtEvent detects that attacker is DeployableObject (spike wall, etc.).
* Debug log for HurtEvent records a log line for each event.
* World.Entities includes SupplyCrates if there are any airdrops active
* Abandoned Anticheat module removed
* Updated GlitchFix module
* Python Lib included in distribution
* Most recent IronPythonModule
*
Patcher program not included. Already-patched Assembly-CSharp.dll is in the zipfile. Just unzip it over your Rust server, no patching needed anymore. (Cracked users don't replace It, use the patcher.)
* Player.TeleportTo and Player.SafeTeleportTo now return bool from the underlying methods, indicating success or failure.
* Rust++
/i and
/give commands use spell-checking algorithms to match arguments against player names and item names. In most cases, you can type the player name, item name and quantity in any order, with or without quotes. Misspellings are tolerated, although only to a point. If a item name or player name has a number as a word by itself in it, then the quantity should be typed last.
Code:
/i 556 ammo 250
/i can tuna 10
/i canbean
/i 20 choclat bar
/give dretax 20 m4
/give drtax 556 ammo 556
/give dretax armor part 6 4
/give mcmc 20 small rats
/give 20 small stash mr hanky the christmas poo
New Methods
Player.IsWarm() - bool
Player.IsPoisoned() - bool
Player.IsRadPoisoned() - bool
Player.IsHungry() - bool
Player.IsStarving() - bool
Player.IsBleeding() - bool (changed to readonly)
Player.IsCold() - bool (changed to readonly)
Player.IsInjured() - bool (changed to readonly)
Player.AddWater(float liters) - void (only + values are effective, max 30)
Player.AddRads(float amount) - void (only + values)
Player.AddAntiRad(float amount) - void (only + values)
* note: AddAnti
Rad() not Rads
Player.AdjustPoisonLevel(float amount) - void (+ or - values OK)
* Poison level >= 1.0 = player vomits, takes damage.
Player.AdjustCalorieLevel(float amount) - void (+ or - values OK)
Entity.IsStructureMaster() - bool
Entity.IsSleeper() - bool
Entity.IsFireBarrel() - bool
Entity.IsSupplyCrate() - bool
TimedEvent(string name, double interval, bool autoreset)
TimedEvent(string name, double interval, object[] args, bool autoreset)
DataStore.ToIni(string table, IniParser ini) - void
DataStore.FromIni(IniParser ini) - void
JavaScript:
var toini = Plugin.CreateIni("Awesome");
DataStore.ToIni("Awesome", ini);
if (PLugin.IniExists("Awesome") {
var fromini = Plugin.GetIni("Awesome");
DataStore.FromIni(fromini);
}
// ToIni(tablename, ini) saves DataStore "tablename" as [section] name
// FromIni(ini) restores to same tablename
// Ini file doesn't have to match table name
New properties
Player.Structures - Entity array
Player.Sleeper - Entity (or null)
Player.Fires - Entity array
Player.Storage - Entity array
Player.Shelters - Entity array
Player.AtHome - bool (is inside any Player.Structures)
Player.CalorieLevel - float
Player.RadLevel - float
Entity.Location - Vector3
Entity.X .Y .Z - float
NPC.Location - Vector3
NPC.X .Y . Z - float
HurtEvent.AttackerIsPlayer - bool
HurtEvent.VictimIsPlayer - bool
HurtEvent.WeaponName - added Poison, Radiation, Starvation, Fall Damage, Supply Crate
TimedEvent.AutoReset - bool get / set (should timer repeat? false = run once)
Server.Sleepers - List<Entity>
World.StructureMasters - List<Entity>
Extension Methods
Extension methods added for string and array. Call them on an instance of a string, or an instance of an array. C# modules and Python plugins can use these.
array.Slice(int startIndex, int endIndex) - what .Net should already have.
string.MatchItemName() - return a new string with the item name that is the best match for the original string. Original string should be close to the desired item name.
string.Blueprint() - returns a new string with the item's proper Blueprint (or BP) item name.
string.BaseItem() - the reverse of .Blueprint()
Both of these methods require the exact item name. If called on a string that doesn't match an item exactly, returns the original string unchanged.