Module ORGM.Server

Server Side Functions and tables.

Info:

  • Copyright: 2018 File: server/1LoadOrder/ORGMServer.lua
  • Release: v3.09
  • Author: Fenris_Wolf

Item Equip Functions

itemBindingHandler (key) Triggerd by Events.OnKeyPressed, this replaces PZ’s ItemBindingHandler.onKeyPressed function.
equipBestFirearm (playerObj, subCategory) Equips the best firearm overriding the default PZ system that always finds the weapon with highest damage.
compareFirearms (item1, item2) Compares 2 firearms and returns the better choice.
equipBestMeleeWeapon (playerObj, subCategory) Used for selecting melee weapons.


Item Equip Functions

itemBindingHandler (key)
Triggerd by Events.OnKeyPressed, this replaces PZ’s ItemBindingHandler.onKeyPressed function.

It handles the new pistol/rifle/shotgun hotkeys, and bypasses equipping a light source if a equippedgun has a tactical light.

Parameters:

  • key integer key code

See also:

equipBestFirearm (playerObj, subCategory)
Equips the best firearm overriding the default PZ system that always finds the weapon with highest damage.

This bases its choice on a number of factors:

1) is it currently loaded. 2) does the player have ammo (loaded magazines only if the gun uses magazines). 3) damage.

Parameters:

  • playerObj IsoPlayer
  • subCategory nil or string “Pistol”, “Rifle” or “Shotgun”

See also:

compareFirearms (item1, item2)
Compares 2 firearms and returns the better choice.

Parameters:

  • item1 table {item=HandWeapon, loaded=boolean, ammo=boolean, dmg=float}
  • item2 table {item=HandWeapon, loaded=boolean, ammo=boolean, dmg=float}

Returns:

    table either item1 or item2
equipBestMeleeWeapon (playerObj, subCategory)
Used for selecting melee weapons.

Basically PZ’s default weapon selection code.

Parameters:

  • playerObj IsoPlayer
  • subCategory nil or string subCategory of the InventoryItem

See also:

generated by LDoc 1.4.3 Last updated 2018-10-07 13:48:49