Divergent/mods/Redone Collection/gamedata/scripts/redone_lc_ros_transition_lo...

309 lines
11 KiB
Plaintext
Raw Permalink Normal View History

function actor_on_first_update()
local lc_pool = {
["lc_ros01_ros02"] = {
pos = vector():set(-136.3947,-0.0025,122.3627),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros01_ros02.1"] = {
pos = vector():set(-135.5676,-0.000,122.1426),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros01_ros02.2"] = {
pos = vector():set(-137.3257,-0.0067,121.5680),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros01_ros02.3"] = {
pos = vector():set(-136.9949,-0.0018,122.1856),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01"] = {
pos = vector():set(-136.9901,0.0062,124.2836),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01.1"] = {
pos = vector():set(-136.9537,0.0044,125.0893),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01.2"] = {
pos = vector():set(-138.3931,0.0078,124.3509),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01.3"] = {
pos = vector():set(-138.4250,0.0095,124.6852),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01.4"] = {
pos = vector():set(-138.6385,0.0060,124.1129),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros02_ros01.5"] = {
pos = vector():set(-137.5683,0.0036,123.8512),
smart = "ros_smart_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros03_ros04"] = {
pos = vector():set(-196.8538,3.0381,68.4065),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros05_ros06"] = {
pos = vector():set(-211.6216,-0.0015,9.8376),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros05_ros06.1"] = {
pos = vector():set(-210.3275,-0.0004,9.9314),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros05_ros06.2"] = {
pos = vector():set(-211.0420,-0.0011,10.7245),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros06_ros05"] = {
pos = vector():set(-212.0351,8.8153,9.2077),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros06_ros05.1"] = {
pos = vector():set(-212.5222,8.6005,8.4991),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros06_ros05.2"] = {
pos = vector():set(-212.6854,8.8162,9.5271),
smart = "ros_smart_stalker_killers1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros07_ros08"] = {
pos = vector():set(-172.6166,-0.0011,60.7795),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros07_ros08.1"] = {
pos = vector():set(-171.1199,-0.0027,61.0932),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros07_ros08.2"] = {
pos = vector():set(-172.9888,-0.0005,62.2433),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros07_ros08.3"] = {
pos = vector():set(-171.8293,-3.9115,62.2001),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros08_ros07"] = {
pos = vector():set(-188.0054,17.6997,75.3117),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros08_ros07.1"] = {
pos = vector():set(-188.5492,17.6990,75.2511),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
},
["lc_ros08_ros07.2"] = {
pos = vector():set(-186.6996,17.6995,74.1847),
smart = "ros_smart_snork1",
spot = "level_changer_spot_mini",
hint = "space_restrictor_to_rostok_desc",
}
}
for sec,v in pairs(lc_pool) do
local se = get_story_se_item(sec)
if not (se) then
local pos = v.pos
local vid = level.vertex_id(pos)
local gid = SIMBOARD.smarts_by_names[v.smart].m_game_vertex_id
se = alife():create(sec,pos,vid,gid)
end
if (se.position:distance_to_sqr(v.pos) > 0.1) then
local pos = v.pos
local vid = level.vertex_id(pos)
local gid = SIMBOARD.smarts_by_names[v.smart].m_game_vertex_id
TeleportObject(se.id,pos,vid,gid)
end
if (level.map_has_object_spot(se.id,v.spot) == 0) then
level.map_add_object_spot_ser(se.id,v.spot,game.translate_string(v.hint))
end
end
end
function check_name(actor,obj,p)
return p and p[1] and obj and string.find(obj:name(),p[1]) and true
end
function teleport_actor(actor,obj)
local p = {
["lc_ros01_ros02"] = {
pos = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
w_p = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
smart = "ros_smart_killers1",
},
["lc_ros01_ros02.1"] = {
pos = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
w_p = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
smart = "ros_smart_killers1",
},
["lc_ros01_ros02.2"] = {
pos = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
w_p = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
smart = "ros_smart_killers1",
},
["lc_ros01_ros02.3"] = {
pos = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
w_p = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01.1"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01.2"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01.3"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01.4"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros02_ros01.5"] = {
pos = vector():set(-137.00665283203, 0.0017983913421631, 124.59739685059),
w_p = vector():set(-136.99494934082, -0.0014290809631348, 122.18569946289),
smart = "ros_smart_killers1",
},
["lc_ros03_ros04"] = {
pos = vector():set(-196.85385131836, 3.0381197929382, 68.406555175781),
w_p = vector():set(-196.1629486084, 0.062152981758118, 69.714248657227),
smart = "ros_smart_snork1",
},
["lc_ros05_ros06"] = {
pos = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
w_p = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
smart = "ros_smart_stalker_killers1",
},
["lc_ros05_ros06.1"] = {
pos = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
w_p = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
smart = "ros_smart_stalker_killers1",
},
["lc_ros05_ros06.2"] = {
pos = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
w_p = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
smart = "ros_smart_stalker_killers1",
},
["lc_ros06_ros05"] = {
pos = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
w_p = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
smart = "ros_smart_stalker_killers1",
},
["lc_ros06_ros05.1"] = {
pos = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
w_p = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
smart = "ros_smart_stalker_killers1",
},
["lc_ros06_ros05.2"] = {
pos = vector():set(-212.22702026367, 8.8150157928467, 8.7844772338867),
w_p = vector():set(-211.20606994629, -0.0010014176368713, 10.295828819275),
smart = "ros_smart_stalker_killers1",
},
["lc_ros07_ros08"] = {
pos = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
w_p = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
smart = "ros_smart_snork1",
},
["lc_ros07_ros08.1"] = {
pos = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
w_p = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
smart = "ros_smart_snork1",
},
["lc_ros07_ros08.2"] = {
pos = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
w_p = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
smart = "ros_smart_snork1",
},
["lc_ros07_ros08.3"] = {
pos = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
w_p = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
smart = "ros_smart_snork1",
},
["lc_ros08_ros07"] = {
pos = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
w_p = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
smart = "ros_smart_snork1",
},
["lc_ros08_ros07.1"] = {
pos = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
w_p = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
smart = "ros_smart_snork1",
},
["lc_ros08_ros07.2"] = {
pos = vector():set(-188.33070373535, 17.697116851807, 74.735275268555),
w_p = vector():set(-172.27548217773, -0.00015679001808167, 61.4404296875),
smart = "ros_smart_snork1",
},
}
local sec = obj and obj:section()
local v = sec and p[sec]
if (v and v.w_p and v.pos and v.smart) then
db.actor:set_actor_position(v.w_p)
end
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
end