<div dir="ltr"><div>Oh! I do have a question about zone handles.</div><div><br></div><div>What happens to a zone handle if you create one, and then move to a different map? Does it still point to the similarly numbered zone on the new map? -- I think that is perfectly okay if it does, I am just curious :D</div><div><br></div><div>---</div><div>James Paige</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 6:47 AM James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>That sounds reasonable. Just "get zone". The special syntax seems like overkill right now<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu., Apr. 21, 2022, 12:34 a.m. Ralph Versteegen, <<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I think I'll go ahead and add the "get zone" command since I don't see much reason not to, and we can rename it or add special syntax to call it later.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 21 Apr 2022 at 15:12, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com" rel="noreferrer" target="_blank">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span style="font-family:monospace"><font face="arial,sans-serif">I want to make the extra data functions ("get extra", etc) usable on zones. It would be possible for them to interpret small positive integers as zone IDs. But I'm rather off-put by code like this, where it's completely unobvious that it's acting on zones:</font><br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">  assert(get extra(5, -1) == 2147483647)</span></div><div><span style="font-family:monospace"></span></div><span style="font-family:monospace">  set extra(5, -2, 32)<br></span><div><span style="font-family:monospace">  assert(extra length(5) == 3)<br></span></div><div><br><span style="font-family:monospace"></span></div><div>I would prefer self-documenting code. Plus it monopolises small integers as zone IDs when they could be any sort of ID or slot (in particular it would be nice if heros had extra data too).<br></div><div><br></div><div>Some proposals:</div><div>-Add "zone reference" which returns the zone ID + a large constant to set the HandleType. These references don't need to (can't) be deleted. They should work with all existing zone commands too</div><div>--Or call it "get zone" instead. Or should we use a different naming scheme from existing "get" commands?<br></div><div>-Add special syntax to HSpeak to translate "zone 5" to "get zone(5)". I think this looks nice:<br></div><div><span style="font-family:monospace">  set extra(zone 5, -2, 32)</span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"> However, you need to be able to get a zone from an expression as well as an integer constant. So you'd use "get zone(value)" for that</span>.<br></span></div><div><span style="font-family:arial,sans-serif"> Note that in future when objects are added to HS we need to have a way to get objects from IDs, so getzone would return an object rather than a handle (there will be a backcompat bit to switch between handles and objects), meaning you could write "<span style="font-family:monospace">zone <a href="http://5.name" rel="noreferrer" target="_blank">5.name</a></span>" which maybe takes a little getting used to, and we can add many others like getenemy/"enemy 5".  But there shouldn't be a difference in type between "enemy 5" and "enemy:plip" so the latter would also change.</span></div><div><span style="font-family:arial,sans-serif">--Or use syntax "zone: 5" instead</span></div><div><span style="font-family:arial,sans-serif">-Just add "zone extra length" and "resize zone extra" commands. I would not add any others, so zones would become second-class citizens. We will still need "get zone" in future anyway.</span><br><span style="font-family:arial,sans-serif"></span></div><div><div><span style="font-family:monospace"><br></span></div></div></div>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" rel="noreferrer" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div></div></div>
</blockquote></div>