Changes between Version 20 and Version 21 of Triggers
- Timestamp:
- Aug 10, 2014, 12:44:39 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Triggers
v20 v21 163 163 Notes 164 164 }}} 165 |---------------- 166 {{{#!td 167 `OnStructureBuilt` 168 }}} 169 {{{#!td 170 {{{#!js 171 {"enabled": bool} 172 }}} 173 }}} 174 {{{#!td 175 {{{#!js 176 {"building": constructedBuilding} 177 }}} 178 }}} 179 {{{#!td 180 Happens when a foundation gets finished or a building gets completely repaired 181 }}} 165 182 166 |---------------- 183 167 {{{#!td … … 202 186 |---------------- 203 187 {{{#!td 204 `OnTrainingFinished` 205 }}} 206 {{{#!td 207 {{{#!js 208 {"enabled": bool} 209 }}} 210 }}} 211 {{{#!td 212 {{{#!js 213 { 214 "entities": [entityId], 215 "owner": playerId, 216 "metadata": metadata 217 } 218 }}} 219 }}} 220 {{{#!td 221 Happens when training of some units is finished 222 }}} 223 |---------------- 224 {{{#!td 225 `OnTrainingQueued` 226 }}} 227 {{{#!td 228 {{{#!js 229 {"enabled": bool} 230 }}} 231 }}} 232 {{{#!td 233 {{{#!js 234 { 235 "playerid": playerId, 236 "unitTemplate": templateName, 237 "count": number, 238 "metadata": metadata, 239 "trainerEntity": entityId 240 } 241 }}} 242 }}} 243 {{{#!td 244 245 }}} 246 |---------------- 247 {{{#!td 248 `OnResearchFinished` 249 }}} 250 {{{#!td 251 {{{#!js 252 {"enabled": bool} 253 }}} 254 }}} 255 {{{#!td 256 {{{#!js 257 { 258 "player": playerId, 259 "tech": templateName 260 } 261 }}} 262 }}} 263 {{{#!td 264 265 }}} 266 |---------------- 267 {{{#!td 268 `OnResearchQueued` 269 }}} 270 {{{#!td 271 {{{#!js 272 {"enabled": bool} 273 }}} 274 }}} 275 {{{#!td 276 {{{#!js 277 { 278 "playerid": playerId, 279 "technologyTemplate": templateName, 280 "researcherEntity": entityId 281 } 282 }}} 188 `OnInterval` 189 }}} 190 {{{#!td 191 {{{#!js 192 { 193 "delay": number, 194 "interval": number, 195 "enabled": bool 196 } 197 }}} 198 }}} 199 {{{#!td 200 TODO 283 201 }}} 284 202 {{{#!td … … 325 243 {{{#!td 326 244 Any command a player sends. The "cmd" part of a command always have a type, and per type can have different other atributes. Check the documentation in the source file ([source:ps/trunk/binaries/data/mods/public/simulation/helpers/Commands.js Commands.js]) for documentation 327 }}}328 |----------------329 {{{#!td330 `OnInterval`331 }}}332 {{{#!td333 {{{#!js334 {335 "delay": number,336 "interval": number,337 "enabled": bool338 }339 }}}340 }}}341 {{{#!td342 TODO343 }}}344 {{{#!td345 346 245 }}} 347 246 |---------------- … … 373 272 374 273 }}} 274 |---------------- 275 {{{#!td 276 `OnResearchFinished` 277 }}} 278 {{{#!td 279 {{{#!js 280 {"enabled": bool} 281 }}} 282 }}} 283 {{{#!td 284 {{{#!js 285 { 286 "player": playerId, 287 "tech": templateName 288 } 289 }}} 290 }}} 291 {{{#!td 292 293 }}} 294 |---------------- 295 {{{#!td 296 `OnResearchQueued` 297 }}} 298 {{{#!td 299 {{{#!js 300 {"enabled": bool} 301 }}} 302 }}} 303 {{{#!td 304 {{{#!js 305 { 306 "playerid": playerId, 307 "technologyTemplate": templateName, 308 "researcherEntity": entityId 309 } 310 }}} 311 }}} 312 {{{#!td 313 314 }}} 315 |---------------- 316 {{{#!td 317 `OnStructureBuilt` 318 }}} 319 {{{#!td 320 {{{#!js 321 {"enabled": bool} 322 }}} 323 }}} 324 {{{#!td 325 {{{#!js 326 {"building": constructedBuilding} 327 }}} 328 }}} 329 {{{#!td 330 Happens when a foundation gets finished or a building gets completely repaired 331 }}} 332 |---------------- 333 {{{#!td 334 `OnTrainingFinished` 335 }}} 336 {{{#!td 337 {{{#!js 338 {"enabled": bool} 339 }}} 340 }}} 341 {{{#!td 342 {{{#!js 343 { 344 "entities": [entityId], 345 "owner": playerId, 346 "metadata": metadata 347 } 348 }}} 349 }}} 350 {{{#!td 351 Happens when training of some units is finished 352 }}} 353 |---------------- 354 {{{#!td 355 `OnTrainingQueued` 356 }}} 357 {{{#!td 358 {{{#!js 359 {"enabled": bool} 360 }}} 361 }}} 362 {{{#!td 363 {{{#!js 364 { 365 "playerid": playerId, 366 "unitTemplate": templateName, 367 "count": number, 368 "metadata": metadata, 369 "trainerEntity": entityId 370 } 371 }}} 372 }}} 373 {{{#!td 374 375 }}} 376 |---------------- 377 {{{#!td 378 `OnTreasureCollected` 379 }}} 380 {{{#!td 381 {{{#!js 382 { 383 } 384 }}} 385 }}} 386 {{{#!td 387 {{{#!js 388 { 389 "player": cmpPlayer.GetPlayerID(), 390 "type": type.specific, 391 "amount": status.amount 392 } 393 }}} 394 }}} 395 {{{#!td 396 Happens in ResourceGatherer.js when a treasure is collected. 397 398 }}} 399