Skip to content

Commit

Permalink
Update modules, docs, core-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEady committed Nov 1, 2023
1 parent ec98ac0 commit 9e37be9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
7 changes: 6 additions & 1 deletion docs/docs.polserver.com/pol100/corechanges.xml
Expand Up @@ -2,9 +2,14 @@
<ESCRIPT>
<header>
<topic>Latest Core Changes</topic>
<datemodified>10-28-2023</datemodified>
<datemodified>11-01-2023</datemodified>
</header>
<version name="POL100.1.0">
<entry>
<date>11-01-2023</date>
<author>Kevin:</author>
<change type="Added">RestartScript() now can restart item control scripts. Similar to NPC scripts, the existing Item control script will terminate and a new one started.</change>
</entry>
<entry>
<date>10-28-2023</date>
<author>Ins:</author>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.polserver.com/pol100/scripttypes.xml
Expand Up @@ -98,7 +98,7 @@ endprogram</example>
<whencalled>Immediately after the item is created (includes boot-up).</whencalled>
<wherelives>The 'program' in a .src file, in a package or /scripts/control</wherelives>
<todefine>In the item's itemdesc.cfg entry, the 'ControlScript' property defines the location of the control script. This is in package format ':pkgname:scriptname', or if just 'scriptname' in the same package, or /scripts/control.</todefine>
<explain>This script is called when the item is created and stays attached to the item. Usually control scripts do not exit until the item is destroyed (note, you must handle this yourself). They generally use a loop to process events or do some housecleaning after some sleeping, or wait_for_event.</explain>
<explain>This script is called when the item is created and stays attached to the item. Usually control scripts do not exit until the item is destroyed (note, you must handle this yourself: control scripts will not automatically terminate when the item is destroyed). They generally use a loop to process events or do some housecleaning after some sleeping, or wait_for_event.</explain>
<example>
use uo;
use os;
Expand Down
8 changes: 4 additions & 4 deletions docs/docs.polserver.com/pol100/uoem.xml
Expand Up @@ -1681,13 +1681,13 @@ const JOURNAL_PRINT_YOU_SEE := 0x01; // Will print "You see:" in the journal.</c
</function>

<function name="RestartScript">
<prototype>RestartScript( npc )</prototype>
<parameter name="npc" value="Character Reference (must be an NPC)" />
<explain>Stops the current master script for an NPC, and starts a new one. </explain>
<prototype>RestartScript( npc_or_item )</prototype>
<parameter name="npc_or_item" value="Reference to Character (must be an NPC) or Item" />
<explain>Stops the current master script for an NPC or control script for an Item, and starts a new one. </explain>
<explain>npc.script can be assigned before calling this, to change the master script for an NPC. </explain>
<return>1 if the script was started</return>
<error>"Invalid parameter"</error>
<error>"RestartScript only operates on NPCs"</error>
<error>"RestartScript only operates on NPCs and Items"</error>
<related>NPC</related>
</function>

Expand Down
2 changes: 2 additions & 0 deletions pol-core/doc/core-changes.txt
@@ -1,4 +1,6 @@
-- POL100.1.0 --
11-01-2023 Kevin:
Added: RestartScript() now can restart item control scripts. Similar to NPC scripts, the existing Item control script will terminate and a new one started.
10-28-2023 Ins:
Added: ServSpecOpt "UndoGetItemEnableRangeCheck" 1/0 default 0.
If enabled - on fail to equip item back on character (if it has been taken from character layer)
Expand Down
2 changes: 1 addition & 1 deletion pol-core/support/scripts/uo.em
Expand Up @@ -367,7 +367,7 @@ RegisterForSpeechEvents( at_object, range, flags := 0 );
ReleaseItem( item );
RequestInput( character, item, prompt ); // item is a placeholder, just pass any item
ReserveItem( item );
RestartScript( npc );
RestartScript( npc_or_item );
Resurrect( mobile, flags := 0 ); // flags: RESURRECT_*
RevokePrivilege( character, privilege );
SaveWorldState();
Expand Down

0 comments on commit 9e37be9

Please sign in to comment.