mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 14:02:49 +00:00
TG: Bugfixes for NTSL. AIs can now use script consoles. Fixes crashes.
Buffs metroid magic. More core uses! Revision: r3334 Author: vageyenaman
This commit is contained in:
@@ -229,6 +229,8 @@
|
||||
return max(low,min(high,num))
|
||||
|
||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
||||
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
|
||||
return null
|
||||
var/textList = dd_text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
|
||||
@@ -1383,7 +1385,7 @@ proc/listclearnulls(list/list)
|
||||
var/y_pos = null
|
||||
var/z_pos = null
|
||||
|
||||
/area/proc/move_contents_to(var/area/A, var/turftoleave=null)
|
||||
/area/proc/move_contents_to(var/area/A, var/turftoleave=null, var/direction = null)
|
||||
//Takes: Area. Optional: turf type to leave behind.
|
||||
//Returns: Nothing.
|
||||
//Notes: Attempts to move the contents of one area to another area.
|
||||
@@ -1442,7 +1444,39 @@ proc/listclearnulls(list/list)
|
||||
X.icon_state = old_icon_state1
|
||||
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
|
||||
|
||||
/* Quick visual fix for some weird shuttle corner artefacts when on transit space tiles */
|
||||
if(direction && findtext(X.icon_state, "swall_s"))
|
||||
|
||||
// Spawn a new shuttle corner object
|
||||
var/obj/corner = new()
|
||||
corner.loc = X
|
||||
corner.density = 1
|
||||
corner.anchored = 1
|
||||
corner.icon = X.icon
|
||||
corner.icon_state = dd_replacetext(X.icon_state, "_s", "_f")
|
||||
corner.tag = "delete me"
|
||||
corner.name = "wall"
|
||||
|
||||
// Find a new turf to take on the property of
|
||||
var/turf/nextturf = get_step(corner, direction)
|
||||
if(!nextturf || !istype(nextturf, /turf/space))
|
||||
nextturf = get_step(corner, turn(direction, 180))
|
||||
|
||||
|
||||
// Take on the icon of a neighboring scrolling space icon
|
||||
X.icon = nextturf.icon
|
||||
X.icon_state = nextturf.icon_state
|
||||
|
||||
|
||||
for(var/obj/O in T)
|
||||
|
||||
// Reset the shuttle corners
|
||||
if(O.tag == "delete me")
|
||||
X.icon = 'shuttle.dmi'
|
||||
X.icon_state = dd_replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
|
||||
X.name = "wall"
|
||||
del(O) // prevents multiple shuttle corners from stacking
|
||||
continue
|
||||
if(!istype(O,/obj)) continue
|
||||
O.loc = X
|
||||
for(var/mob/M in T)
|
||||
|
||||
Reference in New Issue
Block a user