Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/messages.js
Show First 20 Lines • Show All 393 Lines • ▼ Show 20 Lines | addChatMessage({ | ||||
"targetIsDomesticAnimal": notification.targetIsDomesticAnimal | "targetIsDomesticAnimal": notification.targetIsDomesticAnimal | ||||
}); | }); | ||||
}, | }, | ||||
"dialog": function(notification, player) | "dialog": function(notification, player) | ||||
{ | { | ||||
if (player == Engine.GetPlayerID()) | if (player == Engine.GetPlayerID()) | ||||
openDialog(notification.dialogName, notification.data, player); | openDialog(notification.dialogName, notification.data, player); | ||||
}, | }, | ||||
"forceselectionrefresh": function(notification, player) | |||||
elexis: dont name this according to what it should do, consider this to be an event that describes what… | |||||
Done Inline ActionsGood point, though I've simply removed this event and resetselectionpannel below in the latest diff. wraitii: Good point, though I've simply removed this event and `resetselectionpannel` below in the… | |||||
{ | |||||
if (player != Engine.GetPlayerID()) | |||||
Done Inline ActionsCould invert it and remove a line ? Stan: Could invert it and remove a line ? | |||||
return; | |||||
g_Selection.onChange(); | |||||
}, | |||||
"resetselectionpannel": function(notification, player) | "resetselectionpannel": function(notification, player) | ||||
{ | { | ||||
if (player != Engine.GetPlayerID()) | if (player != Engine.GetPlayerID()) | ||||
return; | return; | ||||
g_Selection.rebuildSelection({}); | g_Selection.rebuildSelection({}); | ||||
}, | }, | ||||
"playercommand": function(notification, player) | "playercommand": function(notification, player) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 737 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
dont name this according to what it should do, consider this to be an event that describes what happened.
then the GUI can decide what to do on that event, which may be more than updating the selection.
So it should be something like "entitytokenschanged" or so.
Also one only needs to rebuild the selection if an enity was affected.