share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
author Wuzzy <almikes@aol.com>
Tue, 15 Nov 2016 01:25:37 +0100
changeset 11881 34ede05e4d4f
parent 11641 9edd7d5e32ac
child 11988 46bd207d1b17
permissions -rw-r--r--
Remove old Fort Mode from frontend Part of ripping out Fort Mode from game schemes. This time for real. - Remove the game modifier button "Fort Mode" - Remove the scheme "Fort Mode" - Remove some fort mode handling code - Keep gfForts symbol to not mess up things too much - Old schemes are still supported, the fortsmode parameter is just ignored
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     1
---------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     2
--- HEDGE EDITOR 0.9 (for use with Hedgewars 0.9.22 and up)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     3
---------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     4
-- a horrible mission editor by mikade
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     5
-- place gears like a boss
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     6
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     7
-- feel free to shower me with your adoration and/or hate mail
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     8
-- more info can be found at http://hedgewars.org/HedgeEditor
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
     9
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    10
-- special thanks to nemo, unC0Rr, sheepluva and koda for their assistance
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    11
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    12
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    13
-- GETTING STARTED (for best results!)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    14
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    15
-- create a weaponset that has NO DELAYS on any weapons, and that gives you 1 ammo per crate
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    16
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    17
-- (optional) copy GameLogExtractor.html, jquery-1.js
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    18
-- into your Documents/Hedgewars/Logs folder
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    19
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    20
-- (optional) copy hwpmapconverter somewhere easily accessible
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    21
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    22
-- (optional) profit??
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    23
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    24
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    25
-- CORE FEATURES as of latest version
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    26
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    27
-- togglable help (press PRECISE + 1, while you have a tool (e.g. airstrike) selected)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    28
-- you can also the set the ScriptParameter in scheme, e.g: helpDisabled="true"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    29
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    30
-- place girders, rubberbands and custom sprites anywhere on the map.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    31
-- the above objects may be destructible, indestructible, icy, or bouncy.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    32
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    33
-- place mines, sticky mines, air mines, barrels, weapon crates, utility crates,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    34
-- health crates, targets, and cleavers anywhere on the map.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    35
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    36
-- select, reposition, modify, or delete placed objects.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    37
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    38
-- read in data from a previously generated map and allow the map to be edited/saved again
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    39
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    40
-- contextual cursor and menu graphics
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    41
-- placement sounds that are slightly more soothing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    42
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    43
-- meaningless version number
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    44
-- extra whitespace
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    45
-- fewer capital letters than ideal
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    46
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    47
-- upon saving, all level data will be output to logs/game0.log.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    48
-- game0.log also includes a lot of other data so if you only want to see the relevant lines of code
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    49
-- you can use GameLogExtractor.html to extract and prune the log into a cleaner form of data,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    50
-- specifically: either as an automagically generated template mission, just core data, or hwmap points.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    51
-- from there, please copy and paste any lines relevant to your interest into an existing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    52
-- (or totally empty!) script and edit them according to taste.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    53
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    54
--------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    55
-- MODE SPECIFIC SUPPORT
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    56
--------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    57
-- FOR CUSTOM MISSIONS/CAMPAIGN LEVELS:
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    58
-- the names/hats/flags/voices/graves of any teams/hogs that you use to play this script can be saved,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    59
-- as can (most of) the settings from your scheme and weapons selection.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    60
-- HOWEVER, you can also use the 'hog identity' tool to give hogs preset names/hats/weapons/health
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    61
-- or use the 'team identity' tool to give an entire team themed names/hats.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    62
-- give hogs differing health by using the health modification tool
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    63
-- create goals by tagging gears with victory/defeat/collection markers (somewhat implemented)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    64
-- flavor text, as well as victory/defeat conditions will be generated based on these tags.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    65
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    66
-- SHOPPA BALANCE / CONSTRUCTION MODE (partial and/or possibly decremented):
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    67
-- Press 1-5 while repositioning hogs with the reposition tool to assign them (their position) a rank.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    68
-- This value will be expressed as a colour that is intended to represent how "good" or "bad"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    69
-- a position on the map is. These ranks/points will be output along with other game data to game0.log
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    70
-- This data could be pasted into the ShoppaBalance script to create balances for additional maps.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    71
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    72
-- TECH RACER / HEDGE EDITOR / POINT INTERPRETER:
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    73
-- place/remove waypoints/special points
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    74
-- use the ScriptParameter in the frontend scheme editor to set additional options, e.g.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    75
-- ufoFuel=1000 (Flying Saucer will start with half the normal fuel. A value of 2000 is infinite fuel)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    76
-- portalDistance=15 (This is the distance portals can travel before fizzling)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    77
-- m=3 (load a particular map from the map library of Data/Scripts/TechMaps
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    78
-- helpDisabled="true" (the help pop-up overlay will be disabled by default)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    79
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    80
-- when saving data, points for conversion to HWMAP are also generated and placed inside block comments.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    81
-- copy paste/these points at the START of a converted HWMAP and then convert the map back to HWMAP format.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    82
-- following the above procedure it is then possible to load the map in frontend and play it using a
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    83
-- script like TechRacer (or HedgeEditor itself) that can interpret the points using InterpretPoints()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    84
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    85
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    86
-- DISCLAIMER
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    87
---------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    88
-- well, I really just made this for myself, so it's usage might be a little complicated for others.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    89
-- it also probably has a million errors, and has grown rather bloated over time due to the addition of
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    90
-- more and more features that my initial design didn't take into account.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    91
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    92
-- anyway, I've tried to make it more user-friendly by including more comments and gradually adding
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    93
-- some basic guidelines such as those listed above, and also the in-game Help displays for each tool.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    94
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    95
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    96
-- GIANT "TO DO" LIST / OTHER NOTES
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    97
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    98
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
    99
-- try to prune waypoint list and portal/ufo fuel in the mission template
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   100
-- for gamelog extractor
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   101
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   102
-- I should probably check if there are tagged gears on save
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   103
-- and if there are enable gfOneClanMode so that user can't
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   104
-- just destroy all hogs to win map.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   105
-- (what happens if we lose all our hogs?)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   106
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   107
-- I might be able to make the flavor text even better (assassinate hogName) by
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   108
-- checking if there is only 1 hog, etc.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   109
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   110
-- possibly try show landflag addcaption constantly like we do for superdelete when
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   111
-- using girders / rubbers.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   112
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   113
-- check to what extent hog info is preserved on saving (does health/weps really save correctly?)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   114
-- atm I think it's only for missions so I don't think it is preserved in core data
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   115
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   116
-- check if we lose a mission when the enemy collects our crate (we should)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   117
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   118
-- try and find out why we can't save the Theme, that feels really dumb
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   119
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   120
-- How about a weapons profile tool that is used with team ammo
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   121
-- and then hog identity tool would only be available if gfPerHogAmmo is set
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   122
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   123
-- INVESTIGATE when you can bother to do so
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   124
-- is airmine still missing anywhere, e.g. the weplist generated FOR THE TEMPLATE SCRIPT
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   125
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   126
-- [high] 	waypoints don't reload yet
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   127
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   128
-- [high] 	look into placing dud/random mines (probably needs a nil value)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   129
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   130
-- [high] 	add missing weps/utils/gears as they appear
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   131
--			some gameflags and settings are probably missing, too (diff border types etc)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   132
--			some themes are also probably missing: cake, hoggywood?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   133
-- 			the ongameinit stuff is probaably missing something akin to numAirMines
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   134
--			and also probably scriptParam and gravity etc.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   135
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   136
-- [med] 	add a limited form of save/load within level before mass-output
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   137
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   138
-- [med] 	rework gameflag handling to use the newer API methods (done?)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   139
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   140
-- [med]	maybe incorporate portal effects / ufo tracking into the template generated script if
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   141
-- 			you want the missions to use it
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   142
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   143
-- [med]	improve ammo handling (if possible, take more scheme settings into account)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   144
-- 			also be sure to generate wep data so crates don't have 0 in them (done?)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   145
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   146
-- [low] 	match the user picked color to the color array
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   147
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   148
-- [low] 	break up the division of labor of the tools into airstrike, minestrike, napalm, etc.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   149
			--[[
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   150
			girder =		"Girder Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   151
			rubber =		"Rubber Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   152
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   153
			airstrike =		(target sprite) (gear placement)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   154
							"Mine Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   155
							"Sticky Mine Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   156
							"Air Mine Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   157
							"Barrel Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   158
							"Target Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   159
							"Cleaver Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   160
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   161
			drillstrike =	crate sprite (crate placement mode)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   162
							"Health Crate Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   163
							"Weapon Crate Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   164
							"Utility Crate Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   165
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   166
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   167
			napalm =		arrow sprite (selection/modification/deletion mode)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   168
							"Advanced Repositioning Mode",  -- also include a delete
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   169
							"Tagging Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   170
							"Hog Identity Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   171
							"Team Identity Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   172
							"Health Modification Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   173
							"Sprite Testing Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   174
							"Sprite Modification Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   175
							"Sprite Placement Mode",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   176
							"Waypoint Placement Mode"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   177
							}]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   178
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   179
-- [low]	improve support for ShoppaBalance and ConstructionMode, see ranking)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   180
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   181
-- [low] 	consider combining landflags
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   182
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   183
-- [low] 	periodically rework the code to make it less terrible (hahahahahaha!)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   184
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   185
-- [low]	eventually incorporate scripted structures into the editor / mission mode
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   186
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   187
-- [low] 	some kind of support for single team training missions
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   188
-- 			we could possibly add gfOneClanMode and kill the other team we're playing with?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   189
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   190
-- [never?]	set all actors to heresurrectible (why did I want this?)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   191
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   192
-- [never?] more detailed goal tagging and multi-stage triggers
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   193
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   194
-- [never?]	theoretically might be possible to create forts (and other grouped objects)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   195
--			that can be mirrored and generated/placed in a big enough space
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   196
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   197
-- [never?]	add a pulsing glow thing for sprites you have selected,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   198
--			kind of like the invaders in SpaceInvader (currently they are just displayed as purple)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   199
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   200
-- [never?] add the thing that would be useful for this editor, but that others might use to cheat
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   201
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   202
-- [never?]	improve "illegal" placement detection (pretty sure should just let people do what they want)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   203
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   204
-- [never?]	add GUIs for editing ammo, init settings, additional gear attributes
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   205
-- 			perhaps using precise with timer to enable/disable certain features
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   206
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   207
--[[ gui menu ideas that have long since been abandoned
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   208
INITIALISATION MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   209
	--gameFlags, etc
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   210
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   211
	Map
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   212
	Theme
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   213
	TurnTime
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   214
	Explosives
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   215
	MinesNum
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   216
	CaseFreq
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   217
	Delay
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   218
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   219
	HealthCaseProb
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   220
	HealthCaseAmount
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   221
	DamagePercent
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   222
	MinesTime
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   223
	MineDudPercent
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   224
	SuddenDeathTurns
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   225
	WaterRise
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   226
	HealthDecrease
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   227
HOG MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   228
	health
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   229
	name (can be randomly generated from the list of hog names already in localisation)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   230
	poisoned (true/false)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   231
	hat
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   232
	hog level?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   233
TEAM MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   234
	name (can be randomly generated as above?) should there be an array of teams with an array of names
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   235
	colour
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   236
	grave
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   237
	fort
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   238
	voicepack
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   239
	flag
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   240
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   241
-- this below stuff is less important
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   242
STICKY MINE MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   243
	timer?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   244
MINE MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   245
	timer / dud
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   246
MEDKIT MENU / EXPLOSIVE MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   247
	health amount
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   248
WEP AND UTIL CRATE MENU
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   249
	contents
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   250
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   251
----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   252
-- MAP IDEAS
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   253
----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   254
-- try to create a portal race (limit portal distance)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   255
-- for portal race, include barriers that you need to drill shoot through to get lazer site crates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   256
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   257
-- try make a map that uses sinegun to jump between bouncy boxes (not easy until we get better control over landflags)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   258
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   259
-- how about a mission where you have to trap / freeze all the enemy hogs
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   260
-- and aren't allowed to kill them?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   261
-- can set it on the islands map.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   262
-- landgun
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   263
-- girder
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   264
-- mudball
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   265
-- hammer
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   266
-- seduction? (call a hog who has firepunch into a ditch
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   267
-- icegun (do this so you can freeze guys in an area and then blowtorch/explode an obstacle)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   268
-- jump across a bridge that has been mined and then bat the enemy to the other side.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   269
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   270
-- possibly the same as part of the above, possibly different, what about a heist mission
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   271
-- the objective is to steal 3 enemy crates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   272
-- the first one you have to fall through an invul tunnel of sticky mines and then parachute.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   273
-- the second one you have to drill rocket / portal.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   274
-- the third one you have to underwater ufo into, but only after opening it up with an underwater bee.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   275
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   276
]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   277
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   278
---------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   279
-- HEDGE EDITOR, SCRIPT BEGINS (Hey yo, it's about time)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   280
---------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   281
11637
45316b6eb4a0 Fix broken HedgeEditor map preview
Wuzzy <almikes@aol.com>
parents: 11037
diff changeset
   282
-- Tell other scripts that we exist
45316b6eb4a0 Fix broken HedgeEditor map preview
Wuzzy <almikes@aol.com>
parents: 11037
diff changeset
   283
HedgeEditor = true
45316b6eb4a0 Fix broken HedgeEditor map preview
Wuzzy <almikes@aol.com>
parents: 11037
diff changeset
   284
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   285
HedgewarsScriptLoad("/Scripts/Locale.lua")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   286
HedgewarsScriptLoad("/Scripts/Tracker.lua")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   287
HedgewarsScriptLoad("/Scripts/Params.lua")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   288
HedgewarsScriptLoad("/Scripts/TechMaps.lua")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   289
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   290
-- experimental crap
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   291
--local destroyMap = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   292
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   293
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   294
-- tracking vars for save/load purposes
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   295
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   296
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   297
local teamCounter = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   298
local lastRecordedTeam = ""
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   299
local hhs = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   300
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   301
local waypointList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   302
local girderList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   303
local rubberList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   304
local spriteList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   305
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   306
local mineList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   307
local sMineList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   308
local airMineList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   309
local targetList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   310
local knifeList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   311
local explosivesList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   312
local healthCrateList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   313
local wepCrateList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   314
local utilCrateList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   315
local hogDataList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   316
local AIHogDataList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   317
local hFlagList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   318
local previewDataList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   319
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   320
local shoppaPointList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   321
local shoppaPX = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   322
local shoppaPY = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   323
local shoppaPR = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   324
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   325
---------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   326
-- crates are made of this stuff
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   327
---------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   328
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   329
local atkArray =
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   330
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   331
				{amBazooka, 	"amBazooka",		2, 	loc("Bazooka")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   332
				{amBee, 		"amBee",			3, 	loc("Homing Bee")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   333
				{amMortar, 		"amMortar",			21, loc("Mortar")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   334
				{amDrill, 		"amDrill",			28, loc("Drill Rocket")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   335
				{amSnowball, 	"amSnowball",		50, loc("Mudball")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   336
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   337
				{amGrenade,		"amGrenade",		0, 	loc("Grenade")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   338
				{amClusterBomb,	"amClusterBomb",	1, 	loc("Cluster Bomb")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   339
				{amMolotov, 	"amMolotov",		39, loc("Molotov Cocktail")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   340
				{amWatermelon, 	"amWatermelon",		25, loc("Watermelon Bomb")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   341
				{amHellishBomb,	"amHellishBomb",	26, loc("Hellish Handgrenade")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   342
				{amGasBomb, 	"amGasBomb",		43, loc("Limburger")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   343
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   344
				{amShotgun,		"amShotgun",		4, 	loc("Shotgun")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   345
				{amDEagle,		"amDEagle",			9, 	loc("Desert Eagle")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   346
				{amFlamethrower,"amFlamethrower",	45, loc("Flamethrower")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   347
				{amSniperRifle,	"amSniperRifle",	37, loc("Sniper Rifle")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   348
				{amSineGun, 	"amSineGun",		44, loc("SineGun")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   349
				{amIceGun, 		"amIceGun",			53, loc("Freezer")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   350
				{amLandGun,		"amLandGun",		52, loc("Land Spray")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   351
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   352
				{amFirePunch, 	"amFirePunch",		11, loc("Shoryuken")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   353
				{amWhip,		"amWhip",			12, loc("Whip")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   354
				{amBaseballBat, "amBaseballBat",	13, loc("Baseball Bat")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   355
				{amKamikaze, 	"amKamikaze",		22, loc("Kamikaze")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   356
				{amSeduction, 	"amSeduction",		24, loc("Seduction")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   357
				{amHammer,		"amHammer",			47, loc("Hammer")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   358
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   359
				{amMine, 		"amMine",			8, 	loc("Mine")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   360
				{amDynamite, 	"amDynamite",		10, loc("Dynamite")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   361
				{amCake, 		"amCake",			23, loc("Cake")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   362
				{amBallgun, 	"amBallgun",		29, loc("Ballgun")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   363
				{amRCPlane,		"amRCPlane",		30, loc("RC Plane")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   364
				{amSMine,		"amSMine",			46, loc("Sticky Mine")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   365
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   366
				{amAirAttack,	"amAirAttack",		15, loc("Air Attack")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   367
				{amMineStrike,	"amMineStrike",		16, loc("Mine Strike")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   368
				{amDrillStrike,	"amDrillStrike",	49, loc("Drill Strike")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   369
				{amAirMine,		"amAirMine",		56, loc("Air Mine")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   370
				{amNapalm, 		"amNapalm",			27, loc("Napalm")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   371
				{amPiano,		"amPiano",			42, loc("Piano Strike")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   372
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   373
				{amKnife,		"amKnife",			54, loc("Cleaver")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   374
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   375
				{amBirdy,		"amBirdy",			40, loc("Birdy")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   376
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   377
				}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   378
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   379
local utilArray =
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   380
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   381
				{amBlowTorch, 		"amBlowTorch",		17, loc("BlowTorch")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   382
				{amPickHammer,		"amPickHammer",		5, 	loc("PickHammer")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   383
				{amGirder, 			"amGirder",			18, loc("Girder")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   384
				{amRubber, 			"amRubber",			55, loc("Rubber")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   385
				{amPortalGun,		"amPortalGun",		41, loc("Personal Portal Device")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   386
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   387
				{amRope, 			"amRope",			7, 	loc("Rope")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   388
				{amParachute, 		"amParachute",		14, loc("Parachute")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   389
				{amTeleport,		"amTeleport",		19, loc("Teleport")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   390
				{amJetpack,			"amJetpack",		38, loc("Flying Saucer")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   391
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   392
				{amInvulnerable,	"amInvulnerable",	33, loc("Invulnerable")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   393
				{amLaserSight,		"amLaserSight",		35, loc("Laser Sight")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   394
				{amVampiric,		"amVampiric",		36, loc("Vampirism")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   395
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   396
				{amLowGravity, 		"amLowGravity",		31, loc("Low Gravity")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   397
				{amExtraDamage, 	"amExtraDamage",	32, loc("Extra Damage")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   398
				{amExtraTime,		"amExtraTime",		34, loc("Extra Time")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   399
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   400
				{amResurrector, 	"amResurrector",	48, loc("Resurrector")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   401
				{amTardis, 			"amTardis",			51, loc("Tardis")},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   402
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   403
				{amSwitch,			"amSwitch",			20, loc("Switch Hog")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   404
				}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   405
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   406
				--skiphog is 6
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   407
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   408
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   409
-- hog and map editing junk
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   410
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   411
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   412
local preMadeTeam = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   413
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   414
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   415
				"Clowns",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   416
				{"WhySoSerious","clown-copper","clown-crossed","clown","Joker"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   417
				{"Baggy","Bingo","Bobo","Bozo","Buster","Chester","Copper","Heckles","Giggles","Jingo","Molly","Loopy","Patches","Tatters"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   418
				"R","cm_birdy","Mobster","Rubberduck","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   419
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   420
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   421
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   422
				"Street Fighters",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   423
				{"sf_balrog","sf_blanka","sf_chunli","sf_guile","sf_honda","sf_ken","sf_ryu","sf_vega"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   424
				{"Balrog","Blanka","Chunli","Guile","Honda","Ken","Ryu","Vega"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   425
				"F","cm_balrog","Surfer","dragonball","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   426
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   427
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   428
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   429
				"Cybernetic Empire",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   430
				{"cyborg1","cyborg2"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   431
				{"Unit 189","Unit 234","Unit 333","Unit 485","Unit 527","Unit 638","Unit 709","Unit 883"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   432
				"R","cm_binary","Robot","Grave","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   433
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   434
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   435
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   436
				"Color Squad",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   437
				{"hair_blue","hair_green","hair_red","hair_yellow","hair_purple","hair_grey","hair_orange","hair_pink"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   438
				{"Blue","Green","Red","Yellow","Purple","Grey","Orange","Pink"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   439
				"F","cm_birdy","Singer","Grave","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   440
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   441
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   442
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   443
				"Fruit",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   444
				{"fr_apple","fr_banana","fr_lemon","fr_orange","fr_pumpkin","fr_tomato"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   445
				{"Juicy","Squishy","Sweet","Sour","Bitter","Ripe","Rotten","Fruity"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   446
				"R","cm_mog","Default","Cherry","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   447
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   448
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   449
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   450
				"The Police",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   451
				{"bobby","bobby2v","policecap","policegirl","royalguard"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   452
				{"Hightower","Lassard","Callahan","Jones","Harris","Thompson","Mahoney","Hooks","Tackleberry"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   453
				"R","cm_star","British","Statue","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   454
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   455
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   456
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   457
				"The Ninja-Samurai Alliance",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   458
				{"NinjaFull","NinjaStraight","NinjaTriangle","Samurai","StrawHat","StrawHatEyes","StrawHatFacial","naruto"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   459
				{"Bushi","Tatsujin","Itami","Arashi","Shinobi","Ukemi","Godai","Kenshi","Ninpo"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   460
				"R","japan","Default","octopus","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   461
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   462
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   463
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   464
				"Pokemon",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   465
				{"poke_ash","poke_charmander","poke_chikorita","poke_jigglypuff","poke_lugia","poke_mudkip","poke_pikachu","poke_slowpoke","poke_squirtle","poke_voltorb"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   466
				{"Ash","Charmander","Chikorita","Jigglypuff","Lugia","Mudkip","Pikachu","Slowpoke","Squirtle","Voltorb"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   467
				"FR","cm_pokemon","Default","pokeball","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   468
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   469
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   470
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   471
				"The Zoo",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   472
				{"zoo_Bat","zoo_Beaver","zoo_Bunny","zoo_Deer","zoo_Hedgehog","zoo_Moose","zoo_Pig","zoo_Porkey","zoo_Sheep","zoo_chicken","zoo_elephant","zoo_fish","zoo_frog","zoo_snail","zoo_turtle"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   473
				{"Batty","Tails","Bunny","Deer","Spikes","Horns","Bacon","Porkey","Sheepy","Chicken","Trunks","Fishy","Legs","Slimer","Roshi"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   474
				"FR","cm_hurrah","Default","Bone","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   475
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   476
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   477
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   478
				"The Devs",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   479
				{"ushanka","zoo_Sheep","bb_bob","Skull","poke_mudkip","lambda","WizardHat","sf_ryu","android","fr_lemon","mp3"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   480
				{"unC0Rr", "sheepluva", "nemo", "mikade", "koda", "burp","HeneK","Tiyuri","Xeli","Displacer","szczur"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   481
				"FR","hedgewars","Classic","Statue","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   482
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   483
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   484
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   485
				"Mushroom Kingdom",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   486
				{"sm_daisy","sm_luigi","sm_mario","sm_peach","sm_toad","sm_wario"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   487
				{"Daisy","Luigi","Mario","Princess Peach","Toad","Wario"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   488
				"FR","cm_birdy","Default","Badger","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   489
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   490
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   491
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   492
				"Pirates",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   493
				{"pirate_jack","pirate_jack_bandana"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   494
				{"Rusted Diego","Fuzzy Beard","Al.Kaholic","Morris","Yumme Gunpowder","Cutlass Cain","Jim Morgan","Silver","Dubloon Devil","Ugly Mug","Fair Wind","Scallywag","Salty Dog","Bearded Beast","Timbers","Both Barrels","Jolly Roger"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   495
				"R","cm_pirate","Pirate","chest","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   496
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   497
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   498
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   499
				"Gangsters",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   500
				{"Moustache","Cowboy","anzac","Bandit","thug","Jason","NinjaFull","chef"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   501
				{"The Boss","Jimmy","Frankie","Morris","Mooney","Knives","Tony","Meals"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   502
				"F","cm_anarchy","Mobster","deadhog","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   503
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   504
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   505
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   506
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   507
				"Twenty-Twenty",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   508
				{"Glasses","lambda","SunGlasses","Sniper","Terminator_Glasses","Moustache_glasses","doctor","punkman","rasta"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   509
				{"Specs","Speckles","Spectator","Glasses","Glassy","Harry Potter","Goggles","Clark Kent","Goggs","Lightbender","Specs Appeal","Four Eyes"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   510
				"R","cm_face","Default","eyecross","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   511
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   512
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   513
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   514
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   515
				"Monsters",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   516
				{"Skull","Jason","ShaggyYeti","Zombi","cyclops","Mummy","hogpharoah","vampirichog"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   517
				{"Bones","Jason","Yeti","Zombie","Old One Eye","Ramesses","Xerxes","Count Hogula"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   518
				"FR","cm_vampire","Default","octopus","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   519
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   520
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   521
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   522
				"The Iron Curtain",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   523
				{"ushanka","war_sovietcomrade1","war_sovietcomrade1","ushanka"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   524
				{"Alex","Sergey","Vladimir","Andrey","Dimitry","Ivan","Oleg","Kostya","Anton","Eugene"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   525
				"R","cm_soviet","Russian","skull","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   526
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   527
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   528
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   529
				"Desert Storm",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   530
				{"war_desertofficer","war_desertgrenadier1","war_desertmedic","war_desertsapper1","war_desertgrenadier2","war_desertgrenadier4","war_desertsapper2","war_desertgrenadier5"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   531
				{"Brigadier Briggs","Lt. Luke","Sgt. Smith","Corporal Calvin","Frank","Joe","Sam","Donald"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   532
				"F","cm_birdy","Default","Grave","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   533
				},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   534
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   535
				--{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   536
				--"Sci-Fi",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   537
				--{"scif_2001O","scif_2001Y","scif_BrainSlug","scif_BrainSlug2","scif_Geordi","scif_SparkssHelmet","scif_cosmonaut","scif_cyberpunk","scif_swDarthvader","scif_swStormtrooper"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   538
				--{},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   539
				--"R","cm_birdy","Default","Grave","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   540
				--},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   541
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   542
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   543
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   544
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   545
				--
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   546
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   547
				--{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   548
				--,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   549
				--{},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   550
				--{},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   551
				--"R","cm_birdy","Default","Grave","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   552
				--},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   553
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   554
				-- don't forget new additions need to be added to:
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   555
				--pMode = {"Clowns","Street Fighters","Cybernetic Empire","Color Squad","Fruit","The Police","The Ninja-Samurai Alliance","Pokemon","The Zoo","The Devs","The Hospital"}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   556
				-- but maybe we can just get the size of this array and automatically generate a list instead
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   557
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   558
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   559
				{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   560
				"The Hospital",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   561
				{"doctor","nurse","war_britmedic","war_desertmedic","war_germanww2medic"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   562
				{"Dr. Blackwell","Dr. Drew","Dr. Harvey","Dr. Crushing","Dr. Jenner","Dr. Barnard","Dr. Parkinson","Dr. Banting","Dr. Horace","Dr. Hollows","Dr. Jung"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   563
				"R","cm_birdy","Default","heart","Castle"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   564
				}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   565
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   566
				}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   567
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   568
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   569
--local menuArray =	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   570
--			"Initialisation Menu", "Team Menu"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   571
--			}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   572
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   573
--local hatArray = 	{hahahaha, you're joking, right?}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   574
--[[well, here are most of them as vaguely ordered by theme, there may be some duplicates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   575
NoHat,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   576
NinjaFull,NinjaStraight,NinjaTriangle,Samurai,StrawHat,StrawHatEyes,StrawHatFacial,naruto
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   577
sm_daisy,sm_luigi,sm_mario,sm_peach,sm_toad,sm_wario,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   578
ShortHair_Black,ShortHair_Brown,ShortHair_Grey,ShortHair_Red,ShortHair_Yellow
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   579
hair_blue,hair_green,hair_red,hair_yellow,hair_purple,hair_grey,hair_orange,hair_pink
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   580
Skull,Jason,ShaggyYeti,Zombi,cyclops,Mummy,hogpharoah,vampirichog
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   581
cap_blue,cap_red,cap_green,cap_junior,cap_yellow,cap_thinking
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   582
WhySoSerious,clown-copper,clown-crossed,clown,Joker
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   583
bobby,bobby2v,policecap,policegirl,royalguard,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   584
spcartman,spstan,spkenny,spkyle,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   585
sf_balrog,sf_blanka,sf_blankatoothless,sf_chunli,sf_guile,sf_honda,sf_ken,sf_ryu,sf_vega
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   586
Glasses,lambda,SunGlasses,Terminator_Glasses,Moustache_glasses
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   587
Laminaria,Dragon,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   588
cyborg1,cyborg2,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   589
dish_Ladle,dish_SauceBoatSilver,dish_Teacup,dish_Teapot
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   590
laurel,flag_french,flag_germany,flag_italy,flag_usa
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   591
fr_apple,fr_banana,fr_lemon,fr_orange,fr_pumpkin,fr_tomato
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   592
doctor,nurse,war_britmedic,war_desertmedic,war_germanww2medic,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   593
poke_ash,poke_charmander,poke_chikorita,poke_jigglypuff,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   594
poke_lugia,poke_mudkip,poke_pikachu,poke_slowpoke,poke_squirtle,poke_voltorb
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   595
zoo_Bat,zoo_Beaver,zoo_Bunny,zoo_Deer,zoo_Hedgehog,zoo_Moose,zoo_Pig,zoo_Porkey,zoo_Sheep
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   596
zoo_chicken,zoo_elephant,zoo_fish,zoo_frog,zoo_snail,zoo_turtle
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   597
bushhider,cratehider,Disguise,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   598
tf_demoman,tf_scout,Sniper,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   599
Bandit,thug,anzac,Cowboy
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   600
pirate_jack,pirate_jack_bandana,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   601
tiara,crown,royalguard
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   602
punkman,Einstein,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   603
sth_Amy,sth_AmyClassic,sth_Eggman,sth_Knux,sth_Metal,sth_Shadow,sth_Sonic,sth_SonicClassic,sth_Super,sth_Tails
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   604
vc_gakupo,vc_gumi,vc_kaito,vc_len,vc_luka,vc_meiko,vc_miku,vc_rin
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   605
touhou_chen,touhou_marisa,touhou_patchouli,touhou_remelia,touhou_suwako,touhou_yukari,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   606
TeamHeadband,TeamSoldier,TeamTopHat,TeamWheatley,cap_team,hair_team,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   607
bb_bob,bb_bub,bb_cororon,bb_kululun,bubble,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   608
Viking,spartan,swordsmensquire,knight,dwarf,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   609
WizardHat,tophats,pinksunhat,ushanka,mexicansunbrero,HogInTheHat,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   610
4gsuif,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   611
AkuAku,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   612
noface,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   613
Coonskin3,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   614
Dan,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   615
Dauber,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   616
Eva_00b,Eva_00y,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   617
Evil,InfernalHorns,angel,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   618
Gasmask,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   619
IndianChief,Cowboy,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   620
MegaHogX,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   621
Meteorhelmet,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   622
Moustache,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   623
OldMan,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   624
Pantsu,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   625
Plunger,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   626
RSR,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   627
Rain,stormcloud,DayAndNight,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   628
chuckl,Rambo,RobinHood,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   629
Santa,snowhog,ShaggyYeti,eastertop,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   630
Sleepwalker,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   631
SparkleSuperFun,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   632
SunWukong,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   633
android,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   634
beefeater,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   635
car,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   636
chef,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   637
constructor,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   638
footballhelmet,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   639
judo,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   640
lamp,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   641
mechanicaltoy,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   642
mickey_ears,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   643
snorkel,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   644
quotecap,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   645
rasta,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   646
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   647
metalband,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   648
kiss_criss,kiss_frehley,kiss_simmons,kiss_stanley,mp3,Elvis
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   649
mv_Spidey,mv_Venom,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   650
ntd_Falcon,ntd_Kirby,ntd_Link,ntd_Samus,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   651
scif_2001O,scif_2001Y,scif_BrainSlug,scif_BrainSlug2,scif_Geordi,scif_SparkssHelmet,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   652
scif_cosmonaut,scif_cyberpunk,scif_swDarthvader,scif_swStormtrooper,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   653
war_UNPeacekeeper01,war_UNPeacekeeper02,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   654
war_airwarden02,war_airwarden03,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   655
war_americanww2helmet,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   656
war_britmedic,war_britpthhelmet,war_britsapper,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   657
war_desertgrenadier1,war_desertgrenadier2,war_desertgrenadier4,war_desertgrenadier5,war_desertmedic,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   658
war_desertofficer,war_desertsapper1,war_desertsapper2,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   659
war_frenchww1gasmask,war_frenchww1helmet,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   660
war_germanww1helmet2,war_germanww1tankhelm,war_germanww2medic,war_germanww2pith,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   661
war_grenadier1,war_trenchgrenadier1,war_trenchgrenadier2,war_trenchgrenadier3,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   662
war_plainpith,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   663
war_sovietcomrade1,war_sovietcomrade2,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   664
war_trenchfrench01,war_trenchfrench02,]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   665
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   666
local colorArray = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   667
					--{0xff0000ff, "0xff0000ff", "Red"}, -- look up hw red
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   668
					{0xff4980c1, "0xff4980c1", "Blue"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   669
					{0xff1de6ba, "0xff1de6ba", "Teal"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   670
					{0xffb541ef, "0xffb541ef", "Purple"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   671
					{0xffe55bb0, "0xffe55bb0", "Pink"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   672
					{0xff20bf00, "0xff20bf00", "Green"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   673
					{0xfffe8b0e, "0xfffe8b0e", "Orange"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   674
					{0xff5f3605, "0xff5f3605", "Brown"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   675
					{0xffffff01, "0xffffff01", "Yellow"}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   676
					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   677
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   678
local graveArray = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   679
					"Badger", "Bone", "bp2", "bubble", "Cherry",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   680
					"chest", "coffin", "deadhog", "dragonball", "Duck2",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   681
					"Earth", "Egg", "eyecross", "Flower", "Ghost",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   682
					"Grave", "heart", "money", "mouton1", "octopus",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   683
					"plant2", "plant3", "Plinko", "pokeball", "pyramid",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   684
					"ring", "Rip", "Rubberduck", "Simple", "skull",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   685
					"star", "Status"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   686
					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   687
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   688
local voiceArray = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   689
					"British","Classic","Default","Default_es","Default_uk",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   690
					"HillBilly","Mobster","Pirate","Robot","Russian","Singer",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   691
					"Surfer"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   692
					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   693
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   694
local fortArray =	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   695
					"Cake", "Castle", "Earth", "EvilChicken", "Flowerhog",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   696
					"Hydrant", "Lego", "Plane", "Statue", "Tank",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   697
					"UFO", "Wood"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   698
					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   699
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   700
-- non-exhaustive list of flags, feel free to choose others
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   701
local flagArray = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   702
					"cm_binary", "cm_birdy", "cm_earth", "cm_pirate", "cm_star",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   703
					"cm_hurrah", "cm_hax0r", "cm_balrog", "cm_spider", "cm_eyeofhorus"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   704
					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   705
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   706
local gameFlagList =	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   707
			{"gfMultiWeapon", false, gfMultiWeapon},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   708
			{"gfBorder", false, gfBorder},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   709
			{"gfSolidLand", false, gfSolidLand},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   710
			{"gfDivideTeams", false, gfDivideTeams},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   711
			{"gfLowGravity", false, gfLowGravity},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   712
			{"gfLaserSight", true, gfLaserSight},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   713
			{"gfInvulnerable", false, gfInvulnerable},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   714
			{"gfMines", false, gfMines},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   715
			{"gfVampiric", false, gfVampiric},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   716
			{"gfKarma", false, gfKarma},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   717
			{"gfArtillery", false, gfArtillery},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   718
			{"gfOneClanMode", false, gfOneClanMode},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   719
			{"gfRandomOrder", false, gfRandomOrder},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   720
			{"gfKing", false, gfKing},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   721
			{"gfPlaceHog", false, gfPlaceHog},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   722
			{"gfSharedAmmo", false, gfSharedAmmo},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   723
			{"gfDisableGirders", false, gfDisableGirders},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   724
			{"gfExplosives", false, gfExplosives},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   725
			{"gfDisableLandObjects", false, gfDisableLandObjects},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   726
			{"gfAISurvival", false, gfAISurvival},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   727
			{"gfInfAttack", true, gfInfAttack},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   728
			{"gfResetWeps", false, gfResetWeps},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   729
			{"gfResetHealth", false, gfResetHealth},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   730
			{"gfPerHogAmmo", false, gfPerHogAmmo},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   731
			{"gfDisableWind", false, gfDisableWind},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   732
			{"gfMoreWind", false, gfMoreWind},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   733
			{"gfTagTeam", false, gfTagTeam}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   734
			}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   735
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   736
local themeList = 	{"Art", "Bamboo", "Bath", --[["Blox",]] "Brick", "Cake", "Castle", "Cave", "Cheese",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   737
		"Christmas", "City", "Compost", --[["CrazyMission", "Deepspace",]] "Desert", "Earthrise",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   738
		--[["Eyes",]] "Freeway", "Golf", "Halloween", "Hell", --[["HogggyWood",]] "Island", "Jungle", "Nature",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   739
		"Olympics", "Planes", "Sheep", "Snow", "Stage", "Underwater"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   740
		}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   741
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   742
local mapList = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   743
		"Bamboo", "BambooPlinko", "Basketball", "Bath", "Blizzard", "Blox", "Bubbleflow",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   744
		"Battlefield", "Cake", "Castle", "Cave", "Cheese", "Cogs", "Control", "Earthrise",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   745
		"Eyes", "Hammock", "Hedgelove", "Hedgewars", "Hogville", "Hydrant", "Islands",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   746
		"Knockball", "Lonely_Island", "Mushrooms", "Octorama", "PirateFlag",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   747
		"Plane", "Ropes", "Ruler", "Sheep", "ShoppaKing", "Sticks", "Trash", "Tree",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   748
		"TrophyRace"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   749
		}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   750
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   751
--local spriteArray = {
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   752
--					{sprBigDigit,			"sprBigDigit",			0}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   753
--					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   754
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   755
local spriteIDArray = {sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   756
sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   757
sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   758
sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   759
sprClusterBomb, sprClusterParticle, sprFlame,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   760
sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   761
sprAMSlot, sprAMAmmos, sprAMAmmosBW, sprAMSlotKeys, sprAMCorners,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   762
sprFinger, sprAirBomb, sprAirplane, sprAmAirplane, sprAmGirder,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   763
sprHHTelepMask, sprSwitch, sprParachute, sprTarget, sprRopeNode,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   764
sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   765
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   766
sprFireButton, sprArrowUp, sprArrowDown, sprArrowLeft, sprArrowRight,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   767
sprJumpWidget, sprAMWidget, sprPauseButton, sprTimerButton, sprTargetButton,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   768
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   769
sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   770
sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   771
sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   772
sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   773
sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   774
sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   775
sprCakeWalk, sprCakeDown, sprWatermelon,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   776
sprEvilTrace, sprHellishBomb, sprSeduction, sprDress,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   777
sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   778
sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   779
sprSpeechCorner, sprSpeechEdge, sprSpeechTail,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   780
sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   781
sprShoutCorner, sprShoutEdge, sprShoutTail,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   782
sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   783
sprSmoke, sprSmokeWhite, sprShell, sprDust, sprSnowDust, sprExplosives, sprExplosivesRoll,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   784
sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   785
sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   786
sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   787
sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   788
sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   789
sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   790
sprSMineOff, sprSMineOn, sprHandSMine, sprHammer,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   791
sprHandResurrector, sprCross, sprAirDrill, sprNapalmBomb,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   792
sprBulletHit, sprSnowball, sprHandSnowball, sprSnow,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   793
sprSDFlake, sprSDWater, sprSDCloud, sprSDSplash, sprSDDroplet, sprTardis,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   794
sprSlider, sprBotlevels, sprHandKnife, sprKnife, sprStar, sprIceTexture, sprIceGun, sprFrozenHog, sprAmRubber, sprBoing}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   795
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   796
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   797
local spriteTextArray = {"sprWater", "sprCloud", "sprBomb", "sprBigDigit", "sprFrame",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   798
"sprLag", "sprArrow", "sprBazookaShell", "sprTargetP", "sprBee",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   799
"sprSmokeTrace", "sprRopeHook", "sprExplosion50", "sprMineOff",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   800
"sprMineOn", "sprMineDead", "sprCase", "sprFAid", "sprDynamite", "sprPower",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   801
"sprClusterBomb", "sprClusterParticle", "sprFlame", "sprHorizont",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   802
"sprHorizontL", "sprHorizontR", "sprSky", "sprSkyL", "sprSkyR", "sprAMSlot",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   803
"sprAMAmmos", "sprAMAmmosBW", "sprAMSlotKeys", "sprAMCorners", "sprFinger",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   804
"sprAirBomb", "sprAirplane", "sprAmAirplane", "sprAmGirder", "sprHHTelepMask",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   805
 "sprSwitch", "sprParachute", "sprTarget", "sprRopeNode", "sprQuestion",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   806
 "sprPowerBar", "sprWindBar", "sprWindL", "sprWindR", "sprFireButton",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   807
 "sprArrowUp", "sprArrowDown", "sprArrowLeft", "sprArrowRight", "sprJumpWidget",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   808
 "sprAMWidget", "sprPauseButton", "sprTimerButton", "sprTargetButton",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   809
 "sprFlake", "sprHandRope", "sprHandBazooka", "sprHandShotgun",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   810
 "sprHandDEagle", "sprHandAirAttack", "sprHandBaseball", "sprPHammer",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   811
 "sprHandBlowTorch", "sprBlowTorch", "sprTeleport", "sprHHDeath", "sprShotgun",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   812
 "sprDEagle", "sprHHIdle", "sprMortar", "sprTurnsLeft", "sprKamikaze", "sprWhip",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   813
 "sprKowtow", "sprSad", "sprWave", "sprHurrah", "sprLemonade", "sprShrug",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   814
 "sprJuggle", "sprExplPart", "sprExplPart2", "sprCakeWalk", "sprCakeDown",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   815
 "sprWatermelon", "sprEvilTrace", "sprHellishBomb", "sprSeduction", "sprDress",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   816
 "sprCensored", "sprDrill", "sprHandDrill", "sprHandBallgun", "sprBalls", "sprPlane",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   817
 "sprHandPlane", "sprUtility", "sprInvulnerable", "sprVampiric", "sprGirder",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   818
 "sprSpeechCorner", "sprSpeechEdge", "sprSpeechTail", "sprThoughtCorner",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   819
 "sprThoughtEdge", "sprThoughtTail", "sprShoutCorner", "sprShoutEdge",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   820
 "sprShoutTail", "sprSniperRifle", "sprBubbles", "sprJetpack", "sprHealth",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   821
 "sprHandMolotov", "sprMolotov", "sprSmoke", "sprSmokeWhite", "sprShell", "sprDust",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   822
 "sprSnowDust", "sprExplosives", "sprExplosivesRoll", "sprAmTeleport", "sprSplash",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   823
 "sprDroplet", "sprBirdy", "sprHandCake", "sprHandConstruction", "sprHandGrenade",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   824
 "sprHandMelon", "sprHandMortar", "sprHandSkip", "sprHandCluster", "sprHandDynamite",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   825
 "sprHandHellish", "sprHandMine", "sprHandSeduction", "sprHandVamp", "sprBigExplosion",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   826
 "sprSmokeRing", "sprBeeTrace", "sprEgg", "sprTargetBee", "sprHandBee", "sprFeather",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   827
 "sprPiano", "sprHandSineGun", "sprPortalGun", "sprPortal", "sprCheese", "sprHandCheese",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   828
 "sprHandFlamethrower", "sprChunk", "sprNote", "sprSMineOff", "sprSMineOn", "sprHandSMine",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   829
 "sprHammer", "sprHandResurrector", "sprCross", "sprAirDrill", "sprNapalmBomb", "sprBulletHit",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   830
 "sprSnowball", "sprHandSnowball", "sprSnow", "sprSDFlake", "sprSDWater", "sprSDCloud",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   831
 "sprSDSplash", "sprSDDroplet", "sprTardis", "sprSlider", "sprBotlevels", "sprHandKnife",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   832
 "sprKnife", "sprStar", "sprIceTexture", "sprIceGun", "sprFrozenHog", "sprAmRubber", "sprBoing"}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   833
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   834
 local reducedSpriteIDArray = {
11641
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   835
  sprAmRubber, sprAmGirder, sprAMSlot, sprAMAmmos, sprAMAmmosBW, sprAMCorners, sprHHTelepMask, sprTurnsLeft,
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   836
  sprSpeechCorner, sprSpeechEdge, sprSpeechTail, sprThoughtCorner, sprThoughtEdge, sprThoughtTail, sprShoutCorner,
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   837
  sprShoutEdge, sprShoutTail, sprBotlevels, sprIceTexture, sprCustom1, sprCustom2, }
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   838
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   839
 local reducedSpriteTextArray = {
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   840
  "sprAmRubber", "sprAmGirder", "sprAMSlot", "sprAMAmmos", "sprAMAmmosBW", "sprAMCorners", "sprHHTelepMask", "sprTurnsLeft",
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   841
  "sprSpeechCorner", "sprSpeechEdge", "sprSpeechTail", "sprThoughtCorner", "sprThoughtEdge", "sprThoughtTail", "sprShoutCorner",
9edd7d5e32ac HedgeEditor: Fix list of available sprites
Wuzzy <almikes@aol.com>
parents: 11640
diff changeset
   842
  "sprShoutEdge", "sprShoutTail", "sprBotlevels", "sprIceTexture", "sprCustom1", "sprCustom2", }
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   843
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   844
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   845
-- placement shite
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   846
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   847
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   848
local landType = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   849
local superDelete = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   850
local ufoGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   851
ufoFuel = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   852
mapID = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   853
local portalDistance = 5000/5
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   854
local helpDisabled = false  --determines whether help popups pop up
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   855
local CG = nil -- this is the visual gear displayed at CursorX, CursorY
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   856
local crateSprite = nil-- this is a visual gear aid for crate placement
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   857
local tSpr = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   858
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   859
local cGear = nil -- detects placement of girders and objects (using airattack)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   860
local curWep = amNothing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   861
local leftHeld = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   862
local rightHeld = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   863
local preciseOn = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   864
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   865
-- primary placement categories
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   866
local cIndex = 1 -- category index
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   867
local cat = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   868
				loc("Girder Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   869
				loc("Rubber Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   870
				loc("Mine Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   871
				loc("Sticky Mine Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   872
				loc("Air Mine Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   873
				loc("Barrel Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   874
				loc("Health Crate Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   875
				loc("Weapon Crate Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   876
				loc("Utility Crate Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   877
				loc("Target Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   878
				loc("Cleaver Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   879
				loc("Advanced Repositioning Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   880
				loc("Tagging Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   881
				loc("Hog Identity Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   882
				loc("Team Identity Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   883
				loc("Health Modification Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   884
				--loc("Sprite Testing Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   885
				loc("Sprite Placement Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   886
				loc("Sprite Modification Mode"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   887
				loc("Waypoint Placement Mode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   888
				}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   889
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   890
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   891
local pMode = {}	-- pMode contains custom subsets of the main categories
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   892
local pIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   893
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   894
local genTimer = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   895
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   896
local CGR = 1 -- current girder rotation, we actually need this as HW remembers what rotation you last used
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   897
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   898
local placedX = {} -- x coord of placed object
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   899
local placedY = {} -- y coord of placed object
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   900
local placedSpec = {} -- this is different depending on what was placed, for mines it is their time, for crates it is their content, (for girders/rubbers it used to be their rotation, and for sprites, their name, but this has been moved to different variables to allow more complex / smooth editing)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   901
--local placedSuperSpec = {} -- used to be used by girders/rubbers/sprites for their landFlag
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   902
local placedType = {} -- what kind of object was placed: mine, crate, girder, rubber, barrel, etc.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   903
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   904
local placedTint = {} -- only girders/rubbers/sprites use this, it is their tint / colouration
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   905
local placedSprite = {} -- what sprite was placed
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   906
local placedFrame = {} -- what frame of sprite was placed (rotation for girders / rubber)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   907
local placedLandFlags = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   908
local placedHWMapFlag = {} -- this is what HWMapConverter uses
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   909
local placedCount = 0 -- do we really need this?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   910
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   911
local sSprite -- sprite overlay that glows to show selected sprites
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   912
local sCirc -- circle that appears around selected gears
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   913
local sGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   914
local closestDist
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   915
local closestGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   916
local closestSpriteID = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   917
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   918
------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   919
-- menu shite (more or less unused currently)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   920
------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   921
--local menuEnabled = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   922
--local menuIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   923
--local menu = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   924
--local subMenu = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   925
--local sMI = 1 -- sub menu index
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   926
--local preMenuCfg
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   927
--local postMenuCfg
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   928
--local initMenu	=	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   929
--					{"Selected Menu",	"Initialisation Menu"},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   930
--					{"List of Gameflags",	""},
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   931
--					{"List of Gameflags",	""}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   932
--					}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   933
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   934
------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   935
-- SOME GENERAL METHODS
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   936
------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   937
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   938
function BoolToString(boo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   939
	if boo == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   940
		return("true")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   941
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   942
		return("false")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   943
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   944
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   945
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   946
function GetDistFromGearToXY(gear, g2X, g2Y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   947
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   948
	g1X, g1Y = GetGearPosition(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   949
	q = g1X - g2X
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   950
	w = g1Y - g2Y
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   951
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   952
	return ( (q*q) + (w*w) )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   953
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   954
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   955
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   956
------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   957
-- STUFF FOR LOADING SPECIAL POINTS / HWMAP CONVERSION
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   958
------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   959
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   960
local specialPointsX = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   961
local specialPointsY = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   962
local specialPointsFlag = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   963
local specialPointsCount = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   964
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   965
function onSpecialPoint(x,y,flag)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   966
    specialPointsX[specialPointsCount] = x
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   967
    specialPointsY[specialPointsCount] = y
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   968
	specialPointsFlag[specialPointsCount] = flag
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   969
    specialPointsCount = specialPointsCount + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   970
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   971
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   972
-- you know you could probably add multiple layers to this to get more points
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   973
-- after the first set is expended have the last 1 be 127
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   974
-- and then increment some other counter so like
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   975
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   976
-- bobCounter = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   977
-- specialPoint(5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   978
-- specialPoint(127)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   979
-- specialPoint(5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   980
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   981
-- if BobCounter = 1 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   982
-- 		if specialPointsFlag == 5 then createMine
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   983
--		if specialPointFlag == 127 then bobCounter = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   984
-- elseif bobCounter == 2 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   985
-- 		if specialPointsFlag == 5 then createExlosives
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   986
-- end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   987
--
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   988
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   989
-- this function interprets special points that have been embedded into an HWPMAP
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   990
function InterpretPoints()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   991
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   992
	-- flags run from 0 to 127
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   993
	for i = 0, (specialPointsCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   994
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   995
		-- Mines
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   996
		if specialPointsFlag[i] == 1 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   997
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   998
		elseif specialPointsFlag[i] == 2 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
   999
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1000
		elseif specialPointsFlag[i] == 3 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1001
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 2000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1002
		elseif specialPointsFlag[i] == 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1003
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 3000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1004
		elseif specialPointsFlag[i] == 5 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1005
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 4000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1006
		elseif specialPointsFlag[i] == 6 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1007
			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 5000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1008
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1009
		-- Sticky Mines
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1010
		elseif specialPointsFlag[i] == 7 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1011
			AddGear(specialPointsX[i], specialPointsY[i], gtSMine, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1012
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1013
		-- Air Mines
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1014
		elseif specialPointsFlag[i] == 8 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1015
			AddGear(specialPointsX[i], specialPointsY[i], gtAirMine, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1016
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1017
		-- Health Crates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1018
		elseif specialPointsFlag[i] == 9 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1019
			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),25)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1020
		elseif specialPointsFlag[i] == 10 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1021
			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),50)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1022
		elseif specialPointsFlag[i] == 11 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1023
			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),75)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1024
		elseif specialPointsFlag[i] == 12 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1025
			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1026
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1027
		-- Cleaver
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1028
		elseif specialPointsFlag[i] == 13 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1029
			AddGear(specialPointsX[i], specialPointsY[i], gtKnife, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1030
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1031
		-- Target
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1032
		elseif specialPointsFlag[i] == 14 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1033
			AddGear(specialPointsX[i], specialPointsY[i], gtTarget, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1034
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1035
		--Barrels
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1036
		elseif specialPointsFlag[i] == 15 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1037
			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1038
		elseif specialPointsFlag[i] == 16 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1039
			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),25)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1040
		elseif specialPointsFlag[i] == 17 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1041
			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),50)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1042
		elseif specialPointsFlag[i] == 18 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1043
			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),75)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1044
		elseif specialPointsFlag[i] == 19 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1045
			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1046
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1047
		-- There are about 58+- weps / utils
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1048
		-- Weapon Crates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1049
		elseif (specialPointsFlag[i] >= 20) and (specialPointsFlag[i] < (#atkArray+20)) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1050
			tempG = SpawnAmmoCrate(specialPointsX[i],specialPointsY[i],atkArray[specialPointsFlag[i]-19][1])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1051
			setGearValue(tempG,"caseType","ammo")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1052
			setGearValue(tempG,"contents",atkArray[specialPointsFlag[i]-19][2])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1053
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1054
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1055
		-- Utility Crates
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1056
		elseif (specialPointsFlag[i] >= (#atkArray+20)) and (specialPointsFlag[i] < (#atkArray+20+#utilArray)) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1057
			tempG = SpawnUtilityCrate(specialPointsX[i],specialPointsY[i],utilArray[specialPointsFlag[i]-19-#atkArray][1])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1058
			setGearValue(tempG,"caseType","util")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1059
			setGearValue(tempG,"contents",utilArray[specialPointsFlag[i]-19-#atkArray][2])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1060
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1061
		--79-82 (reserved for future wep crates)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1062
		--89,88,87,86 and 85,84,83,82 (reserved for the 2 custom sprites and their landflags)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1063
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1064
		--90-99 reserved for scripted structures
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1065
		--[[elseif specialPointsFlag[i] == 90 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1066
			--PlaceStruc("generator")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1067
		elseif specialPointsFlag[i] == 91 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1068
			--PlaceStruc("healingstation")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1069
		elseif specialPointsFlag[i] == 92 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1070
			--PlaceStruc("respawner")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1071
		elseif specialPointsFlag[i] == 93 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1072
			--PlaceStruc("teleportationnode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1073
		elseif specialPointsFlag[i] == 94 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1074
			--PlaceStruc("biofilter")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1075
		elseif specialPointsFlag[i] == 95 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1076
			--PlaceStruc("supportstation")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1077
		elseif specialPointsFlag[i] == 96 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1078
			--PlaceStruc("constructionstation")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1079
		elseif specialPointsFlag[i] == 97 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1080
			--PlaceStruc("reflectorshield")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1081
		elseif specialPointsFlag[i] == 98 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1082
			--PlaceStruc("weaponfilter")]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1083
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1084
		elseif specialPointsFlag[i] == 98 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1085
			portalDistance = div(specialPointsX[i],5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1086
			ufoFuel = specialPointsY[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1087
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1088
		-- Normal Girders
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1089
		elseif specialPointsFlag[i] == 100 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1090
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1091
		elseif specialPointsFlag[i] == 101 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1092
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1093
		elseif specialPointsFlag[i] == 102 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1094
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1095
		elseif specialPointsFlag[i] == 103 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1096
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1097
		elseif specialPointsFlag[i] == 104 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1098
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1099
		elseif specialPointsFlag[i] == 105 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1100
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1101
		elseif specialPointsFlag[i] == 106 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1102
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1103
		elseif specialPointsFlag[i] == 107 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1104
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1105
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1106
		-- Invulnerable Girders
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1107
		elseif specialPointsFlag[i] == 108 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1108
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1109
		elseif specialPointsFlag[i] == 109 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1110
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1111
		elseif specialPointsFlag[i] == 110 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1112
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1113
		elseif specialPointsFlag[i] == 111 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1114
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1115
		elseif specialPointsFlag[i] == 112 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1116
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1117
		elseif specialPointsFlag[i] == 113 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1118
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1119
		elseif specialPointsFlag[i] == 114 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1120
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1121
		elseif specialPointsFlag[i] == 115 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1122
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1123
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1124
		-- Icy Girders
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1125
		elseif specialPointsFlag[i] == 116 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1126
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1127
		elseif specialPointsFlag[i] == 117 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1128
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1129
		elseif specialPointsFlag[i] == 118 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1130
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1131
		elseif specialPointsFlag[i] == 119 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1132
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1133
		elseif specialPointsFlag[i] == 120 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1134
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1135
		elseif specialPointsFlag[i] == 121 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1136
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1137
		elseif specialPointsFlag[i] == 121 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1138
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1139
		elseif specialPointsFlag[i] == 123 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1140
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 16448250, nil, nil, nil, lfIce)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1141
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1142
		-- Rubber Bands
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1143
		elseif specialPointsFlag[i] == 124 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1144
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 0, 4294967295, nil, nil, nil, lfBouncy)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1145
		elseif specialPointsFlag[i] == 125 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1146
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 1, 4294967295, nil, nil, nil, lfBouncy)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1147
		elseif specialPointsFlag[i] == 126 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1148
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 2, 4294967295, nil, nil, nil, lfBouncy)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1149
		elseif specialPointsFlag[i] == 127 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1150
			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 3, 4294967295, nil, nil, nil, lfBouncy)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1151
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1152
		-- Waypoints
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1153
		else -- 0 / no value
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1154
			PlaceWaypoint(specialPointsX[i],specialPointsY[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1155
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1156
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1157
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1158
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1159
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1160
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1161
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1162
-- just fucking around
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1163
----------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1164
-- ancient stuff that no longer has any relevance
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1165
--[[
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1166
function BoostVeloctiy(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1167
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1168
	if (GetGearType(gear) == gtSMine) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1169
		(GetGearType(gear) == gtMine) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1170
		(GetGearType(gear) == gtHedgehog) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1171
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1172
			dx,dy = GetGearVelocity(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1173
			SetGearVelocity(gear,dx*1.5,dy*1.5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1174
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1175
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1176
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1177
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1178
-- use this stuff when you want to get some idea of land and/or blow up /everything/
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1179
function CheckGrenades(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1180
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1181
	if GetGearType(gear) == gtGrenade then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1182
		dx, dy = GetGearVelocity(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1183
		if (dy == 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1184
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1185
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1186
			DeleteGear(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1187
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1188
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1189
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1190
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1191
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1192
function BlowShitUpPartTwo()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1193
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1194
	destroyMap = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1195
	runOnGears(CheckGrenades)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1196
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1197
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1198
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1199
function BlowShitUp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1200
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1201
	destroyMap = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1202
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1203
	mapWidth = 4096
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1204
	mapHeight = 2048
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1205
	blockSize = 50
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1206
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1207
	mY = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1208
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1209
	while (mY < WaterLine) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1210
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1211
		mX = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1212
		mY = mY + 1*blockSize
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1213
		while (mX < mapWidth) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1214
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1215
			mX = mX + (1*blockSize)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1216
			gear = AddGear(mX, mY, gtGrenade, 0, 0, 0, 5000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1217
			SetState(gear, bor(GetState(gear),gstInvisible) )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1218
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1219
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1220
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1221
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1222
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1223
end]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1224
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1225
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1226
-- you know, using this it might be possible to have a self destructing track,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1227
-- or a moving one.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1228
-- edit: this was from the gold old days before it was possible to erase sprites)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1229
--[[function BoomGirder(x,y,rot)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1230
	girTime = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1231
	if rot < 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1232
				AddGear(x, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1233
	elseif rot == 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1234
				g = AddGear(x-45, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1235
				g = AddGear(x-30, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1236
				g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1237
				g = AddGear(x+30, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1238
				g = AddGear(x+45, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1239
	elseif rot == 5 then ------- diag
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1240
				g = AddGear(x+45, y+45, gtGrenade, 0, 0, 0, girTime) --n
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1241
				g = AddGear(x+30, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1242
				g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1243
				g = AddGear(x-30, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1244
				g = AddGear(x-45, y-45, gtGrenade, 0, 0, 0, girTime) --n
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1245
	elseif rot == 6 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1246
				g = AddGear(x, y-45, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1247
				g = AddGear(x, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1248
				g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1249
				g = AddGear(x, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1250
				g = AddGear(x, y+45, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1251
	elseif rot == 7 then -------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1252
				g = AddGear(x+45, y-45, gtGrenade, 0, 0, 0, girTime) --n
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1253
				g = AddGear(x+30, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1254
				g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1255
				g = AddGear(x-30, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1256
				g = AddGear(x-45, y+45, gtGrenade, 0, 0, 0, girTime) --n
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1257
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1258
end]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1259
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1260
--[[function SpecialGirderPlacement(x,y,rot)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1261
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1262
	PlaceGirder(x, y, rot)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1263
	girTime = 10000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1264
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1265
	if rot < 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1266
				AddGear(x, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1267
	elseif rot == 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1268
				g = AddGear(x-30, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1269
				g = AddGear(x+30, y, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1270
	elseif rot == 5 then -------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1271
				g = AddGear(x+30, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1272
				g = AddGear(x-30, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1273
	elseif rot == 6 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1274
				g = AddGear(x, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1275
				g = AddGear(x, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1276
	elseif rot == 7 then -------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1277
				g = AddGear(x+30, y-30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1278
				g = AddGear(x-30, y+30, gtGrenade, 0, 0, 0, girTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1279
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1280
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1281
end]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1282
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1283
--shoppabalance crap
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1284
function AddShoppaPoint(x,y,c)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1285
	table.insert(shoppaPX, x)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1286
	table.insert(shoppaPY, y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1287
	table.insert(shoppaPR, c)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1288
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1289
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1290
function GetRankedColour(r)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1291
	if r == 1 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1292
		return(0xFF0000FF)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1293
	elseif r == 2 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1294
		return(0xFFFF00FF)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1295
	elseif r == 3 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1296
		return(0x00FF00FF)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1297
	elseif r == 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1298
		return(0x0000FFFF)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1299
	elseif r == 5 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1300
		return(0xFF00FFFF)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1301
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1302
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1303
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1304
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1305
-- PRIMARY HEDGE EDITOR PLACEMENT STUFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1306
-----------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1307
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1308
function GetClosestGear()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1309
	closestDist = 999999999
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1310
	closestGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1311
	--sGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1312
	runOnGears(SelectGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1313
	return(closestGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1314
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1315
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1316
function SelectGear(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1317
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1318
	d = GetDistFromGearToXY(gear, placedX[placedCount], placedY[placedCount])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1319
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1320
	if d < closestDist then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1321
		closestDist = d
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1322
		closestGear = gear
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1323
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1324
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1325
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1326
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1327
function PlaceWaypoint(x,y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1328
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1329
	placedX[placedCount] = x
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1330
	placedY[placedCount] = y
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1331
	placedType[placedCount] = loc("Waypoint Placement Mode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1332
	placedLandFlags[placedCount] = nil -- use this to specify waypoint type maybe
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1333
	placedHWMapFlag[placedCount] = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1334
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1335
	placedSprite[placedCount] = vgtCircle
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1336
	placedSpec[placedCount] = AddVisualGear(x,y,vgtCircle,0,true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1337
	placedTint[placedCount] = 0xFF0000FF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1338
	placedFrame[placedCount] = 1										--rad is 450
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1339
	SetVisualGearValues(placedSpec[placedCount], x, y, 20, 100, 1, 10, 0, 450, 5, placedTint[placedCount])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1340
	placedCount = placedCount +1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1341
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1342
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1343
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1344
function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1345
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1346
	placedX[placedCount] = pX
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1347
	placedY[placedCount] = pY
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1348
	placedSpec[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1349
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1350
	if pSprite == sprAmGirder then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1351
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1352
		placedType[placedCount] = loc("Girder Placement Mode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1353
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1354
		--newHWMapStuff
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1355
		if pLandFlags == lfIndestructible then	specialMod = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1356
		elseif pLandFlags == lfIce then	specialMod = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1357
		else specialMod = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1358
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1359
		placedHWMapFlag[placedCount] = pFrame+100+(8*specialMod)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1360
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1361
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1362
	elseif pSprite == sprAmRubber then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1363
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1364
		placedType[placedCount] = loc("Rubber Placement Mode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1365
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1366
		--newHWMapStuff
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1367
		if pFrame == 0 then placedHWMapFlag[placedCount] = 124
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1368
		elseif pFrame == 1 then placedHWMapFlag[placedCount] = 125
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1369
		elseif pFrame == 2 then placedHWMapFlag[placedCount] = 126
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1370
		elseif pFrame == 3 then placedHWMapFlag[placedCount] = 127
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1371
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1372
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1373
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1374
		placedType[placedCount] = loc("Sprite Placement Mode")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1375
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1376
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1377
	--placedLandFlags[placedCount] = pLandFlags
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1378
	if pLandFlags == lfIce then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1379
		placedLandFlags[placedCount] = "lfIce"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1380
	elseif pLandFlags == lfIndestructible then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1381
		placedLandFlags[placedCount] = "lfIndestructible"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1382
	elseif pLandFlags == lfBouncy then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1383
		placedLandFlags[placedCount] = "lfBouncy"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1384
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1385
		placedLandFlags[placedCount] = "lfNormal"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1386
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1387
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1388
	--placedSuperSpec[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1389
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1390
	placedTint[placedCount] = pTint
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1391
	placedFrame[placedCount] = pFrame
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1392
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1393
	placedSprite[placedCount] = pSprite
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1394
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1395
	PlaceSprite(pX, pY, pSprite, pFrame, pTint,	nil, nil, nil, pLandFlags)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1396
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1397
	placedCount = placedCount + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1398
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1399
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1400
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1401
function CallPlaceSprite(pID)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1402
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1403
	if landType == lfIce then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1404
		placedLandFlags[pID] = "lfIce"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1405
		placedTint[pID] = 250 + (250*0x100) + (250*0x10000) + (0*0x1000000) -- A BGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1406
	elseif landType == lfIndestructible then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1407
		placedLandFlags[pID] = "lfIndestructible"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1408
		placedTint[pID] = 250 + (0*0x100) + (0*0x10000) + (150*0x1000000) -- A BGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1409
	elseif landType == lfBouncy then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1410
		placedLandFlags[pID] = "lfBouncy"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1411
		placedTint[pID] = 250 + (0*0x100) + (250*0x10000) + (0*0x1000000) -- A BGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1412
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1413
		placedLandFlags[pID] = "lfNormal"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1414
		--placedTint[pID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1415
		placedTint[pID] = 255 + (255*0x100) + (255*0x10000) + (255*0x1000000) -- A BGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1416
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1417
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1418
	PlaceSprite(placedX[pID], placedY[pID], placedSprite[pID], placedFrame[pID],
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1419
		placedTint[pID],
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1420
		nil, -- overrite existing land
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1421
		nil, nil, -- this stuff specifies flipping
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1422
		landType)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1423
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1424
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1425
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1426
function SelectClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1427
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1428
	closestDist = 999999999
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1429
	closestSpriteID = nil -- just in case
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1430
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1431
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1432
		if (placedType[i] == loc("Girder Placement Mode"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1433
			or (placedType[i] == loc("Rubber Placement Mode"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1434
			or (placedType[i] == loc("Sprite Placement Mode"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1435
		then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1436
				q = placedX[i] - placedX[placedCount]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1437
				w = placedY[i] - placedY[placedCount]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1438
				d = ( (q*q) + (w*w) )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1439
				if d < closestDist then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1440
					closestDist = d
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1441
					closestSpriteID = i
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1442
					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(sSprite)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1443
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1444
					--newTint = placedTint[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1445
					newTint = 0xFF00FFFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1446
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1447
					SetVisualGearValues(sSprite, placedX[i], placedY[i], 0, 0, g5, placedFrame[i], 10000, placedSprite[i], 10000, newTint )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1448
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1449
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1450
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1451
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1452
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1453
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1454
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1455
function EraseClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1456
	if closestSpriteID ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1457
		EraseSprite(placedX[closestSpriteID], placedY[closestSpriteID], placedSprite[closestSpriteID], placedFrame[closestSpriteID],
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1458
                    nil, -- erase land only where the pixels match the land flag provided
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1459
                    nil, -- only erase the provided land flags. don't touch other land flags or LandPixels
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1460
                    nil, -- flip sprite horizontally
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1461
                    nil, -- flip sprite vertically
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1462
                    placedLandFlags[closestSpriteID])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1463
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1464
		placedX[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1465
		placedY[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1466
		placedSpec[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1467
		--placedSuperSpec[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1468
		placedType[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1469
		placedTint[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1470
		placedSprite[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1471
		placedFrame[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1472
		placedLandFlags[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1473
		closestSpriteID = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1474
		SetVisualGearValues(sSprite, 0, 0, 0, 0, 0, 1, 10000, sprAmGirder, 10000, 0x00000000 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1475
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1476
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1477
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1478
-- work this into the above two functions and edit them, later
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1479
function EraseClosestWaypoint()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1480
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1481
	closestDist = 999999999
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1482
	closestSpriteID = nil -- just in case
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1483
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1484
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1485
		if (placedType[i] == loc("Waypoint Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1486
				q = placedX[i] - placedX[placedCount]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1487
				w = placedY[i] - placedY[placedCount]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1488
				d = ( (q*q) + (w*w) )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1489
				if d < closestDist then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1490
					closestDist = d
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1491
					closestSpriteID = i
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1492
					g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(sSprite)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1493
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1494
					--newTint = placedTint[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1495
					newTint = 0xFF00FFFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1496
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1497
					SetVisualGearValues(sSprite, placedX[i], placedY[i], 0, 0, g5, placedFrame[i], 10000, placedSprite[i], 10000, newTint )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1498
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1499
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1500
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1501
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1502
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1503
	if closestSpriteID ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1504
		DeleteVisualGear(placedSpec[closestSpriteID])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1505
		placedX[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1506
		placedY[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1507
		placedSpec[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1508
		--placedSuperSpec[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1509
		placedType[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1510
		placedTint[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1511
		placedSprite[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1512
		placedFrame[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1513
		placedLandFlags[closestSpriteID] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1514
		closestSpriteID = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1515
		SetVisualGearValues(sSprite, 0, 0, 0, 0, 0, 1, 10000, sprAmGirder, 10000, 0x00000000 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1516
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1517
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1518
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1519
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1520
-- essentially called when user clicks the mouse
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1521
-- with girders or an airattack
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1522
function PlaceObject(x,y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1523
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1524
	placedX[placedCount] = x
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1525
	placedY[placedCount] = y
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1526
	placedType[placedCount] = cat[cIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1527
	placedSpec[placedCount] = pMode[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1528
	--placedSuperSpec[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1529
	placedTint[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1530
	placedFrame[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1531
	placedLandFlags[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1532
	placedSprite[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1533
	placedHWMapFlag[placedCount] = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1534
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1535
	if cat[cIndex] == loc("Girder Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1536
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1537
		if superDelete == false then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1538
			--lfObject and lfBasic
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1539
			placedFrame[placedCount] = CGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1540
			placedSprite[placedCount] = sprAmGirder
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1541
			CallPlaceSprite(placedCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1542
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1543
			if landType == lfIndestructible then	specialMod = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1544
			elseif landType == lfIce then	specialMod = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1545
			else specialMod = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1546
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1547
			placedHWMapFlag[placedCount] = CGR+100+(8*specialMod)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1548
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1549
			placedType[placedCount] = "bogus" -- we need this so we don't think we've placed a new girder and are trying to erase the things we just placed??
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1550
			SelectClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1551
			EraseClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1552
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1553
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1554
	elseif cat[cIndex] == loc("Rubber Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1555
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1556
		if superDelete == false then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1557
			placedFrame[placedCount] = CGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1558
			placedSprite[placedCount] = sprAmRubber
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1559
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1560
			--CallPlaceSprite(placedCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1561
			--new ermagerd
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1562
			placedLandFlags[placedCount] = "lfBouncy"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1563
			placedTint[placedCount] = 255 + (255*0x100) + (255*0x10000) + (255*0x1000000) -- A BGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1564
			PlaceSprite(placedX[placedCount], placedY[placedCount], placedSprite[placedCount], placedFrame[placedCount],
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1565
				placedTint[placedCount],
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1566
				nil,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1567
				nil, nil,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1568
				landType)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1569
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1570
			if CGR == 0 then placedHWMapFlag[placedCount] = 124
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1571
			elseif CGR == 1 then placedHWMapFlag[placedCount] = 125
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1572
			elseif CGR == 2 then placedHWMapFlag[placedCount] = 126
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1573
			elseif CGR == 3 then placedHWMapFlag[placedCount] = 127
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1574
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1575
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1576
			placedType[placedCount] = "bogus"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1577
			SelectClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1578
			EraseClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1579
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1580
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1581
	elseif cat[cIndex] == loc("Target Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1582
		gear = AddGear(x, y, gtTarget, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1583
	elseif cat[cIndex] == loc("Cleaver Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1584
		gear = AddGear(x, y, gtKnife, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1585
	elseif cat[cIndex] == loc("Health Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1586
		gear = SpawnHealthCrate(x,y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1587
		SetHealth(gear, pMode[pIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1588
		setGearValue(gear,"caseType","med")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1589
	elseif cat[cIndex] == loc("Weapon Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1590
		gear = SpawnAmmoCrate(x, y, atkArray[pIndex][1])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1591
		placedSpec[placedCount] = atkArray[pIndex][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1592
		setGearValue(gear,"caseType","ammo")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1593
		setGearValue(gear,"contents",atkArray[pIndex][2])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1594
	elseif cat[cIndex] == loc("Utility Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1595
		gear = SpawnUtilityCrate(x, y, utilArray[pIndex][1])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1596
		placedSpec[placedCount] = utilArray[pIndex][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1597
		setGearValue(gear,"caseType","util")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1598
		setGearValue(gear,"contents",utilArray[pIndex][2])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1599
	elseif cat[cIndex] == loc("Barrel Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1600
		gear = AddGear(x, y, gtExplosives, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1601
		SetHealth(gear, pMode[pIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1602
	elseif cat[cIndex] == loc("Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1603
		gear = AddGear(x, y, gtMine, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1604
		SetTimer(gear, pMode[pIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1605
	elseif cat[cIndex] == loc("Sticky Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1606
		gear = AddGear(x, y, gtSMine, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1607
	elseif cat[cIndex] == loc("Air Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1608
		gear = AddGear(x, y, gtAirMine, 0, 0, 0, 0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1609
		SetTimer(gear, pMode[pIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1610
	elseif cat[cIndex] == loc("Advanced Repositioning Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1611
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1612
		if pMode[pIndex] == loc("Selection Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1613
			sGear = GetClosestGear()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1614
		elseif pMode[pIndex] == loc("Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1615
			if sGear ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1616
				SetGearPosition(sGear, x, y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1617
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1618
		elseif pMode[pIndex] == loc("Deletion Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1619
			sGear = GetClosestGear()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1620
			if (sGear ~= nil) and (GetGearType(sGear) ~= gtHedgehog) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1621
				DeleteGear(sGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1622
				sGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1623
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1624
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1625
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1626
	elseif (cat[cIndex] == loc("Hog Identity Mode")) or (cat[cIndex] == loc("Team Identity Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1627
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1628
		sGear = GetClosestGear()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1629
		if (sGear ~= nil) and (GetGearType(sGear) == gtHedgehog) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1630
			if (cat[cIndex] == loc("Hog Identity Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1631
				SetHogProfile(sGear, pMode[pIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1632
			else -- set for the whole team
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1633
				SetTeamIdentity(sGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1634
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1635
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1636
			AddCaption(loc("Please click on a hedgehog."),0xffba00ff,capgrpVolume)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1637
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1638
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1639
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1640
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1641
	elseif cat[cIndex] == loc("Health Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1642
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1643
		sGear = GetClosestGear()
11640
4865e715fb49 Hedge Editor: Also allow to set health of barrels and health crates in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11639
diff changeset
  1644
		local gt = GetGearType(sGear)
4865e715fb49 Hedge Editor: Also allow to set health of barrels and health crates in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11639
diff changeset
  1645
		if gt == gtHedgehog or gt == gtExplosives or (gt == gtCase and GetGearPos(sGear) == 0x2) then
11638
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1646
			if pMode[pIndex][2] == "set" then
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1647
				SetHealth(sGear, pMode[pIndex][1])
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1648
			elseif pMode[pIndex][2] == "mod" then
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1649
				local newHealth = math.max(1, GetHealth(sGear) + tonumber(pMode[pIndex][1]))
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1650
				SetHealth(sGear, newHealth)
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1651
			end
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1652
		else
11640
4865e715fb49 Hedge Editor: Also allow to set health of barrels and health crates in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11639
diff changeset
  1653
			AddCaption(loc("Please click on a hedgehog, barrel or health crate."),0xffba00ff,capgrpVolume)
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1654
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1655
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1656
	elseif cat[cIndex] == loc("Sprite Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1657
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1658
		SelectClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1659
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1660
		if closestSpriteID ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1661
			-- we have a sprite selected somewhere
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1662
			--if pMode[pIndex] == "Sprite Selection Mode" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1663
				-- sprite is now selected, good job
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1664
			--elseif pMode[pIndex] == "LandFlag Modification Mode" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1665
			if pMode[pIndex] == loc("LandFlag Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1666
				EraseSprite(placedX[closestSpriteID], placedY[closestSpriteID], placedSprite[closestSpriteID], placedFrame[closestSpriteID], nil, nil, nil, nil, placedLandFlags[closestSpriteID])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1667
				CallPlaceSprite(closestSpriteID)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1668
				closestSpriteID = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1669
				SetVisualGearValues(sSprite, 0, 0, 0, 0, 0, 1, 10000, sprAmGirder, 10000, 0x00000000 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1670
			elseif pMode[pIndex] == loc("Sprite Erasure Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1671
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1672
				EraseClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1673
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1674
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1675
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1676
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1677
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1678
	elseif cat[cIndex] == loc("Tagging Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1679
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1680
		sGear = GetClosestGear()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1681
		if sGear ~= nil then  -- used to be closestGear
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1682
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1683
			if getGearValue(sGear,"tag") == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1684
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1685
				if pMode[pIndex] == loc("Tag Collection Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1686
					if GetGearType(sGear) == gtCase then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1687
						setGearValue(sGear, "tag","collection")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1688
					else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1689
						AddCaption(loc("Please click on a crate."),0xffba00ff,capgrpVolume)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1690
					end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1691
				else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1692
					if pMode[pIndex] == loc("Tag Victory Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1693
						setGearValue(sGear, "tag","victory")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1694
					elseif pMode[pIndex] == loc("Tag Failure Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1695
						setGearValue(sGear, "tag","failure")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1696
					end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1697
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1698
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1699
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1700
				-- remove tag and delete circ
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1701
				setGearValue(sGear, "tag", nil)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1702
				DeleteVisualGear(getGearValue(sGear,"tCirc"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1703
				setGearValue(sGear, "tCirc", nil)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1704
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1705
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1706
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1707
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1708
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1709
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1710
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1711
	--elseif cat[cIndex] == loc("Sprite Testing Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1712
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1713
	--	frameID = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1714
	--	visualSprite = reducedSpriteIDArray[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1715
	--	tempE = AddVisualGear(x, y, vgtStraightShot, 0, true,1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1716
	--	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1717
	--	SetVisualGearValues(tempE, g1, g2, 0, 0, g5, frameID, g7, visualSprite, g9, g10 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1718
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1719
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1720
	elseif cat[cIndex] == loc("Sprite Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1721
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1722
		if superDelete == false then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1723
			placedFrame[placedCount] = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1724
			placedSprite[placedCount] = reducedSpriteIDArray[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1725
			CallPlaceSprite(placedCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1726
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1727
			placedType[placedCount] = "bogus"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1728
			SelectClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1729
			EraseClosestSprite()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1730
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1731
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1732
	elseif cat[cIndex] == loc("Waypoint Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1733
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1734
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1735
		if pMode[pIndex] == loc("Waypoint Deletion Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1736
			EraseClosestWaypoint()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1737
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1738
			PlaceWaypoint(x,y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1739
			placedCount = placedCount - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1740
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1741
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1742
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1743
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1744
	placedCount = placedCount + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1745
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1746
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1747
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1748
-- called when user changes primary selection
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1749
-- either via up/down keys
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1750
-- or selecting girder/airattack
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1751
function RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1752
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1753
	superDelete = false -- fairly new addition
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1754
	landType = 0 --- fairly new addition
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1755
	pIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1756
	pMode = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1757
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1758
	if cat[cIndex] == loc("Girder Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1759
		pIndex = CGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1760
		pMode = {loc("Girder")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1761
	--	pCount = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1762
	elseif cat[cIndex] == loc("Rubber Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1763
		pIndex = CGR
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1764
		pMode = {loc("Rubber")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1765
		landType = lfBouncy -- for now, let's not allow anything else (-- fairly new addition)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1766
	--	pCount = 1???
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1767
	elseif cat[cIndex] == loc("Target Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1768
		pMode = {loc("Standard Target")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1769
	elseif cat[cIndex] == loc("Cleaver Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1770
		pMode = {loc("Standard Cleaver")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1771
	elseif cat[cIndex] == loc("Barrel Placement Mode") then
11639
6733d6076915 More selectable barrel healths in Hedge editor, including default 60
Wuzzy <almikes@aol.com>
parents: 11638
diff changeset
  1772
		pMode = {1,50,60,75,100,120}
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1773
	elseif cat[cIndex] == loc("Health Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1774
		pMode = {25,50,75,100}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1775
	elseif cat[cIndex] == loc("Weapon Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1776
		for i = 1, #atkArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1777
			pMode[i] = atkArray[i][4] --pMode[i] = atkArray[i][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1778
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1779
	elseif cat[cIndex] == loc("Utility Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1780
		for i = 1, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1781
			pMode[i] = utilArray[i][4] --pMode[i] = utilArray[i][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1782
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1783
	elseif cat[cIndex] == loc("Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1784
		pMode = {1,1000,2000,3000,4000,5000,0}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1785
		-- 0 is dud right, or is that nil?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1786
	elseif cat[cIndex] == loc("Sticky Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1787
		pMode = {loc("Normal Sticky Mine")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1788
	elseif cat[cIndex] == loc("Air Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1789
		pMode = {1,1000,2000,3000,4000,5000,0}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1790
	elseif cat[cIndex] == loc("Advanced Repositioning Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1791
		pMode = {loc("Selection Mode"),loc("Placement Mode"), loc("Deletion Mode")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1792
	elseif cat[cIndex] == loc("Tagging Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1793
		pMode = {loc("Tag Victory Mode"),loc("Tag Failure Mode"),loc("Tag Collection Mode")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1794
	elseif cat[cIndex] == loc("Hog Identity Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1795
		pMode = {loc("Soldier"),loc("Grenadier"),loc("Sniper"),loc("Pyro"),loc("Ninja"),loc("Commander"),loc("Chef"),loc("Engineer"),loc("Physicist"),loc("Trapper"),loc("Saint"),loc("Clown")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1796
	elseif cat[cIndex] == loc("Team Identity Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1797
		pMode = {"Clowns","Street Fighters","Cybernetic Empire","Color Squad","Fruit","The Police","The Ninja-Samurai Alliance","Pokemon","The Zoo","The Devs","Mushroom Kingdom","Pirates","Gangsters","Twenty-Twenty","Monsters","The Iron Curtain","The Hospital"}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1798
	elseif cat[cIndex] == loc("Health Modification Mode") then
11638
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1799
		pMode = { {1, "set"}, {25, "set"}, {30, "set"}, {50, "set"}, {75, "set"}, {100, "set"}, {120, "set"}, {150, "set"}, {200, "set"}, {1000, "set"},
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  1800
			{"+1", "mod"}, {"+10", "mod"}, {"+100", "mod"}, {"-1", "mod"}, {"-10", "mod"}, {"-100", "mod"} } 
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1801
	elseif cat[cIndex] == loc("Sprite Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1802
		--pMode = {"Sprite Selection Mode","LandFlag Modification Mode","Sprite Erasure Mode"}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1803
		pMode = {loc("LandFlag Modification Mode"),loc("Sprite Erasure Mode")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1804
	elseif cat[cIndex] == loc("Sprite Testing Mode") or cat[cIndex] == loc("Sprite Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1805
		--for i = 1, #spriteTextArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1806
		--	pMode[i] = spriteTextArray[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1807
		--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1808
		for i = 1, #reducedSpriteTextArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1809
			pMode[i] = reducedSpriteTextArray[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1810
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1811
	elseif cat[cIndex] == loc("Waypoint Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1812
		pMode = {loc("Standard Waypoint"), loc("Waypoint Deletion Mode")}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1813
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1814
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1815
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1816
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1817
------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1818
-- LOADING AND SAVING DATA STUFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1819
------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1820
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1821
-- paste data you have saved previously here
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1822
function LoadLevelData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1823
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1824
	if (mapID == nil) or (mapID == 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1825
		LoadMap(1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1826
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1827
		LoadMap(mapID)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1828
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1829
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1830
	for i = 1, techCount-1 do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1831
		PlaceWaypoint(techX[i],techY[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1832
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1833
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1834
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1835
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1836
-- When you save your level, this function
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1837
-- generates the AddTeam and AddHog function calls for onGameInit()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1838
function GetDataForSavingHogs(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1839
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1840
	--AddTeam(teamname, color, grave, fort, voicepack, flag)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1841
	--AddHog(hogname, botlevel, health, hat)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1842
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1843
	--this is a quick hack so that the human team(s) will always be
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1844
	--given the first move ahead of the AI
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1845
	tempDataList = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1846
	if GetHogLevel(gear) == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1847
		tempDataList = hogDataList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1848
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1849
		tempDataList = AIHogDataList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1850
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1851
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1852
	if GetHogTeamName(gear) ~= lastRecordedTeam then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1853
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1854
		teamCounter = teamCounter + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1855
		if teamCounter == 9 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1856
			teamCounter = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1857
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1858
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1859
		-- try match team colour to the colours recorded in the colour array
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1860
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1861
		tColor = 0x00000000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1862
		for i = 1, #colorArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1863
			if GetClanColor(GetHogClan(gear)) == colorArray[i][1] then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1864
				tColor = colorArray[i][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1865
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1866
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1867
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1868
		-- no match, just give him a default colour from the array, then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1869
		if tColor == 0x00000000 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1870
			tColor = colorArray[teamCounter][2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1871
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1872
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1873
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1874
		-- there is used to be no way to read this data, so
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1875
		-- I was assigning teams a random grave, fort, flag and voice
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1876
		-- but now we should be able to get the real thing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1877
		-- so let's do it if they haven't used one of the preset teams
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1878
		if getGearValue(gear,"grave") == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1879
			tFort = fortArray[1+GetRandom(#fortArray)]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1880
			tGrave = GetHogGrave(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1881
			tFlag = GetHogFlag(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1882
			tVoice = GetHogVoicepack(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1883
			--tGrave = graveArray[1+GetRandom(#graveArray)]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1884
			--tFlag = flagArray[1+GetRandom(#flagArray)]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1885
			--tVoice = voiceArray[1+GetRandom(#voiceArray)]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1886
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1887
			tGrave = getGearValue(gear,"grave")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1888
			tFort = getGearValue(gear,"fort")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1889
			tFlag = getGearValue(gear,"flag")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1890
			tVoice = getGearValue(gear,"voice")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1891
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1892
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1893
		lastRecordedTeam = GetHogTeamName(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1894
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1895
		table.insert(tempDataList, "")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1896
		table.insert	(tempDataList,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1897
						"	AddTeam(\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1898
						GetHogTeamName(gear) .."\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1899
						", " .. "\"" ..tColor .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1900
						--		--", " .. colorArray[teamCounter][2] ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1901
						", " .. "\"" .. tGrave .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1902
						", " .. "\"" .. tFort .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1903
						", " .. "\"" .. tVoice .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1904
						", " .. "\"" .. tFlag .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1905
						")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1906
						)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1907
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1908
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1909
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1910
	table.insert(hhs, gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1911
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1912
	table.insert	(tempDataList,	"	hhs[" .. #hhs .."] = AddHog(\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1913
					GetHogName(gear) .. "\", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1914
					GetHogLevel(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1915
					GetHealth(gear) .. ", \"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1916
					GetHogHat(gear) .. "\"" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1917
					")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1918
			)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1919
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1920
	table.insert	(tempDataList,"	SetGearPosition(hhs[" .. #hhs .. "], " .. GetX(gear) .. ", " .. GetY(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1921
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1922
	if getGearValue(gear,"tag") ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1923
		table.insert	(tempDataList,"	setGearValue(hhs[" .. #hhs .. "], \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1924
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1925
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1926
	-- save the ammo values for each gear, we will call this later
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1927
	-- when we want to output it to console
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1928
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1929
	if getGearValue(gear,"ranking") ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1930
		table.insert(shoppaPointList, "AddShoppaPoint(" .. GetX(gear) .. ", " .. GetY(gear) .. ", " .. getGearValue(gear,"ranking") .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1931
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1932
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1933
	for i = 1, #atkArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1934
		setGearValue(gear, atkArray[i][1], GetAmmoCount(gear, atkArray[i][1]))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1935
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1936
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1937
	for i = 1, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1938
		setGearValue(gear, utilArray[i][1], GetAmmoCount(gear, utilArray[i][1]))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1939
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1940
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1941
	if GetHogLevel(gear) == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1942
		hogDataList = tempDataList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1943
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1944
		AIHogDataList = tempDataList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1945
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1946
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1947
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1948
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1949
-- output hog and team data to the console
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1950
function SaveHogData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1951
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1952
	runOnHogs(GetDataForSavingHogs)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1953
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1954
	WriteLnToConsole("	------ TEAM LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1955
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1956
	for i = 1, #hogDataList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1957
		WriteLnToConsole(hogDataList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1958
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1959
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1960
	for i = 1, #AIHogDataList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1961
		WriteLnToConsole(AIHogDataList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1962
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1963
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1964
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1965
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1966
	if #shoppaPointList > 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1967
		WriteLnToConsole("	------ SHOPPA POINT LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1968
		for i = 1, #shoppaPointList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1969
			WriteLnToConsole(shoppaPointList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1970
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1971
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1972
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1973
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1974
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1975
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1976
-- generates an onGameInit() template with scheme data, team adds, and hogs
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1977
function SaveConfigData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1978
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1979
	WriteLnToConsole("function onGameInit()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1980
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1981
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1982
	temp = "	EnableGameFlags(gfDisableWind"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1983
	for i = 1, #gameFlagList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1984
		if gameFlagList[i][2] == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1985
			temp = temp .. ", ".. gameFlagList[i][1]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1986
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1987
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1988
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1989
	WriteLnToConsole("	ClearGameFlags()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1990
	WriteLnToConsole(temp .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1991
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1992
	WriteLnToConsole("	Map = \"" .. Map .. "\"")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1993
	WriteLnToConsole("	Theme = \"" .. "Nature" .. "\"")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1994
	WriteLnToConsole("	TurnTime = " .. TurnTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1995
	WriteLnToConsole("	Explosives = " .. Explosives)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1996
	WriteLnToConsole("	MinesNum = " .. MinesNum)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1997
	WriteLnToConsole("	CaseFreq = " .. CaseFreq)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1998
	WriteLnToConsole("	Delay = " .. Delay)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  1999
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2000
	WriteLnToConsole("	HealthCaseProb = " .. HealthCaseProb)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2001
	WriteLnToConsole("	HealthCaseAmount = " .. HealthCaseAmount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2002
	WriteLnToConsole("	DamagePercent = " .. DamagePercent)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2003
	WriteLnToConsole("	MinesTime = " .. MinesTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2004
	WriteLnToConsole("	MineDudPercent  = " .. MineDudPercent)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2005
	WriteLnToConsole("	SuddenDeathTurns = " .. SuddenDeathTurns)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2006
	WriteLnToConsole("	WaterRise = " .. WaterRise)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2007
	WriteLnToConsole("	HealthDecrease = " .. HealthDecrease)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2008
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2009
	--WriteLnToConsole("	Ready = " .. Ready)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2010
	--WriteLnToConsole("	AirMinesNum = " .. AirMinesNum)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2011
	--WriteLnToConsole("	ScriptParam = " .. ScriptParam)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2012
	--WriteLnToConsole("	GetAwayTime = " .. GetAwayTime)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2013
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2014
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2015
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2016
	SaveHogData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2017
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2018
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2019
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2020
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2021
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2022
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2023
-- output gear data as special points to be placed in a converted HWMAP, readable by InterpretPoints()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2024
function ConvertGearDataToHWPText()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2025
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2026
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2027
	WriteLnToConsole("--BEGIN HWMAP CONVERTER POINTS--")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2028
	WriteLnToConsole("-- You can paste this data into the HWMAP converter if needed.")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2029
	WriteLnToConsole("--[[")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2030
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2031
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2032
	for i = 1, #hFlagList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2033
		WriteLnToConsole(hFlagList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2034
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2035
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2036
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2037
	WriteLnToConsole("]]")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2038
	WriteLnToConsole("--END HWMAP CONVERTER POINTS--")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2039
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2040
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2041
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2042
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2043
-- sigh
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2044
-- gradually got more bloated with the addition of hwpoint tracking and
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2045
-- distinction betweeen the need to track victory/win conditions or not
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2046
function GetDataForGearSaving(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2047
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2048
	temp = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2049
	specialFlag = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2050
	arrayList = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2051
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2052
	if GetGearType(gear) == gtMine then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2053
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2054
		if (getGearValue(gear, "tag") ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2055
			temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2056
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2057
				GetY(gear) .. ", gtMine, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2058
			table.insert(mineList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2059
			table.insert(mineList, "	SetTimer(tempG, " .. GetTimer(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2060
			table.insert(mineList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2061
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2062
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2063
			temp = 	"	SetTimer(" .. "AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2064
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2065
				GetY(gear) .. ", gtMine, 0, 0, 0, 0)" .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2066
				GetTimer(gear) ..")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2067
			table.insert(mineList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2068
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2069
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2070
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2071
		if 		GetTimer(gear) == 1 then specialFlag = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2072
		elseif	GetTimer(gear) == 1000 then specialFlag = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2073
		elseif	GetTimer(gear) == 2000 then specialFlag = 3
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2074
		elseif	GetTimer(gear) == 3000 then specialFlag = 4
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2075
		elseif	GetTimer(gear) == 4000 then specialFlag = 5
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2076
		elseif	GetTimer(gear) == 5000 then specialFlag = 6
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2077
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2078
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2079
	elseif GetGearType(gear) == gtSMine then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2080
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2081
		arrayList = sMineList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2082
		temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2083
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2084
				GetY(gear) .. ", gtSMine, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2085
		table.insert(sMineList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2086
		specialFlag = 7
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2087
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2088
	elseif GetGearType(gear) == gtAirMine then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2089
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2090
		if (getGearValue(gear, "tag") ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2091
			temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2092
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2093
				GetY(gear) .. ", gtAirMine, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2094
			table.insert(airMineList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2095
			table.insert(airMineList, "	SetTimer(tempG, " .. GetTimer(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2096
			table.insert(airMineList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2097
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2098
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2099
			temp = 	"	SetTimer(" .. "AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2100
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2101
				GetY(gear) .. ", gtAirMine, 0, 0, 0, 0)" .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2102
				GetTimer(gear) ..")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2103
			table.insert(airMineList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2104
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2105
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2106
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2107
		table.insert(previewDataList, "	PreviewPlacedGear(" .. GetX(gear) ..", " ..	GetY(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2108
		specialFlag = 8
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2109
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2110
	elseif GetGearType(gear) == gtExplosives then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2111
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2112
		if (getGearValue(gear, "tag") ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2113
			temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2114
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2115
				GetY(gear) .. ", gtExplosives, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2116
			table.insert(explosivesList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2117
			table.insert(explosivesList, "	SetHealth(tempG, " .. GetHealth(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2118
			table.insert(explosivesList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2119
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2120
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2121
			temp = 	"	SetHealth(" .. "AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2122
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2123
				GetY(gear) .. ", gtExplosives, 0, 0, 0, 0)" .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2124
				GetHealth(gear) ..")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2125
			table.insert(explosivesList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2126
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2127
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2128
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2129
		table.insert(previewDataList, "	PreviewPlacedGear(" .. GetX(gear) ..", " ..	GetY(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2130
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2131
		if 		GetHealth(gear) == 1 then specialFlag = 15
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2132
		elseif	GetHealth(gear) == 25 then specialFlag = 16
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2133
		elseif	GetHealth(gear) == 50 then specialFlag = 17
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2134
		elseif	GetHealth(gear) == 75 then specialFlag = 18
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2135
		elseif	GetHealth(gear) == 100 then specialFlag = 19
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2136
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2137
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2138
	elseif GetGearType(gear) == gtTarget then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2139
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2140
		arrayList = targetList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2141
		temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2142
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2143
				GetY(gear) .. ", gtTarget, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2144
		table.insert(targetList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2145
		specialFlag = 14
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2146
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2147
	elseif GetGearType(gear) == gtKnife then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2148
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2149
		arrayList = knifeList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2150
		temp = 	"	tempG = AddGear(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2151
				GetX(gear) .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2152
				GetY(gear) .. ", gtKnife, 0, 0, 0, 0)"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2153
		table.insert(knifeList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2154
		specialFlag = 13
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2155
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2156
	elseif GetGearType(gear) == gtCase then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2157
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2158
		table.insert(previewDataList, "	PreviewPlacedGear(" .. GetX(gear) ..", " ..	GetY(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2159
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2160
		if (GetHealth(gear) ~= nil) and (GetHealth(gear) ~= 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2161
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2162
			if (getGearValue(gear, "tag") ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2163
				temp = 	"	tempG = SpawnHealthCrate(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2164
					GetX(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2165
					GetY(gear) ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2166
					")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2167
				table.insert(healthCrateList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2168
				table.insert(healthCrateList, "	SetHealth(tempG, " .. GetHealth(gear) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2169
				table.insert(healthCrateList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2170
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2171
				temp = 	"	SetHealth(SpawnHealthCrate(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2172
					GetX(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2173
					GetY(gear) ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2174
					"), " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2175
					GetHealth(gear) ..")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2176
				table.insert(healthCrateList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2177
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2178
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2179
			if 		GetHealth(gear) == 25 then specialFlag = 9
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2180
			elseif	GetHealth(gear) == 50 then specialFlag = 10
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2181
			elseif	GetHealth(gear) == 75 then specialFlag = 11
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2182
			elseif	GetHealth(gear) == 100 then specialFlag = 12
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2183
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2184
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2185
		elseif getGearValue(gear,"caseType") == "ammo" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2186
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2187
			arrayList = wepCrateList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2188
			temp = 	"	tempG = SpawnAmmoCrate(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2189
					GetX(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2190
					GetY(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2191
					getGearValue(gear,"contents") ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2192
					")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2193
			table.insert(wepCrateList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2194
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2195
			tempV = getGearValue(gear,"contents")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2196
			for i = 1, #atkArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2197
				if tempV == atkArray[i][2] then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2198
					specialFlag = i + 19
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2199
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2200
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2201
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2202
			--dammit, we probably need two more entries if we want to allow editing of existing maps
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2203
			table.insert(wepCrateList, "	setGearValue(tempG, \"caseType\", \"" .. getGearValue(gear,"caseType") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2204
			table.insert(wepCrateList, "	setGearValue(tempG, \"contents\", \"" .. getGearValue(gear,"contents") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2205
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2206
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2207
		elseif getGearValue(gear,"caseType") == "util" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2208
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2209
			arrayList = utilCrateList
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2210
			temp = 	"	tempG = SpawnUtilityCrate(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2211
					GetX(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2212
					GetY(gear) ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2213
					getGearValue(gear,"contents") ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2214
					")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2215
			table.insert(utilCrateList, temp)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2216
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2217
			tempV = getGearValue(gear,"contents")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2218
			for i = 1, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2219
				if tempV == utilArray[i][2] then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2220
					specialFlag = i + 19 + #atkArray
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2221
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2222
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2223
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2224
			--dammit, we probably need two more entries if we want to allow editing of existing maps
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2225
			table.insert(utilCrateList, "	setGearValue(tempG, \"caseType\", \"" .. getGearValue(gear,"caseType") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2226
			table.insert(utilCrateList, "	setGearValue(tempG, \"contents\", \"" .. getGearValue(gear,"contents") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2227
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2228
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2229
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2230
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2231
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2232
	-- add tracking of simple win/lose for simpler gears that have a tempG = listed above
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2233
	if (getGearValue(gear, "tag") ~= nil) and (arrayList ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2234
		table.insert(arrayList, "	setGearValue(tempG, \"tag\", \"" .. getGearValue(gear,"tag") .. "\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2235
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2236
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2237
	-- this creates a big, messy list of special flags for use in hwmaps
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2238
	if specialFlag ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2239
		table.insert(hFlagList, "	" .. GetX(gear) .. " " .. GetY(gear) .. " " .. specialFlag)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2240
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2241
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2242
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2243
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2244
-- generate a title and list all the gears if there is at least 1 of them in the list
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2245
function AppendGearList(gearList, consoleLine)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2246
	if #gearList > 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2247
		WriteLnToConsole(consoleLine)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2248
		for i = 1, #gearList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2249
			WriteLnToConsole(gearList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2250
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2251
		WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2252
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2253
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2254
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2255
-- new attempt at doing shit a bit cleaner:
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2256
-- it may be a bit verbose, but this should generate a comprehensive, human-readable
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2257
-- list of gears, broken up into sections and output it to the console
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2258
function SaveGearData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2259
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2260
	runOnGears(GetDataForGearSaving)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2261
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2262
	AppendGearList(healthCrateList, "	------ HEALTH CRATE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2263
	AppendGearList(wepCrateList, "	------ AMMO CRATE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2264
	AppendGearList(utilCrateList, "	------ UTILITY CRATE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2265
	AppendGearList(explosivesList, "	------ BARREL LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2266
	AppendGearList(mineList, "	------ MINE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2267
	AppendGearList(sMineList, "	------ STICKY MINE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2268
	AppendGearList(airMineList, "	------ AIR MINE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2269
	AppendGearList(targetList, "	------ TARGET LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2270
	AppendGearList(knifeList, "	------ CLEAVER LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2271
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2272
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2273
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2274
function DoAmmoLoop(i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2275
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2276
	for x = 1, #atkArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2277
		if getGearValue(hhs[i],atkArray[x][1]) ~= 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2278
			WriteLnToConsole("	AddAmmo(hhs[" .. i .. "], " .. atkArray[x][2] .. ", " .. getGearValue(hhs[i],atkArray[x][1]) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2279
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2280
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2281
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2282
	for x = 1, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2283
		if getGearValue(hhs[i],utilArray[x][1]) ~= 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2284
			WriteLnToConsole("	AddAmmo(hhs[" .. i .. "], " .. utilArray[x][2] .. ", " .. getGearValue(hhs[i],utilArray[x][1]) .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2285
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2286
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2287
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2288
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2289
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2290
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2291
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2292
-- this is called when a tagged gear is deleted during a mission
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2293
-- it determines if the game is ready to conclude in victory/defeat
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2294
function CheckForConclusion(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2295
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2296
	-- failure gears must always all be protected, so if any of them are destroyed the player loses
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2297
	if getGearValue(gear,"tag") == "failure" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2298
		EndGameIn("failure")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2299
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2300
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2301
		-- the presence of other tagged gears means that the goal of this mission is not
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2302
		-- simply to kill every hedgehog. Thus, we need to count the remaining tagged objects
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2303
		-- to see how close we are to completing the mission successfully.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2304
		victoryObj = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2305
		failObj = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2306
		collectObj = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2307
		runOnGears(CheckForConditions)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2308
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2309
		if GetGearType(gear) ~= gtCase then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2310
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2311
			-- non-crates can only be tagged as victory or failure, and as this wasn't tagged
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2312
			-- "failure" in our earlier check, this must be a victory tagged gear. Let's adust
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2313
			-- the number of objects accordingly as it's in the process of being destroyed.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2314
			victoryObj = victoryObj - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2315
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2316
			-- if there are no objectives left to complete, end the game in victory
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2317
			if (victoryObj == 0) and (collectObj == 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2318
				EndGameIn("victory")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2319
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2320
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2321
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2322
			-- this crate was deleted, but was it collected or destroyed, and how does that match
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2323
			-- the goals of our mission?
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2324
			if (GetGearMessage(gear) == 256) and (getGearValue(gear,"tag") == "collection") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2325
				if GetHogLevel(CurrentHedgehog) == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2326
					-- the enemy stole our crate
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2327
					EndGameIn("failure")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2328
				else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2329
					collectObj = collectObj - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2330
					if (victoryObj == 0) and (collectObj == 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2331
						EndGameIn("victory")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2332
					end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2333
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2334
			elseif (GetGearMessage(gear) == 0) and (getGearValue(gear,"tag") == "victory") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2335
				victoryObj = victoryObj - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2336
				if (victoryObj == 0) and (collectObj == 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2337
					EndGameIn("victory")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2338
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2339
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2340
				-- unfortunately, we messed up our mission.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2341
				EndGameIn("failure")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2342
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2343
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2344
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2345
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2346
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2347
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2348
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2349
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2350
---------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2351
-- THE BIG ONE
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2352
---------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2353
-- saving process starts here
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2354
-- saves all level data to logs/game0.log and generates a simple script template
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2355
function SaveLevelData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2356
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2357
	WriteLnToConsole("------ BEGIN SCRIPT ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2358
	WriteLnToConsole("-- Copy and Paste this text into an empty text file, and save it as")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2359
	WriteLnToConsole("-- YOURTITLEHERE.lua, in your Data/Missions/Training/ folder.")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2360
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2361
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2362
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2363
	WriteLnToConsole("HedgewarsScriptLoad(\"/Scripts/Locale.lua\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2364
	WriteLnToConsole("HedgewarsScriptLoad(\"/Scripts/Tracker.lua\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2365
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2366
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2367
	WriteLnToConsole("local hhs = {}")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2368
	--WriteLnToConsole("local ufoGear = nil")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2369
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2370
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2371
	WriteLnToConsole("local wepArray = {")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2372
	WriteLnToConsole("		amBazooka, amBee, amMortar, amDrill, amSnowball,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2373
	WriteLnToConsole("		amGrenade, amClusterBomb, amMolotov, amWatermelon, amHellishBomb, amGasBomb,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2374
	WriteLnToConsole("		amShotgun, amDEagle, amSniperRifle, amSineGun, amLandGun, amIceGun,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2375
	WriteLnToConsole("		amFirePunch, amWhip, amBaseballBat, amKamikaze, amSeduction, amHammer,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2376
	WriteLnToConsole("		amMine, amDynamite, amCake, amBallgun, amRCPlane, amSMine, amAirMine,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2377
	WriteLnToConsole("		amAirAttack, amMineStrike, amDrillStrike, amNapalm, amPiano, amBirdy,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2378
	WriteLnToConsole("		amBlowTorch, amPickHammer, amGirder, amRubber, amPortalGun,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2379
	WriteLnToConsole("		amRope, amParachute, amTeleport, amJetpack,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2380
	WriteLnToConsole("		amInvulnerable, amLaserSight, amVampiric,")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2381
	WriteLnToConsole("		amLowGravity, amExtraDamage, amExtraTime, amResurrector, amTardis, amSwitch")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2382
	WriteLnToConsole("	}")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2383
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2384
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2385
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2386
	SaveConfigData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2387
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2388
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2389
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2390
	WriteLnToConsole("function LoadHogWeapons()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2391
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2392
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2393
	if band(GameFlags, gfPerHogAmmo) ~= 0 then -- per hog ammo
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2394
		for i = 1, #hhs do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2395
			DoAmmoLoop(i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2396
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2397
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2398
	else	-- team-based ammo
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2399
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2400
		teamCounter = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2401
		lastRecordedTeam = ""
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2402
		for i = 1, #hhs do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2403
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2404
			if GetHogTeamName(hhs[i]) ~= lastRecordedTeam then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2405
				lastRecordedTeam = GetHogTeamName(hhs[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2406
				teamCounter = teamCounter + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2407
				if teamCounter == 9 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2408
					teamCounter = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2409
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2410
				DoAmmoLoop(i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2411
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2412
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2413
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2414
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2415
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2416
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2417
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2418
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2419
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2420
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2421
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2422
	WriteLnToConsole("function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2423
	WriteLnToConsole("	PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2424
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2425
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2426
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2427
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2428
	WriteLnToConsole("function LoadGearData()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2429
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2430
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2431
	WriteLnToConsole("	--BEGIN CORE DATA--")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2432
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2433
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2434
	WriteLnToConsole("	------ PORTAL DISTANCE and UFO FUEL ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2435
	WriteLnToConsole("	ufoFuel = " .. ufoFuel)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2436
	WriteLnToConsole("	portalDistance = " .. portalDistance*5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2437
	table.insert(hFlagList, "	" .. portalDistance*5 .. " " .. ufoFuel .. " " .. 98)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2438
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2439
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2440
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2441
		if placedType[i] == loc("Waypoint Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2442
			table.insert(waypointList,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2443
			"	AddWayPoint(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2444
				placedX[i] ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2445
				placedY[i] ..")"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2446
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2447
			table.insert(hFlagList, "	" .. placedX[i] .. " " .. placedY[i] .. " " .. "0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2448
			table.insert(previewDataList, "	PreviewWayPoint(" .. placedX[i] ..", " ..	placedY[i] .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2449
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2450
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2451
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2452
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2453
		if placedType[i] == loc("Girder Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2454
			table.insert(girderList,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2455
			"	LoadSprite(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2456
				placedX[i] ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2457
				placedY[i] ..", sprAmGirder, " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2458
				placedFrame[i] ..			-- the rotation/frame
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2459
				", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2460
				placedTint[i] ..", " .. -- "nil, " .. -- color
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2461
				"nil, nil, nil, " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2462
				placedLandFlags[i] .. ")" --the landType
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2463
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2464
			table.insert(hFlagList, "	" .. placedX[i] .. " " .. placedY[i] .. " " .. placedHWMapFlag[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2465
			table.insert(previewDataList, "	PreviewGirder(" .. placedX[i] ..", " ..	placedY[i] .. ", " .. placedFrame[i] .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2466
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2467
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2468
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2469
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2470
		if placedType[i] == loc("Rubber Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2471
			table.insert(rubberList,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2472
				"	LoadSprite(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2473
				placedX[i] ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2474
				placedY[i] ..", sprAmRubber, " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2475
				placedFrame[i] ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2476
				", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2477
				placedTint[i] ..", " .. -- "nil, " .. -- color
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2478
				"nil, nil, nil, " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2479
				"lfBouncy)" --placedLandFlags[i] .. ")" --the landType
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2480
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2481
			table.insert(hFlagList, "	" .. placedX[i] .. " " .. placedY[i] .. " " .. placedHWMapFlag[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2482
			table.insert(previewDataList, "	PreviewRubber(" .. placedX[i] ..", " ..	placedY[i] .. ", " .. placedFrame[i] .. ")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2483
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2484
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2485
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2486
	for i = 0, (placedCount-1) do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2487
		if placedType[i] == loc("Sprite Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2488
				table.insert(spriteList,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2489
				"	LoadSprite(" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2490
				placedX[i] ..", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2491
				placedY[i] ..", " .. placedSprite[i] .. ", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2492
				placedFrame[i] .. -- I think this is the frame, can't remember
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2493
				", " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2494
				placedTint[i] ..", " .. -- "nil, " .. -- color
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2495
				"nil, nil, nil, " ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2496
				placedLandFlags[i] .. ")" --the landType
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2497
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2498
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2499
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2500
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2501
	AppendGearList(waypointList, "	------ WAYPOINT LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2502
	AppendGearList(girderList, "	------ GIRDER LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2503
	AppendGearList(rubberList, "	------ RUBBER LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2504
	AppendGearList(spriteList, "	------ SPRITE LIST ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2505
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2506
	SaveGearData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2507
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2508
	WriteLnToConsole("	--END CORE DATA--")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2509
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2510
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2511
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2512
	WriteLnToConsole("	LoadHogWeapons()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2513
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2514
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2515
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2516
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2517
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2518
	WriteLnToConsole("function onGameStart()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2519
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2520
	WriteLnToConsole("	LoadGearData()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2521
	WriteLnToConsole("	DetermineMissionGoal()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2522
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2523
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2524
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2525
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2526
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2527
	WriteLnToConsole("function onNewTurn()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2528
	WriteLnToConsole("	--insert code according to taste")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2529
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2530
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2531
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2532
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2533
	WriteLnToConsole("function onGameTick()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2534
	WriteLnToConsole("	runOnGears(UpdateTagCircles)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2535
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2536
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2537
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2538
	WriteLnToConsole("function UpdateTagCircles(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2539
	WriteLnToConsole("	if getGearValue(gear,\"tag\") ~= nil then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2540
	WriteLnToConsole("		if getGearValue(gear,\"tCirc\") == nil then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2541
	WriteLnToConsole("			setGearValue(gear, \"tCirc\",AddVisualGear(0,0,vgtCircle,0,true))")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2542
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2543
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2544
	WriteLnToConsole("		if getGearValue(gear,\"tag\") == \"victory\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2545
	WriteLnToConsole("			SetVisualGearValues(getGearValue(gear,\"tCirc\"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0xff0000ff)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2546
	WriteLnToConsole("		elseif getGearValue(gear,\"tag\") == \"failure\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2547
	WriteLnToConsole("			SetVisualGearValues(getGearValue(gear,\"tCirc\"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x00ff00ff)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2548
	WriteLnToConsole("		elseif getGearValue(gear,\"tag\") == \"collection\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2549
	WriteLnToConsole("			SetVisualGearValues(getGearValue(gear,\"tCirc\"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x0000ffff)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2550
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2551
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2552
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2553
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2554
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2555
	WriteLnToConsole("function CheckForConditions(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2556
	WriteLnToConsole("	if getGearValue(gear,\"tag\") == \"victory\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2557
	WriteLnToConsole("		victoryObj = victoryObj +1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2558
	WriteLnToConsole("	elseif getGearValue(gear,\"tag\") == \"failure\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2559
	WriteLnToConsole("		failObj = failObj +1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2560
	WriteLnToConsole("	elseif getGearValue(gear,\"tag\") == \"collection\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2561
	WriteLnToConsole("		collectObj = collectObj +1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2562
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2563
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2564
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2565
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2566
	WriteLnToConsole("function CheckForConclusion(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2567
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2568
	WriteLnToConsole("	if getGearValue(gear,\"tag\") == \"failure\" then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2569
	WriteLnToConsole("		EndGameIn(\"failure\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2570
	WriteLnToConsole("	else ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2571
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2572
	WriteLnToConsole("		victoryObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2573
	WriteLnToConsole("		failObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2574
	WriteLnToConsole("		collectObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2575
	WriteLnToConsole("		runOnGears(CheckForConditions)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2576
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2577
	WriteLnToConsole("		if GetGearType(gear) ~= gtCase then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2578
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2579
	WriteLnToConsole("			victoryObj = victoryObj - 1 ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2580
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2581
	WriteLnToConsole("			if (victoryObj == 0) and (collectObj == 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2582
	WriteLnToConsole("				EndGameIn(\"victory\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2583
	WriteLnToConsole("			end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2584
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2585
	WriteLnToConsole("		else")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2586
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2587
	WriteLnToConsole("			if (GetGearMessage(gear) == 256) and (getGearValue(gear,\"tag\") == \"collection\") then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2588
	WriteLnToConsole("				if GetHogLevel(CurrentHedgehog) ~= 0 then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2589
	WriteLnToConsole("					EndGameIn(\"failure\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2590
	WriteLnToConsole("				else")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2591
	WriteLnToConsole("					collectObj = collectObj - 1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2592
	WriteLnToConsole("					if (victoryObj == 0) and (collectObj == 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2593
	WriteLnToConsole("						EndGameIn(\"victory\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2594
	WriteLnToConsole("					end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2595
	WriteLnToConsole("				end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2596
	WriteLnToConsole("			elseif (GetGearMessage(gear) == 0) and (getGearValue(gear,\"tag\") == \"victory\") then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2597
	WriteLnToConsole("				victoryObj = victoryObj - 1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2598
	WriteLnToConsole("				if (victoryObj == 0) and (collectObj == 0) then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2599
	WriteLnToConsole("					EndGameIn(\"victory\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2600
	WriteLnToConsole("				end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2601
	WriteLnToConsole("			else")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2602
	WriteLnToConsole("				EndGameIn(\"failure\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2603
	WriteLnToConsole("			end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2604
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2605
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2606
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2607
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2608
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2609
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2610
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2611
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2612
	WriteLnToConsole("function DetermineMissionGoal()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2613
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2614
	WriteLnToConsole("	victoryObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2615
	WriteLnToConsole("	failObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2616
	WriteLnToConsole("	collectObj = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2617
	WriteLnToConsole("	vComment = \"\"")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2618
	WriteLnToConsole("	fComment = \"\"")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2619
	WriteLnToConsole("	collectComment = \"\"")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2620
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2621
	WriteLnToConsole("	runOnGears(CheckForConditions)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2622
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2623
	WriteLnToConsole("	if victoryObj > 0 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2624
	WriteLnToConsole("		if victoryObj == 1 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2625
	WriteLnToConsole("			vComment = loc(\"Destroy the red target\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2626
	WriteLnToConsole("		else ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2627
	WriteLnToConsole("			vComment = loc(\"Destroy the red targets\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2628
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2629
--	WriteLnToConsole("	else")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2630
--	WriteLnToConsole("		vComment = loc(\"Destroy the enemy.\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2631
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2632
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2633
	WriteLnToConsole("	if collectObj > 0 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2634
	WriteLnToConsole("		if collectObj == 1 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2635
	WriteLnToConsole("			collectComment = loc(\"Collect the blue target\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2636
	WriteLnToConsole("		else ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2637
	WriteLnToConsole("			collectComment = loc(\"Collect all the blue targets\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2638
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2639
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2640
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2641
	WriteLnToConsole("	if (collectObj == 0) and (victoryObj == 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2642
	WriteLnToConsole("		vComment = loc(\"Destroy the enemy.\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2643
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2644
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2645
	WriteLnToConsole("	if failObj > 0 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2646
	WriteLnToConsole("		if failObj == 1 then ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2647
	WriteLnToConsole("			fComment = loc(\"The green target must survive\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2648
	WriteLnToConsole("		else ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2649
	WriteLnToConsole("			fComment = loc(\"The green targets must survive\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2650
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2651
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2652
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2653
	WriteLnToConsole("	ShowMission(loc(\"User Challenge\"), loc(\"Mission Goals\") .. \":\", collectComment .. \"|\" .. vComment .. \"|\" .. fComment, 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2654
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2655
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2656
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2657
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2658
	WriteLnToConsole("function isATrackedGear(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2659
	WriteLnToConsole("	if 	(GetGearType(gear) == gtHedgehog) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2660
	WriteLnToConsole("		(GetGearType(gear) == gtExplosives) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2661
	WriteLnToConsole("		(GetGearType(gear) == gtMine) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2662
	WriteLnToConsole("		(GetGearType(gear) == gtSMine) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2663
	WriteLnToConsole("		(GetGearType(gear) == gtAirMine) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2664
	WriteLnToConsole("		(GetGearType(gear) == gtTarget) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2665
	WriteLnToConsole("		(GetGearType(gear) == gtKnife) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2666
	WriteLnToConsole("		(GetGearType(gear) == gtPortal) or")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2667
	WriteLnToConsole("		(GetGearType(gear) == gtCase)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2668
	WriteLnToConsole("	then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2669
	WriteLnToConsole("		return(true)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2670
	WriteLnToConsole("	else")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2671
	WriteLnToConsole("		return(false)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2672
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2673
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2674
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2675
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2676
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2677
	WriteLnToConsole("function onGearAdd(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2678
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2679
	--WriteLnToConsole("	if GetGearType(gear) == gtJetpack then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2680
	--WriteLnToConsole("		ufoGear = gear")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2681
	--WriteLnToConsole("		if (ufoFuel ~= 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2682
	--WriteLnToConsole("			SetHealth(ufoGear, ufoFuel)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2683
	--WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2684
	--WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2685
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2686
	WriteLnToConsole("	if isATrackedGear(gear) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2687
	WriteLnToConsole("		trackGear(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2688
	--WriteLnToConsole("		if GetGearType(gear) == gtPortal then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2689
	--WriteLnToConsole("			setGearValue(gear,\"life\",portalDistance)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2690
	--WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2691
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2692
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2693
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2694
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2695
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2696
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2697
	WriteLnToConsole("function EndGameIn(c)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2698
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2699
	WriteLnToConsole("	teamCounter = 0")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2700
	WriteLnToConsole("	lastRecordedTeam = \"\" ")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2701
	WriteLnToConsole("	for i = 1, #hhs do")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2702
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2703
	WriteLnToConsole("		if GetHogTeamName(hhs[i]) ~= lastRecordedTeam then --er, is this okay without nill checks?")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2704
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2705
	WriteLnToConsole("			lastRecordedTeam = GetHogTeamName(hhs[i])")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2706
	WriteLnToConsole("			teamCounter = teamCounter + 1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2707
	WriteLnToConsole("			if teamCounter == 9 then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2708
	WriteLnToConsole("				teamCounter = 1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2709
	WriteLnToConsole("			end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2710
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2711
	WriteLnToConsole("			if (c ==  \"victory\") and (GetHogLevel(hhs[i]) ~= 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2712
	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2713
	WriteLnToConsole("				ShowMission(loc(\"User Challenge\"), loc(\"MISSION SUCCESSFUL\"), loc(\"Congratulations!\"), 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2714
	WriteLnToConsole("			elseif (c ==  \"failure\") and (GetHogLevel(hhs[i]) == 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2715
	WriteLnToConsole("				DismissTeam(GetHogTeamName(hhs[i]))")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2716
	WriteLnToConsole("				ShowMission(loc(\"User Challenge\"), loc(\"MISSION FAILED\"), loc(\"Oh no! Just try again!\"), -amSkip, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2717
	WriteLnToConsole("			elseif (c ==  \"victory\") and (GetHogLevel(hhs[i]) == 0) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2718
	WriteLnToConsole("				PlaySound(sndVictory,hhs[i]) -- check if we actually need this")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2719
	WriteLnToConsole("			end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2720
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2721
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2722
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2723
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2724
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2725
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2726
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2727
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2728
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2729
	WriteLnToConsole("function onGearDelete(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2730
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2731
	WriteLnToConsole("	--insert code according to taste")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2732
	--WriteLnToConsole("	if GetGearType(gear) == gtJetpack then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2733
	--WriteLnToConsole("		ufoGear = nil")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2734
	--WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2735
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2736
	WriteLnToConsole("	if isATrackedGear(gear) then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2737
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2738
	WriteLnToConsole("		if getGearValue(gear,\"tag\") ~= nil then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2739
	WriteLnToConsole("			CheckForConclusion(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2740
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2741
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2742
	--WriteLnToConsole("		if getGearValue(gear,\"tag\") == \"failure\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2743
	--WriteLnToConsole("			EndGameIn(\"failure\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2744
	--WriteLnToConsole("		elseif getGearValue(gear,\"tag\") == \"victory\" then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2745
	--WriteLnToConsole("			EndGameIn(\"victory\")")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2746
	--WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2747
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2748
	WriteLnToConsole("		if getGearValue(gear, \"tCirc\") ~= nil then")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2749
	WriteLnToConsole("			DeleteVisualGear(getGearValue(gear, \"tCirc\"))")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2750
	WriteLnToConsole("		end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2751
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2752
	WriteLnToConsole("		trackDeletion(gear)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2753
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2754
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2755
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2756
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2757
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2758
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2759
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2760
	WriteLnToConsole("--enable and/or alter code according to taste")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2761
	WriteLnToConsole("function onAmmoStoreInit()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2762
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2763
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2764
	WriteLnToConsole("	for i = 1, #wepArray do")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2765
	WriteLnToConsole("		SetAmmo(wepArray[i], 0, 0, 0, 1)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2766
	WriteLnToConsole("	end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2767
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2768
	--WriteLnToConsole("	SetAmmo(amBazooka, 2, 0, 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2769
	--WriteLnToConsole("	SetAmmo(amGrenade, 1, 0, 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2770
	--WriteLnToConsole("	SetAmmo(amRope, 9, 0, 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2771
	WriteLnToConsole("	SetAmmo(amSkip, 9, 0, 0, 0)")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2772
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2773
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2774
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2775
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2776
	WriteLnToConsole("------ END GENERATED MISSION ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2777
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2778
	-- at this point, generation for the missions/training output is intended to stop
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2779
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2780
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2781
	WriteLnToConsole("function GeneratePreviewData()")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2782
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2783
	for i = 1, #previewDataList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2784
		WriteLnToConsole(previewDataList[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2785
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2786
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2787
	WriteLnToConsole("end")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2788
	WriteLnToConsole("")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2789
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2790
	ConvertGearDataToHWPText()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2791
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2792
	WriteLnToConsole("------ END GENERATED SCRIPT ------")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2793
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2794
	AddCaption(loc("Level Data Saved!"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2795
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2796
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2797
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2798
----------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2799
-- some special effects handling
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2800
----------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2801
function SmokePuff(x,y,c)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2802
	tempE = AddVisualGear(x, y, vgtSmoke, 0, false)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2803
	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2804
	SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, 1, g9, c )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2805
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2806
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2807
function HandleGearBasedRankingEffects(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2808
	if getGearValue(gear, "ranking") ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2809
		SmokePuff(GetX(gear), GetY(gear),GetRankedColour(getGearValue(gear, "ranking")))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2810
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2811
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2812
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2813
function HandleRankingEffects()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2814
	for i = 1, #shoppaPX do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2815
		SmokePuff(shoppaPX[i], shoppaPY[i], GetRankedColour(shoppaPR[i]))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2816
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2817
	runOnHogs(HandleGearBasedRankingEffects)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2818
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2819
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2820
function UpdateTagCircles(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2821
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2822
	if getGearValue(gear,"tag") ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2823
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2824
		if cat[cIndex] == loc("Tagging Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2825
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2826
			-- generate circs for tagged gears that don't have a circ yet (new)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2827
			if getGearValue(gear,"tCirc") == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2828
				setGearValue(gear, "tCirc",AddVisualGear(0,0,vgtCircle,0,true))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2829
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2830
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2831
			if getGearValue(gear,"tag") == "victory" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2832
				SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0xff0000ff)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2833
			elseif getGearValue(gear,"tag") == "failure" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2834
				SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x00ff00ff)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2835
			elseif getGearValue(gear,"tag") == "collection" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2836
				SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 100, 255, 1, 10, 0, 150, 3, 0x0000ffff)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2837
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2838
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2839
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2840
			SetVisualGearValues(getGearValue(gear,"tCirc"), GetX(gear), GetY(gear), 0, 1, 1, 10, 0, 1, 1, 0x00000000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2841
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2842
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2843
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2844
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2845
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2846
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2847
-- handle short range portal gun
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2848
function PortalEffects(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2849
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2850
	if GetGearType(gear) == gtPortal then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2851
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2852
		tag = GetTag(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2853
		if tag == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2854
			col = 0xfab02aFF -- orange ball
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2855
		elseif tag == 1 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2856
			col = 0x00FF00FF -- orange portal
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2857
		elseif tag == 2 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2858
			col = 0x364df7FF  -- blue ball
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2859
		elseif tag == 3 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2860
			col = 0xFFFF00FF  -- blue portal
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2861
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2862
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2863
		if (tag == 0) or (tag == 2) then -- i.e ball form
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2864
			tempE = AddVisualGear(GetX(gear), GetY(gear), vgtDust, 0, true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2865
			g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2866
			SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, 1, g9, col )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2867
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2868
			remLife = getGearValue(gear,"life")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2869
			remLife = remLife - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2870
			setGearValue(gear, "life", remLife)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2871
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2872
			if remLife == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2873
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2874
				tempE = AddVisualGear(GetX(gear)+15, GetY(gear), vgtSmoke, 0, true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2875
				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2876
				SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2877
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2878
				tempE = AddVisualGear(GetX(gear)-15, GetY(gear), vgtSmoke, 0, true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2879
				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2880
				SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2881
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2882
				tempE = AddVisualGear(GetX(gear), GetY(gear)+15, vgtSmoke, 0, true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2883
				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2884
				SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2885
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2886
				tempE = AddVisualGear(GetX(gear), GetY(gear)-15, vgtSmoke, 0, true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2887
				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2888
				SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2889
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2890
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2891
				PlaySound(sndVaporize)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2892
				DeleteGear(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2893
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2894
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2895
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2896
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2897
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2898
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2899
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2900
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2901
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2902
function updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2903
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2904
	if (GetCurAmmoType() ~= amGirder) and (GetCurAmmoType() ~= amRubber) and (GetCurAmmoType() ~= amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2905
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2906
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2907
				loc("HEDGE EDITOR"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2908
				loc("(well... kind of...)"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2909
				loc("Place Girder: Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2910
				loc("Place Rubber: Rubber") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2911
				loc("Place Gear: Air Attack") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2912
				loc("Change Selection: [Up], [Down], [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2913
				loc("Toggle Help: Precise+1 (While a tool is selected)") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2914
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2915
				loc("COMMANDS: (Use while no weapon is selected)") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2916
				loc("Save Level: Precise+4") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2917
				loc("Toggle Editing Weapons and Tools: Precise+2") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2918
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2919
				--" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2920
				"", 4, 5000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2921
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2922
						--4
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2923
	elseif cat[cIndex] == loc("Girder Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2924
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2925
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2926
				loc("GIRDER PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2927
				loc("Use this mode to place girders"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2928
				loc("Place Girder: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2929
				loc("Change Rotation: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2930
				loc("Change LandFlag: [1], [2], [3], [4]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2931
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2932
				loc("1 - Normal Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2933
				loc("2 - Indestructible Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2934
				loc("3 - Icy Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2935
				loc("4 - Bouncy Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2936
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2937
				loc("Deletion Mode: [5]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2938
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2939
				"", -amGirder, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2940
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2941
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2942
	elseif cat[cIndex] == loc("Rubber Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2943
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2944
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2945
				loc("RUBBER PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2946
				loc("Use this mode to place rubberbands"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2947
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2948
				loc("Change Rotation: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2949
				--"Change LandFlag: [1], [2], [3]" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2950
				--" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2951
				loc("1 - Normal Rubber") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2952
				--"2 - Indestructible Rubber" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2953
				--"3 - Icy Rubber" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2954
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2955
				loc("Deletion Mode: [5]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2956
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2957
				"", -amRubber, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2958
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2959
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2960
	elseif cat[cIndex] == loc("Barrel Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2961
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2962
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2963
				loc("BARREL PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2964
				loc("Use this mode to place barrels"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2965
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2966
				loc("Change Health: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2967
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2968
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2969
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2970
				"", 8, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2971
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2972
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2973
	elseif cat[cIndex] == loc("Cleaver Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2974
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2975
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2976
				loc("CLEAVER MINE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2977
				loc("Use this mode to place cleavers"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2978
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2979
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2980
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2981
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2982
				"", -amKnife, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2983
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2984
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2985
	elseif cat[cIndex] == loc("Target Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2986
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2987
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2988
				loc("TARGET MINE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2989
				loc("Use this mode to place targets"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2990
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2991
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2992
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2993
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2994
				"", 1, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2995
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2996
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2997
	elseif cat[cIndex] == loc("Waypoint Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2998
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  2999
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3000
				loc("WAYPOINT PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3001
				loc("Use this mode to waypoints"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3002
				loc("Place Waypoint: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3003
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3004
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3005
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3006
				"", -amAirAttack, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3007
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3008
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3009
	elseif cat[cIndex] == loc("Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3010
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3011
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3012
				loc("MINE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3013
				loc("Use this mode to place mines"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3014
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3015
				loc("Change Timer (in milliseconds): [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3016
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3017
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3018
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3019
				"", -amMine, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3020
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3021
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3022
	elseif cat[cIndex] == loc("Sticky Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3023
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3024
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3025
				loc("STiCKY MINE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3026
				loc("Use this mode to place sticky mines"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3027
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3028
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3029
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3030
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3031
				"", -amSMine, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3032
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3033
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3034
	elseif cat[cIndex] == loc("Air Mine Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3035
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3036
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3037
				loc("AIR MINE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3038
				loc("Use this mode to place air mines"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3039
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3040
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3041
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3042
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3043
				"", -amAirMine, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3044
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3045
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3046
	elseif cat[cIndex] == loc("Weapon Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3047
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3048
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3049
				"WEAPON CRATE PLACEMENT MODE",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3050
				loc("Use this mode to place weapon crates"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3051
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3052
				loc("Change Content: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3053
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3054
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3055
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3056
				"", 7, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3057
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3058
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3059
	elseif cat[cIndex] == loc("Utility Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3060
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3061
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3062
				loc("UTILITY CRATE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3063
				loc("Use this mode to place utility crates"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3064
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3065
				loc("Change Content: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3066
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3067
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3068
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3069
				"", 5, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3070
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3071
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3072
	elseif cat[cIndex] == loc("Health Crate Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3073
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3074
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3075
				loc("HEALTH CRATE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3076
				loc("Use this mode to place utility crates"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3077
				loc("Place Object: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3078
				loc("Change Health Boost: [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3079
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3080
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3081
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3082
				"", 6, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3083
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3084
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3085
	elseif cat[cIndex] == loc("Advanced Repositioning Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3086
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3087
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3088
				loc("ADVANCED REPOSITIONING MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3089
				loc("Use this mode to select and reposition gears"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3090
				loc("[Left], [Right]: Change between selection and placement mode.") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3091
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3092
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3093
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3094
				"", -amAirAttack, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3095
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3096
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3097
	elseif cat[cIndex] == loc("Sprite Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3098
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3099
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3100
				loc("SPRITE MODIFICATION MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3101
				"",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3102
				"Use this mode to select, modify, or delete existing girders," .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3103
				"rubbers, or sprites." .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3104
				"[Left], [Right]: Change between land-flag" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3105
				--"[Left], [Right]: Change between selection, land-flag" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3106
				"modification, and deletion modes." .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3107
				"While in modification mode, you can " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3108
				"change land-flag by clicking on an object." .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3109
				loc("Set LandFlag: [1], [2], [3], [4]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3110
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3111
				loc("1 - Normal Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3112
				loc("2 - Indestructible Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3113
				loc("3 - Icy Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3114
				loc("4 - Bouncy Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3115
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3116
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3117
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3118
				"", -amAirAttack, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3119
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3120
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3121
	elseif cat[cIndex] == loc("Sprite Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3122
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3123
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3124
				loc("SPRITE PLACEMENT MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3125
				loc("Use this mode to place custom sprites."),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3126
				loc("[Left], [Right]: Change sprite selection") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3127
				loc("Set LandFlag: [1], [2], [3], [4]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3128
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3129
				loc("1 - Normal Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3130
				loc("2 - Indestructible Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3131
				loc("3 - Icy Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3132
				loc("4 - Bouncy Land") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3133
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3134
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3135
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3136
				"", 2, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3137
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3138
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3139
	--elseif cat[cIndex] == loc("Sprite Testing Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3140
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3141
	--	ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3142
	--			"SPRITE TESTING MODE",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3143
	--			"Use this mode to test sprites before you place them.",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3144
	--			"Place Temporary Visual Test: [Left Click]" .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3145
	--			"[Left], [Right]: Change between sprites." .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3146
	--			" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3147
	--			loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3148
	--			loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3149
	--			"", 3, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3150
	--			)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3151
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3152
	elseif cat[cIndex] == loc("Tagging Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3153
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3154
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3155
				loc("TAGGING MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3156
				loc("Use this mode to tag gears for win/lose conditions."),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3157
				loc("Tag Gear: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3158
				loc("[Left], [Right]: Change between tagging modes.") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3159
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3160
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3161
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3162
				"", 3, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3163
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3164
	elseif cat[cIndex] == loc("Hog Identity Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3165
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3166
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3167
				loc("HOG IDENTITY MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3168
				loc("Use this mode to give a hog a preset identity and weapons."),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3169
				loc("Set Identity: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3170
				loc("[Left], [Right]: Change between identities.") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3171
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3172
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3173
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3174
				"", 3, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3175
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3176
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3177
	elseif cat[cIndex] == loc("Team Identity Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3178
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3179
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3180
				loc("TEAM IDENTITY MODE"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3181
				loc("Use this mode to give an entire team themed hats and names."),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3182
				loc("Set Identity: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3183
				loc("[Left], [Right]: Change between identities.") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3184
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3185
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3186
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3187
				"", 3, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3188
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3189
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3190
	elseif cat[cIndex] == loc("Health Modification Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3191
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3192
		ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3193
				loc("HEALTH MODIFICATION MODE"),
11640
4865e715fb49 Hedge Editor: Also allow to set health of barrels and health crates in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11639
diff changeset
  3194
				loc("Use this mode to set the health of hogs, health crates and barrels."),
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3195
				loc("Set Health: [Left Click]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3196
				loc("[Left], [Right]: Change health value.") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3197
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3198
				loc("Change Placement Mode: [Up], [Down]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3199
				loc("Toggle Help: Precise+1") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3200
				"", 3, 60000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3201
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3202
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3203
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3204
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3205
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3206
	if helpDisabled == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3207
		HideMission()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3208
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3209
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3210
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3211
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3212
-- called in onGameTick()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3213
function HandleHedgeEditor()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3214
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3215
	if CurrentHedgehog ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3216
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3217
		genTimer = genTimer + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3218
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3219
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3220
		tSprCol = 0x00000000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3221
		tempFrame = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3222
		xDisplacement = 42
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3223
		yDisplacement = 42
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3224
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3225
		if (curWep == amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3226
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3227
			--wowaweewa, holyeeeee shite this is badly hacked (please rewrite when less lazy/morefeatures)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3228
			dCol = 0xFFFFFFFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3229
			dFrame = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3230
			dAngle = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3231
			if (cat[cIndex] == loc("Mine Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3232
				dSprite = sprBotlevels--sprMineOff
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3233
				dFrame = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3234
			elseif (cat[cIndex] == loc("Sticky Mine Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3235
				dSprite = sprBotlevels--sprSMineOff
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3236
				dFrame = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3237
			elseif (cat[cIndex] == loc("Air Mine Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3238
				dSprite = sprAirMine
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3239
			elseif (cat[cIndex] == loc("Barrel Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3240
				dSprite = sprExplosives
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3241
			elseif (cat[cIndex] == loc("Health Crate Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3242
				dSprite = sprFAid
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3243
			elseif (cat[cIndex] == loc("Weapon Crate Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3244
				dSprite = sprCase
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3245
			elseif (cat[cIndex] == loc("Utility Crate Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3246
				dSprite = sprUtility
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3247
			elseif (cat[cIndex] == loc("Target Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3248
				dSprite = sprTarget
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3249
			elseif (cat[cIndex] == loc("Cleaver Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3250
				dAngle = 270
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3251
				dSprite = sprKnife
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3252
			elseif (cat[cIndex] == loc("Sprite Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3253
				dSprite = reducedSpriteIDArray[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3254
				dFrame = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3255
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3256
				dCol = 0xFFFFFF00
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3257
				dSprite = sprArrow
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3258
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3259
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3260
			if CG == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3261
				CG = AddVisualGear(CursorX, CursorY, vgtStraightShot,0,true,3)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3262
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3263
			g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(CG)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3264
			SetVisualGearValues(CG, CursorX, CursorY, 0, 0, dAngle, dFrame, 1000, dSprite, 1000, dCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3265
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3266
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3267
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3268
			if crateSprite == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3269
				crateSprite = AddVisualGear(CursorX, CursorY-35, vgtStraightShot,0,true,3)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3270
				for i = 1, 4 do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3271
					tSpr[i] = AddVisualGear(CursorX, CursorY-35, vgtStraightShot,0,true,3)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3272
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3273
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3274
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3275
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3276
			if (cat[cIndex] == loc("Weapon Crate Placement Mode")) or (cat[cIndex] == loc("Utility Crate Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3277
				if (cat[cIndex] == loc("Weapon Crate Placement Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3278
					tArr = atkArray
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3279
				else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3280
					tArr = utilArray
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3281
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3282
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3283
				tSprCol = 0xFFFFFFFF
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3284
				tempFrame = tArr[pIndex][3]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3285
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3286
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3287
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3288
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3289
			if CG ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3290
				SetVisualGearValues(CG, 0, 0, 0, 0, 0, 0, 1000, sprArrow, 1000, 0xFFFFFF00)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3291
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3292
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3293
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3294
		SetVisualGearValues(crateSprite, CursorX+xDisplacement, CursorY+yDisplacement, 0, 0, dAngle, tempFrame, 1000, sprAMAmmos, 1000, tSprCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3295
		SetVisualGearValues(tSpr[1], CursorX+xDisplacement-2, CursorY+yDisplacement-2, 0, 0, dAngle, 10, 1000, sprTarget, 1000, tSprCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3296
		SetVisualGearValues(tSpr[2], CursorX+xDisplacement-2, CursorY+yDisplacement+2, 0, 0, dAngle, 10, 1000, sprTarget, 1000, tSprCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3297
		SetVisualGearValues(tSpr[3], CursorX+xDisplacement+2, CursorY+yDisplacement-2, 0, 0, dAngle, 10, 1000, sprTarget, 1000, tSprCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3298
		SetVisualGearValues(tSpr[4], CursorX+xDisplacement+2, CursorY+yDisplacement+2, 0, 0, dAngle, 10, 1000, sprTarget, 1000, tSprCol)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3299
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3300
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3301
		if genTimer >= 100 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3302
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3303
			genTimer = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3304
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3305
			--if destroyMap == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3306
			--	BlowShitUpPartTwo()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3307
			--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3308
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3309
			curWep = GetCurAmmoType()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3310
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3311
			HandleRankingEffects()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3312
			runOnGears(PortalEffects)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3313
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3314
			-- change to girder mode on weapon swap
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3315
			if (cIndex ~= 1) and (curWep == amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3316
				cIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3317
				RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3318
				updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3319
			elseif (cIndex ~=2) and (curWep == amRubber) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3320
				cIndex = 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3321
				RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3322
				updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3323
			-- change to generic mode if girder no longer selected
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3324
			elseif (cIndex == 1) and (curWep ~= amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3325
				cIndex = 3 -- was 2
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3326
				RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3327
				--updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3328
			elseif (cIndex == 2) and (curWep ~= amRubber) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3329
				cIndex = 3 --new
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3330
				RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3331
				--updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3332
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3333
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3334
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3335
			-- update display selection criteria
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3336
			if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3337
				AddCaption(cat[cIndex],0xffba00ff,capgrpMessage)
11638
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3338
				local caption2
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3339
				if type(pMode[pIndex]) == "table" then
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3340
					caption2 = tostring(pMode[pIndex][1])
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3341
				else
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3342
					caption2 = tostring(pMode[pIndex])
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3343
				end
df8fbbbcd775 Hedge Editor: Allow to add/subtract health in Health Modification Mode
Wuzzy <almikes@aol.com>
parents: 11637
diff changeset
  3344
				AddCaption(caption2,0xffba00ff,capgrpMessage2)
11037
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3345
				if superDelete == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3346
					AddCaption(loc("Warning: Deletition Mode Active"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3347
				end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3348
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3349
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3350
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3351
			if sSprite ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3352
				g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(sSprite)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3353
				SetVisualGearValues(sSprite, g1, g2, 0, 0, g5, g6, 10000, g8, 10000, g10 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3354
				--AddCaption(g7)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3355
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3356
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3357
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3358
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3359
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3360
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3361
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3362
	if (ufoFuel ~= 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3363
		if ufoFuel == 2000 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3364
			SetHealth(ufoGear, 2000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3365
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3366
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3367
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3368
	-- kinda lazy, but at least we don't have to do elaborate tacking elsewhere
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3369
	SetVisualGearValues(sCirc, 0, 0, 0, 1, 1, 10, 0, 1, 1, 0x00000000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3370
	--update selected gear display
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3371
	if (cat[cIndex] == loc("Advanced Repositioning Mode")) and (sGear ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3372
		SetVisualGearValues(sCirc, GetX(sGear), GetY(sGear), 100, 255, 1, 10, 0, 300, 3, 0xff00ffff)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3373
	elseif (cat[cIndex] == loc("Sprite Modification Mode")) and (sSprite ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3374
		g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(sSprite)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3375
		SetVisualGearValues(sSprite, g1, g2, 0, 0, g5, g6, 10000, g8, 10000, g10 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3376
	elseif (cat[cIndex] == loc("Tagging Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3377
		if (sGear ~= nil) or (closestGear ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3378
			--recently disabled
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3379
			--SetVisualGearValues(sCirc, GetX(sGear), GetY(sGear), 0, 1, 1, 10, 0, 1, 1, 0x00000000)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3380
			closestGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3381
			sGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3382
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3383
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3384
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3385
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3386
	runOnGears(UpdateTagCircles)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3387
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3388
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3389
	-- some kind of target detected, tell me your story
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3390
	if cGear ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3391
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3392
		x,y = GetGearTarget(cGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3393
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3394
		if GetGearType(cGear) == gtAirAttack then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3395
			DeleteGear(cGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3396
			PlaceObject(x, y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3397
		elseif GetGearType(cGear) == gtGirder then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3398
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3399
			CGR = GetState(cGear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3400
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3401
			-- improve rectangle test based on CGR when you can be bothered
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3402
			--if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3403
			--	AddCaption(loc("Invalid Girder Placement"),0xffba00ff,capgrpVolume)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3404
			--else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3405
				PlaceObject(x, y)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3406
			--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3407
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3408
			-- this allows the girder tool to be used like a mining laser
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3409
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3410
		--[[
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3411
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3412
			if CGR < 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3413
				AddGear(x, y, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3414
			elseif CGR == 4 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3415
				g = AddGear(x-30, y, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3416
				g = AddGear(x+30, y, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3417
			elseif CGR == 5 then -------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3418
				g = AddGear(x+30, y+30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3419
				g = AddGear(x-30, y-30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3420
			elseif CGR == 6 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3421
				g = AddGear(x, y+30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3422
				g = AddGear(x, y-30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3423
			elseif CGR == 7 then -------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3424
				g = AddGear(x+30, y-30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3425
				g = AddGear(x-30, y+30, gtGrenade, 0, 0, 0, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3426
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3427
]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3428
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3429
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3430
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3431
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3432
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3433
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3434
--------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3435
-- EVENT HANDLERS
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3436
--------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3437
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3438
function commandMode()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3439
	if (preciseOn == true) and ((GetCurAmmoType() == amNothing) or (GetCurAmmoType() == amSkip)) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3440
		return(true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3441
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3442
		return(false)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3443
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3444
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3445
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3446
function onTimer(s)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3447
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3448
	superDelete = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3449
	if (commandMode() == true) and (s == 4) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3450
		SaveLevelData() -- positions of crates, etc
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3451
	elseif (commandMode() == true) and (s == 2) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3452
		if GetAmmoCount(CurrentHedgehog, amAirAttack) == 100 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3453
			SetEditingWeps(0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3454
			AddCaption(loc("The editor weapons and tools have been removed!"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3455
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3456
			SetEditingWeps(100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3457
			AddCaption(loc("The editor weapons and tools have been added!"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3458
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3459
	elseif (preciseOn == true) and (s == 1) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3460
		if (GetCurAmmoType() == amGirder) or  (GetCurAmmoType() == amRubber) or  (GetCurAmmoType() == amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3461
			helpDisabled = not(helpDisabled)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3462
			AddCaption("Help Disabled: " .. BoolToString(helpDisabled),0xffba00ff,capgrpVolume)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3463
			updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3464
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3465
	elseif (cat[cIndex] == loc("Sprite Placement Mode")) or (cat[cIndex] == loc("Girder Placement Mode")) or (cat[cIndex] == loc("Rubber Placement Mode")) or (cat[cIndex] == loc("Sprite Modification Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3466
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3467
		if (cat[cIndex] == loc("Rubber Placement Mode")) and (s ~= 5) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3468
			landType = lfBouncy
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3469
			AddCaption(loc("Bouncy Land"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3470
		elseif s == 1 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3471
			landType = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3472
			AddCaption(loc("Normal Land"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3473
		elseif s == 2 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3474
			landType = lfIndestructible
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3475
			AddCaption(loc("Indestructible Land"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3476
		elseif s == 3 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3477
			landType = lfIce
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3478
			AddCaption(loc("Icy Land"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3479
		elseif (s == 4) then --and (cat[cIndex] == "Sprite Placement Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3480
			landType = lfBouncy
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3481
			AddCaption(loc("Bouncy Land"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3482
		elseif (s == 5) and (cat[cIndex] ~= loc("Sprite Modification Mode")) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3483
			superDelete = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3484
			-- this and the above should probably be shown in another place where the other
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3485
			-- two add captions are displayed for this kinda thing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3486
			--AddCaption(loc("Warning: Deletition Mode Active"),0xffba00ff,capgrpAmmoinfo)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3487
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3488
	elseif pMode[pIndex] == loc("Selection Mode") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3489
		setGearValue(sGear, "ranking", s)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3490
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3491
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3492
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3493
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3494
function onPrecise()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3495
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3496
	preciseOn = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3497
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3498
	--ParseCommand("voicepack " .. "Surfer")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3499
	--AddCaption(GetHogGrave(CurrentHedgehog))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3500
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3501
	--if (pMode[pIndex] == "Selection Mode") and (closestGear ~= nil) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3502
	--	menuEnabled = not(menuEnabled)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3503
		--showmenu
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3504
	--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3505
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3506
	--BlowShitUp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3507
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3508
--[[
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3509
	frameID = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3510
	visualSprite = sprAmGirder--reducedSpriteIDArray[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3511
	--visualSprite = spriteIDArray[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3512
	tempE = AddVisualGear(1, 1, vgtStraightShot, 0, true,1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3513
	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3514
	SetVisualGearValues(tempE, g1, g2, 0, 0, g5, frameID, g7, visualSprite, g9, g10 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3515
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3516
]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3517
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3518
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3519
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3520
function onPreciseUp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3521
	preciseOn = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3522
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3523
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3524
--[[function onLJump()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3525
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3526
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3527
function onHJump()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3528
end]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3529
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3530
--[[function UpdateMenu()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3531
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3532
	preMenuCfg = loc("Use the arrow keys to navigate this menu") .. "|"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3533
	postMenuCfg = loc("Press [Fire] to accept this configuration.")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3534
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3535
	menu = 	{
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3536
			loc("Walls Required") .. ": " .. #wTouched .. "|",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3537
			loc("Surf Before Crate") .. ": " .. BoolToCfgTxt(requireSurfer) .. "|",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3538
			loc("Attack From Rope") .. ": " .. BoolToCfgTxt(AFR) .. "|",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3539
			loc("Super Weapons") .. ": " .. BoolToCfgTxt(allowCrazyWeps) .. "|"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3540
			}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3541
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3542
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3543
function HandleStartingStage()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3544
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3545
	temp = menu[menuIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3546
	menu[menuIndex] = "--> " .. menu[menuIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3547
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3548
	missionComment = ""
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3549
	for i = 1, #menu do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3550
		missionComment = missionComment .. menu[i]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3551
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3552
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3553
	ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3554
				loc("HEDGE EDITOR") .. " 0.4",
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3555
				loc("Edit gear properties"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3556
				preMenuCfg..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3557
				missionComment ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3558
				postMenuCfg ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3559
				--" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3560
				"", 4, 300000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3561
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3562
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3563
	menu[menuIndex] = temp
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3564
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3565
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3566
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3567
function UpdateMenuCategoryOrSomething()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3568
	temp = menu[1]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3569
	menu = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3570
	if temp == "Initialisation Menu" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3571
		for i = 1, #initMenuArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3572
			menu[i] = initMenuArray[i] .. ": " .. initMenuArray[2]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3573
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3574
	elseif temp == "GameFlag Menu" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3575
		for i = 1, #gameFlagList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3576
			menu[i] = gameFlagList[1] .. ": " .. BoolToStr(gameFlagList[2])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3577
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3578
	elseif temp == "Ammo Menu" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3579
		for i  = 1, #atkArray do	--except, this should be per hog, not overall :(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3580
			--menu[i] = atkArray[i][2] .. ": " .. atkArray[i][3]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3581
			menu[i] = atkArray[i][2] .. ": " .. getGearValue(sGear,atkArray[i][1])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3582
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3583
		-- you should run through all the hogs and assign them ammo values based on the
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3584
		-- ammo set, yea, let's write that function in 5th
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3585
		for i = #menu, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3586
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3587
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3588
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3589
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3590
function doMenuShit(d)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3591
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3592
	if d == "up" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3593
		menuIndex = menuIndex -1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3594
		if 	menuIndex == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3595
			menuIndex = #menu
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3596
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3597
	elseif d == "down" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3598
		menuIndex = menuIndex +1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3599
		if menuIndex > #menu then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3600
			menuIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3601
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3602
	elseif d == "left" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3603
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3604
	elseif d == "right" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3605
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3606
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3607
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3608
end]]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3609
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3610
---------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3611
-- Cycle through selection subsets (by changing pIndex, pMode)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3612
-- i.e 	health of barrels, medikits,
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3613
--		timer of mines
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3614
--		contents of crates etc.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3615
---------------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3616
function onLeft()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3617
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3618
	leftHeld = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3619
	rightHeld = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3620
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3621
	--if menuEnabled == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3622
		--doMenuShit("left")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3623
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3624
	--else -- normal case
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3625
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3626
		pIndex = pIndex - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3627
		if pIndex == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3628
			pIndex = #pMode
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3629
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3630
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3631
		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3632
			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3633
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3634
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3635
	--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3636
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3637
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3638
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3639
function onRight()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3640
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3641
	leftHeld = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3642
	rightHeld = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3643
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3644
	--if menuEnabled == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3645
		--doMenuShit("right")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3646
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3647
	--else -- normal case
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3648
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3649
		pIndex = pIndex + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3650
		if pIndex > #pMode then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3651
			pIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3652
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3653
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3654
		if (curWep == amGirder) or (curWep == amRubber) or (curWep == amAirAttack) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3655
			AddCaption(pMode[pIndex],0xffba00ff,capgrpMessage2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3656
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3657
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3658
	--end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3659
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3660
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3661
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3662
---------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3663
-- Cycle through primary categories (by changing cIndex)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3664
-- i.e 	mine, sticky mine, barrels
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3665
--		health/weapon/utility crate, placement of gears
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3666
---------------------------------------------------------
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3667
function onUp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3668
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3669
	--if menuEnabled == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3670
		--doMenuShit("up")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3671
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3672
	--elseif (curWep ~= amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3673
	if (curWep ~= amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3674
		--AddCaption(cIndex)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3675
		cIndex = cIndex - 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3676
		if (cIndex == 1) or (cIndex == 2) then --1	--we no longer hit girder by normal means
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3677
			cIndex = #cat
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3678
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3679
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3680
		RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3681
		updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3682
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3683
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3684
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3685
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3686
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3687
function onDown()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3688
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3689
	--if menuEnabled == true then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3690
		--doMenuShit("down")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3691
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3692
	--elseif (curWep ~= amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3693
	if (curWep ~= amGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3694
		cIndex = cIndex + 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3695
		if cIndex > #cat then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3696
			cIndex = 3	 -- 2 ----we no longer hit girder by normal means
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3697
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3698
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3699
		RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3700
		updateHelp()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3701
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3702
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3703
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3704
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3705
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3706
function onParameters()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3707
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3708
    parseParams()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3709
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3710
	ufoFuel = tonumber(params["ufoFuel"])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3711
	if ufoFuel == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3712
		ufoFuel = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3713
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3714
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3715
	mapID = tonumber(params["m"])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3716
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3717
	--15 is a good short range portal, for what it's worth
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3718
	if tonumber(params["portalDistance"]) ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3719
		portalDistance = div(tonumber(params["portalDistance"]),5)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3720
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3721
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3722
	if portalDistance == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3723
		portalDistance = 5000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3724
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3725
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3726
	if params["helpDisabled"] == "true" then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3727
		helpDisabled = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3728
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3729
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3730
	if mapID == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3731
		mapID = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3732
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3733
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3734
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3735
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3736
function onGameInit()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3737
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3738
	-- perhaps we can get some of this better info in parsecommandoverride
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3739
	--Map = "Islands"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3740
	--Theme = "Deepspace"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3741
	--Seed = "{bacb2f87-f316-4691-a333-3bcfc4fb3d88}"
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3742
	--MapGen = 0 -- 0:generated map, 1:generated maze, 2:hand drawn map
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3743
	--TemplateFilter = 5	-- small=1,med=2,large=3,cavern=4,wacky=5
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3744
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3745
	if mapID == nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3746
		mapID = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3747
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3748
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3749
	-- read gameflags and assign their values to the gameflaglist array
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3750
	for i = 1, #gameFlagList do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3751
		if band(GameFlags, gameFlagList[i][3]) ~= 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3752
			gameFlagList[i][2] = true
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3753
		else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3754
			gameFlagList[i][2] = false
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3755
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3756
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3757
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3758
	Explosives = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3759
	MinesNum = 0
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3760
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3761
	--GameFlags = GameFlags + gfInfAttack
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3762
	EnableGameFlags(gfInfAttack, gfDisableWind)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3763
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3764
	RedefineSubset()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3765
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3766
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3767
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3768
function onGameStart()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3769
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3770
	trackTeams()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3771
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3772
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3773
	InterpretPoints()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3774
	LoadLevelData()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3775
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3776
	ShowMission	(
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3777
				loc("HEDGE EDITOR"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3778
				loc("(well... kind of...)"),
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3779
				loc("Place Girder: Girder") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3780
				loc("Place Rubber: Rubber") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3781
				loc("Place Gear: Air Attack") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3782
				loc("Change Selection: [Up], [Down], [Left], [Right]") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3783
				loc("Toggle Help: Precise+1 (While a tool is selected)") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3784
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3785
				loc("COMMANDS: (Use while no weapon is selected)") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3786
				loc("Save Level: Precise+4") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3787
				loc("Toggle Editing Weapons and Tools: Precise+2") .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3788
				" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3789
				--" " .. "|" ..
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3790
				"", 4, 5000
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3791
				)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3792
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3793
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3794
	sCirc = AddVisualGear(0,0,vgtCircle,0,true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3795
	SetVisualGearValues(sCirc, 0, 0, 100, 255, 1, 10, 0, 40, 3, 0xffba00ff)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3796
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3797
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3798
	frameID = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3799
	visualSprite = sprAmGirder
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3800
	sSprite = AddVisualGear(0, 0, vgtStraightShot, 0, true,1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3801
	g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(sSprite)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3802
	SetVisualGearValues(sSprite, 1, 1, 0, 0, g5, frameID, 20000, visualSprite, 20000, g10 )
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3803
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3804
	SetAmmoDelay(amAirAttack,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3805
	SetAmmoDelay(amGirder,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3806
	SetAmmoDelay(amRubber,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3807
	--SetAmmoDelay(amNapalm,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3808
	--SetAmmoDelay(amDrillStrike,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3809
	--SetAmmoDelay(amMineStrike,0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3810
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3811
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3812
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3813
function SetEditingWeps(ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3814
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3815
	AddAmmo(CurrentHedgehog, amAirAttack, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3816
	AddAmmo(CurrentHedgehog, amGirder, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3817
	AddAmmo(CurrentHedgehog, amRubber, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3818
	--AddAmmo(CurrentHedgehog, amPortalGun, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3819
	AddAmmo(CurrentHedgehog, amTeleport, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3820
	AddAmmo(CurrentHedgehog, amRope, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3821
	--AddAmmo(CurrentHedgehog, amJetpack, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3822
	--AddAmmo(CurrentHedgehog, amParachute, ammoCount)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3823
	AddAmmo(CurrentHedgehog, amSwitch, 100) --ammoCount
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3824
	AddAmmo(CurrentHedgehog, amSkip, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3825
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3826
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3827
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3828
function clearAmmo(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3829
	for i = 1, #atkArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3830
		AddAmmo(gear,atkArray[i][1],0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3831
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3832
	for i = 1, #utilArray do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3833
		AddAmmo(gear,utilArray[i][1],0)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3834
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3835
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3836
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3837
-- the below two functions allow you to set up a themed team.
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3838
-- one day, it'd be nice to be able to set their voice/flag/grave
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3839
-- ingame at this point, too, but for now, this is impossible
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3840
function SetTeamIdentity(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3841
	tName = pMode[pIndex]
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3842
	hIndex = 1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3843
	hArr = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3844
	for i = 1,#preMadeTeam[pIndex][2] do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3845
		table.insert(hArr,preMadeTeam[pIndex][2][i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3846
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3847
	nArr = {}
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3848
	for i = 1,#preMadeTeam[pIndex][3] do
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3849
		table.insert(nArr,preMadeTeam[pIndex][3][i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3850
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3851
	SetHogTeamName(gear, tName)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3852
	--runOnHogsInTeam(AssignTeam(gear),tName)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3853
	runOnHogs(AssignTeam)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3854
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3855
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3856
function AssignTeam(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3857
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3858
	if GetHogTeamName(gear) == tName then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3859
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3860
		setGearValue(gear,"flag",preMadeTeam[pIndex][5])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3861
		setGearValue(gear,"voice",preMadeTeam[pIndex][6])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3862
		setGearValue(gear,"grave",preMadeTeam[pIndex][7])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3863
		setGearValue(gear,"fort",preMadeTeam[pIndex][8])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3864
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3865
		if preMadeTeam[pIndex][4] == "R" then -- random team
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3866
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3867
			if #hArr > 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3868
				--if there are unchosen hats left, choose one
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3869
				--then remove it from the available list of hats
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3870
				i = 1+GetRandom(#hArr)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3871
				SetHogHat(gear,hArr[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3872
				table.remove(hArr,i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3873
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3874
				-- choose any hat randomly
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3875
				SetHogHat(gear,preMadeTeam[pIndex][2][1+GetRandom(#preMadeTeam[pIndex][2])])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3876
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3877
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3878
			if #nArr > 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3879
				i = 1+GetRandom(#nArr)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3880
				SetHogName(gear,nArr[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3881
				table.remove(nArr,i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3882
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3883
				SetHogName(gear,preMadeTeam[pIndex][3][1+GetRandom(#preMadeTeam[pIndex][3])])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3884
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3885
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3886
		elseif preMadeTeam[pIndex][4] == "F" then -- fixed team w/ exactly 8 guys
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3887
			SetHogName(gear,preMadeTeam[pIndex][3][hIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3888
			SetHogHat(gear,preMadeTeam[pIndex][2][hIndex])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3889
			hIndex = hIndex +1
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3890
		else -- FR fixed random team with more or less than 8 guys
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3891
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3892
			if #hArr > 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3893
				i = 1+GetRandom(#hArr)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3894
				SetHogHat(gear,hArr[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3895
				SetHogName(gear,nArr[i])
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3896
				table.remove(hArr,i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3897
				table.remove(nArr,i)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3898
			else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3899
				SetHogHat(gear,"NoHat")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3900
				SetHogName(gear,"Uninspiring hog")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3901
			end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3902
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3903
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3904
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3905
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3906
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3907
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3908
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3909
-- allows you to set a sort of identity and weapon profile for a given hog
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3910
-- this should only really be used when perHogAmmo is enabled
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3911
function SetHogProfile(gear, pro)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3912
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3913
	clearAmmo(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3914
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3915
	if pro == loc("Sniper") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3916
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3917
		SetHogName(gear,"Sniper")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3918
		SetHogHat(gear, "Sniper")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3919
		SetHealth(gear, 50)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3920
		AddAmmo(gear, amSniperRifle, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3921
		AddAmmo(gear, amDEagle, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3922
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3923
	elseif pro == loc("Pyro") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3924
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3925
		SetHogName(gear,loc("Pyro"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3926
		SetHogHat(gear, "Gasmask")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3927
		SetHealth(gear, 80)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3928
		AddAmmo(gear, amFlamethrower, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3929
		AddAmmo(gear, amMolotov, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3930
		AddAmmo(gear, amNapalm, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3931
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3932
	elseif pro == loc("Soldier") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3933
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3934
		SetHogName(gear,loc("Soldier"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3935
		--SetHogHat(gear, "war_americanww2helmet")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3936
		SetHogHat(gear, "TeamSoldier")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3937
		SetHealth(gear, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3938
		AddAmmo(gear, amBazooka, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3939
		AddAmmo(gear, amShotgun, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3940
		AddAmmo(gear, amMortar, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3941
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3942
	elseif pro == loc("Grenadier") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3943
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3944
		SetHogName(gear,loc("Grenadier"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3945
		SetHogHat(gear, "war_desertgrenadier1")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3946
		SetHealth(gear, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3947
		AddAmmo(gear, amGrenade, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3948
		AddAmmo(gear, amClusterBomb, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3949
		AddAmmo(gear, amGasBomb, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3950
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3951
	elseif pro == loc("Chef") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3952
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3953
		SetHogName(gear,loc("Chef"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3954
		SetHogHat(gear, "chef")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3955
		SetHealth(gear, 65)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3956
		AddAmmo(gear, amGasBomb, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3957
		AddAmmo(gear, amKnife, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3958
		AddAmmo(gear, amCake, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3959
		--AddAmmo(gear, amWatermelon, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3960
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3961
	elseif pro == loc("Ninja") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3962
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3963
		SetHogName(gear,loc("Ninja"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3964
		SetHogHat(gear, "NinjaFull")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3965
		SetHealth(gear, 80)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3966
		AddAmmo(gear, amRope, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3967
		AddAmmo(gear, amFirePunch, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3968
		AddAmmo(gear, amParachute, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3969
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3970
	elseif pro == loc("Commander") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3971
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3972
		SetHogName(gear,loc("Commander"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3973
		SetHogHat(gear, "sf_vega")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3974
		SetHealth(gear, 120)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3975
		AddAmmo(gear, amDEagle, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3976
		AddAmmo(gear, amAirAttack, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3977
		AddAmmo(gear, amNapalm, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3978
		AddAmmo(gear, amDrillStrike, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3979
		AddAmmo(gear, amMineStrike, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3980
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3981
	elseif pro == loc("Engineer") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3982
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3983
		SetHogName(gear,loc("Engineer"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3984
		SetHogHat(gear, "Glasses")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3985
		SetHealth(gear, 45)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3986
		AddAmmo(gear, amGirder, 4)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3987
		AddAmmo(gear, amRubber, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3988
		AddAmmo(gear, amLandGun, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3989
		AddAmmo(gear, amBlowTorch, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3990
		AddAmmo(gear, amPickHammer, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3991
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3992
	elseif pro == loc("Physicist") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3993
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3994
		SetHogName(gear,loc("Physicist"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3995
		SetHogHat(gear, "lambda")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3996
		SetHealth(gear, 80)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3997
		AddAmmo(gear, amIceGun, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3998
		AddAmmo(gear, amSineGun, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  3999
		AddAmmo(gear, amBee, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4000
		AddAmmo(gear, amLowGravity, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4001
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4002
	elseif pro == loc("Trapper") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4003
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4004
		SetHogName(gear,loc("Trapper"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4005
		SetHogHat(gear, "Skull")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4006
		SetHealth(gear, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4007
		AddAmmo(gear, amMine, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4008
		AddAmmo(gear, amSMine, 4)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4009
		AddAmmo(gear, amAirMine, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4010
		AddAmmo(gear, amMolotov, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4011
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4012
	elseif pro == loc("Saint") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4013
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4014
		SetHogName(gear,loc("Saint"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4015
		SetHogHat(gear, "angel")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4016
		SetHealth(gear, 200)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4017
		AddAmmo(gear, amSeduction, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4018
		AddAmmo(gear, amInvulnerable, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4019
		AddAmmo(gear, amIceGun, 2)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4020
		AddAmmo(gear, amHammer, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4021
		AddAmmo(gear, amResurrector, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4022
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4023
	elseif pro == loc("Clown") then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4024
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4025
		SetHogName(gear,loc("Clown"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4026
		SetHogHat(gear, "clown-copper")
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4027
		SetHealth(gear, 70)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4028
		AddAmmo(gear, amBaseballBat, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4029
		AddAmmo(gear, amGasBomb, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4030
		AddAmmo(gear, amBallgun, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4031
		AddAmmo(gear, amKamikaze, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4032
		--AddAmmo(gear, amPiano, 1)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4033
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4034
	-- some other ideas/roles
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4035
	-- relocator: portal, teleport, tardis, extra time, lasersite
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4036
	-- vampire: vampire, whip, birdy, extra damage, seduction
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4037
	-- flyboy: rc plane, deagle, whip, parachute, kamikaze
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4038
	-- demo: drill, dynamite, mine, smine, blowtorch
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4039
	-- alien: ufo, sine-gun, drill rocket
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4040
	-- terminator: tardis, shotgun, cake, girder
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4041
	-- yeti: ice-gun, firepunch, blowtorch
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4042
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4043
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4044
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4045
	AddAmmo(gear, amSwitch, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4046
	AddAmmo(gear, amSkip, 100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4047
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4048
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4049
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4050
function onNewTurn()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4051
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4052
	-- regardless of our other ammo, give stuff that is useful for editing
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4053
	SetEditingWeps(100)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4054
	if GetHogLevel(CurrentHedgehog) == 0 then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4055
		TurnTimeLeft = -1	-- is that turntime in your pocket? :D
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4056
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4057
		TurnTimeLeft = 1 -- skip the computer's turn
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4058
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4059
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4060
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4061
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4062
function onGameTick()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4063
	HandleHedgeEditor()
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4064
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4065
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4066
function isATrackedGear(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4067
	if 	(GetGearType(gear) == gtHedgehog) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4068
		(GetGearType(gear) == gtGrenade) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4069
		(GetGearType(gear) == gtExplosives) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4070
		(GetGearType(gear) == gtTarget) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4071
		(GetGearType(gear) == gtKnife) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4072
		(GetGearType(gear) == gtMine) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4073
		(GetGearType(gear) == gtSMine) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4074
		(GetGearType(gear) == gtPortal) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4075
		(GetGearType(gear) == gtAirMine) or
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4076
		(GetGearType(gear) == gtCase)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4077
	then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4078
		return(true)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4079
	else
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4080
		return(false)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4081
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4082
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4083
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4084
-- track hedgehogs and placement gears
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4085
function onGearAdd(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4086
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4087
	if GetGearType(gear) == gtJetpack then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4088
		ufoGear = gear
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4089
		if (ufoFuel ~= 0) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4090
			SetHealth(ufoGear, ufoFuel)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4091
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4092
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4093
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4094
	if GetGearType(gear) == gtHedgehog then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4095
		--table.insert(hhs, gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4096
	elseif (GetGearType(gear) == gtAirAttack) or (GetGearType(gear) == gtGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4097
		cGear = gear
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4098
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4099
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4100
	if isATrackedGear(gear) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4101
		trackGear(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4102
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4103
		if GetGearType(gear) == gtPortal then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4104
			setGearValue(gear,"life",portalDistance)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4105
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4106
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4107
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4108
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4109
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4110
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4111
function onGearDelete(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4112
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4113
	if GetGearType(gear) == gtJetpack then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4114
		ufoGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4115
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4116
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4117
	if (GetGearType(gear) == gtAirAttack) or (GetGearType(gear) == gtGirder) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4118
		cGear = nil
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4119
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4120
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4121
	if isATrackedGear(gear) then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4122
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4123
		if getGearValue(gear, "tCirc") ~= nil then
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4124
			DeleteVisualGear(getGearValue(gear, "tCirc"))
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4125
		end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4126
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4127
		trackDeletion(gear)
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4128
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4129
	end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4130
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4131
end
599bb42d7448 HedgeEditor (bring on the bug reports, wahey!)
mikade <redgrinner@gmail.com>
parents:
diff changeset
  4132