@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,401 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DBNavigator.Project.DatabaseFileManager">
|
||||||
|
<open-files />
|
||||||
|
</component>
|
||||||
|
<component name="DBNavigator.Project.Settings">
|
||||||
|
<connections />
|
||||||
|
<browser-settings>
|
||||||
|
<general>
|
||||||
|
<display-mode value="TABBED" />
|
||||||
|
<navigation-history-size value="100" />
|
||||||
|
<show-object-details value="false" />
|
||||||
|
</general>
|
||||||
|
<filters>
|
||||||
|
<object-type-filter>
|
||||||
|
<object-type name="SCHEMA" enabled="true" />
|
||||||
|
<object-type name="USER" enabled="true" />
|
||||||
|
<object-type name="ROLE" enabled="true" />
|
||||||
|
<object-type name="PRIVILEGE" enabled="true" />
|
||||||
|
<object-type name="CHARSET" enabled="true" />
|
||||||
|
<object-type name="TABLE" enabled="true" />
|
||||||
|
<object-type name="VIEW" enabled="true" />
|
||||||
|
<object-type name="MATERIALIZED_VIEW" enabled="true" />
|
||||||
|
<object-type name="NESTED_TABLE" enabled="true" />
|
||||||
|
<object-type name="COLUMN" enabled="true" />
|
||||||
|
<object-type name="INDEX" enabled="true" />
|
||||||
|
<object-type name="CONSTRAINT" enabled="true" />
|
||||||
|
<object-type name="DATASET_TRIGGER" enabled="true" />
|
||||||
|
<object-type name="DATABASE_TRIGGER" enabled="true" />
|
||||||
|
<object-type name="SYNONYM" enabled="true" />
|
||||||
|
<object-type name="SEQUENCE" enabled="true" />
|
||||||
|
<object-type name="PROCEDURE" enabled="true" />
|
||||||
|
<object-type name="FUNCTION" enabled="true" />
|
||||||
|
<object-type name="PACKAGE" enabled="true" />
|
||||||
|
<object-type name="TYPE" enabled="true" />
|
||||||
|
<object-type name="TYPE_ATTRIBUTE" enabled="true" />
|
||||||
|
<object-type name="ARGUMENT" enabled="true" />
|
||||||
|
<object-type name="DIMENSION" enabled="true" />
|
||||||
|
<object-type name="CLUSTER" enabled="true" />
|
||||||
|
<object-type name="DBLINK" enabled="true" />
|
||||||
|
</object-type-filter>
|
||||||
|
</filters>
|
||||||
|
<sorting>
|
||||||
|
<object-type name="COLUMN" sorting-type="NAME" />
|
||||||
|
<object-type name="FUNCTION" sorting-type="NAME" />
|
||||||
|
<object-type name="PROCEDURE" sorting-type="NAME" />
|
||||||
|
<object-type name="ARGUMENT" sorting-type="POSITION" />
|
||||||
|
<object-type name="TYPE ATTRIBUTE" sorting-type="POSITION" />
|
||||||
|
</sorting>
|
||||||
|
<default-editors>
|
||||||
|
<object-type name="VIEW" editor-type="SELECTION" />
|
||||||
|
<object-type name="PACKAGE" editor-type="SELECTION" />
|
||||||
|
<object-type name="TYPE" editor-type="SELECTION" />
|
||||||
|
</default-editors>
|
||||||
|
</browser-settings>
|
||||||
|
<navigation-settings>
|
||||||
|
<lookup-filters>
|
||||||
|
<lookup-objects>
|
||||||
|
<object-type name="SCHEMA" enabled="true" />
|
||||||
|
<object-type name="USER" enabled="false" />
|
||||||
|
<object-type name="ROLE" enabled="false" />
|
||||||
|
<object-type name="PRIVILEGE" enabled="false" />
|
||||||
|
<object-type name="CHARSET" enabled="false" />
|
||||||
|
<object-type name="TABLE" enabled="true" />
|
||||||
|
<object-type name="VIEW" enabled="true" />
|
||||||
|
<object-type name="MATERIALIZED VIEW" enabled="true" />
|
||||||
|
<object-type name="INDEX" enabled="true" />
|
||||||
|
<object-type name="CONSTRAINT" enabled="true" />
|
||||||
|
<object-type name="DATASET TRIGGER" enabled="true" />
|
||||||
|
<object-type name="DATABASE TRIGGER" enabled="true" />
|
||||||
|
<object-type name="SYNONYM" enabled="false" />
|
||||||
|
<object-type name="SEQUENCE" enabled="true" />
|
||||||
|
<object-type name="PROCEDURE" enabled="true" />
|
||||||
|
<object-type name="FUNCTION" enabled="true" />
|
||||||
|
<object-type name="PACKAGE" enabled="true" />
|
||||||
|
<object-type name="TYPE" enabled="true" />
|
||||||
|
<object-type name="DIMENSION" enabled="false" />
|
||||||
|
<object-type name="CLUSTER" enabled="false" />
|
||||||
|
<object-type name="DBLINK" enabled="true" />
|
||||||
|
</lookup-objects>
|
||||||
|
<force-database-load value="false" />
|
||||||
|
<prompt-connection-selection value="true" />
|
||||||
|
<prompt-schema-selection value="true" />
|
||||||
|
</lookup-filters>
|
||||||
|
</navigation-settings>
|
||||||
|
<dataset-grid-settings>
|
||||||
|
<general>
|
||||||
|
<enable-zooming value="true" />
|
||||||
|
<enable-column-tooltip value="true" />
|
||||||
|
</general>
|
||||||
|
<sorting>
|
||||||
|
<nulls-first value="true" />
|
||||||
|
<max-sorting-columns value="4" />
|
||||||
|
</sorting>
|
||||||
|
<audit-columns>
|
||||||
|
<column-names value="" />
|
||||||
|
<visible value="true" />
|
||||||
|
<editable value="false" />
|
||||||
|
</audit-columns>
|
||||||
|
</dataset-grid-settings>
|
||||||
|
<dataset-editor-settings>
|
||||||
|
<text-editor-popup>
|
||||||
|
<active value="false" />
|
||||||
|
<active-if-empty value="false" />
|
||||||
|
<data-length-threshold value="100" />
|
||||||
|
<popup-delay value="1000" />
|
||||||
|
</text-editor-popup>
|
||||||
|
<values-actions-popup>
|
||||||
|
<show-popup-button value="true" />
|
||||||
|
<element-count-threshold value="1000" />
|
||||||
|
<data-length-threshold value="250" />
|
||||||
|
</values-actions-popup>
|
||||||
|
<general>
|
||||||
|
<fetch-block-size value="100" />
|
||||||
|
<fetch-timeout value="30" />
|
||||||
|
<trim-whitespaces value="true" />
|
||||||
|
<convert-empty-strings-to-null value="true" />
|
||||||
|
<select-content-on-cell-edit value="true" />
|
||||||
|
<large-value-preview-active value="true" />
|
||||||
|
</general>
|
||||||
|
<filters>
|
||||||
|
<prompt-filter-dialog value="true" />
|
||||||
|
<default-filter-type value="BASIC" />
|
||||||
|
</filters>
|
||||||
|
<qualified-text-editor text-length-threshold="300">
|
||||||
|
<content-types>
|
||||||
|
<content-type name="Text" enabled="true" />
|
||||||
|
<content-type name="Properties" enabled="true" />
|
||||||
|
<content-type name="XML" enabled="true" />
|
||||||
|
<content-type name="DTD" enabled="true" />
|
||||||
|
<content-type name="HTML" enabled="true" />
|
||||||
|
<content-type name="XHTML" enabled="true" />
|
||||||
|
<content-type name="SQL" enabled="true" />
|
||||||
|
<content-type name="PL/SQL" enabled="true" />
|
||||||
|
<content-type name="JSON" enabled="true" />
|
||||||
|
<content-type name="JSON5" enabled="true" />
|
||||||
|
<content-type name="YAML" enabled="true" />
|
||||||
|
</content-types>
|
||||||
|
</qualified-text-editor>
|
||||||
|
<record-navigation>
|
||||||
|
<navigation-target value="VIEWER" />
|
||||||
|
</record-navigation>
|
||||||
|
</dataset-editor-settings>
|
||||||
|
<code-editor-settings>
|
||||||
|
<general>
|
||||||
|
<show-object-navigation-gutter value="false" />
|
||||||
|
<show-spec-declaration-navigation-gutter value="true" />
|
||||||
|
<enable-spellchecking value="true" />
|
||||||
|
<enable-reference-spellchecking value="false" />
|
||||||
|
</general>
|
||||||
|
<confirmations>
|
||||||
|
<save-changes value="false" />
|
||||||
|
<revert-changes value="true" />
|
||||||
|
</confirmations>
|
||||||
|
</code-editor-settings>
|
||||||
|
<code-completion-settings>
|
||||||
|
<filters>
|
||||||
|
<basic-filter>
|
||||||
|
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="role" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="user" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||||
|
<user-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</user-schema>
|
||||||
|
<public-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="false" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="false" />
|
||||||
|
</public-schema>
|
||||||
|
<any-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</any-schema>
|
||||||
|
</basic-filter>
|
||||||
|
<extended-filter>
|
||||||
|
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||||
|
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="user" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="role" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||||
|
<user-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</user-schema>
|
||||||
|
<public-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</public-schema>
|
||||||
|
<any-schema>
|
||||||
|
<filter-element type="OBJECT" id="table" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="index" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="function" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="package" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="type" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||||
|
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||||
|
</any-schema>
|
||||||
|
</extended-filter>
|
||||||
|
</filters>
|
||||||
|
<sorting enabled="true">
|
||||||
|
<sorting-element type="RESERVED_WORD" id="keyword" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="datatype" />
|
||||||
|
<sorting-element type="OBJECT" id="column" />
|
||||||
|
<sorting-element type="OBJECT" id="table" />
|
||||||
|
<sorting-element type="OBJECT" id="view" />
|
||||||
|
<sorting-element type="OBJECT" id="materialized view" />
|
||||||
|
<sorting-element type="OBJECT" id="index" />
|
||||||
|
<sorting-element type="OBJECT" id="constraint" />
|
||||||
|
<sorting-element type="OBJECT" id="trigger" />
|
||||||
|
<sorting-element type="OBJECT" id="synonym" />
|
||||||
|
<sorting-element type="OBJECT" id="sequence" />
|
||||||
|
<sorting-element type="OBJECT" id="procedure" />
|
||||||
|
<sorting-element type="OBJECT" id="function" />
|
||||||
|
<sorting-element type="OBJECT" id="package" />
|
||||||
|
<sorting-element type="OBJECT" id="type" />
|
||||||
|
<sorting-element type="OBJECT" id="dimension" />
|
||||||
|
<sorting-element type="OBJECT" id="cluster" />
|
||||||
|
<sorting-element type="OBJECT" id="dblink" />
|
||||||
|
<sorting-element type="OBJECT" id="schema" />
|
||||||
|
<sorting-element type="OBJECT" id="role" />
|
||||||
|
<sorting-element type="OBJECT" id="user" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="function" />
|
||||||
|
<sorting-element type="RESERVED_WORD" id="parameter" />
|
||||||
|
</sorting>
|
||||||
|
<format>
|
||||||
|
<enforce-code-style-case value="true" />
|
||||||
|
</format>
|
||||||
|
</code-completion-settings>
|
||||||
|
<execution-engine-settings>
|
||||||
|
<statement-execution>
|
||||||
|
<fetch-block-size value="100" />
|
||||||
|
<execution-timeout value="20" />
|
||||||
|
<debug-execution-timeout value="600" />
|
||||||
|
<focus-result value="false" />
|
||||||
|
<prompt-execution value="false" />
|
||||||
|
</statement-execution>
|
||||||
|
<script-execution>
|
||||||
|
<command-line-interfaces />
|
||||||
|
<execution-timeout value="300" />
|
||||||
|
</script-execution>
|
||||||
|
<method-execution>
|
||||||
|
<execution-timeout value="30" />
|
||||||
|
<debug-execution-timeout value="600" />
|
||||||
|
<parameter-history-size value="10" />
|
||||||
|
</method-execution>
|
||||||
|
</execution-engine-settings>
|
||||||
|
<operation-settings>
|
||||||
|
<transactions>
|
||||||
|
<uncommitted-changes>
|
||||||
|
<on-project-close value="ASK" />
|
||||||
|
<on-disconnect value="ASK" />
|
||||||
|
<on-autocommit-toggle value="ASK" />
|
||||||
|
</uncommitted-changes>
|
||||||
|
<multiple-uncommitted-changes>
|
||||||
|
<on-commit value="ASK" />
|
||||||
|
<on-rollback value="ASK" />
|
||||||
|
</multiple-uncommitted-changes>
|
||||||
|
</transactions>
|
||||||
|
<session-browser>
|
||||||
|
<disconnect-session value="ASK" />
|
||||||
|
<kill-session value="ASK" />
|
||||||
|
<reload-on-filter-change value="false" />
|
||||||
|
</session-browser>
|
||||||
|
<compiler>
|
||||||
|
<compile-type value="KEEP" />
|
||||||
|
<compile-dependencies value="ASK" />
|
||||||
|
<always-show-controls value="false" />
|
||||||
|
</compiler>
|
||||||
|
<debugger>
|
||||||
|
<debugger-type value="JDBC" />
|
||||||
|
</debugger>
|
||||||
|
</operation-settings>
|
||||||
|
<ddl-file-settings>
|
||||||
|
<extensions>
|
||||||
|
<mapping file-type-id="VIEW" extensions="vw" />
|
||||||
|
<mapping file-type-id="TRIGGER" extensions="trg" />
|
||||||
|
<mapping file-type-id="PROCEDURE" extensions="prc" />
|
||||||
|
<mapping file-type-id="FUNCTION" extensions="fnc" />
|
||||||
|
<mapping file-type-id="PACKAGE" extensions="pkg" />
|
||||||
|
<mapping file-type-id="PACKAGE_SPEC" extensions="pks" />
|
||||||
|
<mapping file-type-id="PACKAGE_BODY" extensions="pkb" />
|
||||||
|
<mapping file-type-id="TYPE" extensions="tpe" />
|
||||||
|
<mapping file-type-id="TYPE_SPEC" extensions="tps" />
|
||||||
|
<mapping file-type-id="TYPE_BODY" extensions="tpb" />
|
||||||
|
</extensions>
|
||||||
|
<general>
|
||||||
|
<lookup-ddl-files value="true" />
|
||||||
|
<create-ddl-files value="false" />
|
||||||
|
<synchronize-ddl-files value="true" />
|
||||||
|
<use-qualified-names value="false" />
|
||||||
|
<make-scripts-rerunnable value="true" />
|
||||||
|
</general>
|
||||||
|
</ddl-file-settings>
|
||||||
|
<general-settings>
|
||||||
|
<regional-settings>
|
||||||
|
<date-format value="MEDIUM" />
|
||||||
|
<number-format value="UNGROUPED" />
|
||||||
|
<locale value="SYSTEM_DEFAULT" />
|
||||||
|
<use-custom-formats value="false" />
|
||||||
|
</regional-settings>
|
||||||
|
<environment>
|
||||||
|
<environment-types>
|
||||||
|
<environment-type id="development" name="Development" description="Development environment" color="-2430209/-12296320" readonly-code="false" readonly-data="false" />
|
||||||
|
<environment-type id="integration" name="Integration" description="Integration environment" color="-2621494/-12163514" readonly-code="true" readonly-data="false" />
|
||||||
|
<environment-type id="production" name="Production" description="Productive environment" color="-11574/-10271420" readonly-code="true" readonly-data="true" />
|
||||||
|
<environment-type id="other" name="Other" description="" color="-1576/-10724543" readonly-code="false" readonly-data="false" />
|
||||||
|
</environment-types>
|
||||||
|
<visibility-settings>
|
||||||
|
<connection-tabs value="true" />
|
||||||
|
<dialog-headers value="true" />
|
||||||
|
<object-editor-tabs value="true" />
|
||||||
|
<script-editor-tabs value="false" />
|
||||||
|
<execution-result-tabs value="true" />
|
||||||
|
</visibility-settings>
|
||||||
|
</environment>
|
||||||
|
</general-settings>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyArgumentEqualDefaultInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyAugmentAssignmentInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyMandatoryEncodingInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyMissingOrEmptyDocstringInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyMissingTypeHintsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/AuxiliaryPlay.iml" filepath="$PROJECT_DIR$/.idea/AuxiliaryPlay.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -1,22 +1,94 @@
|
|||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
# 获得连接
|
from psycopg2 import errors
|
||||||
gamerule = psycopg2.connect(database="gamerule", user="postgres", password="123456", host="localhost", port="5432")
|
|
||||||
# 获得游标对象
|
|
||||||
cursor = gamerule.cursor()
|
|
||||||
|
|
||||||
sql = "SELECT * FROM table1;"
|
|
||||||
# 执行SQL查询
|
|
||||||
cursor.execute(sql)
|
|
||||||
|
|
||||||
# 获取查询结果
|
class DatabaseHandler:
|
||||||
rows = cursor.fetchall()
|
def __init__(self, database, user, password, host, port):
|
||||||
|
self.database = database
|
||||||
|
self.user = user
|
||||||
|
self.password = password
|
||||||
|
self.host = host
|
||||||
|
self.port = port
|
||||||
|
self.conn = None
|
||||||
|
self.cur = None
|
||||||
|
|
||||||
# 处理查询结果
|
def connect(self):
|
||||||
for row in rows:
|
self.conn = psycopg2.connect(database=self.database,
|
||||||
print(row)
|
user=self.user,
|
||||||
|
password=self.password,
|
||||||
|
host=self.host,
|
||||||
|
port=self.port)
|
||||||
|
self.cur = self.conn.cursor()
|
||||||
|
|
||||||
# conn.commit()
|
def create_table(self, table_name):
|
||||||
# 关闭数据库连接
|
self.cur.execute(
|
||||||
gamerule.close()
|
"SELECT EXISTS(SELECT 1 FROM information_schema.tables WHERE table_name='" + table_name + "');")
|
||||||
|
table_exists = self.cur.fetchone()[0]
|
||||||
|
if table_exists:
|
||||||
|
print("表已存在")
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
self.cur.execute(f"CREATE SEQUENCE {table_name}_pid_seq START 1;")
|
||||||
|
self.cur.execute(
|
||||||
|
f"CREATE TABLE {table_name} (pid INTEGER DEFAULT nextval('{table_name}_pid_seq'), id INTEGER, path VARCHAR, xOffset INTEGER, yOffset INTEGER, pOffsetX INTEGER, pOffsetY INTEGER, time INTEGER, rgb VARCHAR);")
|
||||||
|
self.conn.commit()
|
||||||
|
print("操作成功")
|
||||||
|
except errors.DuplicateTable:
|
||||||
|
print("表已存在")
|
||||||
|
|
||||||
|
def insert_data(self, table_name, id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb):
|
||||||
|
try:
|
||||||
|
self.cur.execute(
|
||||||
|
f"INSERT INTO {table_name} (id, path, xOffset, yOffset, pOffsetX, pOffsetY, time, rgb) VALUES ({id}, '{path}', {xOffset}, {yOffset}, {pOffsetX}, {pOffsetY}, {time}, '{rgb}')")
|
||||||
|
self.conn.commit()
|
||||||
|
print("数据插入成功")
|
||||||
|
except errors.ForeignKeyViolation:
|
||||||
|
print("插入数据失败")
|
||||||
|
|
||||||
|
def execute_query(self, table_name):
|
||||||
|
self.cur.execute("SELECT * FROM " + table_name)
|
||||||
|
rows = self.cur.fetchall()
|
||||||
|
for row in rows:
|
||||||
|
print(row)
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.conn.close()
|
||||||
|
|
||||||
|
#
|
||||||
|
# # 示例用法
|
||||||
|
# db = DatabaseHandler(database='gamerule', user='postgres', password='123456', host='localhost', port='5432')
|
||||||
|
# db.connect()
|
||||||
|
# db.create_table('rule11')
|
||||||
|
# db.insert_data('rule11', 9, '../pictures/terminal_photo.png', 10, 20, 30, 40, 12345, '255,0,0')
|
||||||
|
# db.execute_query('rule11')
|
||||||
|
# db.close()
|
||||||
|
|
||||||
|
|
||||||
|
class DatabaseDatum:
|
||||||
|
def __init__(self, tablename=None, id=None, path=None, xOffset=None, yOffset=None, pOffsetX=None, pOffsetY=None,
|
||||||
|
time=None, rgb=None):
|
||||||
|
self.tablename = tablename
|
||||||
|
self.id = id
|
||||||
|
self.path = path
|
||||||
|
self.xOffset = xOffset
|
||||||
|
self.yOffset = yOffset
|
||||||
|
self.pOffsetX = pOffsetX
|
||||||
|
self.pOffsetY = pOffsetY
|
||||||
|
self.time = time
|
||||||
|
self.rgb = rgb
|
||||||
|
|
||||||
|
def get_path_by_pid(self, tablename, pid):
|
||||||
|
db = DatabaseHandler(database='gamerule', user='postgres', password='123456', host='localhost', port='5432')
|
||||||
|
db.connect()
|
||||||
|
query = f"SELECT path FROM {tablename} WHERE pid = {pid};"
|
||||||
|
db.cur.execute(query)
|
||||||
|
result = db.cur.fetchone()
|
||||||
|
db.close()
|
||||||
|
|
||||||
|
if result:
|
||||||
|
self.path = result[0]
|
||||||
|
else:
|
||||||
|
self.path = None
|
||||||
|
|
||||||
|
return self.path
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
class Priority:
|
||||||
|
dormitory_priority = {
|
||||||
|
'bad_mood': ['res/pictures/bad_mood.png', '5'],
|
||||||
|
'common_mood': ['res/pictures/common_mood.png', '4']
|
||||||
|
}
|
||||||
|
producing_experience_priority = {
|
||||||
|
'top_experience': ['res/pictures/experience_top.png', '5'],
|
||||||
|
'common_produce': ['res/pictures/common_produce.png', '4'],
|
||||||
|
'lower_common_produce': ['res/pictures/lower_common_produce.png', '3'],
|
||||||
|
'warehouse_produce': ['res/pictures/warehouse_produce.png', '2'],
|
||||||
|
'house_produce': ['res/pictures/house_produce.png', '1']
|
||||||
|
}
|
||||||
|
|
||||||
|
producing_material_priority = {
|
||||||
|
'material_top': ['res/pictures/material_top.png', '5'],
|
||||||
|
'common_produce': ['res/pictures/common_produce.png', '4'],
|
||||||
|
'lower_common_produce': ['res/pictures/lower_common_produce.png', '3'],
|
||||||
|
'warehouse_produce': ['res/pictures/warehouse_produce.png', '2'],
|
||||||
|
'house_produce': ['res/pictures/house_produce.png', '1']
|
||||||
|
}
|
||||||
|
|
||||||
|
trading_priority = {
|
||||||
|
'trade_top': ['res/pictures/trade_top.png', '5'],
|
||||||
|
'trade_lower': ['res/pictures/trade_lower.png', '4']
|
||||||
|
}
|
||||||
|
|
||||||
|
def print_trading_priority(self):
|
||||||
|
for key, value in Priority.trading_priority.items():
|
||||||
|
print(value[0])
|
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,56 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
import cv2
|
||||||
|
import pyautogui as p
|
||||||
|
from PyQt5.QtCore import QThread, pyqtSignal
|
||||||
|
|
||||||
|
from windows.entity.operations.operation import operation
|
||||||
|
from windows.res.tools.deal_picture import DealPicture
|
||||||
|
|
||||||
|
p.PAUSE = 0.1
|
||||||
|
p.FAILSAFE = True
|
||||||
|
|
||||||
|
|
||||||
|
def backToTerminal():
|
||||||
|
print("back to terminal")
|
||||||
|
positions = DealPicture.find_photo_center('res/pictures/terminal_photo.png', 2)
|
||||||
|
while positions is None:
|
||||||
|
click_photo = cv2.imread('res/pictures/back_btn.png')
|
||||||
|
back_confirm = cv2.imread('res/pictures/back_confirm.png')
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
if DealPicture.find_photo_center(back_confirm, 1):
|
||||||
|
operation.click_once(back_confirm)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
positions = DealPicture.find_photo_center('res/pictures/terminal_photo.png')
|
||||||
|
print("find terminal")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def enter_base():
|
||||||
|
print("enter the base")
|
||||||
|
click_photo = cv2.imread('res/pictures/base.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/electricity.png'), cv2.imread('res/pictures/loading.png')]
|
||||||
|
name = 'base.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def deal_award():
|
||||||
|
print("acquire awards")
|
||||||
|
click_photo = cv2.imread('res/pictures/notice.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/todo-things.png')]
|
||||||
|
name = 'notice.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 2):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_b_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
import cv2
|
||||||
|
import numpy as np
|
||||||
|
from windows.res.tools.deal_picture import DealPicture
|
||||||
|
|
||||||
|
|
||||||
|
import pyautogui as p
|
||||||
|
from paddleocr import PaddleOCR
|
||||||
|
|
||||||
|
ocr = PaddleOCR(use_angle_cls=False, lang="ch") # 初始化OCR模型
|
||||||
|
shotArea = {}
|
||||||
|
find_photo = cv2.imread('../pictures/producing_list.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
print(positons1.x)
|
||||||
|
sleep(3)
|
||||||
|
if positons1:
|
||||||
|
shotArea['left'] = positons1.left
|
||||||
|
shotArea['top'] = positons1.top + positons1.height
|
||||||
|
shotArea['width'] = positons1.width
|
||||||
|
find_photo = cv2.imread('../pictures/operator_in_producing.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
if positons1:
|
||||||
|
shotArea['height'] = positons1.top - shotArea['top'] + positons1.height
|
||||||
|
screenshot = p.screenshot(region=(shotArea['left'], shotArea['top'],
|
||||||
|
shotArea['width'], shotArea['height']))
|
||||||
|
screenshot_np = np.array(screenshot.convert('RGB'))[:, :, ::-1] # 将Pillow图像对象转换为np.ndarray类型
|
||||||
|
result = ocr.ocr(screenshot_np, cls=False)
|
||||||
|
orgwords = ''
|
||||||
|
for idx in result:
|
||||||
|
res = idx[1][0]
|
||||||
|
orgwords += res
|
||||||
|
print(result)
|
||||||
|
print(orgwords)
|
@ -0,0 +1,587 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
import cv2
|
||||||
|
import pyautogui as p
|
||||||
|
|
||||||
|
from windows.entity.operations.operation import operation
|
||||||
|
from windows.res.tools.deal_picture import DealPicture
|
||||||
|
|
||||||
|
p.PAUSE = 0.1
|
||||||
|
p.FAILSAFE = True
|
||||||
|
|
||||||
|
|
||||||
|
def backToTerminal():
|
||||||
|
print("back to terminal")
|
||||||
|
positions = DealPicture.find_photo_center('res/pictures/terminal_photo.png', 2)
|
||||||
|
while positions is None:
|
||||||
|
click_photo = cv2.imread('res/pictures/back_btn.png')
|
||||||
|
back_confirm = cv2.imread('res/pictures/back_confirm.png')
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
if DealPicture.find_photo_center(back_confirm, 1):
|
||||||
|
operation.click_once(back_confirm)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
positions = DealPicture.find_photo_center('res/pictures/terminal_photo.png')
|
||||||
|
print("find terminal")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def back_to_base():
|
||||||
|
print("back to terminal")
|
||||||
|
find_photo = cv2.imread('res/pictures/overview.png')
|
||||||
|
positions = DealPicture.find_photo_center(find_photo, 2)
|
||||||
|
while positions is None:
|
||||||
|
click_photo = cv2.imread('res/pictures/back_btn.png')
|
||||||
|
back_confirm = cv2.imread('res/pictures/back_cancel.png')
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
if DealPicture.find_photo_center(back_confirm, 1):
|
||||||
|
operation.click_once(back_confirm)
|
||||||
|
positions = DealPicture.find_photo_center(find_photo)
|
||||||
|
print("find base")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def enter_base():
|
||||||
|
print("enter the base")
|
||||||
|
click_photo = cv2.imread('res/pictures/base.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/electricity.png'), cv2.imread('res/pictures/loading.png')]
|
||||||
|
name = 'base.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def deal_award():
|
||||||
|
print("acquire awards")
|
||||||
|
click_photo = cv2.imread('res/pictures/notice.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/todo-things.png')]
|
||||||
|
name = 'notice.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 2):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
traget_pictures = [cv2.imread('res/pictures/acquiring.png'),
|
||||||
|
cv2.imread('res/pictures/agenttrust.png'),
|
||||||
|
cv2.imread('res/pictures/order_delivery.png')]
|
||||||
|
while DealPicture.find_any_photos(traget_pictures):
|
||||||
|
if DealPicture.find_photo_center(cv2.imread('res/pictures/acquiring.png'), 0.3):
|
||||||
|
click_photo = cv2.imread('res/pictures/acquiring.png')
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
if DealPicture.find_photo_center(cv2.imread('res/pictures/agenttrust.png'), 0.3):
|
||||||
|
click_photo = cv2.imread('res/pictures/acquiring.png')
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
if DealPicture.find_photo_center(cv2.imread('res/pictures/order_delivery.png'), 0.3):
|
||||||
|
click_photo = cv2.imread('res/pictures/acquiring.png')
|
||||||
|
operation.click_once(click_photo)
|
||||||
|
click_photo = cv2.imread('res/pictures/notice.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/overview.png')]
|
||||||
|
name = 'notice.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 2):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def change_dormitory_operators():
|
||||||
|
"""
|
||||||
|
改变当前所有宿舍干员
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
click_photo = cv2.imread('res/pictures/overview.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/remove_operator.png')]
|
||||||
|
name = 'overview.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.7):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
changed_dormitory = 0
|
||||||
|
find_photo = cv2.imread('res/pictures/current_clicked_construction.png')
|
||||||
|
target_word = '宿舍'
|
||||||
|
target_photos = [cv2.imread('res/pictures/good_mood_overview.png'),
|
||||||
|
cv2.imread('res/pictures/common_mood_overview.png')]
|
||||||
|
while True:
|
||||||
|
shotphoto = p.screenshot()
|
||||||
|
words_inf = DealPicture.recognise_word(shotphoto)
|
||||||
|
word_position = DealPicture.find_word_positon(target_word, words_inf)
|
||||||
|
# 找到宿舍
|
||||||
|
if word_position is not None:
|
||||||
|
photo_position = None
|
||||||
|
while photo_position is None:
|
||||||
|
# 点击宿舍
|
||||||
|
operation.click_position_once(word_position)
|
||||||
|
photo_position = DealPicture.match_template(find_photo)
|
||||||
|
shot_photo1 = DealPicture.shot_photo(photo_position)
|
||||||
|
target_photo1 = [cv2.imread('res/pictures/good_mood_overview.png')]
|
||||||
|
# 点击心情,进入宿舍
|
||||||
|
if DealPicture.mapping_any_photo(shot_photo1, target_photo1):
|
||||||
|
stop_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
operation.click_util(target_photo1[0], lambda: DealPicture.find_photo_center(stop_photo), 0, -50)
|
||||||
|
|
||||||
|
# 以心情优先
|
||||||
|
click_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
stop_photo = [cv2.imread('res/pictures/the_fifth_choosed.png')]
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.9):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_photo_center(stop_photo))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
# 将好心情干员放前面来
|
||||||
|
click_photo = cv2.imread('res/pictures/mood.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/mood_down.png')]
|
||||||
|
name = 'mood.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.9):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
|
||||||
|
# 将好心情干员放前面来
|
||||||
|
click_photo = cv2.imread('res/pictures/mood_down.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/mood_up.png')]
|
||||||
|
name = 'mood_down.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.9):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
# 截图,优先级
|
||||||
|
priority_list = {'1': [], '2': [], '3': [], '4': [], '5': []}
|
||||||
|
target_photo2 = [cv2.imread('res/pictures/bad_mood.png'),
|
||||||
|
[cv2.imread('res/pictures/common_mood.png')]]
|
||||||
|
photos = DealPicture.find_operator_rectangle(target_photo2)
|
||||||
|
DealPicture.class_dormitory_priority(photos, priority_list)
|
||||||
|
click_operator_by_priority(priority_list, True)
|
||||||
|
|
||||||
|
|
||||||
|
def enter_product_stations():
|
||||||
|
click_photo = cv2.imread('res/pictures/product_station.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/enter_product.png')]
|
||||||
|
name = 'product_station.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.7):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
click_photo = cv2.imread('res/pictures/enter_product.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/producing_list.png')]
|
||||||
|
name = 'enter_product.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
click_photo = cv2.imread('res/pictures/unclicked_product_station01.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/clicked_product_station01.png')]
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def judge_current_position():
|
||||||
|
trading_station = cv2.imread('res/pictures/in_trading_station.png')
|
||||||
|
producing_station = cv2.imread('res/pictures/in_producing_station.png')
|
||||||
|
|
||||||
|
if DealPicture.find_photo_center(trading_station):
|
||||||
|
return 'trading_station'
|
||||||
|
if DealPicture.find_photo_center(producing_station):
|
||||||
|
return 'producing_station'
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
def juge_current_station(words):
|
||||||
|
for word in words:
|
||||||
|
if word.__contains__('01'):
|
||||||
|
return '01'
|
||||||
|
elif word.__contains__('02'):
|
||||||
|
return '02'
|
||||||
|
elif word.__contains__('03'):
|
||||||
|
return '03'
|
||||||
|
elif word.__contains__('04'):
|
||||||
|
return '04'
|
||||||
|
elif word.__contains__('05'):
|
||||||
|
return '05'
|
||||||
|
elif word.__contains__('06'):
|
||||||
|
return '06'
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
def juge_next_station(current_station):
|
||||||
|
if current_station == '01':
|
||||||
|
return '02'
|
||||||
|
elif current_station == '02':
|
||||||
|
return '03'
|
||||||
|
elif current_station == '03':
|
||||||
|
return '04'
|
||||||
|
elif current_station == '04':
|
||||||
|
return '05'
|
||||||
|
elif current_station == '05':
|
||||||
|
return '06'
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
def to_next_station():
|
||||||
|
"""
|
||||||
|
点击下一个工作站
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
current_position = judge_current_position()
|
||||||
|
if current_position == '':
|
||||||
|
current_position = judge_current_position()
|
||||||
|
if current_position == '':
|
||||||
|
return False
|
||||||
|
shotArea = {}
|
||||||
|
if current_position == 'trading_station':
|
||||||
|
|
||||||
|
# 得到当前贸易站
|
||||||
|
current_station_photo = cv2.imread('res/pictures/current_trade_station.png')
|
||||||
|
current_station_position = DealPicture.match_template(current_station_photo)
|
||||||
|
screenshot = p.screenshot(region=(current_station_position['left'], current_station_position['top'],
|
||||||
|
current_station_position['width'], current_station_position['height']))
|
||||||
|
words_inf = DealPicture.recognise_word(screenshot)
|
||||||
|
word = DealPicture.words_in_photo(words_inf)
|
||||||
|
current_station = juge_current_station(word)
|
||||||
|
if current_station == '':
|
||||||
|
return False
|
||||||
|
|
||||||
|
# 得到当前的贸易站列表
|
||||||
|
find_photo = cv2.imread('res/pictures/trading_list.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
if positons1:
|
||||||
|
shotArea['left'] = positons1.left
|
||||||
|
shotArea['top'] = positons1.top + positons1.height
|
||||||
|
shotArea['width'] = positons1.width
|
||||||
|
find_photo = cv2.imread('res/pictures/operator_in_trading.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
if positons1:
|
||||||
|
shotArea['height'] = positons1.top - shotArea['top'] + positons1.height
|
||||||
|
screenshot = p.screenshot(region=(shotArea['left'], shotArea['top'],
|
||||||
|
shotArea['width'], shotArea['height']))
|
||||||
|
result_inf = DealPicture.recognise_word(screenshot)
|
||||||
|
|
||||||
|
# 得到下一个工作站的位置
|
||||||
|
next_station = juge_next_station(current_station)
|
||||||
|
if next_station == '':
|
||||||
|
return False
|
||||||
|
next_station_position = DealPicture.find_word_positon(next_station, result_inf)
|
||||||
|
if next_station_position is not None:
|
||||||
|
next_station_position['left'] = next_station_position['left'] + shotArea['left']
|
||||||
|
next_station_position['top'] = next_station_position['top'] + shotArea['top']
|
||||||
|
click_photo = DealPicture.shot_photo(next_station_position)
|
||||||
|
# 点击图片,直到图片消失
|
||||||
|
position = DealPicture.find_photo_positons(click_photo)
|
||||||
|
if position is not None:
|
||||||
|
operation.click_position_once(position)
|
||||||
|
else:
|
||||||
|
print('没找到下一个站')
|
||||||
|
return False
|
||||||
|
|
||||||
|
elif current_position == 'producing_station':
|
||||||
|
# 得到当前生产站
|
||||||
|
current_station_photo = cv2.imread('res/pictures/current_product_station.png')
|
||||||
|
current_station_position = DealPicture.match_template(current_station_photo)
|
||||||
|
screenshot = p.screenshot(region=(current_station_position['left'], current_station_position['top'],
|
||||||
|
current_station_position['width'], current_station_position['height']))
|
||||||
|
words_inf = DealPicture.recognise_word(screenshot)
|
||||||
|
word = DealPicture.words_in_photo(words_inf)
|
||||||
|
current_station = juge_current_station(word)
|
||||||
|
if current_station == '':
|
||||||
|
return False
|
||||||
|
|
||||||
|
# 得到当前的工作站列表
|
||||||
|
find_photo = cv2.imread('res/pictures/producing_list.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
if positons1:
|
||||||
|
shotArea['left'] = positons1.left
|
||||||
|
shotArea['top'] = positons1.top + positons1.height
|
||||||
|
shotArea['width'] = positons1.width
|
||||||
|
find_photo = cv2.imread('res/pictures/operator_in_producing.png')
|
||||||
|
positons1 = DealPicture.find_photo_positons(find_photo)
|
||||||
|
if positons1:
|
||||||
|
shotArea['height'] = positons1.top - shotArea['top'] + positons1.height
|
||||||
|
screenshot = p.screenshot(region=(shotArea['left'], shotArea['top'],
|
||||||
|
shotArea['width'], shotArea['height']))
|
||||||
|
result_inf = DealPicture.recognise_word(screenshot)
|
||||||
|
|
||||||
|
# 得到下一个工作站的位置
|
||||||
|
next_station = juge_next_station(current_station)
|
||||||
|
if next_station == '':
|
||||||
|
return True
|
||||||
|
next_station_position = DealPicture.find_word_positon(next_station, result_inf)
|
||||||
|
if next_station_position is not None:
|
||||||
|
next_station_position['left'] = next_station_position['left'] + shotArea['left']
|
||||||
|
next_station_position['top'] = next_station_position['top'] + shotArea['top']
|
||||||
|
click_photo = DealPicture.shot_photo(next_station_position)
|
||||||
|
# 点击图片,直到图片消失
|
||||||
|
position = DealPicture.find_photo_positons(click_photo)
|
||||||
|
if position is not None:
|
||||||
|
operation.click_position_once(position)
|
||||||
|
else:
|
||||||
|
print('没找到下一个站')
|
||||||
|
return True
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def judge_current_product():
|
||||||
|
judge_photo = cv2.imread('res/pictures/material_product.png')
|
||||||
|
if DealPicture.find_photo_center(judge_photo):
|
||||||
|
return 'material'
|
||||||
|
else:
|
||||||
|
return 'experience'
|
||||||
|
|
||||||
|
|
||||||
|
def click_operator_by_priority(priority, isdormitory = None):
|
||||||
|
"""
|
||||||
|
按照优先级点击干员
|
||||||
|
:param priority:
|
||||||
|
"""
|
||||||
|
# 将好心情干员放前面来
|
||||||
|
click_photo = cv2.imread('res/pictures/target_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/mid_working_state.png')]
|
||||||
|
name = 'target_working_state.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
click_photo = cv2.imread('res/pictures/mid_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/target_working_state.png')]
|
||||||
|
name = 'mid_working_state'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
|
||||||
|
# 回到最左边
|
||||||
|
last_photo = p.screenshot()
|
||||||
|
drag_photo = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
position1 = DealPicture.find_photo_center(drag_photo)
|
||||||
|
find_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
position2 = DealPicture.find_photo_center(find_photo)
|
||||||
|
count_fail = 0
|
||||||
|
while count_fail < 2:
|
||||||
|
operation.drag_once(find_photo, position1.x - position2.x, 0, 0, -200)
|
||||||
|
current_photo = p.screenshot()
|
||||||
|
if not DealPicture.screen_changed(last_photo, current_photo):
|
||||||
|
count_fail += 1
|
||||||
|
last_photo = current_photo
|
||||||
|
|
||||||
|
if isdormitory is None:
|
||||||
|
# 将要点击的干员列出
|
||||||
|
priority_number = 5
|
||||||
|
click_list = []
|
||||||
|
while priority_number >= 1:
|
||||||
|
for name in priority[str(priority_number)]:
|
||||||
|
if len(click_list) > 3:
|
||||||
|
break
|
||||||
|
click_list.append(name)
|
||||||
|
priority_number -= 1
|
||||||
|
if len(click_list) > 3:
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
# 将要点击的干员列出
|
||||||
|
priority_number = 5
|
||||||
|
click_list = []
|
||||||
|
while priority_number >= 1:
|
||||||
|
for name in priority[str(priority_number)]:
|
||||||
|
if len(click_list) > 5:
|
||||||
|
break
|
||||||
|
click_list.append(name)
|
||||||
|
priority_number -= 1
|
||||||
|
if len(click_list) > 5:
|
||||||
|
break
|
||||||
|
|
||||||
|
print(click_list)
|
||||||
|
|
||||||
|
# 点击文字
|
||||||
|
stop_photo = cv2.imread('res/pictures/the_third_choosed.png')
|
||||||
|
if isdormitory is not None:
|
||||||
|
stop_photo = cv2.imread('res/pictures/the_fifth_choosed.png')
|
||||||
|
drag_photo = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
position1 = DealPicture.find_photo_center(drag_photo)
|
||||||
|
find_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
position2 = DealPicture.find_photo_center(find_photo)
|
||||||
|
|
||||||
|
count_fail1 = 0
|
||||||
|
last_photo1 = p.screenshot()
|
||||||
|
stop = None
|
||||||
|
while stop is None:
|
||||||
|
|
||||||
|
current_photo1 = p.screenshot()
|
||||||
|
words_inf = DealPicture.recognise_word(current_photo1)
|
||||||
|
|
||||||
|
# 点击对应文字
|
||||||
|
# for click_word in click_list:
|
||||||
|
# position = DealPicture.find_word_positon(click_word, words_inf)
|
||||||
|
# if position:
|
||||||
|
# operation.click_position_once(position)
|
||||||
|
# click_list.remove(click_word)
|
||||||
|
positions = DealPicture.find_words_positon(click_list, words_inf)
|
||||||
|
if len(positions) > 0:
|
||||||
|
for position in positions:
|
||||||
|
operation.click_position_once(position)
|
||||||
|
click_list.remove(position['name'])
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
|
stop = DealPicture.find_photo_center(stop_photo, 0.5, 0.7)
|
||||||
|
if stop is None:
|
||||||
|
operation.drag_once(drag_photo, position2.x - position1.x, 0, 0, -200)
|
||||||
|
|
||||||
|
if not DealPicture.screen_changed(last_photo1, current_photo1):
|
||||||
|
count_fail += 1
|
||||||
|
last_photo1 = current_photo1
|
||||||
|
if count_fail1 > 3:
|
||||||
|
break
|
||||||
|
|
||||||
|
# 完成后
|
||||||
|
click_word = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
operation.click_util(click_word, lambda: DealPicture.find_no_photos([click_word]))
|
||||||
|
|
||||||
|
|
||||||
|
def change_current_operators():
|
||||||
|
"""
|
||||||
|
改变当前基站干员
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
# 进入换干员界面
|
||||||
|
current_produce = judge_current_product()
|
||||||
|
current_position = judge_current_position()
|
||||||
|
if current_position == 'trading_station':
|
||||||
|
click_photo = cv2.imread('res/pictures/operator_in_trading.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/clear_options.png')]
|
||||||
|
name = 'operator_in_stations.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos), 0, 80)
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
elif current_position == 'producing_station':
|
||||||
|
click_photo = cv2.imread('res/pictures/operator_in_producing.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/clear_options.png')]
|
||||||
|
name = 'operator_in_stations.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos), 0, 80)
|
||||||
|
else:
|
||||||
|
print("don't find picture", name)
|
||||||
|
return False
|
||||||
|
|
||||||
|
# 将好心情放前面
|
||||||
|
target_mood = cv2.imread('res/pictures/unclicked_working_state.png')
|
||||||
|
if DealPicture.find_photo_center(target_mood):
|
||||||
|
click_photo = cv2.imread('res/pictures/unclicked_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/target_working_state.png'),
|
||||||
|
cv2.imread('res/pictures/mid_working_state.png')]
|
||||||
|
name = 'unclicked_working_state.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
click_photo = cv2.imread('res/pictures/mid_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/target_working_state.png')]
|
||||||
|
name = 'mid_working_state.png'
|
||||||
|
|
||||||
|
if DealPicture.find_photo_center(click_photo):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
# 检查有坏心情,不好心情,就清空当前干员
|
||||||
|
click_photo = cv2.imread('res/pictures/bad_mood.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/the_first_choosed.png'),
|
||||||
|
cv2.imread('res/pictures/the_second_choosed.png'),
|
||||||
|
cv2.imread('res/pictures/the_third_choosed.png')]
|
||||||
|
name = 'bad_mood.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.9):
|
||||||
|
click_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_no_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture" + name)
|
||||||
|
|
||||||
|
click_photo = cv2.imread('res/pictures/bad_common_mood.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/the_first_choosed.png'),
|
||||||
|
cv2.imread('res/pictures/the_second_choosed.png'),
|
||||||
|
cv2.imread('res/pictures/the_third_choosed.png')]
|
||||||
|
name = 'common_mood.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1, 0.9):
|
||||||
|
click_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_no_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
find_photo = cv2.imread('res/pictures/the_third_choosed.png')
|
||||||
|
if DealPicture.find_photo_center(find_photo):
|
||||||
|
# 完成后
|
||||||
|
click_word = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
operation.click_util(click_word, lambda: DealPicture.find_no_photos([click_word]))
|
||||||
|
return True
|
||||||
|
|
||||||
|
# 将好心情干员放前面来
|
||||||
|
click_photo = cv2.imread('res/pictures/target_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/mid_working_state.png')]
|
||||||
|
name = 'target_working_state.png'
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
click_photo = cv2.imread('res/pictures/mid_working_state.png')
|
||||||
|
stop_photos = [cv2.imread('res/pictures/target_working_state.png')]
|
||||||
|
if DealPicture.find_photo_center(click_photo, 1):
|
||||||
|
operation.click_util(click_photo, lambda: DealPicture.find_any_photos(stop_photos))
|
||||||
|
# else:
|
||||||
|
# print("don't find picture", name)
|
||||||
|
|
||||||
|
priority_list = {'1': [], '2': [], '3': [], '4': [], '5': []}
|
||||||
|
if current_position == 'producing_station':
|
||||||
|
# 获取制造站的
|
||||||
|
continue_shot = True
|
||||||
|
drag_photo = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
position1 = DealPicture.find_photo_center(drag_photo)
|
||||||
|
find_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
position2 = DealPicture.find_photo_center(find_photo)
|
||||||
|
if current_produce == 'experience':
|
||||||
|
# 获取经验值的
|
||||||
|
# 截图,获取当前干员列表图片
|
||||||
|
while continue_shot:
|
||||||
|
target_photo = [cv2.imread('res/pictures/good_mood.png'), cv2.imread('res/pictures/common_mood.png')]
|
||||||
|
result_photo = DealPicture.find_operator_rectangle(target_photo)
|
||||||
|
continue_shot = DealPicture.class_experience_priority(result_photo, priority_list)
|
||||||
|
operation.drag_once(drag_photo, position2.x - position1.x, 0, 0, -200)
|
||||||
|
|
||||||
|
elif current_produce == 'material':
|
||||||
|
# 获取金属材料的
|
||||||
|
# 截图,获取当前干员列表图片
|
||||||
|
while continue_shot:
|
||||||
|
target_photo = [cv2.imread('res/pictures/good_mood.png'), cv2.imread('res/pictures/common_mood.png')]
|
||||||
|
result_photo = DealPicture.find_operator_rectangle(target_photo)
|
||||||
|
continue_shot = DealPicture.class_material_priority(result_photo, priority_list)
|
||||||
|
operation.drag_once(drag_photo, position2.x - position1.x, 0, 0, -200)
|
||||||
|
|
||||||
|
if current_produce == 'trading_station':
|
||||||
|
# 获取交易站的
|
||||||
|
continue_shot = True
|
||||||
|
drag_photo = cv2.imread('res/pictures/confirmbtn.png')
|
||||||
|
position1 = DealPicture.find_photo_center(drag_photo)
|
||||||
|
find_photo = cv2.imread('res/pictures/clear_options.png')
|
||||||
|
position2 = DealPicture.find_photo_center(find_photo)
|
||||||
|
# 截图,获取当前干员列表图片
|
||||||
|
while continue_shot:
|
||||||
|
target_photo = [cv2.imread('res/pictures/good_mood.png'), cv2.imread('res/pictures/common_mood.png')]
|
||||||
|
result_photo = DealPicture.find_operator_rectangle(target_photo)
|
||||||
|
continue_shot = DealPicture.class_trading_priority(result_photo, priority_list)
|
||||||
|
operation.drag_once(drag_photo, position2.x - position1.x, 0, 0, -200)
|
||||||
|
|
||||||
|
click_operator_by_priority(priority_list)
|
||||||
|
|
||||||
|
|
||||||
|
def change():
|
||||||
|
pass
|