Skip to content

Commit

Permalink
manual server sync
Browse files Browse the repository at this point in the history
  • Loading branch information
The Widelands Bunnybot committed Aug 19, 2021
1 parent 6532f53 commit 51a2776
Show file tree
Hide file tree
Showing 84 changed files with 11,339 additions and 8,739 deletions.
2 changes: 1 addition & 1 deletion addons/enhanced_debug_scripts.wad/addon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name=_"Enhanced Debug Scripts"
description=_"Adds a bundle of useful scripts for use from the debug console in Debug builds of Widelands."
author="MarkMcWire"
version="1.0.5"
version="1.0.7"
category="script"
requires=
sync_safe="false"
56 changes: 32 additions & 24 deletions addons/enhanced_debug_scripts.wad/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function connect_road(startx, starty, targetx, targety)
targetx = targetx + 1
end
if ((diffy == 1) or (diffy == -1)) and (diffx == 0) then
targety = targety + 1
targety = targety - 1
end

-- horizontal road --
Expand All @@ -284,7 +284,11 @@ function connect_road(startx, starty, targetx, targety)
end

-- vertical road --
if (diffx == 0) and (diffy == 3) then
if (diffx == 0) and (diffy == 3) and (targety % 2 == 1) then
road = player:place_road(roadtype, startflag, "br", "bl", "br", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 0) and (diffy == 3) and (targety % 2 == 0) then
road = player:place_road(roadtype, startflag, "bl", "br", "bl", true)
startflag = road.end_flag
startfield = startflag.fields[1]
Expand All @@ -293,7 +297,11 @@ function connect_road(startx, starty, targetx, targety)
startflag = road.end_flag
startfield = startflag.fields[1]
end
if (diffx == 0) and (diffy == -3) then
if (diffx == 0) and (diffy == -3) and (targety % 2 == 1) then
road = player:place_road(roadtype, startflag, "tr", "tl", "tr", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 0) and (diffy == -3) and (targety % 2 == 0) then
road = player:place_road(roadtype, startflag, "tl", "tr", "tl", true)
startflag = road.end_flag
startfield = startflag.fields[1]
Expand All @@ -309,7 +317,7 @@ function connect_road(startx, starty, targetx, targety)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 2) and (diffy == 2) then
road = player:place_road(roadtype, startflag, "br", "br", "r", true)
road = player:place_road(roadtype, startflag, "br", "r", "br", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 3) and (diffy == 1) then
Expand All @@ -327,11 +335,11 @@ function connect_road(startx, starty, targetx, targety)
end

if (diffx == -3) and (diffy == -2) then
road = player:place_road(roadtype, startflag, "tl", "l", "l", true)
road = player:place_road(roadtype, startflag, "tl", "tl", "tl", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == -2) and (diffy == -2) then
road = player:place_road(roadtype, startflag, "tl", "tl", "l", true)
road = player:place_road(roadtype, startflag, "tl", "l", "tl", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == -3) and (diffy == -1) then
Expand All @@ -353,11 +361,11 @@ function connect_road(startx, starty, targetx, targety)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 2) and (diffy == -2) then
road = player:place_road(roadtype, startflag, "tr", "tr", "r", true)
road = player:place_road(roadtype, startflag, "tr", "r", "tr", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == 3) and (diffy == -1) then
road = player:place_road(roadtype, startflag, "tr", "r", "tr", true)
road = player:place_road(roadtype, startflag, "tr", "r", "r", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx > 0) and (diffy == -1) then
Expand All @@ -375,7 +383,7 @@ function connect_road(startx, starty, targetx, targety)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == -2) and (diffy == 2) then
road = player:place_road(roadtype, startflag, "bl", "bl", "l", true)
road = player:place_road(roadtype, startflag, "bl", "l", "bl", true)
startflag = road.end_flag
startfield = startflag.fields[1]
elseif (diffx == -3) and (diffy == 1) then
Expand Down Expand Up @@ -582,21 +590,21 @@ function dismantle_all_buildings(player_number, building_name)
local tribe = player.tribe
local tribe_name = tribe.name

for k, tplayer in ipairs(game.players) do
for i, tbuilding in ipairs(tplayer.tribe.buildings) do
for j, building in ipairs(player:get_buildings(tbuilding.name)) do
if tbuilding.name == building_name then
building:dismantle(true)
elseif tbuilding.type_name == tbuilding.name == (tribe_name .. "_" .. building_name) then
building:dismantle(true)
elseif string.find(tbuilding.name, building_name) then
building:dismantle(true)
elseif tbuilding.type_name == building_name then
building:dismantle(true)
end
end
end
end
for k, tplayer in ipairs(game.players) do
for i, tbuilding in ipairs(tplayer.tribe.buildings) do
for j, building in ipairs(player:get_buildings(tbuilding.name)) do
if tbuilding.name == building_name then
building:dismantle(true)
elseif tbuilding.type_name == tbuilding.name == (tribe_name .. "_" .. building_name) then
building:dismantle(true)
elseif string.find(tbuilding.name, building_name) then
building:dismantle(true)
elseif tbuilding.type_name == building_name then
building:dismantle(true)
end
end
end
end
end

function dismantle_idle_buildings(player_number, productivity_threshold)
Expand Down
Binary file modified i18n/cs/LC_MESSAGES/europeans_tribe.wad.mo
Binary file not shown.
Binary file modified i18n/de/LC_MESSAGES/europeans_tribe.wad.mo
Binary file not shown.
Binary file modified i18n/europeans_tribe.wad/cs.mo
Binary file not shown.
Binary file modified i18n/europeans_tribe.wad/de.mo
Binary file not shown.
Binary file modified i18n/europeans_tribe.wad/nds.mo
Binary file not shown.
Binary file modified i18n/europeans_tribe.wad/ru.mo
Binary file not shown.
Binary file modified i18n/foreign_planet.wad/ru.mo
Binary file not shown.
Binary file modified i18n/frisians-economy-ultra.wad/ru.mo
Binary file not shown.
Binary file modified i18n/impassable_water.wad/ru.mo
Binary file not shown.
Binary file modified i18n/legacy_terrains.wad/ru.mo
Binary file not shown.
Binary file modified i18n/legacy_ui.wad/ru.mo
Binary file not shown.
Binary file modified i18n/minimalistic_theme.wad/ru.mo
Binary file not shown.
Binary file modified i18n/mostly_balanced_maps.wad/ru.mo
Binary file not shown.
Binary file modified i18n/nds/LC_MESSAGES/europeans_tribe.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/europeans_tribe.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/foreign_planet.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/frisians-economy-ultra.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/impassable_water.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/legacy_terrains.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/legacy_ui.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/minimalistic_theme.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/mostly_balanced_maps.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/tropics.wad.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/white_summer.wad.mo
Binary file not shown.
Binary file modified i18n/tropics.wad/ru.mo
Binary file not shown.
Binary file modified i18n/white_summer.wad/ru.mo
Binary file not shown.
Loading

0 comments on commit 51a2776

Please sign in to comment.