Commit Graph

30 Commits (master)

Author SHA1 Message Date
Maikel de Vries e18cee3a46 turn musket into blunderbuss
The musket was not a very popular and useful weapon, being inferior to the bow. It now shoots 5 weaker bullets in one shot with less damage per bullet, this might require some further testing and fine-tuning. Also the weaker bullets mean that they can be used in a gatling-gun (WIP) and in the airplane as well.
2016-08-22 16:32:48 +02:00
Maikel de Vries 45bb9ab550 rename lead shot to lead bullet and clean up script 2016-08-22 16:32:47 +02:00
Mark 1d288575ee Stackable: Unit test for extra-slot items containing stacks. 2016-04-08 22:04:24 +02:00
Mark 1c1ea38efa Renamed the liquids IDs
Omitted the prefix "Liquid_".
2016-03-25 19:11:55 +01:00
Mark 74ce1ea8ac Stackable: Unit test for barrel entering Clonks via interaction menu 2016-03-25 15:16:03 +01:00
Mark a224d62791 Stackable: Unit test for initialization
The earth object did not include _inherited(...) in the Construction() callback. Thus it was not initialized as a stackable object correctly. Fortunately the other stackable objects did not have this problem.
Nonetheless I added a unit test, so that we can identify similar problems in the future.
2016-03-18 06:30:16 +01:00
Mark ac8d40418c Refactoring: Stackable: Renamed TryPutInto() to MergeWithStacksIn()
The previous name suggested that the object actually gets put into another object. In fact it merges the stack count with other stacks, and it does not only try to (and reverts the state if it fails), but it actually changes other objects even if the function returns false.
2016-03-16 18:19:55 +01:00
Mark a61eac6ff3 Refactoring: Stackable: Reenabled recursive stacking into items
This got removed by accidet (checking if the object was added to another stack seemed logical). However, this whole function does not really make sense. It returns true if the object got removed only. That means that the object would not enter the other object anyway.
Removed the UpdateStackDisplay(), because that happens in TryAddToStack() if the count changes, anyway.
2016-03-11 07:03:22 +01:00
Mark b40e44340c Stackable: Reverted some tests.
Checked the tests against the original implementation. Turns out that the implementation was recursive for finite stacks after all!
2016-03-10 17:41:22 +01:00
Mark 0759c59bf1 Stackable: Fixed remaining unit tests 2016-03-10 17:29:42 +01:00
Mark 2e8ed77f56 Stackable: Fixed unit test 17
The test simply had a wrong expectation.
2016-03-10 17:20:45 +01:00
Mark 862c4ad312 Stackable: Fixed unit test 12 and 13
The test expects what the method does. Added original expected behavior in comments, because this was the use case example.
2016-03-10 07:03:29 +01:00
Mark f0aa3fafc7 Stackable: Fix unit test 8
The test now expects what the functions actually do. Put the previously expected behavior in comments
2016-03-10 06:56:05 +01:00
Mark 674145dc48 Refactoring: Stackable: Fix unit test 5
Added documentation for Stack(); Stack() does not stack on top of itself anymore.
2016-03-10 06:41:34 +01:00
Mark 114ad2697e Refactoring: Stackable: A stack can never contain 0 items
Stacks with 0 or less items are always removed. GetStackCount() returns the actual stack count now, which should always be positive.
2016-03-09 06:59:46 +01:00
Mark b16e94d51d Stackable: Unit test for use case #2 with infinite objects 2016-03-09 06:30:49 +01:00
Mark 2dd6bbdaf4 Stackable: More unit tests for infinite object 2016-03-08 22:53:27 +01:00
Mark 350088525c Refactoring: Stackable: Use InitialStackCount() where it makes sense 2016-03-08 06:57:53 +01:00
Mark d8a68f5655 Stackable: Unit test for stacking finite and infinite objects 2016-03-08 06:48:34 +01:00
Mark fe5e1bc581 Stackable: Unit test for infinite stack count, basics.
Found a bug: An infinite stack gets removed if you take the entire stack at once.
2016-03-07 17:47:49 +01:00
Mark 45fbc64254 Stackable: Remove obsolete objects. 2016-03-07 06:53:08 +01:00
Mark c7fc982d3e Stackable: Unit tests for the use cases from the stackable documentation. 2016-03-07 06:40:27 +01:00
Mark 8573ed9745 Stackable: Unit test for deeply nested extra-slot objects 2016-03-07 06:13:44 +01:00
Mark df04c2c9c1 Stackable: Unit test 9
Stack objects into a container with non-extra-slot containers.
2016-03-06 21:44:57 +01:00
Mark 4101dc7600 Stackable: Additional test scenarios for unit test 8 2016-03-06 21:30:57 +01:00
Mark d86fe2549d Stackable: Unit test for TryPutInto() with empty containers.
First part of a series of tests. TryPutInto() has to be tested with several container types.
2016-03-06 21:04:28 +01:00
Mark e92f5b6bf9 Stackable: Better logging in unit test
Also corrected some minor details in the test logic, related to InitialStackCount() and MaxStackCount().
2016-03-06 06:49:57 +01:00
Mark 258f3d3b3b Stackable: Unit tests for Stack() and TryAddToStack() 2016-03-04 17:46:24 +01:00
Mark ec35a11013 Stackable: More unit tests
Tests for CalcValue() and TakeObject(). Testing the behaviour in combination with containers that have an extra slot is necessary.
2016-03-04 06:57:47 +01:00
Mark e8b6fda751 Stackable: Unit test
First unit tests for the stackable library
2016-03-03 23:01:52 +01:00