Door improvement + spider_instance fix

This commit is contained in:
Kaan Soral
2025-03-27 16:16:17 +03:00
parent b255c4a2c8
commit 7dbc37f0b7
3 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ if is_production:
#maps["desertland"]["key"]="jayson_desertland_copy" #maps["desertland"]["key"]="jayson_desertland_copy"
pass pass
game_version=817 game_version=819
SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales
update_notes=[ update_notes=[
"New zones, items and monsters from the community!", "New zones, items and monsters from the community!",
File diff suppressed because one or more lines are too long
+14 -3
View File
@@ -4934,8 +4934,14 @@ function init_io() {
!can_reach && !can_reach &&
door[4] == data.to && door[4] == data.to &&
s == (door[5] || 0) && s == (door[5] || 0) &&
simple_distance( distance(
{ map: player.map, x: G.maps[player.map].spawns[door[6]][0], y: G.maps[player.map].spawns[door[6]][1] }, {
map: player.map,
x: G.maps[player.map].spawns[door[6]][0],
y: G.maps[player.map].spawns[door[6]][1],
width: door[2],
height: door[3],
},
player, player,
) < B.door_dist ) < B.door_dist
) { ) {
@@ -5044,7 +5050,7 @@ function init_io() {
} else { } else {
return fail_response("cant_enter"); return fail_response("cant_enter");
} }
} else if (data.place == "crypt" || data.place == "winter_instance") { } else if (data.place == "crypt" || data.place == "winter_instance" || data.place == "spider_instance") {
var f = "cave"; var f = "cave";
var ref = G.maps.cave.spawns[2]; var ref = G.maps.cave.spawns[2];
var item = "cryptkey"; var item = "cryptkey";
@@ -5053,6 +5059,11 @@ function init_io() {
ref = G.maps.winterland.spawns[5]; ref = G.maps.winterland.spawns[5];
item = "frozenkey"; item = "frozenkey";
} }
if (data.place == "spider_instance") {
f = "gateway";
ref = G.maps.gateway.spawns[3];
item = "spiderkey";
}
if (simple_distance(player, { in: f, map: f, x: ref[0], y: ref[1] }) > 120) { if (simple_distance(player, { in: f, map: f, x: ref[0], y: ref[1] }) > 120) {
return fail_response("transport_cant_reach"); return fail_response("transport_cant_reach");
} }