screpl.core.appmanager module

class screpl.core.appmanager. AppManager ( su_id , su_prefix , su_prefixlen ) [source]

Bases: object

alloc_db_epd ( sizequarter ) [source]

allocate SIZEQUARTER*4 bytes

alloc_variable ( count ) [source]
free_db_epd ( epd ) [source]
free_variable ( ptr ) [source]
get_foreground_app_instance ( ) [source]
get_map_height ( ) [source]
get_map_width ( ) [source]
get_mouse_position ( ) [source]

evaluate mouse position

This can cause desync

get_superuser_id ( ) [source]
is_multiplaying ( ) [source]

If current game have more than two humans, return true, otherwise false

key_down ( key , sync = None ) [source]
key_holdcounter ( key ) [source]
key_press ( key , hold = None , sync = None ) [source]

hold: list of keys, such as LCTRL, LSHIFT, LALT, etc…

key_up ( key , sync = None ) [source]
mouse_lclick ( sync = None ) [source]
mouse_ldrag ( sync = None ) [source]
mouse_lpress ( sync = None ) [source]
mouse_mclick ( sync = None ) [source]
mouse_mpress ( sync = None ) [source]
mouse_rclick ( sync = None ) [source]
mouse_rpress ( sync = None ) [source]
pop_current_allocating_method ( ) [source]
push_current_allocating_method ( method ) [source]
request_destruct ( ) [source]

Request destruct of the application self, on foreground

request_update ( ) [source]

Request update of the display buffer.

This should be called under AppMethod or AppCommand

run ( writer ) [source]
send_app_output_to_bridge ( src_buffer , size ) [source]
start_application ( app , jump = True ) [source]

Queue to start app

It just records that the app should start. Actual start of the app is at the next frame.

synchronize ( conditions , variables_to_sync = None ) [source]