Example #1
0
 def removeobjs(self):
     """Hides the button"""
     if self.state==1:
         Base.EraseLink(self.room,self.index)
         if self.sprite and type(self.sprite)==tuple and len(self.sprite)>2:
             Base.EraseObj(self.room,self.index)
         self.state=0
Example #2
0
def DestroyActiveButtons ():
    global activelinks
    global activeobjs
    for button in activelinks:
        Base.EraseLink(button[0],button[1])
        debug.debug('*** erase link: '+str(button))
        debug.debug(activelinks)
    for button in activeobjs:
        Base.EraseObj(button[0],button[1])
        debug.debug('*** erase obj: '+str(button))
        debug.debug(activeobjs)
    activeobjs=[]
    activelinks=[]
Example #3
0
 def setExitLinkState(self, state):
     '''this is here to enable modal behaviour, i.e. hinder exit out of a dialog'''
     if state:
         rect = GUI.GUIRect(224, 167, 35, 14)
         x, y, w, h = rect.getHotRect()
         #       Base.Link (room_start, 'exit', x, y, w, h, 'Exit', room_exit_to)
         Base.LinkPython(
             self.room_id, 'exit',
             "#\nimport GUI\nGUI.GUIRootSingleton.getRoomById(%s).owner.reset()\n"
             % (self.guiroom.getIndex()), x, y, w, h, 'XXXExit',
             self.exit_room_id)
     else:
         Base.EraseLink(self.room_id, 'exit')
import commodity_lib
commodity = commodity_lib.MakeCommodity (room1,time_of_day)
Base.Link (room1, 'commodity', 0.21, -0.97, 0.755, 0.553333, 'Commodity_Exchange', commodity)
import bar_lib
bar = bar_lib.MakeBar (room1,time_of_day,'default','bases/bar/NewCon_Bar', True, True, 'new_constantinople',False,[('nc0', -0.7456875, -0.0194),('nc1',-0.582,-0.1649),('nc2',-0.1394375, -0.1746),('nc3',-0.0909375, -0.1358),('nc4',0.400125, -0.0679)])
Base.Link (room1, 'bar', 0.2325, -0.17, 0.0925, 0.176667, 'Bar', bar)
import mercenary_guild
merchant = mercenary_guild.MakeMercenaryGuild (room1,time_of_day)
Base.Link (room1, 'mercenary', -0.0875, -0.266667, 0.23, 0.3, 'Mercenary_Guild', merchant)
import merchant_guild
merchant = merchant_guild.MakeMerchantGuild (room1,time_of_day)
Base.Link (room1, 'merchant', -0.895, -0.423333, 0.5275, 0.483333, 'Merchant_Guild', merchant)
Base.Comp (room1, 'my_comp_id', -0.28, -0.306667, 0.14, 0.28, 'Mission_Computer', 'Missions News Info ')
import weapons_lib
weap = weapons_lib.MakeWeapon (room1,time_of_day)
Base.Link (room1, 'weapon_room', 0.515, -0.413333, 0.4575, 0.596667, 'Ship_Dealer/Upgrades', weap)
Base.Python (room1, 'my_link_id', 0.82, 0.226667, 0.16, 0.746667, 'Landing_Pad', '''#
import Base
Base.EraseObj('''+str(room1)+''',"ldp00000")
Base.Texture ('''+str(room1)+''', "ldp", "bases/new_constantinople/NewCon_Concourse_ldp.spr", 0.94375, 0.375) #0.9154375, 0.3492)
Base.Python('''+str(room1)+''', "ldp", -1, -1, 2, 2, "Landing_Pad", "#\\n", True)
Base.RunScript('''+str(room1)+''', "trainleave", """#
import Base
Base.SetCurRoom('''+str(room0)+''')
Base.EraseLink('''+str(room1)+''',"ldp")
Base.EraseObj('''+str(room1)+''',"ldp")
Base.EraseObj('''+str(room1)+''',"trainleave")
Base.Texture ('''+str(room1)+''', "ldp00000", "bases/new_constantinople/NewCon_Concourse"+time_of_day+"_ldp00000.spr", 0.94375, 0.375) #0.9154375, 0.3492)
""", 3.2)
''', False)