Skip to content
Rusketh edited this page Apr 18, 2014 · 2 revisions

Custom Components

Custom components can be installed to lua/lemongate/components/custom. To enable/ disable a custom component you can use the following concommand "lemon_component {component name} {1/0}" followed by "lemon_reload". There are 3 custom components are shipped by default.

PropCore Component

The prop core component allows you to spawn props into the game, it is disabled by default.

Cvar Default Description
lemon_prop_max 50 The maximum propcore spawned prop per player over all LemonGates.
lemon_prop_rate 10 Maximum props a player can spawn per second.
Function Return Description
canSpawn() Boolean Returns true if a prop can be created.
Entity:dealDamage(Number) Void Deals damage to an entity.
Entity:destroy() Void
Entity:destroy(Vector, Boolean) Void
Entity:enableGravity(Boolean) Void Enable gravity on E.
Physics:enableGravity(Boolean) Void Enable gravity on physics object P.
Entity:freeze(Boolean) Void Set B to true to freeze an entity.
Physics:freeze(Boolean) Void Set B to true to freeze a physics object.
noSpawnEffect(Boolean) Void Makes propcore use an effect when spawning props.
Entity:parent(Entity) Void Sets the parent entity of E.
Entity:parent(Physics) Void Sets the parent physics object of E.
propcore() Table Returns a table of the current propcore settings.
Entity:remove() Void Removes entity E.
Entity:setAng(Angle) Void Sets the angle of an entity.
Entity:setNotSolid(Boolean) Void Changes the solidity of an entity.
Entity:setPhysProp(String, Boolean) Void
Entity:setPos(Vector) Void Sets the position of an entity.
spawn(String, Boolean) Entity Creates and returns a new prop using S as its model, it will be frozen if B is true.
spawn(String) Entity Creates and returns a new prop using S as its model.
spawnedProps() Table Returns a table of props created by the LemonGate.
Entity:unparent() Void Unparents E from its parent.

Hover Text Component

The hovertext component allows you to attach hovering text to entities, it is enabled by default.

Cvar Default Description
lemon_hovertext_maxrange 50000 The maximum visual range of hovering text.
Constant Type
HOVERTEXT_TINY String
HOVERTEXT_TINY String
HOVERTEXT_SMALL String
HOVERTEXT_SMALL_SHADOW String
HOVERTEXT_NORMAL String
HOVERTEXT_NORMAL_SHADOW String
HOVERTEXT_LARGE String
HOVERTEXT_LARGE_SHADOW String
Function Return Description
hovertextFonts() Table
Entity:removeText() Void e:removeText()
Entity:setText(String) Void e:setText(Text)
Entity:setText(String, Color) Void e:setText(Text, Color)
Entity:setText(String, Color, Vector) Void e:setText(Text, Color, Offset)
Entity:setText(String, Color, Vector, Number) Void e:setText(Text, Color, Offset, Range)
Entity:setText(String, String) Void e:setText(Text, Font)
Entity:setText(String, String, Color) Void e:setText(Text, Font, Color)
Entity:setText(String, String, Color, Vector) Void e:setText(Text, Font, Color, Offset)
Entity:setText(String, String, Color, Vector, Number) Void e:setText(Text, Font, Color, Offset, Range)
Entity:setTextColor(Color) Void e:setTextColor(Color)
Entity:setTextFilter(Table) Void e:setTextRange(Filter)
Entity:setTextFont(String) Void e:setTextFont(Font)
Entity:setTextOffset(Vector) Void e:setTextOffset(Offset)
Entity:setTextRange(Number) Void e:setTextRange(Range)

Clone this wiki locally