Skip to content

Commit

Permalink
Sean (#74)
Browse files Browse the repository at this point in the history
* Saving work on road

* Commit for safety in case of reversion.

Needs fixing and cleanup, but saving to branch in case of future problems.

* Reversion Point

Not ready for pull request.

* New action and other changes.

Still not ready to pull.

* Action object changed and selection modified

Contract list added to action object constructor in order to allow for pre-tick contract generation that is accessible by the client without exposing player.

* Changed location type to region

* Delete singleton_controller.py

Removed unused Singleton

* Cleanup and memes

* Changed from_json and added copy

Needs review

* Removed deprecated client property

* Fixed active contract assignment

* Added comments

* Fixes

* More fixes

Changed equals to equals to __eq__  to fit python conventions and added isinstance check. Also fixed typo in contract saving.

* More fixes

Changed equals to __eq__  to fit python conventions and added isinstance check. Also fixed typo in contract saving.

* Quick fix

* Design Changes

Moved functionality to truck as suggested by Wyly

* Rework

Saving before potentially working on contract generation.

* Comments and fix

* Minor change

* Fixed outdated comment

* Update stats.py

* Update contract_controller.py

* Update action.py

* Fixed multiple outputs

* Merged Chris

* Merged dev

* began work on time function

* Gas Controller changes

* Buy controller?

* Moved time to player

* Resolved sophies suggestions

* removed locationTypes File

* Added file for effort controller

* Added RoadType and DisasterType to enums

* Added length modifier to road

* Added road_type as parameter for road

* Connect road types to event types

* Create 2020-10-27-byte-le-minutes.md

* EventHandler Logic

Method to randomly chose and execute an event.

* Working game!

* Removed print statement!

* Moved event_handler

Moved into controllers and renamed to event_controller

* removed controllers

* Removed imports

* Other minor changes

* Okay guys it really works this time

* Changed possible event types from sets to lists (for weighting)

* Added missing name in get city by name

* Add files via upload

* Linked truck\'s node to map

* Added missing import

* Began work on upgrade controller

* Add files via upload

* Revert "Linked truck\'s node to map"

This reverts commit 660b051.

* Progress update, stuff is actually getting done folks I'm not lying this time haha

* Add files via upload

* Update 2020-11-17-byte-le-minutes.md

* More upgrades and their tests! TODO add logic for only having one of each upgrade class

* Began work on changing upgrade logic to only allow for one upgrade of each type

* nearly to the pr state

* Add files via upload

* I'm a lazy bum for not having done any of this sooner. Happy Thanksgiving

* A bit late for Thanksgiving but I think I've got something here. Seems to work alright

* Add files via upload

* Completed the framework for upgrading objects.

* Added some comments.

* Finished body upgrade controller, objects and tests. Need to align tests so they are more similar

* Finished upgrade logic, changed classes so they all inherit baseUpgradeObject

* here this should run I think

* Add files via upload

* made tests similar to eachother, all passing

* here you go soph

* Fixed spelling mistakes

* Removed logic that only allowed you to buy gas at cities

* Fixes. Added inheritence for body objects so they all have gas levels. I think it works

* placeholder contract generation reimplemented, json modified

* fixes and region modifiers

* Added truck to/from json, logic to prevent contract selection being out of bounds

* json fixes, player current node, selection modification

* fixes, comments, removed redundancy

* more fixes

* minor fixes

* Began work on implementing how upgrades impact event damage and chance. Still thinking about the best way to do this

* Fixed node not calling to_json method in truck

* began changes to gamestats, event controller

* Fixed some json

* node json and typo fix

* fixed typo

* Finished changing the logic for events, will start creating tests for them

* fixed duplicate from merge

* basic json output

* Current node assignment fixes, typo

* missing self in event_controller

* missing import

* quick fix

* more progress on the event controller tests, fixes

* percentage change

* organization and longer roads

* More progress on creating tests

* Merged Dev

* Finished event testing. Was unable to unit test move because it's too bulky/dependant to unit test

* Removed uneccesary assignement of event controller hapenning twice, commented out auto time reduction

* truck from json, contract deadline/renown, moved money to truck

* removed broken is equal method

* reimplement contract == method

* deadline stat changes

* Fixed test cases

* Began looking into broken upgrade controller

* Before pull dev

* Reverted changes to payment

* Fixes to health and gas actions so they work as intended

* Uncommented game map in contract for now

* Added maximum speed gamestat. Also Fixed bad reference in heal controller. Added speed unit test

* Began work on documentation

* Began work on documentation

* Fix partial gas buy

* Fixed client, __speed variable was unnecessary

* Changes is not to !=

* Removed move unit tests

* Set upgrades to base objects. minor changes to base client

* Updated docs a bit

* Every turn now takes one tick of time. Pumping gas, repairing and upgrading also now take time with this time listed in gamestats. Updated docs but more work to do

* Fixed some formatting stuff

* More formatting junk

* Fixed mpg to be based on speed 'again'

* Added final score

* slight changes to stats. Fixed tire switching not working

* fixed max turn time

* Added scrimage server

* Began work on scrimage server

* Upped buffer size

* a bunch of stuff

* Updated git ignore to have vID

* Added log removal after new game is run

* More client changes

* Update build.sh

Changed back to 3

* Added new scrimmage server

* Added scrimmage temp folders to git ignore

* Fixed bug where runs would go past max runs

* Updated client, added time subtraction for no actiontype chosen

* Added url resolver. CSS style

* Fixed formatting issues

* Built documentation

* Moved test client, changed docs

* Moved some stuff around within the docs

* hey look it'sa website er something maybe

* Considerable changes to documentation

* made some edits to the wrapper. updating should now be possible once we start working with versions which I'd really like to have started doing by now but that's neither here nor there at this point. happy face, happy thoughts happy face happy thoughts

* Tiny little itty bitty change because I'm a smarty pants. Also not sure who put that semi-colon there, Riley.

* Changes

* Built docs, added new command

* More merge conflicts that don't show up in rst files

* Updated server

* Resolved conflict in html, unneeded files

* Added great image

* Removed map comment

* Fixed issue with __main__

Co-authored-by: Christopher Parks <[email protected]>
Co-authored-by: Anomalous-Creator <[email protected]>
Co-authored-by: [Sean Hagen] <[email protected]>
Co-authored-by: qstanley <[email protected]>
Co-authored-by: Christopher Parks <[email protected]>
Co-authored-by: PixPanz <[email protected]>
  • Loading branch information
7 people authored Feb 19, 2021
1 parent 809f032 commit 8b1800c
Show file tree
Hide file tree
Showing 66 changed files with 1,584 additions and 112 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cp -r ./game ./wrapper/game
cp -r ./scrimmage ./wrapper/scrimmage
python3 -m zipapp ./wrapper -o ./launcher.pyz -c
rm -rf ./wrapper/game
rm -rf ./wrapper/scrimmage
rm -rf ./wrapper/scrimmage
Binary file added docs/.doctrees/AddonObjects.doctree
Binary file not shown.
Binary file added docs/.doctrees/BodyObjects.doctree
Binary file not shown.
Binary file added docs/.doctrees/Contract.doctree
Binary file not shown.
Binary file added docs/.doctrees/Road.doctree
Binary file not shown.
Binary file added docs/.doctrees/RunningTheGame.doctree
Binary file not shown.
Binary file added docs/.doctrees/TakingAction.doctree
Binary file not shown.
Binary file added docs/.doctrees/TireObjects.doctree
Binary file not shown.
Binary file added docs/.doctrees/Truck.doctree
Binary file not shown.
Binary file added docs/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/AddonObjects.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/GameMap.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/Road.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/RunningTheGame.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/TakingAction.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/TireObjects.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/Truck.doctree
Binary file not shown.
Binary file added docs/LearnTheTruckinGame/.doctrees/enums.doctree
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/LearnTheTruckinGame/.doctrees/index.doctree
Binary file not shown.
28 changes: 13 additions & 15 deletions docs/LearnTheTruckinGame/AddonObjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -181,11 +182,10 @@ <h1>Add On Objects<a class="headerlink" href="#add-on-objects" title="Permalink
<div class="section" id="the-policescanner-object">
<h2>The policeScanner Object<a class="headerlink" href="#the-policescanner-object" title="Permalink to this headline"></a></h2>
<p>The police scanner object helps you evade the cops. It will reduce the damage and time taken from the police event.
Referenced as:
.. code-block:: python</p>
<blockquote>
<div><p>ObjectType.policeScanner</p>
</div></blockquote>
Referenced as:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">ObjectType</span><span class="o">.</span><span class="n">policeScanner</span>
</pre></div>
</div>
<p>The levels are below</p>
<table class="docutils align-default">
<colgroup>
Expand Down Expand Up @@ -222,11 +222,10 @@ <h2>The policeScanner Object<a class="headerlink" href="#the-policescanner-objec
<div class="section" id="the-gps-object">
<h2>The GPS Object<a class="headerlink" href="#the-gps-object" title="Permalink to this headline"></a></h2>
<p>GPS will help re-route you away from traffic. It will reduce the damage and time taken from the traffic event.
Referenced as:
.. code-block:: python</p>
<blockquote>
<div><p>ObjectType.GPS</p>
</div></blockquote>
Referenced as:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">ObjectType</span><span class="o">.</span><span class="n">GPS</span>
</pre></div>
</div>
<p>The levels are below</p>
<table class="docutils align-default">
<colgroup>
Expand Down Expand Up @@ -264,11 +263,10 @@ <h2>The GPS Object<a class="headerlink" href="#the-gps-object" title="Permalink
<h2>The Rabbits foot Object<a class="headerlink" href="#the-rabbits-foot-object" title="Permalink to this headline"></a></h2>
<p>The Rabbit’s foot will bring you good luck in the event a disaster occuring.
It will minorly reduce incoming damage from all event types. This bonus will stack additively with your other damage reduction bonuses.
Referenced as:
.. code-block:: python</p>
<blockquote>
<div><p>ObjectType.rabbitFoot</p>
</div></blockquote>
Referenced as:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">ObjectType</span><span class="o">.</span><span class="n">rabbitFoot</span>
</pre></div>
</div>
<p>The levels are below</p>
<table class="docutils align-default">
<colgroup>
Expand Down
1 change: 1 addition & 0 deletions docs/LearnTheTruckinGame/BodyObjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down
1 change: 1 addition & 0 deletions docs/LearnTheTruckinGame/Contract.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down
1 change: 1 addition & 0 deletions docs/LearnTheTruckinGame/Events.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down
8 changes: 1 addition & 7 deletions docs/LearnTheTruckinGame/GameMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@
<li class="toctree-l1"><a class="reference internal" href="Events.html">Events</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Game Map</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#instance-variables">Instance variables</a></li>
<li class="toctree-l2"><a class="reference internal" href="#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Node.html">Node</a></li>
<li class="toctree-l1"><a class="reference internal" href="Road.html">Road</a></li>
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -204,12 +204,6 @@ <h2>Instance variables<a class="headerlink" href="#instance-variables" title="Pe
</tbody>
</table>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline"></a></h2>
<p>get_next_node() -&gt; get the next node in the game map. also sets your current node to the get_next_node
length() -&gt; returns the number of nodes in the map. Also sets current node to end
reset_current() -&gt; resets your current node to head</p>
</div>
</div>


Expand Down
1 change: 1 addition & 0 deletions docs/LearnTheTruckinGame/Node.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down
3 changes: 2 additions & 1 deletion docs/LearnTheTruckinGame/Road.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -211,7 +212,7 @@ <h2>Instance variables<a class="headerlink" href="#instance-variables" title="Pe
<h2>Road Type Modifiers<a class="headerlink" href="#road-type-modifiers" title="Permalink to this headline"></a></h2>
<p>There are 6 Roadtypes, mountain_road, forest_road, tundra_road, city_road, highway, and interstate. Road type enumerations can be accessed by RoadType.&lt;RoadType&gt;</p>
<p><strong>Potential Events</strong></p>
<p>The potential events that can happen on a given road type are listed below. More on events can be seen at <a class="reference internal" href="Events.html"><span class="doc">Events</span></a></p>
<p>The potential events that can happen on a given road type are listed below, in order of how often they occur. More on events can be seen at <a class="reference internal" href="Events.html"><span class="doc">Events</span></a></p>
<table class="docutils align-default">
<colgroup>
<col style="width: 21%" />
Expand Down
7 changes: 6 additions & 1 deletion docs/LearnTheTruckinGame/RunningTheGame.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -201,7 +202,11 @@ <h2>Installing<a class="headerlink" href="#installing" title="Permalink to this
<h2>Running the game<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<div class="section" id="building-the-launcher">
<h3>Building the launcher<a class="headerlink" href="#building-the-launcher" title="Permalink to this headline"></a></h3>
<p>When updates are pushed, (run python launcher.pyz u?). Then run build.bat.</p>
<p>run build.bat by clicking on it or through a terminal. TDQM is needed for this project, so also run</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">pip install tdqm</span>
</pre></div>
</div>
<p>When updates are pushed, (run python launcher.pyz u?).</p>
</div>
<div class="section" id="generating-the-map">
<h3>Generating the map<a class="headerlink" href="#generating-the-map" title="Permalink to this headline"></a></h3>
Expand Down
28 changes: 19 additions & 9 deletions docs/LearnTheTruckinGame/TakingAction.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<li class="toctree-l2"><a class="reference internal" href="#upgrading">Upgrading</a></li>
<li class="toctree-l2"><a class="reference internal" href="#switching-tires">Switching Tires</a></li>
<li class="toctree-l2"><a class="reference internal" href="#choosing-a-speed">Choosing a speed</a></li>
<li class="toctree-l2"><a class="reference internal" href="#failure-to-action">Failure to action</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Truck.html">The Truck Object</a></li>
Expand All @@ -112,6 +113,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="TireObjects.html">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -190,7 +192,7 @@ <h1>Taking Action<a class="headerlink" href="#taking-action" title="Permalink to
<h2>Selecting a contract<a class="headerlink" href="#selecting-a-contract" title="Permalink to this headline"></a></h2>
<p>A list of contracts will be generated every turn. These contracts can be viewed in truck.contract_list
Once you have chosen a contract, pass the select contract enum and the index of the contract which you
wish to select.</p>
wish to select. Selecting a contract takes one hour.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">select_contract</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -200,7 +202,8 @@ <h2>Selecting a contract<a class="headerlink" href="#selecting-a-contract" title
<h2>Moving<a class="headerlink" href="#moving" title="Permalink to this headline"></a></h2>
<p>Moving requires selecting a road. The list of roads you can select is in truck.current_node.roads.
Simply pass the road you wish to travel to by passing the index of the road you wish to take. Each
road will lead to the same node.</p>
road will lead to the same node. Please note that the amount of time it takes to travel a road is
simply calculated by (road.length / player.truck.get_current_speed())</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">select_route</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -209,7 +212,8 @@ <h2>Moving<a class="headerlink" href="#moving" title="Permalink to this headline
<div class="section" id="buying-gas">
<h2>Buying Gas<a class="headerlink" href="#buying-gas" title="Permalink to this headline"></a></h2>
<p>You can buy gas at every node. Gas prices vary from node to node. There are no arguments passed to the
buy gas method, it will either fill up your tank or buy the most gas you can afford.</p>
buy gas method, it will either fill up your tank or buy the most gas you can afford. Buying gas also takes
a flat 5 hours.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">buy_gas</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -219,7 +223,7 @@ <h2>Buying Gas<a class="headerlink" href="#buying-gas" title="Permalink to this
<h2>Repairing<a class="headerlink" href="#repairing" title="Permalink to this headline"></a></h2>
<p>Throughout the game your truck will take damage. Similar to buying gas, Repair prices will fluctuate from
node to node. No arguments are required, and the truck will either fully repair or repair the most you can
afford.</p>
afford. Repairing a truck takes 10 hours.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">repair</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -229,29 +233,35 @@ <h2>Repairing<a class="headerlink" href="#repairing" title="Permalink to this he
<h2>Upgrading<a class="headerlink" href="#upgrading" title="Permalink to this headline"></a></h2>
<p>Upgrades can negate damage and time penalties from events. There are two upgrade slots (body, addons)
which each have three different upgrade types. If you don’t have enough money, the upgrade will be ignored. Switching
from one object to another will result in a complete loss of the former upgrade.</p>
from one object to another will result in a complete loss of the former upgrade. Upgrading takes 4 hours.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">upgrade</span><span class="p">,</span> <span class="n">Objectype</span><span class="o">.</span><span class="n">policeScanner</span><span class="p">)</span>
</pre></div>
</div>
<p>Will upgrade or switch your add on object to policeScanner. Other possible upgrades are tank, headlights, sentryGun, rabbitFoot, and GPS</p>
</div>
<div class="section" id="switching-tires">
<h2>Switching Tires<a class="headerlink" href="#switching-tires" title="Permalink to this headline"></a></h2>
<p>Tires are like upgrades, but they don’t have any levels. The syntax is also slightly different</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ObjectType</span><span class="o">.</span><span class="n">tires</span><span class="p">,</span> <span class="n">TireType</span><span class="o">.</span><span class="n">tire_econ</span><span class="p">)</span>
<p>Tires are like upgrades, but they don’t have any levels. The syntax is also slightly different. Switching tires also
takes 4 hours.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">switch_tire</span><span class="p">,</span> <span class="n">TireType</span><span class="o">.</span><span class="n">tire_econ</span><span class="p">)</span>
</pre></div>
</div>
<p>Will switch your tires to the tire_econ type</p>
</div>
<div class="section" id="choosing-a-speed">
<h2>Choosing a speed<a class="headerlink" href="#choosing-a-speed" title="Permalink to this headline"></a></h2>
<p>You can set your trucks speed to an integer value between 1 and 80 MPH. Going faster will allow you to complete more
contracts, but will also increase the probability of events happening. Your speed will also affect your fuel efficiency.</p>
<p>You can set your trucks speed to an integer value between 1 and 100 MPH. Going faster will allow you to complete more
contracts, but will also increase the probability of events happening. Your speed will also affect your fuel efficiency.
Increasing your speed takes one hour.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">actions</span><span class="o">.</span><span class="n">set_action</span><span class="p">(</span><span class="n">ActionType</span><span class="o">.</span><span class="n">set_speed</span><span class="p">,</span> <span class="mi">66</span><span class="p">)</span>
</pre></div>
</div>
<p>Will set your trucks speed to 66 mph</p>
</div>
<div class="section" id="failure-to-action">
<h2>Failure to action<a class="headerlink" href="#failure-to-action" title="Permalink to this headline"></a></h2>
<p>Not taking any action is a valid action. It takes one hour to take no action.</p>
</div>
</div>


Expand Down
21 changes: 15 additions & 6 deletions docs/LearnTheTruckinGame/TireObjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Enums" href="enums.html" />
<link rel="prev" title="Body Objects" href="BodyObjects.html" />
</head>

Expand Down Expand Up @@ -102,6 +103,7 @@
<li class="toctree-l1"><a class="reference internal" href="AddonObjects.html">Add On Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="BodyObjects.html">Body Objects</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Tires</a></li>
<li class="toctree-l1"><a class="reference internal" href="enums.html">Enums</a></li>
</ul>


Expand Down Expand Up @@ -176,31 +178,37 @@ <h1>Tires<a class="headerlink" href="#tires" title="Permalink to this headline">
the bandits event and that sticky tires negate the icyroads event.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 17%" />
<col style="width: 11%" />
<col style="width: 72%" />
<col style="width: 14%" />
<col style="width: 10%" />
<col style="width: 15%" />
<col style="width: 61%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>Negations</p></th>
<th class="head"><p>Type</p></th>
<th class="head"><p>Fuel Efficiency</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>tire_econ</p></td>
<td><p>0.0</p></td>
<td><p>1.5</p></td>
<td><p>A fuel efficient tire, but at the cost of traction</p></td>
</tr>
<tr class="row-odd"><td><p>tire_normal</p></td>
<td><p>0.0</p></td>
<td><p>1</p></td>
<td><p>A tire that is balanced between fuel efficiency and traction</p></td>
</tr>
<tr class="row-even"><td><p>tire_sticky</p></td>
<td><p>0.2</p></td>
<td><p>0.3</p></td>
<td><p>0.8</p></td>
<td><p>Negates damage from the icy_road event at the cost of fuel efficiency</p></td>
</tr>
<tr class="row-odd"><td><p>monster_truck</p></td>
<td><p>0.2</p></td>
<td><p>0.3</p></td>
<td><p>0.8</p></td>
<td><p>Negates damage from the bandit event at the cost of fuel efficiency</p></td>
</tr>
</tbody>
Expand All @@ -213,6 +221,7 @@ <h1>Tires<a class="headerlink" href="#tires" title="Permalink to this headline">
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="enums.html" class="btn btn-neutral float-right" title="Enums" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="BodyObjects.html" class="btn btn-neutral float-left" title="Body Objects" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>

Expand Down
Loading

0 comments on commit 8b1800c

Please sign in to comment.