# HG changeset patch # User Wuzzy # Date 1521771421 -3600 # Node ID 5984e8c6cbeb215bc9db7a79efc71d3f5c0131a9 # Parent 4b9c5cf49c9f78adaad62517c0e93d12c38965a0 Add new game flag gfSwitchHog, enable hog switching at turn start diff -r 4b9c5cf49c9f -r 5984e8c6cbeb ChangeLog.txt --- a/ChangeLog.txt Thu Mar 22 23:27:11 2018 +0100 +++ b/ChangeLog.txt Fri Mar 23 03:17:01 2018 +0100 @@ -3,6 +3,7 @@ ====================== 0.9.24 ====================== Game: + New weapon: Minigun + + New game modifier: Enable switch hedgehog at start of turn + Change weapon icons: Mudball, air mine + Add healing visual effect in Paramedics mode and a few scripts + Show remaining ammo when using Birdy egg or RC Plane bomb diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Thu Mar 22 23:27:11 2018 +0100 +++ b/QTfrontend/hedgewars.qrc Fri Mar 23 03:17:01 2018 +0100 @@ -127,6 +127,7 @@ res/hh_small.png res/btnDisabled.png res/btnBorder@2x.png + res/btnSwitchHog@2x.png res/btnInvulnerable@2x.png res/btnLaserSight@2x.png res/btnLowGravity@2x.png diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/model/gameSchemeModel.cpp --- a/QTfrontend/model/gameSchemeModel.cpp Thu Mar 22 23:27:11 2018 +0100 +++ b/QTfrontend/model/gameSchemeModel.cpp Fri Mar 23 03:17:01 2018 +0100 @@ -28,7 +28,7 @@ QList defaultScheme = QList() << QVariant("Default") // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -96,7 +96,7 @@ spNames = QStringList() << "name" // 0 | Name should be first forever - << "fortsmode" // 1 + << "switchhog" // 1 << "divteams" // 2 << "solidland" // 3 << "border" // 4 @@ -144,7 +144,7 @@ QList proMode; proMode << predefSchemesNames[1] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -192,7 +192,7 @@ QList shoppa; shoppa << predefSchemesNames[2] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(true) // solid land 3 << QVariant(true) // border 4 @@ -240,7 +240,7 @@ QList cleanslate; cleanslate << predefSchemesNames[3] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -288,7 +288,7 @@ QList minefield; minefield << predefSchemesNames[4] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -336,7 +336,7 @@ QList barrelmayhem; barrelmayhem << predefSchemesNames[5] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -384,7 +384,7 @@ QList tunnelhogs; tunnelhogs << predefSchemesNames[6] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(true) // border 4 @@ -432,7 +432,7 @@ QList timeless; timeless << predefSchemesNames[7] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -480,7 +480,7 @@ QList thinkingportals; thinkingportals << predefSchemesNames[8] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -528,7 +528,7 @@ QList kingmode; kingmode << predefSchemesNames[9] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -576,7 +576,7 @@ QList construction; construction << predefSchemesNames[10] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -625,7 +625,7 @@ QList spaceinvasion; spaceinvasion << predefSchemesNames[11] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 @@ -674,7 +674,7 @@ QList hedgeeditor; hedgeeditor << predefSchemesNames[12] // name 0 - << QVariant(false) // fortsmode 1 + << QVariant(false) // switchhog 1 << QVariant(false) // team divide 2 << QVariant(false) // solid land 3 << QVariant(false) // border 4 diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/res/btnSwitchHog.png Binary file QTfrontend/res/btnSwitchHog.png has changed diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/res/btnSwitchHog@2x.png Binary file QTfrontend/res/btnSwitchHog@2x.png has changed diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/ui/page/pagescheme.cpp --- a/QTfrontend/ui/page/pagescheme.cpp Thu Mar 22 23:27:11 2018 +0100 +++ b/QTfrontend/ui/page/pagescheme.cpp Fri Mar 23 03:17:01 2018 +0100 @@ -84,6 +84,10 @@ TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom")); glGMLayout->addWidget(TBW_bottomborder,0,3,1,1); + TBW_switchhog = new ToggleButtonWidget(gbGameModes, ":/res/btnSwitchHog@2x.png"); + TBW_switchhog->setWhatsThis(tr("Select a hedgehog at the beginning of a turn")); + glGMLayout->addWidget(TBW_switchhog,0,4,1,1); + TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png"); TBW_solid->setWhatsThis(tr("Land can not be destroyed!")); glGMLayout->addWidget(TBW_solid,1,0,1,1); @@ -545,6 +549,7 @@ selectScheme->setModel(model); mapper->addMapping(LE_name, 0); + mapper->addMapping(TBW_switchhog, 1); mapper->addMapping(TBW_teamsDivide, 2); mapper->addMapping(TBW_solid, 3); mapper->addMapping(TBW_border, 4); diff -r 4b9c5cf49c9f -r 5984e8c6cbeb QTfrontend/ui/page/pagescheme.h --- a/QTfrontend/ui/page/pagescheme.h Thu Mar 22 23:27:11 2018 +0100 +++ b/QTfrontend/ui/page/pagescheme.h Fri Mar 23 03:17:01 2018 +0100 @@ -75,6 +75,7 @@ ToggleButtonWidget * TBW_morewind; ToggleButtonWidget * TBW_tagteam; ToggleButtonWidget * TBW_bottomborder; + ToggleButtonWidget * TBW_switchhog; QSpinBox * SB_DamageModifier; QSpinBox * SB_TurnTime; diff -r 4b9c5cf49c9f -r 5984e8c6cbeb hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Thu Mar 22 23:27:11 2018 +0100 +++ b/hedgewars/uConsts.pas Fri Mar 23 03:17:01 2018 +0100 @@ -209,7 +209,7 @@ gfVampiric = $00000200; gfKarma = $00000400; gfArtillery = $00000800; - gfForts = $00001000; + gfSwitchHog = $00001000; gfRandomOrder = $00002000; gfKing = $00004000; gfPlaceHog = $00008000; diff -r 4b9c5cf49c9f -r 5984e8c6cbeb hedgewars/uLand.pas --- a/hedgewars/uLand.pas Thu Mar 22 23:27:11 2018 +0100 +++ b/hedgewars/uLand.pas Fri Mar 23 03:17:01 2018 +0100 @@ -717,10 +717,6 @@ LoadThemeConfig; - // is this not needed any more? lets hope setlength sets also 0s - //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then - // FillChar(Land,SizeOf(TCollisionArray),0);*) - if cPathz[ptMapCurrent] <> '' then begin map:= cPathz[ptMapCurrent] + '/map.png'; @@ -741,7 +737,7 @@ mgMaze : begin ResizeLand(4096,2048); GenMaze; end; mgPerlin: begin ResizeLand(4096,2048); GenPerlin; end; mgDrawn : GenDrawnMap; - mgForts : begin GameFlags:= (GameFlags or gfForts or gfDivideTeams); MakeFortsMap(); end; + mgForts : begin GameFlags:= (GameFlags or gfDivideTeams); MakeFortsMap(); end; else OutError('Unknown mapgen', true); end; @@ -835,7 +831,7 @@ if (GameFlags and gfDisableGirders) <> 0 then hasGirders:= false; -if (GameFlags and gfForts = 0) and (maskOnly or (cPathz[ptMapCurrent] = '')) then +if (cMapGen <> mgForts) and (maskOnly or (cPathz[ptMapCurrent] = '')) then AddObjects else diff -r 4b9c5cf49c9f -r 5984e8c6cbeb hedgewars/uScript.pas --- a/hedgewars/uScript.pas Thu Mar 22 23:27:11 2018 +0100 +++ b/hedgewars/uScript.pas Fri Mar 23 03:17:01 2018 +0100 @@ -3662,7 +3662,7 @@ ScriptSetString(_S'LOCALE', cLocale); // import game flags -ScriptSetInteger('gfForts', gfForts); +ScriptSetInteger('gfSwitchHog', gfSwitchHog); ScriptSetInteger('gfMultiWeapon', gfMultiWeapon); ScriptSetInteger('gfSolidLand', gfSolidLand); ScriptSetInteger('gfBorder', gfBorder); diff -r 4b9c5cf49c9f -r 5984e8c6cbeb hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Mar 22 23:27:11 2018 +0100 +++ b/hedgewars/uTeams.pas Fri Mar 23 03:17:01 2018 +0100 @@ -271,6 +271,7 @@ CurWeapon: PAmmo; w: real; vg: PVisualGear; + g: PGear; s: ansistring; begin if PlacingHogs then @@ -332,25 +333,35 @@ if (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then SetBinds(CurrentTeam^.Binds); -bShowFinger:= true; - if PlacingHogs then begin if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000 else TurnTimeLeft:= 0 end -else if ((GameFlags and gfTagTeam) <> 0) and (not NextClan) then - begin - if TagTurnTimeLeft <> 0 then - TurnTimeLeft:= TagTurnTimeLeft; - TagTurnTimeLeft:= 0; - end else begin - TurnTimeLeft:= cHedgehogTurnTime; - TagTurnTimeLeft:= 0; - NextClan:= false; + if ((GameFlags and gfTagTeam) <> 0) and (not NextClan) then + begin + if TagTurnTimeLeft <> 0 then + TurnTimeLeft:= TagTurnTimeLeft; + TagTurnTimeLeft:= 0; + end + else + begin + TurnTimeLeft:= cHedgehogTurnTime; + TagTurnTimeLeft:= 0; + NextClan:= false; + end; + + if (GameFlags and gfSwitchHog) <> 0 then + begin + g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0); + CurAmmoGear:= g; + lastGearByUID:= g; + end + else + bShowFinger:= true; end; IsGetAwayTime:= false; diff -r 4b9c5cf49c9f -r 5984e8c6cbeb share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Thu Mar 22 23:27:11 2018 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Fri Mar 23 03:17:01 2018 +0100 @@ -973,11 +973,11 @@ HWUploadVideoDialog Upload video - Video hochladen + Video hochladen Upload - Hochladen + Hochladen @@ -2135,6 +2135,10 @@ Sea (Edges connect to sea) Ozean (Grenzen sind mit dem Wasser verbunden) + + Select a hedgehog at the beginning of a turn + Wähle am Zugbeginn einen Igel aus + PageSelectWeapon @@ -2252,7 +2256,7 @@ uploading - hochladen + hochladen Date: %1 @@ -2376,11 +2380,11 @@ Save account name and password - Kontoname und Passwort speichern + Kontoname und Passwort speichern Video is private - Video ist privat + Video ist privat Record audio @@ -2793,27 +2797,27 @@ Please provide either the YouTube account name or the email address associated with the Google Account. - Bitte gib entweder deinen YouTube-Kontonamen oder die entsprechende E-Mail-Adresse des Google-Kontos an. + Bitte gib entweder deinen YouTube-Kontonamen oder die entsprechende E-Mail-Adresse des Google-Kontos an. Account name (or email): - Kontoname (oder E-Mail): + Kontoname (oder E-Mail): Password: - Passwort: + Passwort: Video title: - Videotitel: + Videotitel: Video description: - Videobeschreibung: + Videobeschreibung: Tags (comma separated): - Tags (durch Kommas getrennt): + Tags (durch Kommas getrennt): Description @@ -2964,17 +2968,17 @@ Error while authenticating at google.com: - Fehler während Authentifizierung auf google.com: + Fehler während Authentifizierung auf google.com: Login or password is incorrect - Login oder Passwort inkorrekt + Login oder Passwort inkorrekt Error while sending metadata to youtube.com: - Fehler bei Senden von Meta-Daten zu youtube.com: + Fehler bei Senden von Meta-Daten zu youtube.com: @@ -3045,7 +3049,7 @@ Video upload - Error - Video hochladen - Fehler + Video hochladen - Fehler Netgame - Error @@ -3122,7 +3126,7 @@ Do you really want to cancel uploading %1? - Willst du das Hochladen von %1 wirklich abbrechen? + Willst du das Hochladen von %1 wirklich abbrechen? File error @@ -3326,11 +3330,11 @@ Upload to YouTube - Auf YouTube hochladen + Auf YouTube hochladen Cancel uploading - Hochladen abbrechen + Hochladen abbrechen Restore default coding parameters @@ -3378,7 +3382,7 @@ Upload this video to your YouTube account - Dieses Video zu deinem YouTube-Benutzerkonto hochladen + Dieses Video zu deinem YouTube-Benutzerkonto hochladen diff -r 4b9c5cf49c9f -r 5984e8c6cbeb share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Thu Mar 22 23:27:11 2018 +0100 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Fri Mar 23 03:17:01 2018 +0100 @@ -944,11 +944,11 @@ HWUploadVideoDialog Upload video - Upload video + Upload video Upload - Upload + Upload @@ -2027,6 +2027,10 @@ Name of this scheme Name of this scheme + + Select a hedgehog at the beginning of a turn + Select a hedgehog at the beginning of a turn + PageSelectWeapon @@ -2140,7 +2144,7 @@ uploading - uploading + uploading Date: %1 @@ -2254,11 +2258,11 @@ Save account name and password - Save account name and password + Save account name and password Video is private - Video is private + Video is private Record audio @@ -2627,27 +2631,27 @@ Please provide either the YouTube account name or the email address associated with the Google Account. - Please provide either the YouTube account name or the email address associated with the Google Account. + Please provide either the YouTube account name or the email address associated with the Google Account. Account name (or email): - Account name (or email): + Account name (or email): Password: - Password: + Password: Video title: - Video title: + Video title: Video description: - Video description: + Video description: Tags (comma separated): - Tags (comma separated): + Tags (comma separated): Description @@ -2802,17 +2806,17 @@ Error while authenticating at google.com: - Error while authenticating at google.com: + Error while authenticating at google.com: Login or password is incorrect - Login or password is incorrect + Login or password is incorrect Error while sending metadata to youtube.com: - Error while sending metadata to youtube.com: + Error while sending metadata to youtube.com: @@ -2857,7 +2861,7 @@ Video upload - Error - Video upload—Error + Video upload—Error Netgame - Error @@ -2934,7 +2938,7 @@ Do you really want to cancel uploading %1? - Do you really want to cancel uploading %1? + Do you really want to cancel uploading %1? File error @@ -3138,11 +3142,11 @@ Upload to YouTube - Upload to YouTube + Upload to YouTube Cancel uploading - Cancel uploading + Cancel uploading Restore default coding parameters @@ -3186,7 +3190,7 @@ Upload this video to your YouTube account - Upload this video to your YouTube account + Upload this video to your YouTube account diff -r 4b9c5cf49c9f -r 5984e8c6cbeb share/hedgewars/Data/Maps/Control/map.lua --- a/share/hedgewars/Data/Maps/Control/map.lua Thu Mar 22 23:27:11 2018 +0100 +++ b/share/hedgewars/Data/Maps/Control/map.lua Fri Mar 23 03:17:01 2018 +0100 @@ -319,7 +319,7 @@ -- Things we don't modify here will use their default values. EnableGameFlags(gfInfAttack, gfSolidLand) - DisableGameFlags(gfKing, gfForts, gfAISurvival) + DisableGameFlags(gfKing, gfAISurvival) WaterRise = 0 HealthDecrease = 0 diff -r 4b9c5cf49c9f -r 5984e8c6cbeb share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Thu Mar 22 23:27:11 2018 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua Fri Mar 23 03:17:01 2018 +0100 @@ -1205,7 +1205,7 @@ gfDisableGirders + gfRandomOrder + -- highly recommended! gfDisableLandObjects + gfSolidLand + gfLowGravity + -- a bit unusual but may still be useful - gfBottomBorder + gfForts + gfDivideTeams + + gfBottomBorder + gfDivideTeams + gfDisableWind + gfMoreWind + gfTagTeam + -- very unusual flags, they don’t affect gameplay really, they are mostly for funny graphical effects gfKing + -- King Mode doesn’t work like expected, since hedgehogs never really die here in this mode