mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Bugfixes for NTSL. AIs can now use script consoles. Fixes crashes.
Buffs metroid magic. More core uses! git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3334 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -882,7 +882,7 @@
|
|||||||
reagents = R
|
reagents = R
|
||||||
R.my_atom = src
|
R.my_atom = src
|
||||||
POWERFLAG = rand(1,10)
|
POWERFLAG = rand(1,10)
|
||||||
Uses = rand(2, 5)
|
Uses = rand(7, 25)
|
||||||
//flags |= NOREACT
|
//flags |= NOREACT
|
||||||
|
|
||||||
spawn()
|
spawn()
|
||||||
|
|||||||
@@ -218,6 +218,8 @@
|
|||||||
return max(low,min(high,num))
|
return max(low,min(high,num))
|
||||||
|
|
||||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
/proc/dd_replacetext(text, search_string, replacement_string)
|
||||||
|
if(!text || !search_string || !replacement_string)
|
||||||
|
return null
|
||||||
var/textList = dd_text2list(text, search_string)
|
var/textList = dd_text2list(text, search_string)
|
||||||
return dd_list2text(textList, replacement_string)
|
return dd_list2text(textList, replacement_string)
|
||||||
|
|
||||||
@@ -1339,7 +1341,7 @@ proc/listclearnulls(list/list)
|
|||||||
var/y_pos = null
|
var/y_pos = null
|
||||||
var/z_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.
|
//Takes: Area. Optional: turf type to leave behind.
|
||||||
//Returns: Nothing.
|
//Returns: Nothing.
|
||||||
//Notes: Attempts to move the contents of one area to another area.
|
//Notes: Attempts to move the contents of one area to another area.
|
||||||
@@ -1398,7 +1400,39 @@ proc/listclearnulls(list/list)
|
|||||||
X.icon_state = old_icon_state1
|
X.icon_state = old_icon_state1
|
||||||
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
|
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)
|
||||||
|
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)
|
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
|
if(!istype(O,/obj)) continue
|
||||||
O.loc = X
|
O.loc = X
|
||||||
for(var/mob/M in T)
|
for(var/mob/M in T)
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
|
|
||||||
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
||||||
|
|
||||||
if(newnet && (usr in range(1, src) || issilicon(usr)))
|
if(newnet && ((usr in range(1, src) || issilicon(usr))))
|
||||||
if(length(newnet) > 15)
|
if(length(newnet) > 15)
|
||||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||||
|
|
||||||
|
|||||||
@@ -90,14 +90,18 @@
|
|||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
attack_ai(var/mob/user as mob)
|
||||||
|
attack_hand(user)
|
||||||
|
|
||||||
attack_hand(var/mob/user as mob)
|
attack_hand(var/mob/user as mob)
|
||||||
|
|
||||||
// You need a multitool to use this.
|
// You need a multitool to use this, or be silicon
|
||||||
if(user.equipped())
|
if(!issilicon(user))
|
||||||
if(!istype(user.equipped(), /obj/item/device/multitool))
|
if(user.equipped())
|
||||||
|
if(!istype(user.equipped(), /obj/item/device/multitool))
|
||||||
|
return
|
||||||
|
else
|
||||||
return
|
return
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
if(stat & (BROKEN|NOPOWER) || !on)
|
if(stat & (BROKEN|NOPOWER) || !on)
|
||||||
return
|
return
|
||||||
@@ -150,11 +154,12 @@
|
|||||||
|
|
||||||
Topic(href, href_list)
|
Topic(href, href_list)
|
||||||
|
|
||||||
if(usr.equipped())
|
if(!issilicon(usr))
|
||||||
if(!istype(usr.equipped(), /obj/item/device/multitool))
|
if(usr.equipped())
|
||||||
|
if(!istype(usr.equipped(), /obj/item/device/multitool))
|
||||||
|
return
|
||||||
|
else
|
||||||
return
|
return
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
if(stat & (BROKEN|NOPOWER) || !on)
|
if(stat & (BROKEN|NOPOWER) || !on)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
if(href_list["network"])
|
if(href_list["network"])
|
||||||
|
|
||||||
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
||||||
if(newnet && (usr in range(1, src) || issilicon(usr)))
|
if(newnet && ((usr in range(1, src) || issilicon(usr))))
|
||||||
if(length(newnet) > 15)
|
if(length(newnet) > 15)
|
||||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
|
|
||||||
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
|
||||||
|
|
||||||
if(newnet && (usr in range(1, src) || issilicon(usr)))
|
if(newnet && ((usr in range(1, src) || issilicon(usr))))
|
||||||
if(length(newnet) > 15)
|
if(length(newnet) > 15)
|
||||||
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
|
||||||
|
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ datum
|
|||||||
if(M:eyecheck() <= 0)
|
if(M:eyecheck() <= 0)
|
||||||
flick("e_flash", M.flash)
|
flick("e_flash", M.flash)
|
||||||
|
|
||||||
for(var/i = 1, i <= created_volume, i++)
|
for(var/i = 1, i <= created_volume + rand(1,2), i++)
|
||||||
var/chosen = pick(borks)
|
var/chosen = pick(borks)
|
||||||
var/obj/B = new chosen
|
var/obj/B = new chosen
|
||||||
if(B)
|
if(B)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
client/verb/tcssave()
|
client/verb/tcssave()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if(mob.machine)
|
if(mob.machine || issilicon(mob))
|
||||||
if(istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob) || issilicon(mob)))
|
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||||
if(Machine.editingcode != mob)
|
if(Machine.editingcode != mob)
|
||||||
return
|
return
|
||||||
@@ -23,8 +23,8 @@ client/verb/tcssave()
|
|||||||
|
|
||||||
client/verb/tcscompile()
|
client/verb/tcscompile()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if(mob.machine)
|
if(mob.machine || issilicon(mob))
|
||||||
if(istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob) || issilicon(mob)))
|
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||||
if(Machine.editingcode != mob)
|
if(Machine.editingcode != mob)
|
||||||
return
|
return
|
||||||
@@ -74,8 +74,8 @@ client/verb/tcscompile()
|
|||||||
|
|
||||||
client/verb/tcsrun()
|
client/verb/tcsrun()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if(mob.machine)
|
if(mob.machine || issilicon(mob))
|
||||||
if(istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob) || issilicon(mob)))
|
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||||
if(Machine.editingcode != mob)
|
if(Machine.editingcode != mob)
|
||||||
return
|
return
|
||||||
@@ -140,8 +140,8 @@ client/verb/tcsrun()
|
|||||||
|
|
||||||
client/verb/exittcs()
|
client/verb/exittcs()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if(mob.machine)
|
if(mob.machine || issilicon(mob))
|
||||||
if(istype(mob.machine, /obj/machinery/computer/telecomms/traffic))
|
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||||
if(Machine.editingcode == mob)
|
if(Machine.editingcode == mob)
|
||||||
Machine.storedcode = "[winget(mob, "tcscode", "text")]"
|
Machine.storedcode = "[winget(mob, "tcscode", "text")]"
|
||||||
@@ -152,8 +152,8 @@ client/verb/exittcs()
|
|||||||
|
|
||||||
client/verb/tcsrevert()
|
client/verb/tcsrevert()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if(mob.machine)
|
if(mob.machine || issilicon(mob))
|
||||||
if(istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && (mob.machine in view(1, mob) || issilicon(mob)))
|
if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
|
||||||
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
|
||||||
if(Machine.editingcode != mob)
|
if(Machine.editingcode != mob)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ datum/signal
|
|||||||
if(istext(address))
|
if(istext(address))
|
||||||
var/obj/machinery/telecomms/server/S = data["server"]
|
var/obj/machinery/telecomms/server/S = data["server"]
|
||||||
|
|
||||||
if(!value)
|
if(!value && value != 0)
|
||||||
return S.memory[address]
|
return S.memory[address]
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -204,7 +204,7 @@ datum/signal
|
|||||||
var/obj/machinery/telecomms/server/S = data["server"]
|
var/obj/machinery/telecomms/server/S = data["server"]
|
||||||
var/obj/item/device/radio/hradio
|
var/obj/item/device/radio/hradio
|
||||||
|
|
||||||
if(!message)
|
if(!message && message != 0)
|
||||||
message = "*beep*"
|
message = "*beep*"
|
||||||
if(!source)
|
if(!source)
|
||||||
source = "[html_encode(uppertext(S.id))]"
|
source = "[html_encode(uppertext(S.id))]"
|
||||||
@@ -215,7 +215,7 @@ datum/signal
|
|||||||
freq *= 10 // shift the decimal one place
|
freq *= 10 // shift the decimal one place
|
||||||
|
|
||||||
if(!job)
|
if(!job)
|
||||||
job = "None"
|
job = "?"
|
||||||
|
|
||||||
newsign.data["mob"] = H
|
newsign.data["mob"] = H
|
||||||
newsign.data["mobtype"] = H.type
|
newsign.data["mobtype"] = H.type
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
if(isobject(e))
|
if(isobject(e))
|
||||||
if(istype(e, /list))
|
if(istype(e, /list))
|
||||||
chosenlist = e
|
chosenlist = e
|
||||||
|
i = 2
|
||||||
else
|
else
|
||||||
if(chosenlist)
|
if(chosenlist)
|
||||||
chosenlist.Add(e)
|
chosenlist.Add(e)
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
if(isobject(e))
|
if(isobject(e))
|
||||||
if(istype(e, /list))
|
if(istype(e, /list))
|
||||||
chosenlist = e
|
chosenlist = e
|
||||||
|
i = 2
|
||||||
else
|
else
|
||||||
if(chosenlist)
|
if(chosenlist)
|
||||||
chosenlist.Remove(e)
|
chosenlist.Remove(e)
|
||||||
@@ -113,7 +115,7 @@
|
|||||||
// Clone of copytext()
|
// Clone of copytext()
|
||||||
/proc/docopytext(var/string, var/start = 1, var/end = 0)
|
/proc/docopytext(var/string, var/start = 1, var/end = 0)
|
||||||
if(istext(string) && isnum(start) && isnum(end))
|
if(istext(string) && isnum(start) && isnum(end))
|
||||||
if(length(string) >= end && start > 0)
|
if(start > 0)
|
||||||
return copytext(string, start, end)
|
return copytext(string, start, end)
|
||||||
|
|
||||||
// Clone of length()
|
// Clone of length()
|
||||||
|
|||||||
Reference in New Issue
Block a user