1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-26 03:52:22 +02:00

Merge pull request #178 from hanakocz/master

Chronotrain update + pistol buffs balanced down
This commit is contained in:
Gerkiz 2020-06-25 17:57:27 +02:00 committed by GitHub
commit a3be20d7c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 1014 additions and 563 deletions

View File

@ -67,28 +67,25 @@ map_info_text=The biters have catched the scent of fish in the cargo wagon.\nGui
[chronosphere]
map_info_main_caption=C H R O N O S P H E R E
map_info_sub_caption= ..Comfylatron gone wild..
map_info_text_old=Comfylatron has seized the Fish Train and turned it into a time machine.\n Your job as his slave is:\n\n[1] Keep train alive at all costs\n[2] Gather resources while travelling through different maps.\n[3a] Press enter on cargo wagons to enter insides of train.\n[3b] Press enter on cars to exit the train.\n[4] Charging acumulators inside train speeds up jumps when leaving early is needed.\nCharging and jumping creates huge pollution so be ready to get attacked.\n[5] Items inserted into comfylatron chests get teleported into train.\n[6] Some planets are poor, some are rich, and some are just too dangerous.\n\n Loot, but also evolution grows with jumps performed.\n During jump, personnel will be teleported in,\n however dead bodies nor buildings won't.\nMining productivity grants inventory space and handmining speed.\n\nGood luck. Don't let biters ruin the show!
map_info_text=Comfylatron has seized the Fish Train and turned it into a time machine.\n Your job as his slave is:\n\n[1] Keep train alive at all costs.\n[2] Gather resources while travelling through different locations.\n[3a] Press enter on cargo wagons to enter the insides of train.\n[3b] Press enter on cars to exit the train.\n[4] Charging the accumulators inside the train speeds up the jump, but creates HUGE pollution, aggravating the biters.\n[5] Items inserted into the blue chests get teleported into the train.\n[6] Some planets are poor, some are rich, and some are just too dangerous.\n\nLoot, but also evolution, grows with jumps performed.\n During jump, personnel and their inventories will be teleported in, but anything left behind outside won't.\nEarly jumps award 25 coins per minute spared (until the 25th jump).\nObtaining mining productivity research grants inventory space and hand-mining speed.\n\nGood luck. Don't let biters ruin the show!
planet_jump=Destination: __1__, Ore richness: __2__, Daynight cycle: __3__
map_info_text=Comfylatron has seized the Fish Train and turned it into a time machine.\n Your job as his slave is:\n\n[1] Keep train alive at all costs.\n[2] Gather resources while travelling through different planets.\n[3a] Press enter on cargo wagons to enter the insides of train.\n[3b] Press enter on cars to exit the Chronotrain.\n[4] Charging the accumulators inside the Chronotrain speeds up the jump, but creates HUGE pollution, aggravating the biters.\n[5] Items inserted into the Chronotrain chests get teleported into the train.\n[6] Some planets are poor, some are rich, and some are just too dangerous.\n\nLoot, but also evolution, grows with jumps performed.\n During jump, personnel and their inventories will be teleported in, but anything left behind outside won't.\nEarly jumps award 25 coins per minute spared (until the 25th jump).\nObtaining mining productivity research grants inventory space and hand-mining speed.\n\nGood luck. Don't let biters ruin the show!
planet_jump=Destination: __1__, Ore richness: __2__, Day length: __3__
message_danger1=Comfylatron: The chronojump misfired! Hang on a second!
message_danger2=Comfylatron: Oo-ee! That's worse than I thought, our chronojump went sideways..
message_danger1=Comfylatron: We have a problem! We got disrupted in mid-jump, only part of energy got used, and here we landed. It might have been a trap!
message_danger2=Comfylatron: Battery is unstable, we need to survive until it gets full without additional charging.
message_danger3=Robot voice: INTRUDER ALERT! Lifeforms detected!! Must eliminate!!
message_danger4=Comfylatron: Welp. The charger is shot. We'll have to wait.
message_danger5=Robot voice: Nuclear missiles armed. Launch countdown enabled.
message_rampup50=Comfylatron: The biters are making me nervous... =owo=
message_danger4=Robot voice: Nuclear missiles armed. Launch countdown enabled.
message_rampup50=Comfylatron: Biters start to adapt to our presence, getting stronger every second...
message_overstay=Comfylatron: We took so long to get off that planet, our future destinations have evolved a little...
message_initiate_jump_countdown=Comfylatron: OK, firing her up!! Looks like __1__ seconds 'till jump!
message_jump180=Comfylatron: Train is fully charged! Countdown sequence enabled. 180 seconds 'till jump!
message_jump60=Comfylatron: Nearly there! Grab what you can, we're leaving in 60 seconds!
message_jump30=Comfylatron: You'd better hurry up! 30 seconds remaining!!
message_jump_10orless=Comfylatron: Jump in __1__ seconds!
message_jump_misfire=Comfylatron: The chronojump misfired! Hang on a second!
message_jump10=Comfylatron: Jump in __1__ seconds!
message_jump=Comfylatron: Wheeee! Time jump underway! This is Jump number __1__
message_poison_defense=Comfylatron: Triggering poison defense. Let's kill everything!
message_nuke=Warning: Nuclear missiles launched.
message_accident=Comfylatron: Offline player had an accident, and their corpse fell to the ground near the locomotive.
message_silo=Nuclear silo destroyed. You looted __1__ atomic bombs. Comfylatron seized them for your own safety.
message_game_won_restart=Comfylatron: WHOOSH... the chronotrain teleported us back in time... so let's do this again...
message_game_won_restart=Comfylatron: WAIT whaat? Looks like we did not fixed the train properly and it teleported us back in time...sigh...so let's do this again, and now properly.
message_fishmarket1=Comfylatron: So here we are. Fish Market. When they ordered the fish, they told us this location was safe. Guess we'll have to make it so.
message_fishmarket2=Comfylatron: I hope you have enough nukes. That satellite gave us some space knowledge!
message_fishmarket3=Comfylatron: Hey I found these nukes we looted before... you can take them.
@ -96,13 +93,21 @@ message_lava=Comfylatron: OOF this one is a bit hot. Better keep your distance!
message_choppy=Comfylatron: OwO what are those strange trees?!? They have ore fruits! WTF!
message_game_lost1=The Chronotrain was destroyed!
message_game_lost2=Comfylatron is going to kill you for that... he has a time machine after all!
message_evolve=Comfylatron: From this planet onwards, if we take too long to jump, the biters on future planets will evolve!
message_quest1=Comfylatron: Comfylatron has...a big quest!! The train is broken. Can you help me fix the train computer? And also bring fish to the fish market.
message_quest3=Comfylatron: Tch... More power... Better navigation chipset... they're so demanding. Are you engineers okay to get all that stuff?
message_quest5=Comfylatron: I was doing it wrong the whole time!!! I finally found the problem. We need to rebuild whole processor. Exactly what I feared of. Can you bring me a few more things?
message_quest6=Comfylatron: And, I've got the last part of the CPU brain done. Phew! Now we just need to synchronize our time correctly and we can get fish on the road! All I need is a satellite and a rocket silo ;)
message_quest7=Comfylatron: TIME SYNCHRONIZED... CALCULATING SPACETIME DESTINATION... Done! Power up the chrono engines for a warp into the pocket universe, whilst the fish after still alive!!!!
message_game_won1=Comfylatron: Thank you all, for helping me with fish delivery. It was tough ride. Let's hope they leave a good review. And now that the biters are dead, the fish will be safe here forever...
message_evolve=Comfylatron: Biters start to adapt to us. And they appear to have some hive mind system to share it. If we stay too long, biters elsewhere will be stronger, waiting on us!
message_quest1=Comfylatron: You know...I have big quest. Deliver fish to fish market. But this train is broken. Please help me fix the train computer!
message_quest3=Comfylatron: Ah, we need to give this machine more power and better navigation chipset. Please bring me some additional things.
message_quest5=Comfylatron: Finally found the main issue. We will need to rebuild whole processor. Exactly what I feared of. Just a few more things...
message_quest6=Comfylatron: And, I've got the last part of the CPU brain done. Now we just need to synchronize our time correctly and we are done! Bring me satellite and rocket silo.
message_game_won1=Comfylatron: Thank you all for helping me with fish delivery. It was tough ride. And now that the biters are dead, the fish will be safe here forever...
message_comfylatron_desync=Comfylatron: I got you that time! Back to work, __1__!
difficulty1=Too easy!Low pollution, less enemies, etc...
difficulty2=Still easy!Low pollution, less enemies, etc...
difficulty3=Nearly easy!Low pollution, less enemies, etc...
difficulty4=Normal. Everything just about right...
difficulty5=A bit hard. More pollution, more enemies, etc...
difficulty6=Just about hard. More pollution, more enemies, etc...
difficulty7=Perfectly playable. Maybe. More pollution, more enemies, etc...
map_1=Terra Ferrata
map_2=Malachite Hills
@ -137,31 +142,31 @@ daynight_fast=Fast
daynight_superfast=Super fast
upgrade_train_armor=Train Armor
upgrade_train_armor_message=Comfylatron: Chronotrain's max HP upgraded.
upgrade_train_armor_message=Comfylatron: Train's max HP upgraded.
upgrade_train_armor_tooltip=+2500 Train Max HP. Max level: __1__ Current Max HP: __2__
upgrade_filter=Pollution Filter
upgrade_filter_message=Comfylatron: Chronotrain's pollution filter upgraded.
upgrade_filter_tooltip=Train Pollution Filter. Dampens pollution from machines inside the train and from charging the chrono engine.\nCurrent machine pollution transfer factor: __1__%
upgrade_filter_message=Comfylatron: Train's pollution filter upgraded.
upgrade_filter_tooltip=Train Pollution Filter. Dampens pollution from machines inside the train and from charging the chrono engine.\nCurrent pollution transfer factor: __1__%
upgrade_accumulators=Accumulators
upgrade_accumulators_message=Comfylatron: Chronotrain's accumulator capacity upgraded.
upgrade_accumulators_tooltip=Add an additional row of accumulators to the Chronotrain, increasing the maximum power the chrono engine can draw.
upgrade_accumulators_message=Comfylatron: Train's accumulator capacity upgraded.
upgrade_accumulators_tooltip=Add an additional row of accumulators to the Chronotrain, increasing the maximum charging rate.
upgrade_loot_pickup=Loot Pickup Range
upgrade_loot_pickup_message=Comfylatron: Players install additional red inserters on their shoulders. Item pickup range increased.
upgrade_loot_pickup_tooltip=Add loot pickup distance to players. Current: +__1__ tiles range
upgrade_inventory_size=Character Inventory Size
upgrade_inventory_size_message=Comfylatron: Players can now carry more trash in their unsorted inventories. Just what we needed uwu
upgrade_inventory_size_message=Comfylatron: Players can now carry more trash in their unsorted inventories.
upgrade_inventory_size_tooltip=Add +10 inventory slots to all players.
upgrade_repair=Train Repair Speed
upgrade_repair_message=Comfylatron: The Chronotrain can now repair with an additional repair kit at once.
upgrade_repair_tooltip=The Chronotrain uses more repair tools at once from the Repair Chest. Current: +__1__
upgrade_repair_tooltip=Train now gets repaired with more tools at once from the Repair Chest. Current: +__1__
upgrade_water=Piping System
upgrade_water_message=Comfylatron: The Chronotrain now has a piping system for additional water sources in each wagon. Am I allowed in the pool party??
upgrade_water_message=Comfylatron: Train now has a piping system for additional water sources in each wagon.
upgrade_water_tooltip=Add piping through wagon sides to create water sources for each wagon.
upgrade_output=Output System
upgrade_output_message=Comfylatron: The Chronotrain has been upgraded with output chests. Now it goes both ways!
upgrade_output_message=Comfylatron: Train has been upgraded with output chests.
upgrade_output_tooltip=Adds output chests to wagons 2 and 3 which send items to the external wagon storage.
upgrade_storage=Train Storage
upgrade_storage_message=Comfylatron: Come look, the inside of the Chronotrain has upgraded storage.
upgrade_storage_message=Comfylatron: The inside of the train has upgraded storage.
upgrade_storage_tooltip=Add or upgrade storage chests to line the edges of the insides of the Chronotrain.
upgrade_poison=Poison Defense
upgrade_poison_message=Comfylatron: I don't believe in your defensive skills. I loaded another emergency poison defense into the locomotive...
@ -173,29 +178,32 @@ upgrade_mk2=Power Armor MK2
upgrade_mk2_message=Comfylatron: I upgraded an armor to MK2.
upgrade_mk2_tooltip=Creates one Power Armor MK2
upgrade_computer1=Comfylatron's Quest 1
upgrade_computer1_tooltip=Progresses main quest.\nNew planets won't ever have "very poor" ore distribution.
upgrade_computer1_message=Comfylatron: OK, now I can fix the train navigation... This should get rid of very poor worlds at least. It still needs more work, though. I'll tell you after the jump.
upgrade_computer1_tooltip=Progresses main quest.\nNext destinations won't ever have "very poor" ore distribution.
upgrade_computer1_message=Comfylatron: OK, now I can fix the train navigation... This should get rid of very poor worlds at least. It still needs more work, though. I'll come back later.
upgrade_computer2=Comfylatron's Quest 2
upgrade_computer2_message=Comfylatron: Perfect! Now we have train reactor, and happily for you all, we should be able to avoid poor worlds altogether! Find out what's next after the jump ;)
upgrade_computer2_tooltip=Progresses main quest.\nNew planets won't ever have "poor" ore distribution.
upgrade_computer2_tooltip=Progresses main quest.\nNext destinations won't ever have "poor" ore distribution.
upgrade_computer3=Comfylatron's Quest 3
upgrade_computer3_message=Comfylatron: That's __1__ / 10 processor parts done!
upgrade_computer3_tooltip=Progresses main quest.\nAfter completing 10th part, the final map can be unlocked.
upgrade_computer4=Comfylatron's Final Quest
upgrade_computer4_message=Comfylatron: TIME SYNCHRONIZED... CALCULATING SPACETIME DESTINATION... Voila. Power up the chrono engines for a warp into the pocket universe!!!!
upgrade_computer4_tooltip=Progresses main quest.\nBy unlocking this, the next destination is Fish Market planet.\nBe sure to be ready... there's no way back!
upgrade_computer4_message=Comfylatron: TIME SYNCHRONIZED... CALCULATING SPACETIME DESTINATION... Done! Power up the chrono engines once more and let me deliver the fish finally. This trip is getting long.
upgrade_computer4_tooltip=Progresses main quest.\nBy unlocking this, the next destination is Fish Market.\nBe sure to be ready, there's no way back!
gui_1=ChronoJumps:
gui_2=Charge:
gui_3=Expt. Charged:
gui_3=Charged in:
gui_3_1=Best Case:
gui_3_2=Nuclear missiles launched in:
gui_3_3=JUMP IN:
gui_4=Local Evolution:
gui_planet_button=Planet Info
gui_planet_button=Area Info
gui_upgrades_button=Upgrades
gui_upgrades_1=Purchase upgrades by placing items in the chests at the top of the train interior.
gui_upgrades_2=Upgrading can take a few seconds.
gui_upgrades_switch_left=Upgrades
gui_upgrades_switch_right=Quests
gui_upgrades_jumps=Required minimal jump number
gui_planet_0=Name: __1__
gui_planet_1=Detected ore distribution:
gui_planet_2=Ore Amounts: __1__
@ -207,6 +215,11 @@ gui_planet_6=Overstay in: __1__ min, __2__s
gui_planet_7=Overstay applies after jump __1__
gui_overstayed=Overstayed!
gui_not_overstayed=Avoided overstay.
minimap=Outside View
minimap_button_tooltip=Open or close Outside View window.
minimap_tooltip=LMB: Increase zoom level.\nRMB: Decrease zoom level.\nMMB: Toggle camera size.\nMap button on top to hide/show
map_on=Automatically show map ON
map_off=OFF
[rocks_yield_ore_veins]

279
locale/ru/locale.cfg Normal file
View File

@ -0,0 +1,279 @@
[biter_battles]
map_info= - - B I T E R B A T T L E S - -\n\n Your objective is to defend your team's rocket silo and defeat the other team.\n Feed the opponent's biters with science packs to increase their strength.\n High tier science juice will yield stronger results.\n\n There is no major direct pvp combat.\n The horizontal border river is landfill proof.\n Construction robots can not build on the other teams's side.\n The random map layout is mirrored to provide a fair competition.\n\n West and East directions contain no biter nests,\n leaving room for factory expansion and outpost building.\n North and South directions are biter territory.\n\n There is no biter evolution from pollution, or destruction.\n ONLY feeding increases their power and will lead to your teams victory.\n\n The gui yields two different main stats for each team's biters.\n\n - EVO -\n The evolution of the biters, which increases when they get fed.\n It can go above 100% which unlocks endgame modifiers,\n granting them increased damage and health.\n\n - THREAT -\n Causes biters to attack and reduces when biters are slain.\n Feeding gives permanent "threat-income", as well as creating instant threat.\n A high threat value causes big attacks.\n Values of zero or below will cause no attacks.
[desert_oasis]
map_info_main_caption=--Desert Oasis--
map_info_sub_caption=Survival in the dry sands.
map_info_text=This is a harsh world, the heat is unbearable and the sand is sharp like diamonds.\nMake sure to stay properly hydrated.\nDrink some water from a pond, or sip it out of a barrel to stay refreshed.\n\nWe shall not attempt to travel without a proper vehicle.\nMany building foundations are not possible to be set up outside of the oasis.\nRailways between them however should be possible.\n\nLuckily the ship's moisture meter module did survive the crash.\nIt may come in handy!
[fish_defender]
map_info_main_caption=--Fish Defender--
map_info_sub_caption= *blb blubby blub*
map_info_text=The biters have catched the scent of fish in the market.\nFend them off as long as possible!\nThis however will not be an easy task,\nsince their strength and resistance increases constantly over time.\n\nYour ultimate goal is to evacuate all the fish to cat planet!\nPut them in your rocket's cargo and launch them into space.\nDon't worry, you will still get space science.\n\nThe Market will gladly take any coin you might find.\nAdditional turret slots can be bought at the market.\nSeveral unique upgrades are available too.\nResearching tanks will unlock the artillery technology early.\nAny container bearing dangerous goods, like ammo, grenades or barrels,\ncauses heavy explosions when it breaks.\nMaybe this can be used to our advantage.
boss_message=Boss Wave __1__ - - __2__
50=The Big Biter Gang
100=Biterzilla
150=The Spitter Squad
200=The Wall Nibblers
250=Conveyor Munchers
300=Furnace Freezers
350=Cable Chewers
400=Power Pole Thieves
450=Assembler Annihilators
500=Inserter Crunchers
550=Engineer Eaters
600=Belt Unbalancers
650=Turret Devourers
700=Pipe Perforators
750=Desync Bros
800=Ratio Randomizers
850=Wire Chompers
900=The Bus Mixers
950=Roundabout Deadlockers
1000=Happy Tree Friends
1050=Uranium Digesters
1100=Bot Banishers
1150=Chest Crushers
1200=Cargo Wagon Scratchers
1250=Transport Belt Surfers
1300=Pumpjack Pulverizers
1350=Radar Ravagers
1400=Mall Deconstrutors
1450=Lamp Dimmers
1500=Roboport Disablers
1550=Signal Spammers
1600=Brick Tramplers
1650=Drill Destroyers
1700=Gearwheel Grinders
1750=Silo Seekers
1800=Circuit Breakers
1850=Bullet Absorbers
1900=Oil Guzzlers
1950=Belt Rotators
2000=Bluescreen Factor
[dungeons]
map_info_main_caption=D U N G E O N S
map_info_sub_caption= ~You put your robe and wizard hat on. You are still in a dungeon.~
map_info_text=Expand into the depths for treasure.\nEverytime a new room is discovered, the depth-meter in your left top will increase.\n\nEnemies get more chonky.\nResources yield more ore.\nLoot gets more shiny.\n\nYou can use the green smelly dungeon sewers for long range transports.\n\nHow far can you make it?
[mountain_fortress]
map_info_main_caption=M O U N T A I N F O R T R E S S
map_info_sub_caption= ..diggy diggy choo choo..
map_info_text=Кусаки уловили запах рыбы в грузовом вагоне.\nВези рыбу в горы и охраняй как можно дольше!\nЭто, однако, не будет легкой задачей, так как их сила и численность увеличиваются с течением времени.\n\nКроме того, южные земли со временем разрушаются.\nКаменные кирпичи, бетон или другие твердые плитки могут улучшить устойчивость пола.\n\nОкунитесь глубже для больших сокровищ, но и столкнуться с повышенными опасностями.\nИсследование производительности горных работ, проведет капитальный ремонт вашего горного оборудования,\nукрепление вашей кирки, а также увеличение размера вашего рюкзака.\n\nКогда вы будете копать, вы столкнетесь с непроходимыми темными пропастями или реками.\nНекоторые взрывчатые вещества могут привести к разрушению частей потолка, заполнению пустоты, созданию новых путей.\nВсе, что им нужно, это контейнер и меткий выстрел.\n\nВы можете найти некоторые товары, если вы входите в вагон.\nУдачи в вашем путешествии!
[comfylatron]
shot_evaded=Компилатрон: я проучу тебя на этот раз! Вернись к работе, __1__!
[chronosphere]
map_info_main_caption=Хроносфера
map_info_sub_caption= ..Компилатрон обезумел..
map_info_text=Компилатрон взял на себя управление рыбного поезда и превратил его в машину времени.\nВаша задача как его помощника:\n\n[1] Сохранить HP поезда любой ценой\n[2] Собирайте ресурсы, путешествуя по разным картам.\n[3a] Нажмите Enter на грузовых вагонах, чтобы войти внутрь поезда.\n[3b] Нажмите Enter на Автомобиль(внутри поезда), чтобы выйти из поезда.\n[4] Зарядка аккумуляторов внутри поезда ускоряет заряд.\nЗарядка аккумуляторов создаёт огромное загрязнение окружающей среды, будьте готовы к нападению.\n[5] Если положить предметы в сундуки(Около грузовых вагонов), они телепортируются в поезд.\n[6] Некоторые планеты бедны, некоторые богаты, а некоторые слишком опасны.\n\n Добыча, но и эволюция растет вместе с выполняемыми прыжками.\n Во время прыжка персонал будет телепортирован внутрь,\nоднако ни мертвые тела, ни здания этого не сделают.\nПроизводительность майнинга дает складское пространство и скорость ручной работы.\n \n удачи. Не позволяйте biters испортить шоу!
planet_jump=Место назначения: __1__, Богатство руды: __2__, Дневной цикл: __3__
message_danger1=Компилатрон: У нас проблемы! Мы провалились в середине прыжка, использовалась только часть энергии, и вот мы приземлились ... Это могла быть ловушка!
message_danger2=Компилатрон: Battery is unstable, we need to survive until it gets full without additional charging.
message_danger3=Голос робота: ВНИМАНИЕ! Жизненные формы обнаружены! Необходимо устранить!
message_danger4=Голос робота: Ядерные ракеты вооружены, обратный отсчет запуска включен.
message_rampup50=Comfylatron: Biters start to adapt to our presence, getting stronger every second...
message_overstay=Компилатрон: Похоже, вы оставались на предыдущей планете так долго, что у врагов на других планетах было дополнительное время для эволюции!
message_jump180=Компилатрон: Зарядка аккумулятора отключена, отсчет 180 секунд до прыжка!
message_jump60=Компилатрон: ChronoTrain почти заряжен! Хватайте все, что сможете, мы уходим через 60 секунд!
message_jump30=Компилатрон: Вам лучше поторопиться! Осталось 30 секунд!
message_jump10=Компилатрон: Прыжок через __1__ секунд!
message_jump=Компилатрон: Ух ты! Прыжок Во Времени Активен! Это номер прыжка __1__
message_poison_defense=Компилатрон: Запуск Ядовитой защиты. Давайте убьем всех!
message_nuke=Предупреждение: Запущена ядерная ракета.
message_accident=Компилатрон: Оффлайн-игрок попал в аварию и бросил свои предметы на землю вокруг Локомотива.
message_silo=Ядерный бункер разрушен. Вам удалось добыть __1__ атомных бомб. Компилатрон изъял их для вашей же безопасности.
message_game_won_restart=Компилатрон: Чего ждать? Похоже, мы не исправили поезд должным образом, и он телепортировал нас назад во времени ... вздох ... так что давайте сделаем это снова, и теперь правильно.
message_fishmarket1=Компилатрон: Итак, мы здесь. Рыбный рынок. Когда они заказали рыбу, они сказали, что это место совершенно безопасно. Похоже, нам придется сделать это за них.
message_fishmarket2=Компилатрон: Надеюсь у вас достаточно ядерного оружия. Кроме того, этот спутник дал нам некоторые космические знания.
message_fishmarket3=Компилатрон: К счастью, мы уже разграбили несколько ядерных боеприпасов и забрали их.
message_lava=Компилатрон: OOF это немного жарко. И видели этих укусов? Они купаются в огне! Может быть, попробовать некоторые кирпичи для защиты от лавы?
message_choppy=Компилатрон: Оооо, что это за странные деревья?!? У них есть еще фрукты из руды! WTF!
message_game_lost1=ChronoTrain был разрушен!
message_game_lost2=Компилатрон убьет тебя за это...в конце концов, у него есть машина времени!
message_evolve=Компилатрон: Biters start to adapt to us. And they appear to have some hive mind system to share it. If we stay too long, biters elsewhere will be stronger, waiting on us!
message_quest1=Компилатрон: Вы знаете ... у меня есть большой Квест. Доставьте рыбу на рыбный рынок. Но этот поезд сломался. Пожалуйста, помогите мне починить компьютер поезда!
message_quest3=Компилатрон: Ах, нам нужно дать этой машине больше мощности и улучшенного навигационного чипсета. Пожалуйста, принесите мне несколько дополнительных вещей.
message_quest5=Компилатрон: Наконец-то нашел основную проблему. Нам нужно будет восстановить весь процессор. Именно то, чего я боялся. Еще несколько вещей ...
message_quest6=Компилатрон: И это была последняя часть работы процессора. Теперь нам просто нужно правильно синхронизировать время, и все готово! Принеси мне спутник и ракетную шахту.
message_game_won1=Компилатрон: Спасибо, что помогли мне с этой доставкой. Это было очень тяжело. Я надеюсь, что теперь, когда все кусачие мертвы, рыба будет в безопасности здесь навсегда...
message_comfylatron_desync=Компилатрон: I got you that time! Back to work, __1__!
difficulty1=Too easy!Low pollution, less enemies, etc...
difficulty2=Still easy!Low pollution, less enemies, etc...
difficulty3=Nearly easy!Low pollution, less enemies, etc...
difficulty4=Normal. Everything just about right...
difficulty5=A bit hard. More pollution, more enemies, etc...
difficulty6=Just about hard. More pollution, more enemies, etc...
difficulty7=Perfectly playable. Maybe. More pollution, more enemies, etc...
map_1=Феррата Земли
map_2=Малахитовые холмы
map_3=Гранитные Равнины
map_4=Нефтяной бассейн
map_5=Урановая Гора
map_6=Смешанные депозиты
map_7=Родные земли Biter
map_8=Пустынная свалка металлолома
map_9=Древняя долина
map_10=Древнее поле битвы
map_11=Система пещер
map_12=Странный Лес
map_13=Речные земли
map_14=Горящий Ад
map_15=Начальная зона
map_16=Лабиринт Живой Изгороди
map_17=Рыбный рынок
map_18=Метановые Болота
map_19=ОШИБКА ПУНКТ НАЗНАЧЕНИЯ НЕ НАЙДЕН
ore_richness_very_rich=Очень Богатые
ore_richness_rich=Богатые
ore_richness_normal=Обычный
ore_richness_poor=Бедный
ore_richness_very_poor=Очень Бедные
ore_richness_none=Нет
daynight_static=Статический
daynight_normal=Обычный
daynight_slow=Медленный
daynight_superslow=Очень Медленный
daynight_fast=Быстрый
daynight_superfast=Очень быстрый
upgrade_train_armor=HP поезда
upgrade_train_armor_message=Компилатрон: Максимальное HP поезда было улучшено.
upgrade_train_armor_tooltip=+2500 поезда НР. Максимальный уровень:__1__текущий максимум HP:__2__
upgrade_filter=Фильтр загрязнения
upgrade_filter_message=Компилатрон: Фильтр загрязнения поезда был улучшен.
upgrade_filter_tooltip=Фильтр Загрязнения Поезда. Уменьшает загрязнение изнутри поезда и от хрономотора.\nТекущее загрязнение, производимое поездом: __1__%
upgrade_accumulators=Аккумуляторы
upgrade_accumulators_message=Компилатрон: Аккумуляторная емкость поезда была повышена.
upgrade_accumulators_tooltip=Добавьте дополнительный ряд аккумуляторов для системы зарядки поезда.\nКаждый аккумулятор добавляет 300 кВт возможной потребляемой мощности.
upgrade_loot_pickup=Радиус Подбора Добычи
upgrade_loot_pickup_message=Компилатрон: Теперь у игроков есть дополнительный красный вставщик, установленный на плечах, что увеличивает их диапазон подбора предметов.
upgrade_loot_pickup_tooltip=увеличение радиуса подбора добычи для игроков. Текущий: +__1__ Радиус
upgrade_inventory_size=Размер инвентаря персонажа
upgrade_inventory_size_message=Компилатрон: Теперь игроки могут носить больше предметов в своих инвентарях
upgrade_inventory_size_tooltip=Добавьте +10 слотов инвентаря для всех игроков.
upgrade_repair=Скорость ремонта поезда
upgrade_repair_message=Компилатрон: Поезд теперь сразу же ремонтируется с помощью дополнительного ремкомплекта.
upgrade_repair_tooltip=Поезд использует больше ремонтных инструментов сразу из ремонтного сундука. Текущий: +__1__
upgrade_water=трубопроводная система
upgrade_water_message=Компилатрон: Поезд теперь имеет трубопроводную систему для дополнительных источников воды.
upgrade_water_tooltip=Добавьте трубы через боковые стенки вагона, чтобы создать источники воды для каждого вагона.
upgrade_output=Система снабжения
upgrade_output_message=Компилатрон: Поезд теперь оснащён сундуки снабжения.
upgrade_output_tooltip=добавляет ChronoTrain сундуки, выходящие наружу (в грузовых вагон 2 и 3)
upgrade_storage=сундуки для хранения вагонов
upgrade_storage_message=Компилатрон: Грузовые вагоны теперь имеют улучшенное хранилище.
upgrade_storage_tooltip=Добавьте и модернизируйте сундуки для хранения по бокам вагонов.
upgrade_poison=Ядовитая защита
upgrade_poison_message=Компилатрон: Я не верю в ваши навыки обороны. Я оборудовал поезд ядовитой защитой.
upgrade_poison_tooltip=Ядовитая защита. Запускается автоматически, когда у поезда низкий HP.\nМакс заряды : 4. Таймер перезарядки для следующего использования: __1__ мин.
upgrade_fusion=портативный термоядерный реактор
upgrade_fusion_message=Компилатрон: Один персональный термоядерный реактор готов.
upgrade_fusion_tooltip=Создает один портативный термоядерный реактор
upgrade_mk2=Power Armor MK2
upgrade_mk2_message=Компилатрон: Я модернизировал одну броню до МК2.
upgrade_mk2_tooltip=Создает одну силовую броню МК2
upgrade_computer1=1 Квест Компилатрона
upgrade_computer1_message=Компилатрон: Спасибо за исправление навигации. Теперь я могу избавить нас от очень бедных миров. Это все еще потребует больше работы, вернитесь после прыжка.
upgrade_computer1_tooltip=Продвигается основной квест.\nВсе последующие миры не будут иметь "очень плохого" распределения руды.
upgrade_computer2=2 Квест Компилатрона
upgrade_computer2_message=Компилатрон: Отлично! Теперь у нас есть поездный реактор и еще лучшая точность назначения. После прыжка я доберусь до вас с тем, что еще нужно сделать.
upgrade_computer2_tooltip=Прогресс основного Квест.\nВсе последующие миры не будут иметь "плохого" распределения руды.
upgrade_computer3=3 Квест Компилатрона
upgrade_computer3_message=Компилатрон: Вот и __1__ / 10 части процессора сделаны!
upgrade_computer3_tooltip=Прогресс основного Квеста.\nПосле завершения 10-й части, окончательная карта может быть разблокирована.
upgrade_computer4=Финальный Квест Компилатрона
upgrade_computer4_message=Компилатрон: Время синхронизировано. Расчет времени и пространства назначения. Успех. Прыгай еще раз и дай мне наконец доставить рыбу. Эта поездка становится все длиннее.
upgrade_computer4_tooltip=Прогресс основного Квеста.\nРазблокировав это, следующий пункт назначения карта рыбного рынка. \nБудьте готовы, обратного пути нет!
gui_1=Прыжок:
gui_2=Заряд:
gui_3=Заряжен в:
gui_3_1=Активной зарядки:
gui_3_2=Ядерные ракеты запущены в:
gui_3_3=Прыжок в:
gui_4=Местная Эволюция:
gui_planet_button=Инфо о районе
gui_upgrades_button=Улучшение
gui_upgrades_1=Вставьте необходимые предметы в сундук с данной картиной.
gui_upgrades_2=Сундуки находятся наверху внутри поезда. Обновление может занять минуту.
gui_upgrades_switch_left=Улучшение
gui_upgrades_switch_right=Задания
gui_upgrades_jumps=Требуемый минимальный номер прыжка
gui_planet_0=Имя: __1__
gui_planet_1=Обнаруженное распределение руды:
gui_planet_2=Количество руды: __1__
gui_planet_3=Локальная эволюция: __1__%
gui_planet_4=Глобальные эволюционные бонусы:
gui_planet_4_1=+__1__% эволюции, +__2__% урона
gui_planet_5=Дневной цикл: __1__
gui_planet_6=засидеться в: __1__ min, __2__s
gui_planet_7=засидеться активен после прыжка __1__
gui_overstayed=засидеться!
gui_not_overstayed=засидеться niet.
minimap=Outside View
minimap_button_tooltip=Open or close Outside View window.
minimap_tooltip=LMB: Increase zoom level.\nRMB: Decrease zoom level.\nMMB: Toggle camera size.\nMap button on top to hide/show
map_on=Automatically show map ON
map_off=OFF
train_market=Рынок
train_repair_chest=Ремонтный сундук
train_upgrades=Улучшение
train_upgrades_sub=Нажмите "Улучшения" на верхней части экрана
train_output=Сундук снабжения
train_exit=Нажми "Enter" чтобы выйти
[rocks_yield_ore_veins]
coal=coal
iron-ore=iron
copper-ore=copper
uranium-ore=uranium
stone=stone
mixed=mixed ore
angels-ore1=saphirite
angels-ore2=jivolite
angels-ore3=stiratite
angels-ore4=crotinnium
angels-ore5=rubyte
angels-ore6=bobmonium
giant=giant
huge=huge
big=big
small=smol
tiny=tiny
player_print=You notice something __1__ underneath the rubble. It's a __2__ vein of __3__!! __4__
game_print= __1__ found a __2__ vein of __3__! __4__
[rocks_yield_ore_veins_colors]
coal=dark
iron-ore=shiny
copper-ore=glimmering
uranium-ore=glowing
stone=solid
mixed=glitter
angels-ore1=blueish
angels-ore2=yellow
angels-ore3=strange
angels-ore4=shiny
angels-ore5=crimson
angels-ore6=umber
[wave_defense]
gui_1=Первая волна через
gui_2=Волна:
gui_3=Угроза:
tooltip_1=Высокая угроза усиливает Biter.\nздоровья Biter:__1__%
tooltip_2=изменения / Минуту
[native_war]
map_info= - - N A T I V E W A R - -\n\n Defeat the enemy team Market !\n\nFeed your market with science to spawn waves of native biters and spitters !\nThey will soon after swarm to the opposing team Market !\n\nThe corridor is stewn with worms.\nRebuy dead worms and upgrade them to stem the opposing waves !\n\nExcess energy will activate a beam.\nBeam will progress with more excess energy.\nNatives will spawn according to the beam position.\n\nUse radars to spy opponent's base.\nUse your experience to improve damage and resistance of your biters.\nSpace science packs give extra life to your biters.\nConstruction robots may not build over the wall.\n
[territorial_control]
map_info_main_caption=T E R R I T O R I A L C O N T R O L
map_info_sub_caption= ..alone in the darkness..
map_info_text=Citizen Log #468-2A-3287, Freelancer Trent. \n\nTo whoever is reading this message, \nAny natural resources are rare and the ones worth while are too hard for me to reach. \nLuckily, the wrecks yield all kinds of useful scraps, but also various dangers. \nAlmost lost half a leg some days ago while digging out some scrap. \nThe wildlife is extremely aggressive, especially at the time of night. \nMost of these insect appearing like creatures seem to live underground. \nStay near your light sources, if you want to have a chance of surviving here! \n\n###Log End###

View File

@ -97,7 +97,7 @@ local function set_active_biters(group)
end
end
Public.destroy_inactive_biters = function()
function Public.destroy_inactive_biters()
local objective = Chrono_table.get_table()
if objective.passivetimer < 60 then
return
@ -225,7 +225,7 @@ local function colonize(unit_group)
--unit_group.destroy()
end
Public.send_near_biters_to_objective = function()
function Public.send_near_biters_to_objective()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
@ -325,7 +325,7 @@ end
local function generate_attack_target(nearest_player_unit)
local objective = Chrono_table.get_table()
if objective.game_lost then return nil end
local target = Rand.raffle(
{
nearest_player_unit,
@ -357,7 +357,7 @@ local function generate_attack_target(nearest_player_unit)
target = objective.locomotive
end
end
return target
end
@ -368,7 +368,7 @@ local function send_group(unit_group, nearest_player_unit)
local target = generate_attack_target(nearest_player_unit)
if not target.valid then colonize(unit_group) return end
if not target or not target.valid then colonize(unit_group) return end
local surface = target.surface
local pollution = surface.get_pollution(target.position)
@ -377,8 +377,8 @@ local function send_group(unit_group, nearest_player_unit)
local pollution_to_eat = Balance.pollution_spent_per_attack(difficulty)
surface.pollute(target.position, -pollution_to_eat)
game.pollution_statistics.on_flow("biter-spawner", -pollution_to_eat)
if #unit_group.members > 0 then game.pollution_statistics.on_flow(unit_group.members[1].name or "small-biter", - pollution_to_eat) end
local commands = {}
@ -387,30 +387,25 @@ local function send_group(unit_group, nearest_player_unit)
local position = {target.position.x + vector[1], target.position.y + vector[2]}
position = unit_group.surface.find_non_colliding_position("stone-furnace", position, 96, 1)
if position then
-- game.print("group of " .. #unit_group.members .. " to " .. position.x .. ", " .. position.y)
commands[#commands + 1] = {
type = defines.command.attack_area,
destination = position,
radius = 24,
distraction = defines.distraction.by_enemy
}
}
end
-- game.print("group of " .. #unit_group.members .. " to " .. target.position.x .. ", " .. target.position.y)
commands[#commands + 1] = {
type = defines.command.attack_area,
destination = target.position,
radius = 32,
distraction = defines.distraction.by_enemy
type = defines.command.attack_area,
destination = target.position,
radius = 32,
distraction = defines.distraction.by_enemy
}
commands[#commands + 1] = {
type = defines.command.attack,
target = target,
distraction = defines.distraction.by_enemy
type = defines.command.attack,
target = target,
distraction = defines.distraction.by_enemy
}
unit_group.set_command({
@ -419,7 +414,6 @@ local function send_group(unit_group, nearest_player_unit)
commands = commands
})
else
--game.print("not enough pollution for unit attack")
colonize(unit_group)
end
return true
@ -483,7 +477,7 @@ local function create_attack_group(surface)
end
-- Public.rogue_group = function()
-- function Public.rogue_group()
-- local objective = Chrono_table.get_table()
-- if objective.passivetimer < 60 then return end
-- if not objective.locomotive then return end
@ -508,7 +502,7 @@ end
-- })
-- end
Public.pre_main_attack = function()
function Public.pre_main_attack()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
@ -516,7 +510,7 @@ Public.pre_main_attack = function()
set_biter_raffle_table(surface)
end
Public.perform_main_attack = function()
function Public.perform_main_attack()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end
@ -524,7 +518,7 @@ Public.perform_main_attack = function()
create_attack_group(surface)
end
Public.wake_up_sleepy_groups = function()
function Public.wake_up_sleepy_groups()
local objective = Chrono_table.get_table()
if objective.chronojumps == 0 then return end
if objective.passivetimer < 60 then return end

View File

@ -1,5 +1,6 @@
local Public = {}
local Rand = require 'maps.chronosphere.random'
local Chrono_table = require 'maps.chronosphere.table'
local math_floor = math.floor
local math_min = math.min
@ -23,7 +24,7 @@ end
-- slope 4/5 -> {0.20, 0.40, 0.60, 0.80, 1.20, 2.40, 4.00}
-- slope 3/5 -> {0.15, 0.30, 0.45, 0.60, 0.90, 1.80, 3.00}
-- slope 2/5 -> {0.10, 0.20, 0.30, 0.40, 0.60, 1.20, 2.00}
local function difficulty_exp(difficulty,exponent)
return math_pow(difficulty,exponent)
@ -57,29 +58,11 @@ function Public.passive_planet_jumptime(jumps)
return mins * 60
end
function Public.generate_jump_countdown_length(difficulty)
if difficulty <= 1 then
return Rand.raffle({90,120,150,180,210,240,270},{1,2,14,98,14,2,1})
else
return 180 -- thesixthroc: suppress rng for speedrunners
end
-- return 180
end
function Public.misfire_percentage_chance(difficulty)
if difficulty <= 1 and difficulty > 0.25 then
return 4
else
return 0 -- thesixthroc: suppress rng for speedrunners
end
-- return 0
end
function Public.passive_pollution_rate(jumps, difficulty, filter_upgrades)
local baserate = 5 * jumps
local modifiedrate = baserate * Public.pollution_filter_upgrade_factor(filter_upgrades) * math_max(0, difficulty_sloped(difficulty, 5/4))
return modifiedrate
end
@ -102,7 +85,7 @@ function Public.countdown_pollution_rate(jumps, difficulty)
local baserate = 40 * (10 + jumps) * math_max(0, difficulty_sloped(difficulty, 5/4))
local modifiedrate = baserate -- thesixthroc: Constant, because part of drama of planet progression. Interpret this as hyperwarp portal pollution
return modifiedrate
end
@ -110,7 +93,7 @@ function Public.post_jump_initial_pollution(jumps, difficulty)
local baserate = 200 * (1 + jumps) * math_max(0, difficulty_sloped(difficulty, 5/4))
local modifiedrate = baserate -- thesixthroc: Constant, because part of drama of planet progression. Interpret this as hyperwarp portal pollution
return modifiedrate
end
@ -134,15 +117,21 @@ end
Public.Chronotrain_max_HP = 10000
Public.Chronotrain_HP_repaired_per_pack = 150
Public.Tech_price_multiplier = 0.7
Public.Tech_price_multiplier = 0.6
Public.starting_items = {['pistol'] = 1, ['firearm-magazine'] = 32, ['grenade'] = 2, ['raw-fish'] = 4, ['wood'] = 16}
Public.starting_items = {['pistol'] = 1, ['firearm-magazine'] = 32, ['grenade'] = 4, ['raw-fish'] = 4, ['wood'] = 16}
Public.wagon_starting_items = {{name = 'firearm-magazine', count = 16},{name = 'iron-plate', count = 16},{name = 'wood', count = 16},{name = 'burner-mining-drill', count = 8}}
function Public.jumps_until_overstay_is_on(difficulty) --both overstay penalties, and evoramp
if difficulty > 1 then return 2
elseif difficulty == 1 then return 3
else return 5
local objective = Chrono_table.get_table()
if not objective.config.overstay_penalty then return 999 end
if not difficulty then return 3 end
if difficulty > 1 then
return 2
elseif difficulty == 1 then
return 3
else
return 5
end
end
@ -184,13 +173,10 @@ function Public.player_ammo_damage_modifiers() -- bullet affects gun turrets, bu
['melee'] = 0, -- doesn't do anything
['railgun'] = 0,
['rocket'] = 0,
['shotgun-shell'] = 0.1
['shotgun-shell'] = 0
}
return data
end
function Public.pistol_damage_multiplier(difficulty) return 2.5 end --3 will one-shot biters
function Public.coin_reward_per_second_jumped_early(seconds, difficulty)
local minutes = seconds / 60
@ -202,9 +188,11 @@ function Public.upgrades_coin_cost_difficulty_scaling(difficulty) return difficu
function Public.flamers_nerfs_size(jumps, difficulty) return 0.02 * jumps * difficulty_sloped(difficulty, 1/2) end
function Public.max_new_attack_group_size(difficulty) return math_max(200,math_floor(120 * difficulty_sloped(difficulty, 1))) end
function Public.max_new_attack_group_size(difficulty) return math_min(200,math_floor(120 * difficulty_sloped(difficulty, 1/2))) end
function Public.evoramp50_multiplier_per_10s(difficulty) return (1 + 1/200 * difficulty_sloped(difficulty, 3/5)) end
function Public.fish_market_base_modifier(difficulty) return math_floor(500 / difficulty_sloped(difficulty, 1/2)) end
function Public.evoramp50_multiplier_per_10s(difficulty) return (1 + 1/600 * difficulty_sloped(difficulty, 1)) end
function Public.nukes_looted_per_silo(difficulty) return math_max(10, 10 * math_ceil(difficulty_sloped(difficulty, 1))) end
@ -259,10 +247,10 @@ end
Public.dayspeed_weights = {
static = 2,
normal = 4,
slow = 3,
slow = 3,
superslow = 1,
fast = 3,
superfast = 1
fast = 3,
superfast = 1
}
function Public.market_offers()
return {
@ -298,9 +286,9 @@ function Public.initial_cargo_boxes()
{name = "shotgun-shell", count = math_random(4, 5)},
{name = "shotgun-shell", count = math_random(4, 5)},
{name = "land-mine", count = math_random(6, 18)},
-- {name = "grenade", count = math_random(2, 3)}, --make these harder to get
-- {name = "grenade", count = math_random(2, 3)},
-- {name = "grenade", count = math_random(2, 3)},
{name = "grenade", count = math_random(2, 3)},
{name = "grenade", count = math_random(2, 3)},
{name = "grenade", count = math_random(2, 3)},
{name = "iron-gear-wheel", count = math_random(7, 15)},
{name = "iron-gear-wheel", count = math_random(7, 15)},
{name = "iron-gear-wheel", count = math_random(7, 15)},
@ -323,12 +311,87 @@ end
function Public.treasure_quantity_difficulty_scaling(difficulty) return difficulty_sloped(difficulty, 1) end
function Public.Base_ore_loot_yield(jumps)
return 13 + 2 * jumps
function Public.Base_ore_loot_yield(jumps, scrap)
if scrap then
return 4 + 0.5 * jumps
else
return 15 + 3 * jumps
end
end
function Public.scrap_quantity_multiplier(evolution_factor)
return 1 + 3 * evolution_factor
function Public.scrap()
local main_loot = {
["iron-plate"] = {amount = 5, chance = 400},
["iron-gear-wheel"] = {amount = 3, chance = 250},
["iron-stick"] = {amount = 2, chance = 100},
["copper-plate"] = {amount = 5, chance = 400},
["copper-cable"] = {amount = 8, chance = 150},
["electronic-circuit"] = {amount = 3, chance = 100},
["steel-plate"] = {amount = 4, chance = 100},
["pipe"] = {amount = 3, chance = 50},
["pipe-to-ground"] = {amount = 1, chance = 10},
["battery"] = {amount = 3, chance = 10},
["explosives"] = {amount = 3, chance = 5},
["advanced-circuit"] = {amount = 5, chance = 3},
["plastic-bar"] = {amount = 5, chance = 5},
["processing-unit"] = {amount = 2, chance = 1},
["used-up-uranium-fuel-cell"] = {amount = 1, chance = 4},
["uranium-fuel-cell"] = {amount = 0.3, chance = 1},
["rocket-control-unit"] = {amount = 0.3, chance = 1},
["low-density-structure"] = {amount = 0.5, chance = 2},
["heat-pipe"] = {amount = 1, chance = 1},
["engine-unit"] = {amount = 3, chance = 3},
["electric-engine-unit"] = {amount = 2, chance = 2},
["flying-robot-frame"] = {amount = 1, chance = 2},
["logistic-robot"] = {amount = 0.3, chance = 1},
["construction-robot"] = {amount = 0.3, chance = 1},
["land-mine"] = {amount = 1, chance = 1},
["rocket"] = {amount = 2, chance = 1},
["explosive-rocket"] = {amount = 2, chance = 1},
["defender-capsule"] = {amount = 2, chance = 1},
["destroyer-capsule"] = {amount = 0.3, chance = 1},
["distractor-capsule"] = {amount = 0.3, chance = 1}
}
local second_loot = {
["cannon-shell"] = {amount = 0.1, chance = 5},
["explosive-cannon-shell"] = {amount = 0.1, chance = 4},
["uranium-cannon-shell"] = {amount = 0.1, chance = 3},
["explosive-uranium-cannon-shell"] = {amount = 0.1, chance = 2},
["artillery-shell"] = {amount = 0.1, chance = 1},
["cluster-grenade"] = {amount = 0.2, chance = 20},
["firearm-magazine"] = {amount = 0.4, chance = 70},
["piercing-rounds-magazine"] = {amount = 0.2, chance = 55},
["uranium-rounds-magazine"] = {amount = 0.1, chance = 40},
["nuclear-fuel"] = {amount = 0.1, chance = 3},
["rocket-fuel"] = {amount = 0.3, chance = 8},
["grenade"] = {amount = 0.3, chance = 40},
["solid-fuel"] = {amount = 0.4, chance = 50},
["empty-barrel"] = {amount = 0.1, chance = 50},
["crude-oil-barrel"] = {amount = 0.1, chance = 70},
["lubricant-barrel"] = {amount = 0.1, chance = 40},
["petroleum-gas-barrel"] = {amount = 0.1, chance = 60},
["heavy-oil-barrel"] = {amount = 0.1, chance = 70},
["light-oil-barrel"] = {amount = 0.1, chance = 70},
["water-barrel"] = {amount = 0.1, chance = 40},
}
local scrap_raffle = {}
for k, t in pairs (main_loot) do
for x = 1, t.chance, 1 do
table.insert(scrap_raffle, {name = k, amount = t.amount})
end
end
local second_raffle = {}
for k, t in pairs (second_loot) do
for x = 1, t.chance, 1 do
table.insert(second_raffle, {name = k, amount = t.amount})
end
end
Rand.shuffle(scrap_raffle)
Rand.shuffle(second_raffle)
return {main = scrap_raffle, second = second_raffle}
end
return Public
return Public

View File

@ -30,7 +30,9 @@ end
function Public_chrono.restart_settings()
local get_score = Score.get_table()
local objective = Chrono_table.get_table()
objective.max_health = Balance.Chronotrain_max_HP
Difficulty.reset_difficulty_poll()
Difficulty.set_poll_closing_timeout(game.tick + 35 * 60 * 60)
objective.max_health = Balance.Chronotrain_max_HP
objective.health = Balance.Chronotrain_max_HP
objective.poisontimeout = 0
objective.chronocharges = 0
@ -40,7 +42,6 @@ function Public_chrono.restart_settings()
objective.passivetimer = 0
objective.overstaycount = 0
objective.jump_countdown_start_time = -1
objective.jump_countdown_length = -1
objective.mainscore = 0
objective.active_biters = {}
objective.unit_groups = {}
@ -68,8 +69,6 @@ function Public_chrono.restart_settings()
global.landfill_history = {}
global.mining_history = {}
get_score.score_table = {}
Difficulty.reset_difficulty_poll()
Difficulty.set_poll_closing_timeout(game.tick + 35 * 60 * 60)
game.difficulty_settings.technology_price_multiplier = Balance.Tech_price_multiplier
game.map_settings.enemy_evolution.destroy_factor = 0.005
@ -80,7 +79,7 @@ function Public_chrono.restart_settings()
game.map_settings.enemy_expansion.min_expansion_cooldown = 3600
game.map_settings.enemy_expansion.settler_group_max_size = 8
game.map_settings.enemy_expansion.settler_group_min_size = 16
game.map_settings.enemy_expansion.max_expansion_distance = 9
game.map_settings.enemy_expansion.max_expansion_distance = 9
game.map_settings.pollution.enabled = true
game.map_settings.pollution.expected_max_per_chunk = 400
game.map_settings.pollution.min_to_show_per_chunk = 40
@ -90,7 +89,7 @@ function Public_chrono.restart_settings()
game.map_settings.pollution.pollution_with_max_forest_damage = 10
game.map_settings.pollution.pollution_per_tree_damage = 0.1
game.map_settings.pollution.ageing = 0.1
game.map_settings.pollution.diffusion_ratio = 0.12
game.map_settings.pollution.diffusion_ratio = 0.1
game.map_settings.pollution.enemy_attack_pollution_consumption_modifier = 5
game.map_settings.unit_group.min_group_gathering_time = 1800
game.map_settings.unit_group.max_group_gathering_time = 18000
@ -118,6 +117,7 @@ function Public_chrono.objective_died()
for i = 1, 3, 1 do
surface.create_entity({name = "big-artillery-explosion", position = objective.locomotive_cargo[i].position})
objective.locomotive_cargo[i].destroy()
objective.locomotive_cargo[i] = nil
end
for i = 1, #objective.comfychests,1 do
--surface.create_entity({name = "big-artillery-explosion", position = objective.comfychests[i].position})
@ -156,32 +156,30 @@ function Public_chrono.process_jump()
objective.biter_raffle = {}
objective.chronocharges = 0
objective.jump_countdown_start_time = -1
objective.jump_countdown_length = -1
objective.dangertimer = 1200
objective.dangertimer = 1200
local message = "Comfylatron: Wheeee! Time jump underway! This is Jump number " .. objective.chronojumps
game.print(message, {r=0.98, g=0.66, b=0.22})
game.print({"chronosphere.message_jump", objective.chronojumps}, {r=0.98, g=0.66, b=0.22})
Server.to_discord_embed(message)
if objective.chronojumps == Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
game.print({"chronosphere.message_evolve"}, {r=0.98, g=0.36, b=0.22})
elseif objective.chronojumps >= 15 and objective.computermessage == 0 then
game.print({"chronosphere.message_quest1"}, {r=0.98, g=0.36, b=0.22})
objective.computermessage = 1
objective.computermessage = 1
game.play_sound{path="utility/new_objective", volume_modifier=0.85}
elseif objective.chronojumps >= 20 and objective.computermessage == 2 then
game.print({"chronosphere.message_quest3"}, {r=0.98, g=0.36, b=0.22})
objective.computermessage = 3
objective.computermessage = 3
game.play_sound{path="utility/new_objective", volume_modifier=0.85}
elseif objective.chronojumps >= 25 and objective.computermessage == 4 then
game.print({"chronosphere.message_quest5"}, {r=0.98, g=0.36, b=0.22})
objective.computermessage = 5
objective.computermessage = 5
game.play_sound{path="utility/new_objective", volume_modifier=0.85}
end
if (objective.passivetimer - objective.jump_countdown_length) * objective.passive_chronocharge_rate > objective.chronochargesneeded * 0.75 and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
game.print({"chronosphere.message_overstay"}, {r=0.98, g=0.36, b=0.22})
Server.to_discord_embed("We took so long to get off that planet, our future destinations have evolved a little...")
end
if objective.planet[1].type.id == 19 then
if (objective.passivetimer - 180) * objective.passive_chronocharge_rate > objective.chronochargesneeded * 0.75 and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
game.print({"chronosphere.message_overstay"}, {r=0.98, g=0.36, b=0.22})
end
if objective.planet[1].type.id == 19 then
check_nuke_silos()
end
end
@ -194,6 +192,11 @@ function Public_chrono.get_wagons(start)
wagons[3] = {inventory = {}, bar = 0, filters = {}}
if start then
wagons[1].inventory[1] = {name = "raw-fish", count = 100}
for i = 31, 38, 1 do
wagons[1].filters[i] = "atomic-bomb"
end
wagons[1].filters[39] = "coin"
wagons[1].filters[40] = "coin"
for i = 2, 3, 1 do
for j = 1,#Balance.wagon_starting_items do
wagons[i].inventory[j] = Balance.wagon_starting_items[j]
@ -220,14 +223,14 @@ function Public_chrono.get_wagons(start)
wagons[3].inventory[i] = inventories.three[i]
end
end
return wagons
end
function Public_chrono.post_jump()
local objective = Chrono_table.get_table()
local difficulty = Difficulty.get().difficulty_vote_value
game.forces.enemy.reset_evolution()
if objective.chronojumps + objective.overstaycount <= 40 and objective.planet[1].type.id ~= 17 then
game.forces.enemy.evolution_factor = 0 + 0.025 * (objective.chronojumps + objective.overstaycount)

View File

@ -395,7 +395,7 @@ local function talks(nearby_characters)
local arg2 = symbols[math_random(1, #symbols)]
local randomphrase = texts["convo_starters"][math_random(1, #texts["convo_starters"])]
str = str .. string.format(randomphrase, arg1, arg2)
if math_random(1,40) == 1 and objective.planet[1].type.id ~= 10 and global.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
if math_random(1,40) == 1 and objective.planet[1].type.id ~= 10 and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
local time_until_overstay = (objective.chronochargesneeded * 0.75 / objective.passive_chronocharge_rate - objective.passivetimer)
local time_until_evo = (objective.chronochargesneeded * 0.5 / objective.passive_chronocharge_rate - objective.passivetimer)
if time_until_evo < 0 and time_until_overstay > 0 then
@ -460,10 +460,14 @@ local function desync(event)
frame_speed = 0.1,
vertical_speed = 0.1,
height = 0.1,
movement = {m2 - (math.random(0, m) * 0.01), m2 - (math.random(0, m) * 0.01)}
movement = {m2 - (math_random(0, m) * 0.01), m2 - (math_random(0, m) * 0.01)}
})
end
if not event or math_random(1,2) == 1 then -- 20/04/04: nerf comfylatron
local blocked = false
if not objective.comfylatron.surface.find_non_colliding_position("compilatron", objective.comfylatron.position, 0.5, 0.1) then
blocked = true
end
if not event or blocked or math_random(1,5) == 1 then
objective.comfylatron.surface.create_entity({name = "medium-explosion", position = objective.comfylatron.position})
objective.comfylatron.surface.create_entity({name = "flying-text", position = objective.comfylatron.position, text = "desync", color = {r = 150, g = 0, b = 0}})
objective.comfylatron.destroy()
@ -472,7 +476,7 @@ local function desync(event)
objective.comfylatron.surface.create_entity({name = "flying-text", position = objective.comfylatron.position, text = "desync evaded", color = {r = 0, g = 150, b = 0}})
if event.cause then
if event.cause.valid and event.cause.player then
game.print("Comfylatron: I got you that time! Back to work, " .. event.cause.player.name .. "!", {r = 200, g = 0, b = 0})
game.print({"chronosphere.message_comfylatron_desync", event.cause.player.name}, {r = 200, g = 0, b = 0})
event.cause.die("player", objective.comfylatron)
end
end
@ -603,7 +607,7 @@ local function go_to_some_location()
}
})
end
local symbols = {"!","!!","..","..."," "}
local arg1 = symbols[math_random(1, #symbols)]
local randomphrase = texts["random_travel"][math_random(1, #texts["random_travel"])]

View File

@ -29,6 +29,18 @@ local functions = {
game.players[event.player_index].print("You are not an admin!")
end
end,
["comfy_panel_overstay_penalty"] = function(event)
local objective = Chrono_table.get_table()
if game.players[event.player_index].admin then
if event.element.switch_state == "left" then
objective.config.overstay_penalty = true
else
objective.config.overstay_penalty = false
end
else
game.players[event.player_index].print("You are not an admin!")
end
end,
["comfy_panel_game_lost"] = function(event)
local objective = Chrono_table.get_table()
@ -109,6 +121,12 @@ local build_config_gui = (function (_, frame)
line_elements[#line_elements + 1] = frame.add({type = "line"})
switch_state = "right"
if objective.config.overstay_penalty then switch_state = "left" end
add_switch(frame, switch_state, "comfy_panel_overstay_penalty", "Overstay Penalty", "Disables or enables penalty for staying too long on maps.\nThat is additional evolution growth and permanent biter bonuses.")
line_elements[#line_elements + 1] = frame.add({type = "line"})
switch_state = "right"
if objective.game_lost then switch_state = "left" end
add_switch(frame, switch_state, "comfy_panel_game_lost", "Reset Run", "Marks game as lost and starts countdown for map reset (Use with caution!)")

View File

@ -11,12 +11,14 @@ local math_random = math.random
local math_floor = math.floor
local math_ceil = math.ceil
local function get_ore_amount()
local function get_ore_amount(scrap)
local objective = Chrono_table.get_table()
local amount = Balance.Base_ore_loot_yield(objective.chronojumps) * objective.planet[1].ore_richness.factor
if amount > 600 then amount = 600 end
local scaling = (game.forces.player.mining_drill_productivity_bonus - 1) / 2
local amount = Balance.Base_ore_loot_yield(objective.chronojumps, scrap) * (1 + scaling)
if not scrap then amount = amount * objective.planet[1].ore_richness.factor end
if amount > 500 then amount = 500 end
amount = math_random(math_floor(amount * 0.7), math_floor(amount * 1.3))
if amount < 1 then amount = 1 end
return amount
end
@ -38,6 +40,15 @@ local function reward_ores(amount, mined_loot, surface, player, entity)
end
end
local function flying_text(surface, position, text)
surface.create_entity({
name = "flying-text",
position = {position.x, position.y - 0.5},
text = text,
color = {r=0.98, g=0.66, b=0.22}
})
end
function Public_event.biters_chew_rocks_faster(event)
if event.entity.force.index ~= 3 then return end --Neutral Force
if not event.cause then return end
@ -130,44 +141,42 @@ function Public_event.choppy_loot(event)
if choppy_entity_yield[entity.name] then
if event.buffer then event.buffer.clear() end
if not event.player_index then return end
local amount = math_ceil(math_ceil(get_ore_amount() / 5))
local amount = math_ceil(get_ore_amount(false) / 2)
local second_item_amount = math_random(1,3)
local second_item = "wood"
local main_item = choppy_entity_yield[entity.name][math_random(1,#choppy_entity_yield[entity.name])]
entity.surface.create_entity({
name = "flying-text",
position = entity.position,
text = "+" .. amount .. " [item=" .. main_item .. "] +" .. second_item_amount .. " [item=" .. second_item .. "]",
color = {r=0.8,g=0.8,b=0.8}
})
local text = "+" .. amount .. " [item=" .. main_item .. "] +" .. second_item_amount .. " [item=" .. second_item .. "]"
local player = game.players[event.player_index]
flying_text(entity.surface, entity.position, text, {r = 0.8, g = 0.8, b = 0.8})
reward_ores(amount, main_item, entity.surface, player, player)
local inserted_count = player.insert({name = second_item, count = second_item_amount})
second_item_amount = second_item_amount - inserted_count
if second_item_amount > 0 then
entity.surface.spill_item_stack(entity.position,{name = second_item, count = second_item_amount}, true)
end
reward_ores(second_item_amount, second_item, entity.surface, player, player)
end
end
function Public_event.rocky_loot(event)
local objective = Chrono_table.get_table()
local surface = game.surfaces[objective.active_surface_index]
local player = game.players[event.player_index]
surface.spill_item_stack(player.position,{name = "raw-fish", count = math_random(1,3)},true)
local amount = math_floor(get_ore_amount())
local amount = math_ceil(get_ore_amount(false))
local rock_mining = {"iron-ore", "iron-ore", "iron-ore", "iron-ore", "copper-ore", "copper-ore", "copper-ore", "stone", "stone", "coal", "coal"}
local mined_loot = rock_mining[math_random(1,#rock_mining)]
surface.create_entity({
name = "flying-text",
position = {player.position.x, player.position.y - 0.5},
text = "+" .. amount .. " [img=item/" .. mined_loot .. "]",
color = {r=0.98, g=0.66, b=0.22}
})
reward_ores(amount, mined_loot, surface, player, player)
local text = "+" .. amount .. " [item=" .. mined_loot .. "]"
flying_text(player.surface, player.position, text, {r = 0.98, g = 0.66, b = 0.22})
reward_ores(amount, mined_loot, player.surface, player, player)
reward_ores(math_random(1,3), "raw-fish", player.surface, player, player)
end
function Public_event.scrap_loot(event)
local objective = Chrono_table.get_table()
local scrap_table = Balance.scrap()
local scrap = scrap_table.main[math_random(1, #scrap_table.main)]
local scrap2 = scrap_table.second[math_random(1, #scrap_table.second)]
local amount = math_ceil(get_ore_amount(true) * scrap.amount)
local amount2 = math_ceil(get_ore_amount(true) * scrap2.amount)
local player = game.players[event.player_index]
local text = "+" .. amount .. " [item=" .. scrap.name .. "] + " .. amount2 .. " [item=" .. scrap2.name .. "]"
flying_text(player.surface, player.position, text, {r = 0.98, g = 0.66, b = 0.22})
reward_ores(amount, scrap.name, player.surface, player, player)
reward_ores(amount2, scrap2.name, player.surface, player, player)
end
function Public_event.swamp_loot(event)
@ -189,9 +198,9 @@ function Public_event.swamp_loot(event)
["spitter-spawner"] = 10,
}
local surface = game.surfaces[objective.active_surface_index]
local amount = math_floor(get_ore_amount() / 10)
local amount = math_floor(get_ore_amount(false) / 10)
if ore_yield[event.entity.name] then
amount = math_floor((get_ore_amount() * ore_yield[event.entity.name]) / 10)
amount = math_floor((get_ore_amount(false) * ore_yield[event.entity.name]) / 10)
end
if amount > 50 then amount = 50 end
@ -263,7 +272,7 @@ end
function Public_event.flamer_nerfs()
local objective = Chrono_table.get_table()
local difficulty = Difficulty.get().difficulty_vote_value
local flame_researches = {
[1] = {name = "refined-flammables-1", bonus = 0.2},
[2] = {name = "refined-flammables-2", bonus = 0.2},
@ -304,7 +313,7 @@ function Public_event.mining_buffs(event)
end
if mining_researches[event.research.name] == nil then return end
local tech = mining_researches[event.research.name]
if tech.bonus_productivity then

View File

@ -8,6 +8,7 @@ local math_min = math.min
local Upgrades = require "maps.chronosphere.upgrade_list"
local Balance = require "maps.chronosphere.balance"
local Difficulty = require 'modules.difficulty_vote'
local Minimap = require "maps.chronosphere.minimap"
local function create_gui(player)
local frame = player.gui.top.add({ type = "frame", name = "chronosphere"})
@ -86,6 +87,7 @@ local function update_upgrades_gui(player)
if not player.gui.screen["gui_upgrades"] then return end
local upgrades = Upgrades.upgrades()
local frame = player.gui.screen["gui_upgrades"]
local switch = frame["quest_switch"].switch_state
for i = 1, #upgrades, 1 do
local t = frame["upgrades_table" .. i]
@ -108,17 +110,28 @@ local function update_upgrades_gui(player)
t[index .. "-" .. i].number = item.count
end
end
if upgrades[i].quest then
if switch == "left" then
t.visible = false
else
t.visible = true
end
else
if switch == "right" then
t.visible = false
else
t.visible = true
end
end
end
end
local function planet_gui(player)
local objective = Chrono_table.get_table()
if player.gui.screen["gui_planet"] then player.gui.screen["gui_planet"].destroy() return end
local planet = objective.planet[1]
local evolution = game.forces["enemy"].evolution_factor
local frame = player.gui.screen.add{type = "frame", name = "gui_planet", caption = "Planet Info", direction = "vertical"}
local frame = player.gui.screen.add{type = "frame", name = "gui_planet", caption = {"chronosphere.gui_planet_button"}, direction = "vertical"}
frame.location = {x = 650, y = 45}
frame.style.minimal_height = 300
frame.style.maximal_height = 500
@ -142,7 +155,7 @@ local function planet_gui(player)
frame.add({type = "label", name = "planet_biters3", caption = {"chronosphere.gui_planet_4_1", objective.overstaycount * 2.5, objective.overstaycount * 10}})
frame.add({type = "line"})
frame.add({type = "label", name = "overstay_time", caption = {"chronosphere.gui_planet_7", "",""}})
frame.add({type = "line"})
local close = frame.add({type = "button", name = "close_planet", caption = "Close"})
@ -181,26 +194,28 @@ local function update_planet_gui(player)
frame["planet_biters3"].caption = {"chronosphere.gui_planet_4_1", objective.overstaycount * 2.5, objective.overstaycount * 10}
frame["planet_time"].caption = {"chronosphere.gui_planet_5", planet.day_speed.name}
if objective.jump_countdown_start_time == -1 then
if objective.chronojumps >= Balance.jumps_until_overstay_is_on(difficulty) then
local time_until_overstay = (objective.chronochargesneeded * 0.75 / objective.passive_chronocharge_rate - objective.passivetimer)
if time_until_overstay < 0 then
frame["overstay_time"].caption = {"chronosphere.gui_overstayed","",""}
frame["overstay_time"].caption = {"chronosphere.gui_overstayed"}
else
frame["overstay_time"].caption = {"chronosphere.gui_planet_6", math_floor(time_until_overstay / 60), math_floor(time_until_overstay % 60)}
end
else
frame["overstay_time"].caption = {"chronosphere.gui_planet_7",Balance.jumps_until_overstay_is_on(difficulty),""}
frame["overstay_time"].caption = {"chronosphere.gui_planet_7",Balance.jumps_until_overstay_is_on(difficulty)}
end
else
if objective.chronojumps >= Balance.jumps_until_overstay_is_on(difficulty) then
local overstayed = (objective.chronochargesneeded * 0.75 / objective.passive_chronocharge_rate < objective.jump_countdown_start_time)
if overstayed < 0 then
frame["overstay_time"].caption = {"chronosphere.gui_overstayed","",""}
if overstayed then
frame["overstay_time"].caption = {"chronosphere.gui_overstayed"}
else
frame["overstay_time"].caption = {"chronosphere.gui_not_overstayed","",""}
frame["overstay_time"].caption = {"chronosphere.gui_not_overstayed"}
end
else
frame["overstay_time"].caption = {"chronosphere.gui_planet_7",Balance.jumps_until_overstay_is_on(difficulty)}
end
end
@ -208,7 +223,7 @@ end
local function ETA_seconds_until_full(power, storedbattery) -- in watts and joules
local objective = Chrono_table.get_table()
local n = objective.chronochargesneeded - objective.chronocharges
if n <= 0 then return 0
@ -232,11 +247,17 @@ function Public_gui.update_gui(player)
gui.label.caption = {"chronosphere.gui_1"}
gui.jump_number.caption = objective.chronojumps
gui.charger.caption = {"chronosphere.gui_2"}
if (objective.chronochargesneeded<100000) then
gui.charger_value.caption = string.format("%.2f", objective.chronocharges/1000) .. " / " .. math_floor(objective.chronochargesneeded)/1000 .. " GJ"
else
gui.charger_value.caption = string.format("%.2f", objective.chronocharges/1000000) .. " / " .. math_floor(objective.chronochargesneeded)/1000000 .. " TJ"
end
local interval = objective.chronochargesneeded
gui.progressbar.value = 1 - (objective.chronochargesneeded - objective.chronocharges) / interval
gui.charger.caption = {"chronosphere.gui_2"}
--[[
if (objective.chronochargesneeded<1000) then
gui.charger_value.caption = objective.chronocharges .. "/" .. objective.chronochargesneeded .. " MJ"
@ -250,28 +271,23 @@ function Public_gui.update_gui(player)
gui.charger_value.caption = math_floor(objective.chronocharges/100000)/10 .. " / " .. math_floor(objective.chronochargesneeded/100000)/10 .. " TJ"
end
]]
if (objective.chronochargesneeded<100000) then
gui.charger_value.caption = string.format("%.2f", objective.chronocharges/1000) .. " / " .. math_floor(objective.chronochargesneeded)/1000 .. " GJ"
else
gui.charger_value.caption = string.format("%.2f", objective.chronocharges/1000000) .. " / " .. math_floor(objective.chronochargesneeded)/1000000 .. " TJ"
end
if objective.jump_countdown_start_time == -1 then
if tick % 60 == 58 then -- charge history updates
local history = objective.accumulator_energy_history
objective.accumulator_energy_history = {}
--if tick % 60 == 58 then -- charge history updates
--local history = objective.accumulator_energy_history
--objective.accumulator_energy_history = {}
local powerobserved,storedbattery,seconds_ETA = 0,0,0
if #history == 2 and history[1] and history[2] then
powerobserved = (history[2] - history[1]) / 54 * 60
storedbattery = history[2]
end
--if #history == 2 and history[1] and history[2] then
-- powerobserved = (history[2] - history[1]) / 54 * 60
-- storedbattery = history[2]
--end
seconds_ETA = ETA_seconds_until_full(powerobserved, storedbattery)
gui.timer.caption = {"chronosphere.gui_3"}
gui.timer_value.caption = math_floor(seconds_ETA / 60) .. "m" .. seconds_ETA % 60 .. "s"
gui.timer_value.style.font_color = {r = 0, g = 0.98, b = 0}
if objective.planet[1].type.id == 19 and objective.passivetimer > 31 then
local nukecase = objective.dangertimer
gui.timer2.caption = {"chronosphere.gui_3_2"}
@ -287,10 +303,16 @@ function Public_gui.update_gui(player)
gui.timer_value2.style.font_color = {r = 0, g = 200, b = 0}
end
end
end
--end
if objective.chronojumps >= Balance.jumps_until_overstay_is_on(difficulty) then
local time_until_overstay = (objective.chronochargesneeded * 0.75 / objective.passive_chronocharge_rate - objective.passivetimer)
local time_until_evo = (objective.chronochargesneeded * 0.5 / objective.passive_chronocharge_rate - objective.passivetimer)
if time_until_evo <= seconds_ETA then
gui.timer_value.style.font_color = {r = 0.98, g = 0.5, b = 0}
end
if time_until_overstay <= seconds_ETA then
gui.timer_value.style.font_color = {r = 0.98, g = 0, b = 0}
end
local first_part = "Biters permanently evolve in: " .. math_floor(time_until_overstay/60) .. "m" .. math_floor(time_until_overstay) % 60 .. "s"
if time_until_overstay < 0 then
@ -308,7 +330,7 @@ function Public_gui.update_gui(player)
end
else
gui.timer.caption = {"chronosphere.gui_3_3"}
gui.timer_value.caption = objective.passivetimer - objective.jump_countdown_start_time .. " / " .. objective.jump_countdown_length
gui.timer_value.caption = 180 - (objective.passivetimer - objective.jump_countdown_start_time) .. "s"
gui.timer.tooltip = ""
gui.timer_value.tooltip = ""
gui.timer2.caption = ""
@ -332,6 +354,7 @@ local function upgrades_gui(player)
frame.style.maximal_width = 630
frame.add({type = "label", caption = {"chronosphere.gui_upgrades_1"}})
frame.add({type = "label", caption = {"chronosphere.gui_upgrades_2"}})
frame.add({type = "switch", name = "quest_switch", switch_state = "left", allow_none_state = false, left_label_caption = {"chronosphere.gui_upgrades_switch_left"}, right_label_caption = {"chronosphere.gui_upgrades_switch_right"}})
for i = 1, #upgrades, 1 do
local upg_table = frame.add({type = "table", name = "upgrades_table" .. i, column_count = 10})
@ -340,7 +363,7 @@ local function upgrades_gui(player)
name.style.width = 200
local maxed = upg_table.add({type = "sprite-button", name = "maxed" .. i, enabled = false, sprite = "virtual-signal/signal-check", tooltip = "Upgrade maxed!", visible = false})
local jumps = upg_table.add({type = "sprite-button", name = "jump_req" .. i, enabled = false, sprite = "virtual-signal/signal-J", number = upgrades[i].jump_limit, tooltip = "Required jump number", visible = true})
local jumps = upg_table.add({type = "sprite-button", name = "jump_req" .. i, enabled = false, sprite = "virtual-signal/signal-J", number = upgrades[i].jump_limit, tooltip = {"chronosphere.gui_upgrades_jumps"}, visible = true})
for index,item in pairs(upgrades[i].cost) do
costs[index] = upg_table.add({type = "sprite-button", name = index .. "-" .. i, number = item.count, sprite = item.sprite, enabled = false, tooltip = {item.tt .. "." .. item.name}, visible = true})
@ -358,8 +381,11 @@ local function upgrades_gui(player)
costs[index].visible = true
end
end
if upgrades[i].quest then upg_table.visible = false end
end
frame.add({type = "button", name = "close_upgrades", caption = "Close"})
frame.add({type = "line", direction = "horizontal"})
local close = frame.add({type = "button", name = "close_upgrades", caption = "Close"})
close.style.horizontally_stretchable = true
return costs
end
@ -374,6 +400,12 @@ function Public_gui.on_gui_click(event)
elseif event.element.name == "planet_button" then
planet_gui(player)
return
elseif event.element.name == "minimap_button" then
Minimap.minimap(player, false)
elseif event.element.name =="icw_map" or event.element.name == "icw_map_frame" then
Minimap.toggle_minimap(event)
elseif event.element.name == "switch_auto_map" then
Minimap.toggle_auto(player)
end
if event.element.type ~= "button" and event.element.type ~= "sprite-button" then return end

View File

@ -63,7 +63,7 @@ function Public.locomotive_spawn(surface, position, wagons)
xi = 0
end
local comfychest = surface.create_entity({name = "steel-chest", position = {position.x - 2 + xi, position.y - 2 + yi + i}, force = "player"})
local comfychest = surface.create_entity({name = "blue-chest", position = {position.x - 2 + xi, position.y - 2 + yi + i}, force = "player"})
comfychest.minable = false
--comfychest.destructible = false
if not objective.comfychests[i] then
@ -257,7 +257,7 @@ function Public.create_wagon_room()
for i = 1, 12, 1 do
local step = math_floor((i-1)/4)
local y = -131 + i + step * 128 - step * 4
local e = surface.create_entity({name = "steel-chest", position = {x,y}, force = "player", create_build_effect_smoke = false})
local e = surface.create_entity({name = "red-chest", position = {x,y}, force = "player", create_build_effect_smoke = false})
e.destructible = false
e.minable = false
table.insert(objective.comfychests2, e)
@ -302,7 +302,7 @@ function Public.create_wagon_room()
local market = surface.create_entity({name = "market", position = {-29, height * -0.5 + 4}, force="neutral", create_build_effect_smoke = false})
market.minable = false
market.destructible = false
local repairchest = surface.create_entity({name = "steel-chest", position = {-24, height * -0.5 + 3}, force = "player"})
local repairchest = surface.create_entity({name = "blue-chest", position = {-24, height * -0.5 + 3}, force = "player"})
repairchest.minable = false
repairchest.destructible = false
objective.upgradechest[0] = repairchest
@ -319,7 +319,7 @@ function Public.create_wagon_room()
}
local upgrades = Upgrades.upgrades()
for i = 1, #upgrades, 1 do
local e = surface.create_entity({name = "steel-chest", position = {-21 + i, height * -0.5 + 3}, force = "player"})
local e = surface.create_entity({name = "blue-chest", position = {-21 + i, height * -0.5 + 3}, force = "player"})
e.minable = false
e.destructible = false
objective.upgradechest[i] = e
@ -453,23 +453,27 @@ function Public.enter_cargo_wagon(player, vehicle)
local objective = Chrono_table.get_table()
if not vehicle then log("no vehicle") return end
if not vehicle.valid then log("vehicle invalid") return end
if not objective.locomotive then log("locomotive missing") return end
if not objective.locomotive.valid then log("locomotive invalid") return end
if not game.surfaces["cargo_wagon"] then Public.create_wagon_room() end
local wagon_surface = game.surfaces["cargo_wagon"]
for i = 1, 3, 1 do
if not objective.locomotive_cargo[i] then log("no cargo") return end
if not objective.locomotive_cargo[i].valid then log("cargo invalid") return end
if vehicle == objective.locomotive_cargo[i] then
local x_vector = vehicle.position.x - player.position.x
local position
if x_vector > 0 then
position = {wagon_surface.map_gen_settings.width * -0.5, -128 + 128 * (i - 1)}
else
position = {wagon_surface.map_gen_settings.width * 0.5, -128 + 128 * (i - 1)}
end
player.teleport(wagon_surface.find_non_colliding_position("character", position, 128, 0.5), wagon_surface)
break
end
end
if vehicle.type == "cargo-wagon" then
for i = 1, 3, 1 do
if not objective.locomotive_cargo[i] then log("no cargo") return end
if not objective.locomotive_cargo[i].valid then log("cargo invalid") return end
if vehicle == objective.locomotive_cargo[i] then
local x_vector = vehicle.position.x - player.position.x
local position
if x_vector > 0 then
position = {wagon_surface.map_gen_settings.width * -0.5, -128 + 128 * (i - 1)}
else
position = {wagon_surface.map_gen_settings.width * 0.5, -128 + 128 * (i - 1)}
end
player.teleport(wagon_surface.find_non_colliding_position("character", position, 128, 0.5), wagon_surface)
break
end
end
end
if player.surface.name == "cargo_wagon" and vehicle.type == "car" then
if objective.flame_boots then
objective.flame_boots[player.index] = {fuel = 1, steps = {}}
@ -481,8 +485,13 @@ function Public.enter_cargo_wagon(player, vehicle)
break
end
end
local surface = objective.locomotive_cargo[1].surface
local position = {x = objective.locomotive_cargo[((used_exit - 1) % 3) + 1].position.x + math_sgn(used_exit - 3.5) * 2, y = objective.locomotive_cargo[((used_exit - 1) % 3) + 1].position.y}
local surface = objective.locomotive.surface
local position
if used_exit == 0 or objective.game_lost then
position = game.forces.player.get_spawn_position(surface)
else
position = {x = objective.locomotive_cargo[((used_exit - 1) % 3) + 1].position.x + math_sgn(used_exit - 3.5) * 2, y = objective.locomotive_cargo[((used_exit - 1) % 3) + 1].position.y}
end
local position2 = surface.find_non_colliding_position("character", position, 128, 0.5)
if not position2 then return end
player.teleport(position2, surface)

View File

@ -9,6 +9,7 @@ require "maps.chronosphere.terrain"
require "modules.biter_noms_you"
-- require "modules.custom_death_messages"
local Server = require 'utils.server'
local Chrono_table = require 'maps.chronosphere.table'
local Ai = require "maps.chronosphere.ai"
local Planets = require "maps.chronosphere.chronobubles"
local Ores =require "maps.chronosphere.ores"
@ -20,8 +21,8 @@ local Event_functions = require "maps.chronosphere.event_functions"
local Balance = require "maps.chronosphere.balance"
local Rand = require 'maps.chronosphere.random'
local Chrono = require "maps.chronosphere.chrono"
local Chrono_table = require 'maps.chronosphere.table'
local Locomotive = require "maps.chronosphere.locomotive"
local Minimap = require "maps.chronosphere.minimap"
local Gui = require "maps.chronosphere.gui"
local Difficulty = require 'modules.difficulty_vote'
local math_random = math.random
@ -151,6 +152,9 @@ local function reset_map()
local surface = game.surfaces[objective.active_surface_index]
generate_overworld(surface, planet)
Chrono.restart_settings()
for _,player in pairs(game.players) do
Minimap.minimap(player, true)
end
game.forces.player.set_spawn_position({12, 10}, surface)
Locomotive.locomotive_spawn(surface, {x = 16, y = 10}, Chrono.get_wagons(true))
@ -246,7 +250,7 @@ function Public.chronojump(choice)
if objective.chronojumps <= 24 then
award_coins(
Balance.coin_reward_per_second_jumped_early(objective.chronochargesneeded / objective.passive_chronocharge_rate + objective.jump_countdown_length - objective.passivetimer, Difficulty.get().difficulty_vote_value)
Balance.coin_reward_per_second_jumped_early(objective.chronochargesneeded / objective.passive_chronocharge_rate + 180 - objective.passivetimer, Difficulty.get().difficulty_vote_value)
)
end
@ -264,7 +268,6 @@ function Public.chronojump(choice)
objective.lab_cells = {}
objective.active_surface_index = game.create_surface("chronosphere" .. objective.chronojumps, Chrono.get_map_gen_settings()).index
local surface = game.surfaces[objective.active_surface_index]
--log("seed of new surface: " .. surface.map_gen_settings.seed)
local planet = objective.planet
if choice then
Planets.determine_planet(choice)
@ -279,6 +282,7 @@ function Public.chronojump(choice)
game.delete_surface(oldsurface)
Chrono.post_jump()
Event_functions.flamer_nerfs()
Minimap.update_minimap()
--
local pos = objective.locomotive.position or {x=0,y=0}
@ -307,19 +311,16 @@ local tick_minute_functions = {
local function initiate_jump_countdown()
local objective = Chrono_table.get_table()
local difficulty = Difficulty.get().difficulty_vote_value
local length = Balance.generate_jump_countdown_length(difficulty)
objective.jump_countdown_start_time = objective.passivetimer
objective.jump_countdown_length = length
game.print({"chronosphere.message_initiate_jump_countdown", length}, {r=0.98, g=0.66, b=0.22})
game.print({"chronosphere.message_jump180"}, {r=0.98, g=0.66, b=0.22})
end
local function check_if_overstayed()
local objective = Chrono_table.get_table()
if objective.passivetimer * objective.passive_chronocharge_rate > (objective.chronochargesneeded * 0.75) and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
objective.overstaycount = objective.overstaycount + 1
end
if objective.passivetimer * objective.passive_chronocharge_rate > (objective.chronochargesneeded * 0.75) and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
objective.overstaycount = objective.overstaycount + 1
end
end
function Public.add_chronocharge()
@ -344,16 +345,16 @@ local function drain_accumulators()
local energy = acus[i].energy
if energy > 1010000 and objective.chronocharges < objective.chronochargesneeded then
acus[i].energy = acus[i].energy - 1000000
objective.chronocharges = objective.chronocharges + 1
if objective.locomotive ~= nil and objective.locomotive.valid then
local pos = objective.locomotive.position or {x=0,y=0}
local exterior_pollution = Balance.pollution_per_MJ_actively_charged(objective.chronojumps, difficulty, objective.upgrades[2])
game.surfaces[objective.active_surface_index].pollute(pos, exterior_pollution)
game.pollution_statistics.on_flow("locomotive", exterior_pollution)
if objective.chronocharges == objective.chronochargesneeded then
check_if_overstayed()
initiate_jump_countdown()
@ -363,19 +364,6 @@ local function drain_accumulators()
end
end
function Public.attempt_to_jump()
local objective = Chrono_table.get_table()
local difficulty = Difficulty.get().difficulty_vote_value
if 100 * math_random() <= Balance.misfire_percentage_chance(difficulty) then
game.print({"chronosphere.message_jump_misfire"}, {r=0.98, g=0.66, b=0.22})
objective.jump_countdown_length = objective.jump_countdown_length + 15
else
Public.chronojump(nil)
end
end
function Public.get_total_accu_charge()
local objective = Chrono_table.get_table()
local acus = objective.accumulators
@ -404,7 +392,7 @@ local function tick() --only even ticks trigger
end
--surface.force_generate_chunk_requests()
end
if tick % 12 == 0 and objective.planet[1].type.id == 18 then
Tick_functions.spawn_poison()
end
@ -417,7 +405,7 @@ local function tick() --only even ticks trigger
if objective.chronocharges < objective.chronochargesneeded and objective.planet[1].type.id ~= 17 then
local chronotimer_ticks_between_increase = math_floor(60 / objective.passive_chronocharge_rate / 2) * 2 --make sure it's even because you can't do things on odd ticks
if tick % chronotimer_ticks_between_increase == 0 then
objective.chronocharges = objective.chronocharges + 1
end
@ -425,19 +413,19 @@ local function tick() --only even ticks trigger
if tick % 30 == 0 then
local difficulty = Difficulty.get().difficulty_vote_value
if tick % 60 == 0 and objective.planet[1].type.id ~= 17 then
objective.passivetimer = objective.passivetimer + 1
if objective.planet[1].type.id == 19 then
Tick_functions.dangertimer()
end
Tick_functions.realtime_events()
if objective.locomotive ~= nil and objective.locomotive.valid then
if objective.jump_countdown_start_time == -1 then
if objective.chronocharges == objective.chronochargesneeded then
if objective.chronocharges >= objective.chronochargesneeded then
check_if_overstayed()
initiate_jump_countdown()
end
@ -447,8 +435,8 @@ local function tick() --only even ticks trigger
game.surfaces[objective.active_surface_index].pollute(pos, exterior_pollution)
game.pollution_statistics.on_flow("locomotive", exterior_pollution)
else
if objective.passivetimer == objective.jump_countdown_start_time + objective.jump_countdown_length then
Public.attempt_to_jump()
if objective.passivetimer == objective.jump_countdown_start_time + 180 then
Public.chronojump(nil)
else
local pos = objective.locomotive.position or {x=0,y=0}
local exterior_pollution = Balance.countdown_pollution_rate(objective.chronojumps, Difficulty.get().difficulty_vote_value)
@ -463,7 +451,7 @@ local function tick() --only even ticks trigger
if tick % 60 == 0 then
drain_accumulators()
end
if tick % 120 == 0 then
Tick_functions.move_items()
Tick_functions.output_items()
@ -485,11 +473,11 @@ local function tick() --only even ticks trigger
Tick_functions.offline_players()
end
end
if tick % 1800 == 900 and objective.jump_countdown_start_time ~= -1 then
Ai.perform_main_attack()
end
local key = tick % 3600
if tick_minute_functions[key] then tick_minute_functions[key]() end
if objective.game_reset_tick then
@ -501,12 +489,25 @@ local function tick() --only even ticks trigger
end
Locomotive.fish_tag()
end
for _, player in pairs(game.connected_players) do Gui.update_gui(player) end
for _, player in pairs(game.connected_players) do
Minimap.toggle_button(player)
Gui.update_gui(player)
end
end
local function on_init()
local objective = Chrono_table.get_table()
local T = Map.Pop_info()
local difficulty_tooltips = {
[1] = {"chronosphere.difficulty1"},
[2] = {"chronosphere.difficulty2"},
[3] = {"chronosphere.difficulty3"},
[4] = {"chronosphere.difficulty4"},
[5] = {"chronosphere.difficulty5"},
[6] = {"chronosphere.difficulty6"},
[7] = {"chronosphere.difficulty7"}
}
Difficulty.set_tooltip(difficulty_tooltips)
T.localised_category = "chronosphere"
T.main_caption_color = {r = 150, g = 150, b = 0}
T.sub_caption_color = {r = 0, g = 150, b = 0}
@ -516,13 +517,14 @@ local function on_init()
objective.config.offline_loot = true
objective.config.jumpfailure = true
objective.config.overstay_penalty = true
game.create_force("scrapyard")
local mgs = game.surfaces["nauvis"].map_gen_settings
mgs.width = 16
mgs.height = 16
game.surfaces["nauvis"].map_gen_settings = mgs
game.surfaces["nauvis"].clear()
for k, v in pairs(Balance.player_ammo_damage_modifiers()) do
game.forces['player'].set_ammo_damage_modifier(k, v)
end
@ -532,7 +534,6 @@ local function on_init()
end
reset_map()
--if game.surfaces["nauvis"] then game.delete_surface(game.surfaces["nauvis"]) end
end
-- local function on_load()
@ -583,6 +584,9 @@ local function on_player_mined_entity(event)
elseif
objective.planet[1].type.id == 11 then event.buffer.clear() -- rocky planet
end
elseif entity.name == "mineable-wreckage" then
Event_functions.scrap_loot(event)
event.buffer.clear()
end
end
@ -642,6 +646,7 @@ local function on_player_driving_changed_state(event)
local player = game.players[event.player_index]
local vehicle = event.entity
Locomotive.enter_cargo_wagon(player, vehicle)
Minimap.minimap(player, true)
end
-- function deny_building(event)
@ -695,13 +700,13 @@ end
local function on_research_finished(event)
local difficulty = Difficulty.get().difficulty_vote_value
Event_functions.flamer_nerfs()
Event_functions.mining_buffs(event)
local research = event.research
local p_force = research.force
for _, e in ipairs(research.effects) do
local t = e.type
if t == 'ammo-damage' then
@ -716,7 +721,7 @@ local function on_research_finished(event)
elseif t == 'gun-speed' then
local category = e.ammo_category
local factor = Balance.player_gun_speed_modifiers()[category] or 0
if factor then
local current_m = p_force.get_gun_speed_modifier(category)
local m = e.modifier
@ -724,12 +729,10 @@ local function on_research_finished(event)
end
end
end
end
local function on_entity_damaged(event)
local difficulty = Difficulty.get().difficulty_vote_value
if not event.entity.valid then return end
protect_entity(event)
if not event.entity.valid then return end
@ -738,21 +741,6 @@ local function on_entity_damaged(event)
if event.entity.force.name == "enemy" then
Event_functions.biter_immunities(event)
end
if not event.cause then return end
if not event.cause.valid then return end
if event.cause.name ~= "character" then return end
if event.damage_type.name ~= "physical" then return end
local player = event.cause
if player.shooting_state.state == defines.shooting.not_shooting then return end
local weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index]
local ammo = player.get_inventory(defines.inventory.character_ammo)[player.selected_gun_index]
if not weapon.valid_for_read or not ammo.valid_for_read then return end
if weapon.name ~= "pistol" then return end
if ammo.name ~= "firearm-magazine" and ammo.name ~= "piercing-rounds-magazine" and ammo.name ~= "uranium-rounds-magazine" then return end
if not event.entity.valid then return end
event.entity.damage(event.final_damage_amount * (Balance.pistol_damage_multiplier(difficulty) - 1), player.force, "impact", player)
end

View File

@ -0,0 +1,153 @@
local Public = {}
local Chrono_table = require 'maps.chronosphere.table'
local function create_button(player)
local button = player.gui.top.add({ type = "sprite-button", name = "minimap_button", sprite = "utility/map", tooltip = {"chronosphere.minimap_button_tooltip"}})
button.visible = false
end
function Public.toggle_button(player)
if not player.gui.top["minimap_button"] then
create_button(player)
end
local button = player.gui.top["minimap_button"]
if player.surface.name == "cargo_wagon" then
button.visible = true
else
button.visible = false
end
end
local function get_player_data(player)
local objective = Chrono_table.get_table()
local player_data = objective.icw.players[player.index]
if objective.icw.players[player.index] then return player_data end
objective.icw.players[player.index] = {
surface = objective.active_surface_index,
zoom = 0.30,
map_size = 360,
auto_map = true
}
return objective.icw.players[player.index]
end
function Public.toggle_auto(player)
local player_data = get_player_data(player)
local objective = Chrono_table.get_table()
local switch = player.gui.screen.icw_map_frame["switch_auto_map"]
if switch.switch_state == "left" then
objective.icw.players[player.index].auto_map = true
elseif switch.switch_state == "right" then
objective.icw.players[player.index].auto_map = false
end
end
local function kill_minimap(player)
local element = player.gui.screen.icw_map_frame
--if element then element.destroy() end
if element.visible then element.visible = false end
end
local function kill_frame(player)
if player.gui.screen.icw_map_frame then
local element = player.gui.screen.icw_map_frame.icw_map
element.destroy()
end
end
local function draw_minimap(player)
local objective = Chrono_table.get_table()
local surface = game.surfaces[objective.active_surface_index]
local position = objective.locomotive.position
local player_data = get_player_data(player)
local frame = player.gui.screen.icw_map_frame
if not frame then
frame = player.gui.screen.add({ type = "frame", direction = "vertical", name = "icw_map_frame", caption = {"chronosphere.minimap"}})
frame.location = {x = 10, y = 45}
switch_state = "right"
if player_data.auto_map then switch_state = "left" end
frame.add({type = "switch", name = "switch_auto_map", allow_none_state = false, left_label_caption = {"chronosphere.map_on"}, right_label_caption = {"chronosphere.map_off"}})
end
frame.visible = true
local element = frame["icw_map"]
if not element then
element = player.gui.screen.icw_map_frame.add({
type = "camera",
name = "icw_map",
position = position,
surface_index = surface.index,
zoom = player_data.zoom,
tooltip = {"chronosphere.minimap_tooltip"}
})
element.style.margin = 1
element.style.minimal_height = player_data.map_size
element.style.minimal_width = player_data.map_size
return
end
element.position = position
end
function Public.minimap(player, autoaction)
local player_data = get_player_data(player)
local frame = player.gui.screen["icw_map_frame"]
if frame and frame.visible then
kill_minimap(player)
else
if player.surface.name == "cargo_wagon" then
if autoaction then
if player_data.auto_map then
draw_minimap(player)
end
else
draw_minimap(player)
end
end
end
end
function Public.update_minimap()
local objective = Chrono_table.get_table()
for k, player in pairs(game.connected_players) do
--if player.character and player.character.valid then
if player.surface.name == "cargo_wagon" and player.gui.screen.icw_map_frame then
kill_frame(player)
draw_minimap(player)
end
--end
end
end
function Public.toggle_minimap(event)
local element = event.element
if not element then return end
if not element.valid then return end
if element.name ~= "icw_map" then return end
local player = game.players[event.player_index]
local player_data = get_player_data(player)
if event.button == defines.mouse_button_type.right then
player_data.zoom = player_data.zoom - 0.07
if player_data.zoom < 0.07 then player_data.zoom = 0.07 end
element.zoom = player_data.zoom
return
end
if event.button == defines.mouse_button_type.left then
player_data.zoom = player_data.zoom + 0.07
if player_data.zoom > 2 then player_data.zoom = 2 end
element.zoom = player_data.zoom
return
end
if event.button == defines.mouse_button_type.middle then
player_data.map_size = player_data.map_size + 50
if player_data.map_size > 650 then player_data.map_size = 250 end
element.style.minimal_height = player_data.map_size
element.style.minimal_width = player_data.map_size
element.style.maximal_height = player_data.map_size
element.style.maximal_width = player_data.map_size
return
end
end
return Public

View File

@ -27,7 +27,7 @@ local function draw_noise_ore_patch(position, name, surface, radius, richness, m
local distance_to_center = math.sqrt(x^2 + y^2)
local a = richness - richness_part * distance_to_center
if distance_to_center < radius - math.abs(noise * radius * 0.85) and a > 1 then
if mixed then
noise = simplex_noise(pos.x * 0.005, pos.y * 0.005, seed) + simplex_noise(pos.x * 0.01, pos.y * 0.01, seed) * 0.3 + simplex_noise(pos.x * 0.05, pos.y * 0.05, seed) * 0.2
local i = (math_floor(noise * 100) % 7) + 1
@ -52,7 +52,7 @@ local function draw_noise_ore_patch(position, name, surface, radius, richness, m
end
local function get_size_of_ore(ore, planet)
local base_size = math_random(5, 10) + math_floor(planet[1].ore_richness.factor * 3)
local base_size = math_random(5, 10) + math_floor(planet[1].ore_richness.factor * 4)
local final_size
if planet[1].type.id == 1 and ore == "iron-ore" then --iron planet
final_size = math_floor(base_size * 1.5)
@ -75,10 +75,10 @@ end
local function get_oil_amount(pos, oil_w, richness)
local objective = Chrono_table.get_table()
local hundred_percent = 300000
return math_ceil((hundred_percent / 100) * (4 + objective.chronojumps) * oil_w * richness / 3)
return math_ceil((hundred_percent / 50) * (3 + objective.chronojumps) * oil_w * richness)
end
local function spawn_ore_vein(surface, pos, planet)
local function spawn_ore_vein(surface, pos, planet, extrasize)
local objective = Chrono_table.get_table()
local mixed = false
if planet[1].type.id == 6 then mixed = true end --mixed planet
@ -110,9 +110,13 @@ local function spawn_ore_vein(surface, pos, planet)
--if surface.can_place_entity({name = choice, position = pos, amount = 1}) then
if choice == "crude-oil" then
surface.create_entity({name = "crude-oil", position = pos, amount = get_oil_amount(pos, oil.w, planet[1].ore_richness.factor) })
local amount = get_oil_amount(pos, oil.w, planet[1].ore_richness.factor)
if extrasize then amount = amount * 2 end
surface.create_entity({name = "crude-oil", position = pos, amount = amount})
else
draw_noise_ore_patch(pos, choice, surface, get_size_of_ore(choice, planet), richness * 0.75, mixed)
local size = get_size_of_ore(choice, planet)
if extrasize then size = size * 2 end
draw_noise_ore_patch(pos, choice, surface, size, richness * 0.75, mixed)
end
--end
end
@ -120,177 +124,19 @@ end
function Public_ores.prospect_ores(entity, surface, pos)
local objective = Chrono_table.get_table()
local planet = objective.planet
local chance = 10
local chance = 15
local extrasize = false
if entity then
if entity.name == "rock-huge" then chance = 40 end
if entity.type == "unit-spawner" then chance = 40 end
if entity.name == "rock-huge" then chance = 45 end
if entity.type == "unit-spawner" then chance = 45 end
if planet[1].type.id == 15 then chance = chance + 30 end
if math_random(chance + math_floor(10 * planet[1].ore_richness.factor) ,100 + chance) >= 100 then
spawn_ore_vein(surface, pos, planet)
if math_random(chance + math_floor(20 * planet[1].ore_richness.factor), 100 + chance) >= 100 then
spawn_ore_vein(surface, pos, planet, extrasize)
end
else
spawn_ore_vein(surface, pos, planet)
extrasize = true
spawn_ore_vein(surface, pos, planet, extrasize)
end
end
---- SCRAP ----
local scrap_yield_amounts = {
["iron-plate"] = 8,
["iron-gear-wheel"] = 4,
["iron-stick"] = 8,
["copper-plate"] = 8,
["copper-cable"] = 12,
["electronic-circuit"] = 4,
["steel-plate"] = 4,
["pipe"] = 4,
["solid-fuel"] = 4,
["empty-barrel"] = 3,
["crude-oil-barrel"] = 3,
["lubricant-barrel"] = 3,
["petroleum-gas-barrel"] = 3,
["heavy-oil-barrel"] = 3,
["light-oil-barrel"] = 3,
["water-barrel"] = 3,
["grenade"] = 3,
["battery"] = 3,
["explosives"] = 3,
["advanced-circuit"] = 3,
["nuclear-fuel"] = 0.1,
["pipe-to-ground"] = 1,
["plastic-bar"] = 3,
["processing-unit"] = 1,
["used-up-uranium-fuel-cell"] = 1,
["uranium-fuel-cell"] = 0.3,
["rocket-fuel"] = 0.3,
["rocket-control-unit"] = 0.3,
["low-density-structure"] = 0.3,
["heat-pipe"] = 1,
["green-wire"] = 8,
["red-wire"] = 8,
["engine-unit"] = 2,
["electric-engine-unit"] = 2,
["logistic-robot"] = 0.3,
["construction-robot"] = 0.3,
["land-mine"] = 1,
["rocket"] = 2,
["explosive-rocket"] = 2,
["cannon-shell"] = 2,
["explosive-cannon-shell"] = 2,
["uranium-cannon-shell"] = 2,
["explosive-uranium-cannon-shell"] = 2,
["artillery-shell"] = 0.3,
["cluster-grenade"] = 0.3,
["defender-capsule"] = 2,
["destroyer-capsule"] = 0.3,
["distractor-capsule"] = 0.3
}
local scrap_mining_chance_weights = {
{name = "iron-plate", chance = 600},
{name = "iron-gear-wheel", chance = 400},
{name = "copper-plate", chance = 400},
{name = "copper-cable", chance = 200},
{name = "electronic-circuit", chance = 150},
{name = "steel-plate", chance = 100},
{name = "pipe", chance = 75},
{name = "iron-stick", chance = 30},
{name = "solid-fuel", chance = 20},
{name = "battery", chance = 10},
{name = "crude-oil-barrel", chance = 10},
{name = "petroleum-gas-barrel", chance = 7},
{name = "heavy-oil-barrel", chance = 7},
{name = "light-oil-barrel", chance = 7},
{name = "lubricant-barrel", chance = 4},
{name = "empty-barrel", chance = 4},
{name = "water-barrel", chance = 4},
{name = "green-wire", chance = 4},
{name = "red-wire", chance = 4},
{name = "grenade", chance = 3},
{name = "pipe-to-ground", chance = 3},
{name = "explosives", chance = 3},
{name = "advanced-circuit", chance = 3},
{name = "plastic-bar", chance = 3},
{name = "engine-unit", chance = 2},
{name = "nuclear-fuel", chance = 1},
{name = "processing-unit", chance = 1},
{name = "used-up-uranium-fuel-cell", chance = 1},
{name = "uranium-fuel-cell", chance = 1},
{name = "rocket-fuel", chance = 1},
{name = "rocket-control-unit", chance = 1},
{name = "low-density-structure", chance = 1},
{name = "heat-pipe", chance = 1},
{name = "electric-engine-unit", chance = 1},
{name = "logistic-robot", chance = 1},
{name = "construction-robot", chance = 1},
{name = "land-mine", chance = 1},
{name = "rocket", chance = 1},
{name = "explosive-rocket", chance = 1},
{name = "cannon-shell", chance = 1},
{name = "explosive-cannon-shell", chance = 1},
{name = "uranium-cannon-shell", chance = 1},
{name = "explosive-uranium-cannon-shell", chance = 1},
{name = "artillery-shell", chance = 1},
{name = "cluster-grenade", chance = 1},
{name = "defender-capsule", chance = 1},
{name = "destroyer-capsule", chance = 1},
{name = "distractor-capsule", chance = 1}
}
local scrap_raffle = {}
for _, t in pairs (scrap_mining_chance_weights) do
for x = 1, t.chance, 1 do
table.insert(scrap_raffle, t.name)
end
end
local size_of_scrap_raffle = #scrap_raffle
local function on_player_mined_entity(event)
local entity = event.entity
if not entity.valid then return end
if entity.name ~= "mineable-wreckage" then return end
event.buffer.clear()
local scrap = scrap_raffle[math.random(1, size_of_scrap_raffle)]
local amount_bonus_multiplier = Balance.scrap_quantity_multiplier(game.forces.enemy.evolution_factor)
local r1 = math.ceil(scrap_yield_amounts[scrap] * 0.3 * amount_bonus_multiplier)
local r2 = math.ceil(scrap_yield_amounts[scrap] * 1.7 * amount_bonus_multiplier)
local amount = math.random(r1, r2)
local player = game.players[event.player_index]
local inserted_count = player.insert({name = scrap, count = amount})
if inserted_count ~= amount then
local amount_to_spill = amount - inserted_count
entity.surface.spill_item_stack(entity.position,{name = scrap, count = amount_to_spill}, true)
end
entity.surface.create_entity({
name = "flying-text",
position = entity.position,
text = "+" .. amount .. " [img=item/" .. scrap .. "]",
color = {r=0.98, g=0.66, b=0.22}
})
end
local Event = require 'utils.event'
Event.add(defines.events.on_player_mined_entity, on_player_mined_entity)
return Public_ores
return Public_ores

View File

@ -44,6 +44,7 @@ function Public.reset_table()
chronosphere.offline_players = {}
chronosphere.nextsurface = nil
chronosphere.upgrades = {}
chronosphere.upgrades_on = {}
chronosphere.outchests = {}
chronosphere.upgradechest = {}
chronosphere.fishchest = {}
@ -53,6 +54,8 @@ function Public.reset_table()
chronosphere.comfychests2 = {}
chronosphere.locomotive_cargo = {}
chronosphere.planet = {}
chronosphere.icw = {}
chronosphere.icw.players = {}
end
function Public.get_table()

View File

@ -3,13 +3,15 @@
local Chrono_table = require 'maps.chronosphere.table'
local Ores = require "maps.chronosphere.ores"
local Specials = require "maps.chronosphere.terrain_specials"
local Difficulty = require 'modules.difficulty_vote'
local Balance = require "maps.chronosphere.balance"
local math_random = math.random
local math_floor = math.floor
local math_min = math.min
local math_abs = math.abs
local math_sqrt = math.sqrt
local level_depth = 960
local lake_noise_value = -0.9
local lake_noise_value = -0.85
local labyrinth_cell_size = 32 --valid values are 2, 4, 8, 16, 32
local Treasure = require 'maps.chronosphere.treasure'
local simplex_noise = require "utils.simplex_noise".d2
@ -159,7 +161,7 @@ local function process_dangerevent_position(p, seed, tiles, entities, treasure,
tiles[#tiles + 1] = {name = "dirt-7", position = p}
if scrapyard < -0.38 or scrapyard > 0.38 then
if math_random(1,36) == 1 then entities[#entities + 1] = {name = scrap_entities[math_random(1, scrap_entities_index)], position = p, force = "enemy"} end
if math_random(1,6) == 1 then entities[#entities + 1] = {name="mineable-wreckage", position=p} end
if math_random(1,3) == 1 then entities[#entities + 1] = {name="mineable-wreckage", position=p} end
return
end
return
@ -201,19 +203,19 @@ local function process_hedgemaze_position(p, seed, tiles, entities, treasure, pl
if math_random(1,252 - biters) == 1 and math_sqrt(p.x * p.x + p.y * p.y) > 300 then entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p} end
elseif things == "camp" then
if p.x % 32 > 12 and p.x % 32 < 20 and p.y % 32 > 12 and p.y % 32 < 20 then
if math_random(1,16) == 1 then treasure[#treasure + 1] = p end
if math_random(1,10) == 1 then treasure[#treasure + 1] = p end
elseif p.x % 32 == 11 or p.x % 32 == 12 or p.y % 32 == 11 or p.y % 32 == 12 or p.x % 32 == 21 or p.x % 32 == 20 or p.y % 32 == 21 or p.y % 32 == 20 then
if math_random(1,28) == 1 then entities[#entities + 1] = {name = "land-mine", position = p, force = "scrapyard"} end
if math_random(1,14) == 1 then entities[#entities + 1] = {name = "land-mine", position = p, force = "scrapyard"} end
end
elseif things == "crashsite" then
if math_random(1,10) == 1 then
if math_random(1,2) == 1 then
entities[#entities + 1] = {name="mineable-wreckage", position=p}
end
elseif things == "treasure" then
local roll = math_random(1,512)
local roll = math_random(1,128)
if roll <= 2 then
treasure[#treasure + 1] = p
elseif roll == 3 then
elseif roll > 2 and roll < 10 then
entities[#entities + 1] = {name = "land-mine", position = p, force = "scrapyard"}
end
end
@ -241,15 +243,15 @@ local function process_hedgemaze_position(p, seed, tiles, entities, treasure, pl
elseif things == "prospect" then
if math_random(1,252 - biters) == 1 and math_sqrt(p.x * p.x + p.y * p.y) > 300 then entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p} end
elseif things == "camp" then
if p.x % 32 > 12 and p.x % 32 < 20 and p.y % 32 > 12 and p.y % 32 < 20 and math_random(1,16) == 1 then
if p.x % 32 > 12 and p.x % 32 < 20 and p.y % 32 > 12 and p.y % 32 < 20 and math_random(1,6) == 1 then
treasure[#treasure + 1] = p
end
elseif things == "crashsite" then
if math_random(1,10) == 1 then
if math_random(1,2) == 1 then
entities[#entities + 1] = {name="mineable-wreckage", position=p}
end
elseif things == "treasure" then
if math_random(1,256) == 1 then
if math_random(1,128) == 1 then
treasure[#treasure + 1] = p
end
end
@ -453,8 +455,8 @@ local function process_biter_position(p, seed, tiles, entities, treasure, planet
if math_random(1,52 - biters) == 1 and math_sqrt(p.x * p.x + p.y * p.y) > 150 + handicap then entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p} end
end
if scrapyard > -0.05 - 0.01 * ore_size and scrapyard < 0.05 + 0.01 * ore_size then
if math_random(1,20) == 1 then entities[#entities + 1] = {name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p} end
if scrapyard > -0.08 - 0.01 * ore_size and scrapyard < 0.08 + 0.01 * ore_size then
if math_random(1,30) == 1 then entities[#entities + 1] = {name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p} end
end
if scrapyard + 0.5 > -0.1 - 0.1 * planet[1].type.moisture and scrapyard + 0.5 < 0.1 + 0.1 * planet[1].type.moisture then
local treetypes = tree_raffle[math_random(1, s_tree_raffle)]
@ -518,8 +520,11 @@ local function process_scrapyard_position(p, seed, tiles, entities, treasure, pl
if math_random(1,100) > 42 then entities[#entities + 1] = {name = tree_raffle[math_random(1, s_tree_raffle)], position = p} end
end
if scrapyard < -0.28 or scrapyard > 0.28 then
if math_random(1,48) == 1 then entities[#entities + 1] = {name = scrap_entities[math_random(1, scrap_entities_index)], position = p, force = "enemy"} end
if math_random(1,3) == 1 then entities[#entities + 1] = {name="mineable-wreckage", position=p} end
if math_random(1,48) == 1 then
entities[#entities + 1] = {name = scrap_entities[math_random(1, scrap_entities_index)], position = p, force = "enemy"}
else
entities[#entities + 1] = {name="mineable-wreckage", position=p}
end
return
end
return
@ -593,6 +598,9 @@ local function process_fish_position(p, seed, tiles, entities, treasure, planet)
local body_circle_center_1 = {x = body_center_position.x, y = body_center_position.y - body_spacing}
local body_circle_center_2 = {x = body_center_position.x, y = body_center_position.y + body_spacing}
local difficulty = Difficulty.get().difficulty_vote_value
local biters = Balance.fish_market_base_modifier(difficulty)
--local fin_radius = 200
--local square_fin_radius = fin_radius ^ 2
--local fin_circle_center_1 = {x = -600, y = 0}
@ -615,7 +623,7 @@ local function process_fish_position(p, seed, tiles, entities, treasure, planet)
tiles[#tiles + 1] = {name = "water", position = p}
else
tiles[#tiles + 1] = {name = "grass-1", position = p}
local roll = math_random(1,500)
local roll = math_random(1, biters)
if roll < 4 and p.x > -800 then
entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p}
elseif roll == 5 and p.x > -800 then
@ -632,7 +640,7 @@ local function process_fish_position(p, seed, tiles, entities, treasure, planet)
tiles[#tiles + 1] = {name = "out-of-map", position = p}
else --rest
tiles[#tiles + 1 ] = {name = "grass-1", position = p}
local roll = math_random(1,500)
local roll = math_random(1, biters)
if roll < 4 and p.x > -800 then
entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p}
elseif roll == 5 and p.x > -800 then
@ -648,7 +656,7 @@ local function process_fish_position(p, seed, tiles, entities, treasure, planet)
else
if p.x > 800 and math_abs(p.y) < p.x - 800 then --tail
tiles[#tiles + 1 ] = {name = "grass-1", position = p}
local roll = math_random(1,500)
local roll = math_random(1, biters)
if roll < 4 and p.x > -800 then
entities[#entities + 1] = {name = spawner_raffle[math_random(1, 4)], position = p}
elseif roll == 5 and p.x > -800 then
@ -686,9 +694,9 @@ local entity_functions = {
Treasure(surface, entity.position, entity.name)
end,
["lab"] = function(surface, entity)
local objective = Chrono_table.get_table()
local objective = Chrono_table.get_table()
local e = surface.create_entity(entity)
local evo = 1 + math_min(math_floor(objective.chronojumps / 4), 4)
local evo = 1 + math_min(math_floor(objective.chronojumps / 5), 4)
local research = {
{"automation-science-pack", "logistic-science-pack"},
{"automation-science-pack", "logistic-science-pack", "military-science-pack"},
@ -697,7 +705,7 @@ local entity_functions = {
{"automation-science-pack", "logistic-science-pack", "military-science-pack", "chemical-science-pack", "production-science-pack", "utility-science-pack"}
}
for _,science in pairs(research[evo]) do
e.insert({name = science, count = math_random(math_min(32 + objective.chronojumps, 100), math_min(64 + objective.chronojumps, 200))})
e.insert({name = science, count = math_random(math_min(30 + objective.chronojumps * 5, 100), math_min(60 + objective.chronojumps * 5, 200))})
end
end,
}
@ -892,32 +900,25 @@ local function normal_chunk(surface, left_top, level, planet)
if things == "prospect" then
Ores.prospect_ores(nil, surface, {x = left_top.x + 16, y = left_top.y + 16})
elseif things == "camp" or things == "lab" then
local positions = {
{x = left_top.x + 9, y = left_top.y + 9},{x = left_top.x + 9, y = left_top.y + 16},{x = left_top.x + 9, y = left_top.y + 23},
{x = left_top.x + 16, y = left_top.y + 9},{x = left_top.x + 16, y = left_top.y + 23},
{x = left_top.x + 23, y = left_top.y + 9},{x = left_top.x + 23, y = left_top.y + 16},{x = left_top.x + 23, y = left_top.y + 23}
}
for i = 1, 8, 1 do
entities[#entities + 1] = {name = "gun-turret", position = positions[i], force = "scrapyard"}
end
Specials.defended_position(surface, left_top, entities)
if things == "lab" then
entities[#entities + 1] = {name = "lab", position = {x = left_top.x + 15, y = left_top.y + 15}, force = "neutral"}
end
end
end
for y = 0, 31, 1 do
for x = 0, 31, 1 do
local p = {x = left_top.x + x, y = left_top.y + y}
process_level(p, seed, tiles, entities, treasure, planet, cell, things)
end
end
for x = 0, 31, 1 do
local p = {x = left_top.x + x, y = left_top.y + y}
process_level(p, seed, tiles, entities, treasure, planet, cell, things)
end
end
else
for y = 0, 31, 1 do
for x = 0, 31, 1 do
local p = {x = left_top.x + x, y = left_top.y + y}
process_level(p, seed, tiles, entities, treasure, planet)
end
end
for x = 0, 31, 1 do
local p = {x = left_top.x + x, y = left_top.y + y}
process_level(p, seed, tiles, entities, treasure, planet)
end
end
end
surface.set_tiles(tiles, true)

View File

@ -75,7 +75,7 @@ function Public_terrain.fish_market(surface, left_top)
alignment = "center",
scale_with_zoom = false
}
local fishchest = surface.create_entity({name = "steel-chest", force = "player", position = {x = left_top.x + 11, y = left_top.y + 16}})
local fishchest = surface.create_entity({name = "blue-chest", force = "player", position = {x = left_top.x + 11, y = left_top.y + 16}})
fishchest.destructible = false
fishchest.minable = false
fishchest.operable = false
@ -101,6 +101,15 @@ function Public_terrain.fish_market(surface, left_top)
track.minable = false
end
function Public_terrain.defended_position(surface, left_top, entities)
local positions = {
{x = left_top.x + 9, y = left_top.y + 9},{x = left_top.x + 9, y = left_top.y + 16},{x = left_top.x + 9, y = left_top.y + 23},
{x = left_top.x + 16, y = left_top.y + 9},{x = left_top.x + 16, y = left_top.y + 23},
{x = left_top.x + 23, y = left_top.y + 9},{x = left_top.x + 23, y = left_top.y + 16},{x = left_top.x + 23, y = left_top.y + 23}
}
for i = 1, 8, 1 do
entities[#entities + 1] = {name = "gun-turret", position = positions[i], force = "scrapyard"}
end
end
return Public_terrain

View File

@ -15,36 +15,29 @@ local math_exp = math.exp
function Public_tick.realtime_events()
local objective = Chrono_table.get_table()
-- debug testing for natural jumps (e.g. for misfires):
--if objective.passivetimer == 5 then
-- objective.chronocharges = objective.chronochargesneeded - 10
--end
if objective.planet[1].type.id == 19 then
if objective.passivetimer == 3 then
game.print({"chronosphere.message_danger1"}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer == 15 then
if objective.passivetimer == 10 then
game.print({"chronosphere.message_danger1"}, {r=0.98, g=0.66, b=0.22})
game.print({"chronosphere.message_danger2"}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer == 25 then
game.print({"chronosphere.message_danger3"}, {r=0.98, g=0, b=0})
elseif objective.passivetimer == 30 then
game.print({"chronosphere.message_danger4"}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer == 35 then
game.print({"chronosphere.message_danger5"}, {r=0.98, g=0, b=0})
game.print({"chronosphere.message_danger4"}, {r=0.98, g=0, b=0})
end
end
if objective.jump_countdown_start_time == -1 and objective.passivetimer == math_floor(objective.chronochargesneeded * 0.50 / objective.passive_chronocharge_rate) and objective.chronojumps >= Balance.jumps_until_overstay_is_on(Difficulty.get().difficulty_vote_value) then
game.print({"chronosphere.message_rampup50"}, {r=0.98, g=0.66, b=0.22})
end
if objective.game_lost then return end
if objective.jump_countdown_start_time ~= -1 then
if objective.passivetimer == objective.jump_countdown_start_time + objective.jump_countdown_length - 60 then
if objective.passivetimer == objective.jump_countdown_start_time + 180 - 60 then
game.print({"chronosphere.message_jump60"}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer == objective.jump_countdown_start_time + objective.jump_countdown_length - 30 then
elseif objective.passivetimer == objective.jump_countdown_start_time + 180 - 30 then
game.print({"chronosphere.message_jump30"}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer >= objective.jump_countdown_start_time + objective.jump_countdown_length - 10 and objective.jump_countdown_start_time + objective.jump_countdown_length - objective.passivetimer > 0 then
game.print({"chronosphere.message_jump_10orless", objective.jump_countdown_start_time + objective.jump_countdown_length - objective.passivetimer}, {r=0.98, g=0.66, b=0.22})
elseif objective.passivetimer >= objective.jump_countdown_start_time + 180 - 10 and objective.jump_countdown_start_time + 180 - objective.passivetimer > 0 then
game.print({"chronosphere.message_jump10", objective.jump_countdown_start_time + 180 - objective.passivetimer}, {r=0.98, g=0.66, b=0.22})
end
end
end
@ -59,7 +52,7 @@ function Public_tick.transfer_pollution()
local total_interior_pollution = surface.get_total_pollution()
local exterior_pollution = total_interior_pollution * Balance.machine_pollution_transfer_from_inside_factor(difficulty, objective.upgrades[2])
game.surfaces[objective.active_surface_index].pollute(objective.locomotive.position, exterior_pollution)
-- ascribe the difference to the locomotive:
game.pollution_statistics.on_flow("locomotive", exterior_pollution - total_interior_pollution)
@ -149,7 +142,7 @@ local function create_poison_cloud(position)
if not tile.valid then return end
if tile.name == "water-shallow" or tile.name == "water-mud" then
local random_angles = {math_rad(math_random(359)),math_rad(math_random(359)),math_rad(math_random(359)),math_rad(math_random(359))}
surface.create_entity({name = "poison-cloud", position = {x = position.x, y = position.y}})
surface.create_entity({name = "poison-cloud", position = {x = position.x + 12 * math_cos(random_angles[1]), y = position.y + 12 * math_sin(random_angles[1])}})
surface.create_entity({name = "poison-cloud", position = {x = position.x + 12 * math_cos(random_angles[2]), y = position.y + 12 * math_sin(random_angles[2])}})

View File

@ -12,16 +12,15 @@ local Public = {}
local function treasure_chest_loot(difficulty, planet)
local function loot_data_sensible(loot_data_item)
return {weight = loot_data_item[1], d_min = loot_data_item[2], d_max = loot_data_item[3], scaling = loot_data_item[4], name = loot_data_item[5], min_count = loot_data_item[6], max_count = loot_data_item[7]}
end
local loot_data_raw= {
--always there (or normally always there):
{8, 0, 1, false, "railgun-dart", 8, 16}, -- thesixthroc: this should not scale with jumps. reward treasure hunting currency the same at all jump numbers
{8, 0, 1, false, "coin", 4, 60},
{8, 0, 1, false, "coin", 50, 200},
{4, 0, 1, false, "pistol", 1, 2},
{1, 0, 1, false, "gun-turret", 2, 4},
@ -48,45 +47,45 @@ local function treasure_chest_loot(difficulty, planet)
--shotgun meta:
{10, -0.2, 0.4, true, "shotgun-shell", 12, 24},
{5, 0, 0.4, true, "shotgun", 1, 1},
{3, 0, 1.2, true, "piercing-shotgun-shell", 8, 24},
{2, 0, 1.2, true, "combat-shotgun", 1, 1},
{3, 0.4, 1.2, true, "piercing-shotgun-shell", 8, 24},
{2, 0.4, 1.2, true, "combat-shotgun", 1, 1},
--modular armor meta:
{0.7, -3, 1, true, "modular-armor", 1, 1},
{0.4, 0.3, 1, true, "power-armor", 1, 1},
{0.7, 0.25, 0.6, true, "modular-armor", 1, 1},
{0.4, 0.5, 1, true, "power-armor", 1, 1},
-- {0.5, -1,3, true, "power-armor-mk2", 1, 1},
{2, 0, 1, true, "solar-panel-equipment", 1, 2},
{2, 0, 1, true, "battery-equipment", 1, 1},
{1.6, 0, 1, true, "energy-shield-equipment", 1, 2},
{0.8, 0, 1, true, "night-vision-equipment", 1, 1},
{3, 0.1, 1, true, "solar-panel-equipment", 1, 2},
{2, 0.1, 1, true, "battery-equipment", 1, 1},
{1.6, 0.2, 1, true, "energy-shield-equipment", 1, 2},
{0.8, 0.1, 1, true, "night-vision-equipment", 1, 1},
{0.4, 0.5, 1.5, true, "personal-laser-defense-equipment", 1, 1},
--loader meta:
{math_max(1.5 * difficulty - 1.25, 0), 0, 0.2, false, "loader", 1, 2},
{math_max(1.5 * difficulty - 1.25, 0), 0.2, 0.6, false, "fast-loader", 1, 2},
{math_max(1.5 * difficulty - 1.25, 0), 0.6, 1, false, "express-loader", 1, 2},
--science meta:
{8, -0.5, 0.5, true, "automation-science-pack", 4, 12},
{8, -0.6, 0.6, true, "logistic-science-pack", 4, 12},
{6, -0.1, 1, true, "military-science-pack", 8, 8}, --careful with this
{6, 0.2, 1.4, true, "chemical-science-pack", 16, 24},
{6, 0.3, 1.5, true, "production-science-pack", 16, 24},
{4, 0.4, 1.5, true, "utility-science-pack", 16, 24},
{10, 0.5, 1.5, true, "space-science-pack", 16, 24},
{8, -0.5, 0.5, true, "automation-science-pack", 4, 32},
{8, -0.6, 0.6, true, "logistic-science-pack", 4, 32},
{6, -0.1, 1, true, "military-science-pack", 8, 32},
{6, 0.2, 1.4, true, "chemical-science-pack", 16, 64},
{6, 0.3, 1.5, true, "production-science-pack", 16, 64},
{4, 0.4, 1.5, true, "utility-science-pack", 16, 64},
{10, 0.5, 1.5, true, "space-science-pack", 16, 64},
--early-game:
{3, -0.1, 0.2, false, "railgun-dart", 2, 4},
{3, -0.1, 0.1, true, "wooden-chest", 8, 40},
{5, -0.1, 0.1, true, "burner-inserter", 8, 20},
{1, -0.2, 0.2, true, "offshore-pump", 1, 3},
{3, -0.2, 0.2, true, "boiler", 3, 6},
{6, -0.2, 0.2, true, "lab", 1, 2},
{3, 0, 0.1, true, "lab", 1, 3},
{3, -0.2, 0.2, true, "steam-engine", 2, 4},
{3, -0.2, 0.2, true, "burner-mining-drill", 2, 4},
{2.7, 0, 0.15, false, "submachine-gun", 1, 3},
{0.3, 0, 0.15, false, "vehicle-machine-gun", 1, 1},
{2, 0, 0.1, false, "submachine-gun", 1, 2},
{3, 0, 0.3, true, "iron-chest", 8, 40},
{4, -0.3, 0.3, true, "light-armor", 1, 1},
{4, 0, 0.1, false, "light-armor", 1, 1},
{4, -0.3, 0.3, true, "inserter", 8, 16},
{8, -0.3, 0.3, true, "small-electric-pole", 16, 32},
{6, -0.4, 0.4, true, "stone-furnace", 8, 16},
@ -97,6 +96,7 @@ local function treasure_chest_loot(difficulty, planet)
{5, -0.8, 0.8, true, "transport-belt", 15, 120},
--mid-game:
{6, 0.2, 0.5, false, "railgun-dart", 4, 8},
{5, -0.2, 0.7, true, "pipe", 30, 50},
{1, -0.2, 0.7, true, "pipe-to-ground", 4, 8},
{5, -0.2, 0.7, true, "iron-gear-wheel", 40, 160},
@ -106,7 +106,7 @@ local function treasure_chest_loot(difficulty, planet)
{4, -0.1, 0.8, true, "fast-underground-belt", 3, 10},
{4, -0.1, 0.8, true, "fast-splitter", 1, 5},
{2, 0, 0.6, true, "storage-tank", 2, 6},
{4, 0, 0.6, true, "heavy-armor", 1, 1},
{2, 0, 0.5, true, "heavy-armor", 1, 1},
{3, 0, 0.7, true, "steel-plate", 15, 100},
{8, 0, 0.9, true, "piercing-rounds-magazine", 20, 128},
{4, 0.2, 0.6, true, "engine-unit", 16, 32},
@ -120,6 +120,7 @@ local function treasure_chest_loot(difficulty, planet)
{3, 0.2, 1, true, "chemical-plant", 1, 3},
--late-game:
{9, 0.5, 0.8, false, "railgun-dart", 8, 16},
{3, 0, 1.2, true, "rocket-launcher", 1, 1},
{5, 0, 1.2, true, "rocket", 16, 32},
{3, 0, 1.2, true, "land-mine", 16, 32},
@ -147,6 +148,7 @@ local function treasure_chest_loot(difficulty, planet)
{2, 0.6, 1.4, true, "roboport", 1, 1},
-- super late-game:
{9, 0.8, 1.2, false, "railgun-dart", 12, 20},
{1, 0.9, 1.1, true, "power-armor-mk2", 1, 1},
--{2, 0, 1, , "computer", 1, 1},
@ -231,26 +233,26 @@ local function treasure_chest_loot(difficulty, planet)
{9, 0, 1, false, "green-wire", 10, 29},
{9, 0, 1, false, "red-wire", 10, 29},
{11, 0, 0.6, true, "modular-armor", 1, 1},
{7, -0.2,1, true, "power-armor", 1, 1},
{3, 0,2, true, "power-armor-mk2", 1, 1},
{11, 0.2, 0.6, false, "modular-armor", 1, 1},
{7, 0.4, 1, false, "power-armor", 1, 1},
{3, 0.8, 2, false, "power-armor-mk2", 1, 1},
{4, 0, 1, false, "exoskeleton-equipment", 1, 1},
{4, 0, 1, false, "belt-immunity-equipment", 1, 1},
{4, 0, 1, true, "energy-shield-equipment", 1, 2},
{4, 0, 1, false, "night-vision-equipment", 1, 1},
{4, 0, 1, false, "discharge-defense-equipment", 1, 1},
{4, 0.2, 1, false, "personal-roboport-equipment", 1, 2},
{4, 0.4, 1, false, "personal-laser-defense-equipment", 1, 1},
{8, 0, 1, false, "solar-panel-equipment", 1, 2},
{8, 0, 1, false, "battery-equipment", 1, 1},
{4, 0.5, 1, false, "exoskeleton-equipment", 1, 1},
{4, 0.2, 1, false, "belt-immunity-equipment", 1, 1},
{4, 0.3, 1, true, "energy-shield-equipment", 1, 2},
{4, 0.2, 1, false, "night-vision-equipment", 1, 1},
{4, 0.6, 1, false, "discharge-defense-equipment", 1, 1},
{4, 0.4, 1, false, "personal-roboport-equipment", 1, 2},
{4, 0.6, 1, false, "personal-laser-defense-equipment", 1, 1},
{8, 0.2, 1, false, "solar-panel-equipment", 1, 2},
{8, 0.2, 1, false, "battery-equipment", 1, 1},
{1, 0.5, 1, false, "energy-shield-mk2-equipment", 1, 1},
{1, 0.5, 1, false, "battery-mk2-equipment", 1, 1},
{1, 0.6, 1, false, "energy-shield-mk2-equipment", 1, 1},
{1, 0.6, 1, false, "battery-mk2-equipment", 1, 1},
{3, 0, 1, true, "copper-cable", 20, 400},
{3, -0.3, 0.6, true, "electronic-circuit", 50, 100},
{3, 0.2, 1.4, true, "advanced-circuit", 50, 100},
{3, 0.3, 1.4, true, "advanced-circuit", 50, 100},
{3, 0.5, 1.5, true, "processing-unit", 50, 100},
}
end
@ -284,8 +286,8 @@ function Public.treasure_chest(surface, position, container_name)
local chest_raffle = {}
local distance_to_center = (jumps / 40)
if distance_to_center > 1 then distance_to_center = 1 end
local distance = (jumps / 40)
if distance > 1 then distance = 1 end
local loot_data = treasure_chest_loot(difficulty, objective.planet[1])
local loot_types, loot_weights = {}, {}
@ -295,9 +297,9 @@ function Public.treasure_chest(surface, position, container_name)
if loot_data[i].scaling then -- scale down weights away from the midpoint 'peak' (without changing the mean)
local midpoint = (loot_data[i].d_max + loot_data[i].d_min) / 2
local difference = (loot_data[i].d_max - loot_data[i].d_min)
table.insert(loot_weights,loot_data[i].weight * math_max(0, 1 - (math_abs(distance_to_center - midpoint) / (difference / 2))))
table.insert(loot_weights,loot_data[i].weight * math_max(0, 1 - (math_abs(distance - midpoint) / (difference / 2))))
else -- no scaling
if loot_data[i].d_min <= distance_to_center and loot_data[i].d_max >= distance_to_center then
if loot_data[i].d_min <= distance and loot_data[i].d_max >= distance then
table.insert(loot_weights, loot_data[i].weight)
else
table.insert(loot_weights, 0)
@ -307,8 +309,8 @@ function Public.treasure_chest(surface, position, container_name)
local e = surface.create_entity({name = container_name, position=position, force="neutral", create_build_effect_smoke = false})
e.minable = false
local i = e.get_inventory(defines.inventory.chest)
for _ = 1, math_random(2,5), 1 do -- 20/04/04: max 5 items better than 6, so that if you observe 4 items in alt-mode the chance of an extra one is 1/2 rather than 2/3
local inv = e.get_inventory(defines.inventory.chest)
for _ = 1, math_random(2,6), 1 do
local loot = Rand.raffle(loot_types,loot_weights)
local difficulty_scaling = Balance.treasure_quantity_difficulty_scaling(difficulty)
if objective.chronojumps == 0 then difficulty_scaling = 1 end
@ -321,7 +323,7 @@ function Public.treasure_chest(surface, position, container_name)
elseif lucky <= 10 then
_count = _count * 2
end
i.insert({name = loot.name, count = _count})
inv.insert({name = loot.name, count = _count})
end
end

View File

@ -31,6 +31,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_train_armor"},
sprite = "recipe/locomotive",
max_level = 36,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_train_armor_message"},
tooltip = {"chronosphere.upgrade_train_armor_tooltip", 36, objective.max_health},
jump_limit = objective.upgrades[1],
@ -43,6 +45,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_filter"},
sprite = "recipe/effectivity-module",
max_level = 9,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_filter_message"},
tooltip = {"chronosphere.upgrade_filter_tooltip", math_floor(100 * Balance.machine_pollution_transfer_from_inside_factor(Difficulty.get().difficulty_vote_value, objective.upgrades[2]))},
jump_limit = (1 + objective.upgrades[2]) * 3 or 0,
@ -57,6 +61,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_accumulators"},
sprite = "recipe/accumulator",
max_level = 24,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_accumulators_message"},
tooltip = {"chronosphere.upgrade_accumulators_tooltip"},
jump_limit = objective.upgrades[3],
@ -69,6 +75,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_loot_pickup"},
sprite = "recipe/long-handed-inserter",
max_level = 4,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_loot_pickup_message"},
tooltip = {"chronosphere.upgrade_loot_pickup_tooltip", objective.upgrades[4]},
jump_limit = 0,
@ -81,6 +89,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_inventory_size"},
sprite = "entity/character",
max_level = 4,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_inventory_size_message"},
tooltip = {"chronosphere.upgrade_inventory_size_tooltip"},
jump_limit = (1 + objective.upgrades[5]) * 5,
@ -96,6 +106,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_repair"},
sprite = "recipe/repair-pack",
max_level = 4,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_repair_message"},
tooltip = {"chronosphere.upgrade_repair_tooltip", objective.upgrades[6]},
jump_limit = 0,
@ -108,6 +120,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_water"},
sprite = "fluid/water",
max_level = 1,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_water_message"},
tooltip = {"chronosphere.upgrade_water_tooltip"},
jump_limit = 0,
@ -121,6 +135,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_output"},
sprite = "recipe/cargo-wagon",
max_level = 1,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_output_message"},
tooltip = {"chronosphere.upgrade_output_tooltip"},
jump_limit = 0,
@ -133,6 +149,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_storage"},
sprite = "item/logistic-chest-storage",
max_level = 4,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_storage_message"},
tooltip = {"chronosphere.upgrade_storage_tooltip"},
jump_limit = (1 + objective.upgrades[9]) * 5,
@ -148,6 +166,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_poison"},
sprite = "recipe/poison-capsule",
max_level = 4,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_poison_message"},
tooltip = {"chronosphere.upgrade_poison_tooltip", math_ceil(objective.poisontimeout/6)},
jump_limit = 0,
@ -160,6 +180,8 @@ function Public.upgrades()
name = {"chronosphere.upgrade_fusion"},
sprite = "recipe/fusion-reactor-equipment",
max_level = 999,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_fusion_message"},
tooltip = {"chronosphere.upgrade_fusion_tooltip"},
jump_limit = 24,
@ -173,9 +195,11 @@ function Public.upgrades()
name = {"chronosphere.upgrade_mk2"},
sprite = "recipe/power-armor-mk2",
max_level = 999,
quest = false,
enabled = true,
message = {"chronosphere.upgrade_mk2_message"},
tooltip = {"chronosphere.upgrade_mk2_tooltip"},
jump_limit = 24,
jump_limit = 28,
cost = {
item1 = {name = "low-density-structure", tt = "item-name", sprite = "item/low-density-structure", count = 100},
item2 = {name = "railgun-dart", tt = "item-name", sprite = "item/railgun-dart", count = 300},
@ -186,12 +210,14 @@ function Public.upgrades()
name = {"chronosphere.upgrade_computer1"},
sprite = "item/advanced-circuit",
max_level = 1,
quest = true,
enabled = true,
message = {"chronosphere.upgrade_computer1_message"},
tooltip = {"chronosphere.upgrade_computer1_tooltip"},
jump_limit = 15,
cost = {
item1 = {name = "coin", tt = "item-name", sprite = "item/coin", count = 5000 * Balance.upgrades_coin_cost_difficulty_scaling(difficulty)},
item2 = {name = "advanced-circuit", tt = "item-name", sprite = "item/advanced-circuit", count = 800},
item2 = {name = "advanced-circuit", tt = "item-name", sprite = "item/advanced-circuit", count = 1000},
item3 = {name = "copper-plate", tt = "item-name", sprite = "item/copper-plate", count = 2000}
}
},
@ -199,12 +225,14 @@ function Public.upgrades()
name = {"chronosphere.upgrade_computer2"},
sprite = "item/processing-unit",
max_level = 1,
quest = true,
enabled = true,
message = {"chronosphere.upgrade_computer2_message"},
tooltip = {"chronosphere.upgrade_computer2_tooltip"},
jump_limit = 20,
cost = {
item1 = {name = "coin", tt = "item-name", sprite = "item/coin", count = 10000 * Balance.upgrades_coin_cost_difficulty_scaling(difficulty)},
item2 = {name = "processing-unit", tt = "item-name", sprite = "item/processing-unit", count = 800},
item2 = {name = "processing-unit", tt = "item-name", sprite = "item/processing-unit", count = 1000},
item3 = {name = "nuclear-reactor", tt = "entity-name", sprite = "item/nuclear-reactor", count = 1}
}
},
@ -212,20 +240,24 @@ function Public.upgrades()
name = {"chronosphere.upgrade_computer3"},
sprite = "item/rocket-control-unit",
max_level = 10,
quest = true,
enabled = true,
message = {"chronosphere.upgrade_computer3_message", objective.upgrades[15] + 1},
tooltip = {"chronosphere.upgrade_computer3_tooltip"},
jump_limit = 25,
cost = {
item1 = {name = "coin", tt = "item-name", sprite = "item/coin", count = 2000 * Balance.upgrades_coin_cost_difficulty_scaling(difficulty)},
item2 = {name = "low-density-structure", tt = "item-name", sprite = "item/low-density-structure", count = 40},
item3 = {name = "rocket-control-unit", tt = "item-name", sprite = "item/rocket-control-unit", count = 40},
item4 = {name = "uranium-fuel-cell", tt = "item-name", sprite = "item/uranium-fuel-cell", count = 20}
item2 = {name = "low-density-structure", tt = "item-name", sprite = "item/low-density-structure", count = 100},
item3 = {name = "rocket-control-unit", tt = "item-name", sprite = "item/rocket-control-unit", count = 100},
item4 = {name = "uranium-fuel-cell", tt = "item-name", sprite = "item/uranium-fuel-cell", count = 50}
}
},
[16] = {
name = {"chronosphere.upgrade_computer4"},
sprite = "item/satellite",
max_level = 1,
quest = true,
enabled = true,
message = {"chronosphere.upgrade_computer4_message"},
tooltip = {"chronosphere.upgrade_computer4_tooltip"},
jump_limit = 25,

View File

@ -82,7 +82,7 @@ local function upgrade_out()
local positions = {{-16,-62},{15,-62},{-16,66},{15,66}}
local out = {}
for i = 1, 4, 1 do
local e = game.surfaces["cargo_wagon"].create_entity({name = "steel-chest", position = positions[i], force = "player"})
local e = game.surfaces["cargo_wagon"].create_entity({name = "blue-chest", position = positions[i], force = "player"})
e.destructible = false
e.minable = false
objective.outchests[i] = e

View File

@ -35,7 +35,7 @@ local function on_entity_damaged(event)
if not event.entity.valid then
return
end
event.entity.damage(event.final_damage_amount * 4, player.force, 'impact', player)
event.entity.damage(event.final_damage_amount * 3, player.force, 'impact', player)
end
Event.add(defines.events.on_entity_damaged, on_entity_damaged)