Fougerite Official

Fougerite Official 1.7.9E

No permission to download
  • IronPython module put in by myself, should have everything working in It even if It wasn't before. Plugin.Log now logs seconds too
  • Sqlite is for the next turn guys, since at this time me @DreTaX did the update and not mikec, probably when mikec comes back he will finalize It.
  • Turns out World.Spawn had no problems at all. Just incase I put It in try-catch. It returns an object, so you need to convert It to an entity by yourself. It means you would have to do:
Python:
__author__ = 'DreTaX'
__version__ = '1.0'
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite
from Fougerite import Entity

class Blabla:

    def somemethod(self):
        spawnentity = World.Spawn(string prefab, Vector3 location, Quaternion rotation, int rep)
        entity = Entity(spawnentity)
In JavaScript It would look like this (I think, lel)
JavaScript:
function blabla() {
    var EntityClass = Util.TryFindReturnType("Entity");
    var spawnentity = World.Spawn(string prefab, Vector3 location, Quaternion rotation, int rep);
    var Entity = EntityClass(spawnentity);
}
  • I modified some stuffs in Zone3D, but I will still have to test that.
  • Player class got the implamantation that mikec planned for the next version. At every function, Fougerite will check if the player is online. If It isn't It won't do anything. THIS SHOULD avoid RPC errors. (Player.IsOnline property) (Mike's invention)
  • Player.Damage(float dmg) has been re-added.
  • Player.Health Setter is now back
  • Entity.Health Setter is now back
  • HurtEvent had LOTS OF MODIFICATIONS. I have to say I reverted to a before version and I remade most of the points. Hunting Bow should never appear as Unknown now. Da innovation comes now. All the other objects should be fine too. Notify me if It isn't.
  • Sleepers are now detected on hurtevent. Which means sleeper log will work now. I converted It to a Fougerite Entity, BUT BE WARNED. SleepingAvatar doesn't have a lot of properties. What I know for sure, Is that you can get the OwnerID of It. If you would like to know more, you should decompile the assembly and look at the properties. Calling: Entity.Object will return you the SleepingAvatar object. NOTE: Sleepers are detected On_PlayerHurtEvent
  • HurtEvent.Sleeper was added. It returns True if the victim is a Sleeper.
  • DamageLog was disabled on HurtEvent. No more log spamming.
  • WildLifeManager Error flood patcher inclused in the fougerite patcher.
Sorry about that. Got carried away.
  • Just uploaded the zip to the fougerite servers. Nothing new yet.
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: AddAntiRad() 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.
  • Like
Reactions: Snake and DreTaX
  • Like
Reactions: Snake and DreTaX
Somehow it's not attaching a new zip file. Let me try again.
Newest IronPythonModule now included.
  • Like
Reactions: [K4N]Uslanmaz[PRO]
  • Like
Reactions: [K4N]Uslanmaz[PRO]
Changes since 1.0.7:
  • Removed sample admin.xml and whitelist.xml from Rust++.
  • Zone3D uses a separate Hastable from DataStore.
  • DataStore no longer tries to serialize Vector3.
  • SafeTeleportTo uses a timer for 2nd safety teleport, instead of sleep. Much smoother. Checks slope for steepness. Other fixes.
  • Fixed harmless exception from /loadout command.
  • DataStore has two new methods:
  • DataStore.ToIni(string tablename, IniParser ini);
  • DataStore.FromIni(string tablename, IniParser ini);
  • Values from ini are cast back to float, int, bool, or null from string when loading to DataStore.
  • The filename of the ini doesn't have to match the name of the DataStore table. The table name is stored as a [Section] in the ini.
Use like this:
JavaScript:
var ini = Plugin.CreateIni("saveTable");
DataStore.ToIni("someTable", ini);

if (Plugin.IniExists("otherSave")) {
    var ini = Plugin.GetIni("otherSave");
    DataStore.FromIni("otherTable", ini);
}
  • Like
Reactions: [K4N]Uslanmaz[PRO]
  • Like
Reactions: [K4N]Uslanmaz[PRO]