mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
- Committed SuperSayu's patch fix for silicon alarms.
- Made the singularity not move stuff while contained, should help and make it easier to work with; such as fixing the field generator. - Added logging for gold slime extracts. - Removed unneeded deletion of signals in telecomms code. - Added a debug verb which will record pointers of signals that weren't garbage collected. - Removed the need to create a mob to compare it in telecomms code. - The spider infestation is more likely going to spawn nurses. - Runtime fix with spells. - Reverse list actually does something now. Bots never needed it so I removed it. (Thanks carn) - Added an ON_BORDER flag for border firedoors. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5601 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -146,11 +146,11 @@ proc/listclearnulls(list/list)
|
||||
* Sorting
|
||||
*/
|
||||
|
||||
//Reverses the order of items in the list (Turning a stack into a queue)
|
||||
//Reverses the order of items in the list
|
||||
/proc/reverselist(var/list/input)
|
||||
var/list/output = new/list()
|
||||
for(var/A in input)
|
||||
output += A
|
||||
var/list/output = list()
|
||||
for(var/i = input.len; i >= 1; i--)
|
||||
output += input[i]
|
||||
return output
|
||||
|
||||
//Randomize: Return the list in a random order
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
else
|
||||
step(projectile,dir)
|
||||
|
||||
if(!projectile) // step and step_to sleeps so we'll have to check again.
|
||||
break
|
||||
|
||||
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
|
||||
del(projectile)
|
||||
break
|
||||
|
||||
+45
-22
@@ -182,7 +182,7 @@ datum/radio_frequency
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
if(!start_point)
|
||||
del(signal)
|
||||
// del(signal)
|
||||
return 0
|
||||
if (filter) //here goes some copypasta. It is for optimisation. -rastaf0
|
||||
for(var/obj/device in devices[filter])
|
||||
@@ -255,11 +255,26 @@ datum/radio_frequency
|
||||
del(devices_line)
|
||||
|
||||
|
||||
obj/proc
|
||||
receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
return null
|
||||
var/list/pointers = list()
|
||||
|
||||
datum/signal
|
||||
/client/proc/print_pointers()
|
||||
set name = "Debug Signals"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
src << "There are [pointers.len] pointers:"
|
||||
for(var/p in pointers)
|
||||
src << p
|
||||
var/datum/signal/S = locate(p)
|
||||
if(istype(S))
|
||||
src << S.debug_print()
|
||||
|
||||
/obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
return null
|
||||
|
||||
/datum/signal
|
||||
var/obj/source
|
||||
|
||||
var/transmission_method = 0
|
||||
@@ -272,21 +287,29 @@ datum/signal
|
||||
|
||||
var/frequency = 0
|
||||
|
||||
proc/copy_from(datum/signal/model)
|
||||
source = model.source
|
||||
transmission_method = model.transmission_method
|
||||
data = model.data
|
||||
encryption = model.encryption
|
||||
frequency = model.frequency
|
||||
/datum/signal/New()
|
||||
..()
|
||||
pointers += "\ref[src]"
|
||||
|
||||
proc/debug_print()
|
||||
if (source)
|
||||
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
|
||||
else
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
|
||||
if(islist(data[i]))
|
||||
var/list/L = data[i]
|
||||
for(var/t in L)
|
||||
. += "data\[\"[i]\"\] list has: [t]"
|
||||
/datum/signal/Del()
|
||||
pointers -= "\ref[src]"
|
||||
..()
|
||||
|
||||
/datum/signal/proc/copy_from(datum/signal/model)
|
||||
source = model.source
|
||||
transmission_method = model.transmission_method
|
||||
data = model.data
|
||||
encryption = model.encryption
|
||||
frequency = model.frequency
|
||||
|
||||
/datum/signal/proc/debug_print()
|
||||
if (source)
|
||||
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
|
||||
else
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
|
||||
if(islist(data[i]))
|
||||
var/list/L = data[i]
|
||||
for(var/t in L)
|
||||
. += "data\[\"[i]\"\] list has: [t]"
|
||||
|
||||
@@ -225,7 +225,6 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
next_dest_loc = closest_loc
|
||||
if (next_dest_loc)
|
||||
src.patrol_path = AStar(src.loc, next_dest_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=null)
|
||||
src.patrol_path = reverselist(src.patrol_path)
|
||||
else
|
||||
patrol_move()
|
||||
|
||||
@@ -235,7 +234,6 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
spawn(0)
|
||||
if(!src || !target) return
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 0, 30)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -615,7 +615,6 @@ Auto Patrol: []"},
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/ed209/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
@@ -244,7 +244,6 @@
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
else
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -299,7 +299,6 @@
|
||||
if(src.patient && src.path.len == 0 && (get_dist(src,src.patient) > 1))
|
||||
spawn(0)
|
||||
src.path = AStar(src.loc, get_turf(src.patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
|
||||
src.path = reverselist(src.path)
|
||||
if(src.path.len == 0)
|
||||
src.oldpatient = src.patient
|
||||
src.patient = null
|
||||
|
||||
@@ -706,7 +706,6 @@
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/mulebot/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// sets the current destination
|
||||
|
||||
@@ -553,7 +553,6 @@ Auto Patrol: []"},
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/secbot/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
|
||||
src.path = reverselist(src.path)
|
||||
|
||||
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
@@ -90,6 +90,8 @@
|
||||
//This is needed due to BYOND limitations in controlling visibility
|
||||
heat_proof = 1
|
||||
|
||||
flags = ON_BORDER
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
|
||||
@@ -75,7 +75,7 @@ obj/machinery/embedded_controller
|
||||
if(radio_connection)
|
||||
return radio_connection.post_signal(src, signal)
|
||||
else
|
||||
del(signal)
|
||||
signal = null
|
||||
|
||||
proc
|
||||
set_frequency(new_frequency)
|
||||
|
||||
@@ -70,23 +70,28 @@
|
||||
var/race // The actual race of the mob
|
||||
var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
|
||||
var/mobtype = C.parameters["mobtype"]
|
||||
var/mob/M = new mobtype
|
||||
|
||||
if(ishuman(M) || isbrain(M))
|
||||
var/list/humans = typesof(/mob/living/carbon/human, /mob/living/carbon/brain)
|
||||
var/list/monkeys = typesof(/mob/living/carbon/monkey)
|
||||
var/list/silicons = typesof(/mob/living/silicon)
|
||||
var/list/slimes = typesof(/mob/living/carbon/slime)
|
||||
var/list/animals = typesof(/mob/living/simple_animal)
|
||||
|
||||
if(mobtype in humans)
|
||||
race = "Human"
|
||||
|
||||
else if(ismonkey(M))
|
||||
else if(mobtype in monkeys)
|
||||
race = "Monkey"
|
||||
language = race
|
||||
|
||||
else if(issilicon(M) || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
|
||||
else if(mobtype in silicons || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
|
||||
race = "Artificial Life"
|
||||
|
||||
else if(isslime(M)) // NT knows a lot about slimes, but not aliens. Can identify slimes
|
||||
else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes
|
||||
race = "slime"
|
||||
language = race
|
||||
|
||||
else if(isanimal(M))
|
||||
else if(mobtype in animals)
|
||||
race = "Domestic Animal"
|
||||
language = race
|
||||
|
||||
@@ -94,7 +99,6 @@
|
||||
race = "<i>Unidentifiable</i>"
|
||||
language = race
|
||||
|
||||
del(M)
|
||||
|
||||
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
copy.data["original"] = signal.data["original"]
|
||||
|
||||
else
|
||||
del(copy)
|
||||
copy = null
|
||||
|
||||
|
||||
send_count++
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
layer = 2.7
|
||||
health = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
New()
|
||||
@@ -179,8 +180,9 @@
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
new spawn_type(src.loc)
|
||||
if(!grow_as)
|
||||
grow_as = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
|
||||
new grow_as(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/spider/cocoon
|
||||
|
||||
@@ -159,6 +159,7 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/kill_air_processing
|
||||
src.verbs += /client/proc/disable_communication
|
||||
src.verbs += /client/proc/disable_movement
|
||||
src.verbs += /client/proc/print_pointers
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
while((spawncount >= 1) && vents.len)
|
||||
var/obj/vent = pick(vents)
|
||||
new /obj/effect/spider/spiderling(vent.loc)
|
||||
var/obj/effect/spider/spiderling/S = new(vent.loc)
|
||||
if(prob(66))
|
||||
S.grow_as = /mob/living/simple_animal/hostile/giant_spider/nurse
|
||||
vents -= vent
|
||||
spawncount--
|
||||
@@ -52,7 +52,7 @@
|
||||
msg += "POWER: [alarm_types_show["Power"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_show["Power"]] alarms detected. - "
|
||||
msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
|
||||
|
||||
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
|
||||
src << msg
|
||||
@@ -77,7 +77,7 @@
|
||||
msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_show["Power"]] alarms detected. - "
|
||||
msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
|
||||
|
||||
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
|
||||
src << msg
|
||||
@@ -85,10 +85,10 @@
|
||||
|
||||
alarms_to_show = list()
|
||||
alarms_to_clear = list()
|
||||
for(var/i = 1; i < alarm_types_show.len; i++)
|
||||
alarm_types_show[i] = 0
|
||||
for(var/i = 1; i < alarm_types_clear.len; i++)
|
||||
alarm_types_clear[i] = 0
|
||||
for(var/key in alarm_types_show)
|
||||
alarm_types_show[key] = 0
|
||||
for(var/key in alarm_types_clear)
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
@@ -5,7 +5,7 @@ var/global/list/uneatable = list(
|
||||
/obj/effect/overlay
|
||||
)
|
||||
|
||||
/obj/machinery/singularity/
|
||||
/obj/machinery/singularity
|
||||
name = "Gravitational Singularity"
|
||||
desc = "A Gravitational Singularity."
|
||||
icon = 'icons/obj/singularity.dmi'
|
||||
@@ -212,7 +212,7 @@ var/global/list/uneatable = list(
|
||||
for(var/atom/X in orange(grav_pull,src))
|
||||
var/dist = get_dist(X, src)
|
||||
// Movable atoms only
|
||||
if(dist > consume_range && istype(X, /atom/movable))
|
||||
if(!contained && dist > consume_range && istype(X, /atom/movable))
|
||||
if(is_type_in_list(X, uneatable)) continue
|
||||
if(((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human)))|| (src.current_size >= 9))
|
||||
step_towards(X,src)
|
||||
|
||||
@@ -984,6 +984,25 @@ datum
|
||||
)//exclusion list for things you don't want the reaction to create.
|
||||
var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs
|
||||
|
||||
var/message = "A gold slime reaction has occured"
|
||||
|
||||
var/atom/A = holder.my_atom
|
||||
if(A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/area/my_area = get_area(T)
|
||||
message += " in [my_area.name]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</A>)"
|
||||
message += " (<A HREF='?_src_=vars;Vars=\ref[A]'>VV</A>)"
|
||||
|
||||
var/mob/M = get(A, /mob)
|
||||
if(M)
|
||||
message += " - Carried By: [M.real_name] ([M.key]) (<A HREF='?_src_=holder;adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>)"
|
||||
else
|
||||
message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]"
|
||||
else
|
||||
message += "."
|
||||
|
||||
message_admins(message, 0, 1)
|
||||
|
||||
playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null))
|
||||
|
||||
Reference in New Issue
Block a user