From c018d89c015faa5f4aa423988314424c973c9dd7 Mon Sep 17 00:00:00 2001 From: akirschbaum Date: Sun, 19 Jun 2016 15:19:52 +0000 Subject: [PATCH] Remove redundant semicolons. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@20286 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/CFDialog.py | 10 +++++----- python/dialog/npc_dialog.py | 4 ++-- python/items/banquet.py | 6 +++--- python/items/sunnista.py | 4 ++-- python/maps/scorn/HouseofHealing.py | 2 +- python/maps/witherspoon_manor/rolanda.py | 2 +- python/misc/greet_message.py | 2 +- python/monsters/farnass.py | 2 +- python/quests/QuestTriggerConnect.py | 2 +- test/python.py | 24 ++++++++++++------------ 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/python/CFDialog.py b/python/CFDialog.py index 7c0079fab..40c64cc66 100644 --- a/python/CFDialog.py +++ b/python/CFDialog.py @@ -223,7 +223,7 @@ class Dialog: message = message.replace('$me', self.__speaker.QueryName()) message = message.replace('$you', self.__character.QueryName()) - Crossfire.NPCSay(self.__speaker, message); + Crossfire.NPCSay(self.__speaker, message) if rule.getSuggests() != None: for reply in rule.getSuggests(): Crossfire.AddReply(reply[0], reply[1]) @@ -313,7 +313,7 @@ class Dialog: # prevents flags from conflicting with other non-dialog-related contents # in the player file. def getStatus(self, key): - character_status=self.__character.ReadKey("dialog_"+self.__location); + character_status=self.__character.ReadKey("dialog_"+self.__location) if character_status == "": return "0" pairs=character_status.split(";") @@ -332,7 +332,7 @@ class Dialog: return ishere = 0 finished = "" - character_status = self.__character.ReadKey("dialog_"+self.__location); + character_status = self.__character.ReadKey("dialog_"+self.__location) if character_status != "": pairs = character_status.split(";") for i in pairs: @@ -355,7 +355,7 @@ class Dialog: # to be unique. This also prevents flags from conflicting with other # non-dialog-related contents in the NPC. def getNPCStatus(self, key): - npc_status=self.__speaker.ReadKey("dialog_"+self.__location + "_" + self.__character.Name); + npc_status=self.__speaker.ReadKey("dialog_"+self.__location + "_" + self.__character.Name) if npc_status == "": return "0" pairs=npc_status.split(";") @@ -375,7 +375,7 @@ class Dialog: return ishere = 0 finished = "" - npc_status = self.__speaker.ReadKey("dialog_"+self.__location + "_" + self.__character.Name); + npc_status = self.__speaker.ReadKey("dialog_"+self.__location + "_" + self.__character.Name) if npc_status != "": pairs = npc_status.split(";") for i in pairs: diff --git a/python/dialog/npc_dialog.py b/python/dialog/npc_dialog.py index 93d89a10b..aac5ddf99 100644 --- a/python/dialog/npc_dialog.py +++ b/python/dialog/npc_dialog.py @@ -99,7 +99,7 @@ if (Crossfire.ScriptParameters() != None): filename = Crossfire.ScriptParameters() dialogs = parseJSON([filename], '') speech = Dialog(player, npc, location) -index = 0; +index = 0 for jsonRule in dialogs: replies = None @@ -115,5 +115,5 @@ for jsonRule in dialogs: if speech.speak(Crossfire.WhatIsMessage()) == 0: # block the NPC for some time - Crossfire.WhoAmI().WriteKey('talked_to', str(random.randint(3, 8)), 1); + Crossfire.WhoAmI().WriteKey('talked_to', str(random.randint(3, 8)), 1) Crossfire.SetReturnValue(1) diff --git a/python/items/banquet.py b/python/items/banquet.py index 3e870c8af..1fd723707 100644 --- a/python/items/banquet.py +++ b/python/items/banquet.py @@ -82,9 +82,9 @@ def do_back(): while st != None: if (st.ArchName != rw): st = st.Above - continue; + continue st.Remove() - break; + break act.Message('You feel a powerful force engulf you.') act.Teleport(dest, int(x), int(y)) @@ -102,7 +102,7 @@ def do_banquet(): if (last == now): act.Message('You read the %s but nothing happens.'%l.Name) - return; + return l.WriteKey('banquet_last', now, 1) diff --git a/python/items/sunnista.py b/python/items/sunnista.py index 75f9d985a..283fd87df 100644 --- a/python/items/sunnista.py +++ b/python/items/sunnista.py @@ -45,7 +45,7 @@ def do_release(friendly): m.Friendly = 1 m.AttackMovement = 16 # petmode m.Teleport(act.Map, act.X, act.Y) - l.WriteKey('sunnista_charges', '0', 1); + l.WriteKey('sunnista_charges', '0', 1) act.Message('The %s spits a %s!'%(l.Name, affect)) def do_absorb(count): @@ -76,7 +76,7 @@ def do_find(): if item.ArchName == affect and item.Friendly == 0: got = got + 1 item.Remove() - break; + break if got > max_affect: return got item = item.Above diff --git a/python/maps/scorn/HouseofHealing.py b/python/maps/scorn/HouseofHealing.py index 004d0f2b4..58a1ded02 100644 --- a/python/maps/scorn/HouseofHealing.py +++ b/python/maps/scorn/HouseofHealing.py @@ -37,7 +37,7 @@ def do_say(): if (uses < len(questions)): if (message == answers[uses]): - who.Say('Correct! Be restored!'); + who.Say('Correct! Be restored!') result = player.RemoveDepletion(5) player_set_status(uses + 1) return diff --git a/python/maps/witherspoon_manor/rolanda.py b/python/maps/witherspoon_manor/rolanda.py index 724997571..bf534f23f 100644 --- a/python/maps/witherspoon_manor/rolanda.py +++ b/python/maps/witherspoon_manor/rolanda.py @@ -30,7 +30,7 @@ def do_give(): whoami.Say('And what am I supposed to do with this %s.'%whoisother.Name) return - whoami.Say('Ohhhhhhhh... This, this dagger...'); + whoami.Say('Ohhhhhhhh... This, this dagger...') pl.Message('%s puts her hand to her forehead, and staggers.'%whoami.Name) whoami.WriteKey('witherspoon_saw_dagger', '1', 1) whoami.WriteKey('witherspoon_seated', '', 1) diff --git a/python/misc/greet_message.py b/python/misc/greet_message.py index f10a5f3b3..bd8cbe8af 100644 --- a/python/misc/greet_message.py +++ b/python/misc/greet_message.py @@ -37,7 +37,7 @@ def do_enemy(): said = ';' e = ';' + str(whoami.Enemy.Count) + ';' if said.find(e) != -1: - return; + return msg = Crossfire.ScriptParameters() msg = msg.replace('%m', whoami.Name) diff --git a/python/monsters/farnass.py b/python/monsters/farnass.py index 1780a5eb6..19ae7d291 100644 --- a/python/monsters/farnass.py +++ b/python/monsters/farnass.py @@ -74,7 +74,7 @@ def check_ingredients(): if whoami.ReadKey(key_status) != st_getting: whoami.Say('Oh, great, you found what I need to make my special caramel!') - whoami.WriteKey(key_status, st_getting, 1); + whoami.WriteKey(key_status, st_getting, 1) return # if called here, Farnass moved to the recipient, and can pick the ingredients diff --git a/python/quests/QuestTriggerConnect.py b/python/quests/QuestTriggerConnect.py index 558e4382b..b385daee5 100644 --- a/python/quests/QuestTriggerConnect.py +++ b/python/quests/QuestTriggerConnect.py @@ -32,7 +32,7 @@ import Crossfire def trigger(): player = Crossfire.WhoIsActivator() if player.Type != Crossfire.Type.PLAYER: - return; + return params = Crossfire.ScriptParameters() args = params.split() questname = args[0] diff --git a/test/python.py b/test/python.py index 65bdeb9d6..37ee23a1b 100644 --- a/test/python.py +++ b/test/python.py @@ -78,7 +78,7 @@ def do_maps(): if (len(topic) > 1): flag = 0 if len(topic) > 2: - flag = int(topic[2]); + flag = int(topic[2]) ready = Crossfire.ReadyMap(topic[1], flag) if (ready): whoami.Say('ok, loaded %d map %s'%(flag,ready.Name)) @@ -213,7 +213,7 @@ def do_misc(): whoami.Say('map %s is not loaded'%topic[1]) def do_inventory(): - whoami.Say('You have:'); + whoami.Say('You have:') inv = who.Inventory while inv: whoami.Say('%s (type = %d, subtype = %d)'%(inv.Name, inv.Type, inv.Subtype)) @@ -278,7 +278,7 @@ def do_bed(): def do_readkey(): if (len(topic) < 2): whoami.Say('read what key?') - return; + return whoami.Say('key %s = %s'%(topic[1], who.ReadKey(topic[1]))) def do_writekey(): @@ -298,7 +298,7 @@ def do_speed(): whoami.Say('Changed your speed, now %f and %f'%(who.Speed, who.SpeedLeft)) def do_owner(): - whoami.Say('Not implemented.'); + whoami.Say('Not implemented.') def do_friendlylist(): friends = Crossfire.GetFriendlyList() @@ -320,14 +320,14 @@ def do_create(): second.Teleport(whoami.Map, 2, 2) def do_directory(): - whoami.Say('map = %s'%Crossfire.MapDirectory()); - whoami.Say('unique = %s'%Crossfire.UniqueDirectory()); - whoami.Say('temp = %s'%Crossfire.TempDirectory()); - whoami.Say('config = %s'%Crossfire.ConfigDirectory()); - whoami.Say('local = %s'%Crossfire.LocalDirectory()); - whoami.Say('player = %s'%Crossfire.PlayerDirectory()); - whoami.Say('data = %s'%Crossfire.DataDirectory()); - whoami.Say('scriptname = %s'%Crossfire.ScriptName()); + whoami.Say('map = %s'%Crossfire.MapDirectory()) + whoami.Say('unique = %s'%Crossfire.UniqueDirectory()) + whoami.Say('temp = %s'%Crossfire.TempDirectory()) + whoami.Say('config = %s'%Crossfire.ConfigDirectory()) + whoami.Say('local = %s'%Crossfire.LocalDirectory()) + whoami.Say('player = %s'%Crossfire.PlayerDirectory()) + whoami.Say('data = %s'%Crossfire.DataDirectory()) + whoami.Say('scriptname = %s'%Crossfire.ScriptName()) def do_event(): whoami.Say('event title = %s' %Crossfire.WhatIsEvent().Title)