Commit Graph
7 Commits
Author SHA1 Message Date
David Cernat 5b242a516f Revert "add scale in createObject (#106)"
This reverts commit 58fa94e838.

Rickoff's changes did not work as intended by him, because the condition he added for sending ObjectScale packets was never true due to it relying on an uninitialized variable. It's better to just handle object scales in a different function anyway.

# Conflicts:
#	scripts/dataTableBuilder.lua
2022-03-22 00:07:09 +02:00
David Cernat 26756e6df9 [General] Turn tab characters into spaces, for stylistic consistency 2022-03-12 23:38:35 +02:00
RickoffandGitHub 58fa94e838 add scale in createObject (#106)
* add scale in createObject

* Update logicHandler.lua

* Update dataTableBuilder.lua
2022-02-16 14:33:02 +02:00
NkfreeandGitHub fdf5b3f966 Customize logicHandler.CreateObjects functions to take into account object's properties such as count, charge (if the packetType is equal to "place") (#97)
logicHandler.CreateObjectsAtPlayer and logicHandler.CreateObjectAtLocation both take objectData table instead of plain refId.

objectData can be built using added method BuildObjectData in dataTableBuilder.lua

This way any amount of say gold can be spawned easily.

For backwards compatibility it's possible to replace argument refId in either logicHandler.CreateObjectAtPlayer or logicHandler.CreateObjectAtLocation with dataTableBuilder.BuildObjectData(refId)
2022-02-09 22:49:42 +02:00
David Cernat a0ae5016f6 [General] Rework arguments for AI data & packet methods 2018-08-12 05:43:41 +03:00
David Cernat c3407bac45 [General] Rename refIndex into uniqueIndex
This helps improve clarity by preventing confusion between the refNum and the combination of a refNum and an mpNum that is now called the uniqueIndex.
2018-07-13 04:31:38 +03:00
David Cernat 969e3d3cec [General] Create dataTableBuilder & packetBuilder, initially used for AI 2018-07-11 20:15:34 +03:00