External Publication
Visit Post

OpenTTD AIs and Game Scripts • Re: nasal demons in action

Transport Tycoon Forums - Index page [Unofficial] March 2, 2026
Source

AIList::AddList copies items from the list passed as parameter. If you have two source lists you add AddList them both to a single and get a new list with the items appended.

The postcondition you're quoting says that the list you copy from does not change as a result of the copy. Yes, the items are copied, not moved, so the source list remains identical. It does not say that the two list objects become "linked" or anything.

If you had object references as the data items on the list, the destination list would reference the same objects as the source list, but the list itself is still independent, so you could reorder, add, remove items from one list without affecting the other one.

Statistics: Posted by jfs — 02 Mar 2026 09:18


Discussion in the ATmosphere

Loading comments...