View Issue Details

IDProjectCategoryView StatusLast Update
0005259Spring engineGeneralpublic2016-07-09 16:43
ReporterDeinFreund Assigned Tohokomoko  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version101.0+git 
Summary0005259: Disable take modoption
DescriptionAdd a modoption that disables /take

Currently, mods like zk have to use workarounds like
https://github.com/ZeroK-RTS/Zero-K/blob/ee87cd07f90f7583ec9a448809d7b4c25011d35b/LuaRules/Gadgets/game_disable_take.lua#L33
which causes issues with giving units.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

silentwings

2016-06-03 09:56

reporter   ~0016398

Last edited: 2016-06-03 09:57

modoptions are defined in the games modoptions.lua and implemented via lua gadgets (such as that one, potentially) -> this is a feature request for ZK.

DeinFreund

2016-06-03 10:04

reporter   ~0016399

DeinDrunkFreund..

The problem is that Take can't be properly disabled with lua afaik. There's currently gadget:AllowUnitTransfer which handles both taking and giving units without letting the gadget know whether units are being taken or given. It would be nice to have an additional argument that gives this information.

silentwings

2016-06-03 10:08

reporter   ~0016400

Last edited: 2016-06-03 10:11

there are also addon:UnitGiven and addon:UnitTaken, but i think they may only be called after the event

Google_Frog

2016-06-03 13:49

reporter   ~0016401

The feature request amounts to disabling /take with a modrule. Basically, /take gets in the way of games which want to implement their own handling for dropped players. It is a piece of weird engine behaviour which could easily be implemented by games.

ZK implements its own automatic tracking and sharing of units from lagging or dropped player. DeinFreund wants the feature request because he wants to share units between AI teams. However, years ago we discovered that /take can be used to take control of the units of allied luaAIs and so we disabled transfer for AI teams.

lamer

2016-07-09 15:58

reporter   ~0016483

https://github.com/spring/spring/pull/264

hokomoko

2016-07-09 16:43

developer   ~0016485

Fix 1f3a67b0f8ea6f031877a0447a0e259043215922 committed to develop branch: Merge pull request 0000264 from rlcevg/allow_take

Add allowTake modrule (fix 0005259), repo: spring changeset id: 7200

Issue History

Date Modified Username Field Change
2016-06-01 15:13 DeinFreund New Issue
2016-06-03 09:56 silentwings Note Added: 0016398
2016-06-03 09:57 silentwings Note Edited: 0016398
2016-06-03 10:04 DeinFreund Note Added: 0016399
2016-06-03 10:08 silentwings Note Added: 0016400
2016-06-03 10:08 silentwings Note Edited: 0016400
2016-06-03 10:11 silentwings Note Edited: 0016400
2016-06-03 13:49 Google_Frog Note Added: 0016401
2016-07-09 15:58 lamer Note Added: 0016483
2016-07-09 16:43 hokomoko Changeset attached => spring develop 1f3a67b0
2016-07-09 16:43 hokomoko Note Added: 0016485
2016-07-09 16:43 hokomoko Assigned To => hokomoko
2016-07-09 16:43 hokomoko Status new => resolved
2016-07-09 16:43 hokomoko Resolution open => fixed