Commit Graph

42 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison e0699c15b6 Add function to turn a percentage into a quantity scaling factor 4 months ago
Jonathan G Rennison 1e0bb019a7 Change cargo scaling settings to be linear instead of logarithmic 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 55d78a23be Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/include/squirrel.h
#	src/blitter/32bpp_sse_func.hpp
#	src/bridge_map.h
#	src/clear_map.h
#	src/company_manager_face.h
#	src/console_func.h
#	src/core/bitmath_func.hpp
#	src/core/endian_func.hpp
#	src/core/random_func.hpp
#	src/depot_map.h
#	src/elrail_func.h
#	src/fontcache.h
#	src/industry_map.h
#	src/map_func.h
#	src/newgrf_spritegroup.h
#	src/object_map.h
#	src/rail.h
#	src/rail_map.h
#	src/road_func.h
#	src/road_map.h
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/sl/oldloader.h
#	src/sprite.h
#	src/spritecache.h
#	src/station_func.h
#	src/station_map.h
#	src/story_base.h
#	src/strings_func.h
#	src/tile_cmd.h
#	src/tile_map.h
#	src/tile_type.h
#	src/town.h
#	src/town_map.h
#	src/tree_map.h
#	src/tunnel_map.h
#	src/tunnelbridge_map.h
#	src/vehicle_func.h
#	src/viewport_func.h
#	src/void_map.h
#	src/water.h
#	src/water_map.h
#	src/widget_type.h
4 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 4 months ago
Patric Stout e5673a1756 Codechange: cleanup CargoPacket in terms of variable/function names (#11278)
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.

(cherry picked from commit 30172fc037)
8 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
10 months ago
rubidium42 9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days (#11112) 10 months ago
Jonathan G Rennison c89079a210 Merge branch 'master' into jgrpp
# Conflicts:
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/saveload.h
#	src/strings.cpp
#	src/vehicle.cpp
1 year ago
dP e2f1cd44dc
Change: Increase max cargo age and let min cargo payment approach zero. (#10596)
Co-authored-by: Michael Lutz <michi@icosahedron.de>
1 year ago
Jonathan G Rennison 431d33f149 Allow per-house town cargo generation to be truncated to 0
This effectively applies the town cargo scaling setting more strictly
2 years ago
Pavel Stupnikov f39a00d676 Feature: Set exclusive access to industry from GS (#8115)
(cherry picked from commit 9a45a0f535)
3 years ago
Pavel Stupnikov 9a45a0f535
Feature: Set exclusive access to industry from GS (#8115) 3 years ago
Jonathan G Rennison c7fa284db4 Move scale factor setting scaling to common function 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Niels Martin Hansen 810887af30 Fix #6498: Use int64 for all company rating calculations 6 years ago
frosch 0ba2ed7676 (svn r24565) -Fix: Stop both price and payment inflation if either of them has reached MAX_INFLATION. 12 years ago
alberth 43f807a918 (svn r21156) -Codechange: Introduce EconomyIsInRecession(). 14 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
frosch d507136e04 (svn r18268) -Feature: [NewGRF] Make price base multipliers related to vehicles only apply to the GRF locally, if it defines engines of that type itself. 15 years ago
frosch 912bce0b8c (svn r18266) -Codechange: Add a function to compute prices from price base and cost factor and use it consistently for vehicle purchase, running cost, and refit cost. 15 years ago
smatz 47660b984b (svn r18110) -Codechange [FS#3316]: search for stations nearby only once per producer (instead of once pre produced cargo type) (fonsinchen) 15 years ago
frosch f48f73f060 (svn r18016) -Codechange: Move the arbitrary basecost multiplier offset (8) to newgrf loading and make the internal state zero-based instead. 15 years ago
frosch 3f5e42b04a (svn r18008) -Codechange: Rename NUM_PRICES to PR_END, and use the Price enum some more. 15 years ago
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 15 years ago
frosch 438a429549 (svn r17433) -Codechange: Store cumulated inflation in savegame and compute all prices from that instead of storing all prices separately.
Note: Savegame conversion computes the inflation from max loan. Prices from modified savegames will get lost. TTO savegames will also behave slightly different.
-Change: NewGRF price modifiers now take effect everytime when loading NewGRFs instead of once on gamestart.
15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz 2a430d981f (svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost
-Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
15 years ago
rubidium 985608c713 (svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
 * cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
 * industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
15 years ago
smatz b2aed51f8e (svn r16403) -Codechange: move code related to subsidies to separate file 15 years ago
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
peter1138 ea7ed286a6 (svn r13836) -Fix [FS#2074]: Automatically recalculate inflation if NewGRFs are changed and cargo types are added, so that cargo payment rates are correct. 16 years ago
rubidium 58e6e75320 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h. 16 years ago
peter1138 dda6cab17a (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it. 16 years ago
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 17 years ago
rubidium 38115acf5a (svn r11776) -Codechange: more header splittings to reduce the dependencies. 17 years ago
rubidium aac835171e (svn r11700) -Codechange: reduce the amount of unnecessary includes. 17 years ago
rubidium 8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 17 years ago
rubidium 6a9e77e079 (svn r11680) -Codechange: refactor more out of openttd.h and functions.h. 17 years ago
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago