mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
@@ -14,6 +14,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/area
|
||||
var/fire = null
|
||||
var/atmos = 1
|
||||
@@ -32,6 +33,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
var/eject = null
|
||||
|
||||
var/debug = 0
|
||||
var/powerupdate = 10 //We give everything 10 ticks to settle out it's power usage.
|
||||
var/requires_power = 1
|
||||
var/always_unpowered = 0 //this gets overriden to 1 for space in area/New()
|
||||
|
||||
@@ -44,7 +47,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/used_environ = 0
|
||||
|
||||
var/has_gravity = 1
|
||||
|
||||
var/list/apc = list()
|
||||
var/no_air = null
|
||||
var/area/master // master area used for power calcluations
|
||||
// (original area before splitting due to sd_DAL)
|
||||
@@ -352,6 +355,63 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/shuttle/salvage
|
||||
name = "\improper Salvage Ship"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/shuttle/salvage/start
|
||||
name = "\improper Middle of Nowhere"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/arrivals
|
||||
name = "\improper Space Station Auxiliary Docking"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/derelict
|
||||
name = "\improper Derelict Station"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/djstation
|
||||
name = "\improper Ruskie DJ Station"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/north
|
||||
name = "\improper North of the Station"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/east
|
||||
name = "\improper East of the Station"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/south
|
||||
name = "\improper South of the Station"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/commssat
|
||||
name = "\improper The Communications Satellite"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/mining
|
||||
name = "\improper South-West of the Mining Asteroid"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/abandoned_ship
|
||||
name = "\improper Abandoned Ship"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/clown_asteroid
|
||||
name = "\improper Clown Asteroid"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/trading_post
|
||||
name = "\improper Trading Post"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/shuttle/salvage/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/airtunnel1/ // referenced in airtunnel.dm:759
|
||||
|
||||
/area/dummy/ // Referenced in engine.dm:261
|
||||
@@ -579,22 +639,18 @@ proc/process_ghost_teleport_locs()
|
||||
/area/xenos_station/start
|
||||
name = "\improper start area"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/southwest
|
||||
name = "\improper aft port solars"
|
||||
icon_state = "southwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northwest
|
||||
name = "\improper fore port solars"
|
||||
icon_state = "northwest"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/northeast
|
||||
name = "\improper fore starboard solars"
|
||||
@@ -604,17 +660,14 @@ proc/process_ghost_teleport_locs()
|
||||
/area/xenos_station/southeast
|
||||
name = "\improper aft starboard solars"
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/north
|
||||
name = "\improper north landing area"
|
||||
name = "\improper west landing area"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/south
|
||||
name = "\improper south landing area"
|
||||
name = "\improper east landing area"
|
||||
icon_state = "south"
|
||||
requires_power = 0
|
||||
|
||||
//PRISON
|
||||
/area/prison
|
||||
|
||||
+52
-44
@@ -13,6 +13,8 @@
|
||||
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references loc.loc.master ~Carn
|
||||
uid = ++global_uid
|
||||
related = list(src)
|
||||
active_areas += src
|
||||
all_areas += src
|
||||
|
||||
if(type == /area) // override defaults for space. TODO: make space areas of type /area/space rather than /area
|
||||
requires_power = 1
|
||||
@@ -24,20 +26,16 @@
|
||||
// lighting_state = 4
|
||||
//has_gravity = 0 // Space has gravity. Because.. because.
|
||||
|
||||
if(requires_power)
|
||||
luminosity = 0
|
||||
else
|
||||
if(!requires_power)
|
||||
power_light = 0 //rastaf0
|
||||
power_equip = 0 //rastaf0
|
||||
power_environ = 0 //rastaf0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
..()
|
||||
|
||||
// spawn(15)
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
InitializeLighting()
|
||||
|
||||
|
||||
/area/proc/poweralert(var/state, var/obj/source as obj)
|
||||
@@ -83,9 +81,9 @@
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
testing("Danger level at [AA.name]: [AA.local_danger_level] (reported [reported_danger_level])")
|
||||
// testing("Danger level at [AA.name]: [AA.local_danger_level] (reported [reported_danger_level])")
|
||||
|
||||
testing("Danger level decided upon in [name]: [danger_level] (from [atmosalm])")
|
||||
// testing("Danger level decided upon in [name]: [danger_level] (from [atmosalm])")
|
||||
|
||||
// Danger level change?
|
||||
if(danger_level != atmosalm)
|
||||
@@ -268,6 +266,7 @@
|
||||
// called when power status changes
|
||||
|
||||
/area/proc/power_change()
|
||||
master.powerupdate = 2
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/M in RA) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
@@ -316,54 +315,63 @@
|
||||
/area/Entered(A)
|
||||
var/musVolume = 25
|
||||
var/sound = 'sound/ambience/ambigen1.ogg'
|
||||
var/area/newarea
|
||||
var/area/oldarea
|
||||
|
||||
if(istype(A,/mob))
|
||||
var/mob/M=A
|
||||
|
||||
if(!M.lastarea)
|
||||
M.lastarea = get_area_master(M)
|
||||
newarea = get_area_master(M)
|
||||
oldarea = M.lastarea
|
||||
|
||||
if(newarea==oldarea) return
|
||||
|
||||
M.lastarea = src
|
||||
|
||||
// /vg/ - EVENTS!
|
||||
CallHook("MobAreaChange", list("mob" = M, "new" = newarea, "old" = oldarea))
|
||||
|
||||
if(!istype(A,/mob/living)) return
|
||||
|
||||
var/mob/living/L = A
|
||||
if(!L.ckey) return
|
||||
|
||||
if(!L.lastarea)
|
||||
L.lastarea = get_area(L.loc)
|
||||
var/area/newarea = get_area(L.loc)
|
||||
var/area/oldarea = L.lastarea
|
||||
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
thunk(L)
|
||||
|
||||
L.lastarea = newarea
|
||||
|
||||
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
if(!(L && L.client && (L.client.prefs.sound & SOUND_AMBIENCE))) return
|
||||
if(L && L.client && (L.client.prefs.toggles & SOUND_AMBIENCE))
|
||||
if(!L.client.ambience_playing)
|
||||
L.client.ambience_playing = 1
|
||||
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
|
||||
if(!L.client.ambience_playing)
|
||||
L.client.ambience_playing = 1
|
||||
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
if(prob(35) && !newarea.media_source)
|
||||
// TODO: This is dumb. - N3X
|
||||
if(istype(src, /area/chapel))
|
||||
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/medical/morgue))
|
||||
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg')
|
||||
else if(type == /area)
|
||||
sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/engine))
|
||||
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
|
||||
sound = pick('sound/ambience/ambimalf.ogg')
|
||||
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
|
||||
sound = pick('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg')
|
||||
musVolume = 25
|
||||
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
|
||||
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
else
|
||||
sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
|
||||
if(prob(35))
|
||||
|
||||
if(istype(src, /area/chapel))
|
||||
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/medical/morgue))
|
||||
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg')
|
||||
else if(type == /area)
|
||||
sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg')
|
||||
else if(istype(src, /area/engine))
|
||||
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
|
||||
sound = pick('sound/ambience/ambimalf.ogg')
|
||||
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
|
||||
sound = pick('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg')
|
||||
musVolume = 25
|
||||
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
|
||||
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
else
|
||||
sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
|
||||
if(!L.client.played)
|
||||
L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
|
||||
L.client.played = 1
|
||||
spawn(600) //ewww - this is very very bad
|
||||
if(L.&& L.client)
|
||||
L.client.played = 0
|
||||
if(!L.client.played)
|
||||
L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
|
||||
L.client.played = 1
|
||||
spawn(600) //ewww - this is very very bad
|
||||
if(L.&& L.client)
|
||||
L.client.played = 0
|
||||
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
|
||||
|
||||
@@ -161,3 +161,30 @@ proc/make_mining_asteroid_secret(var/size = 5)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
proc/check_complex_placement(var/turf/T,var/size_x,var/size_y,var/ignore_walls=0)
|
||||
var/list/surroundings = list()
|
||||
|
||||
surroundings |= range(7, locate(T.x,T.y,T.z))
|
||||
surroundings |= range(7, locate(T.x+size_x,T.y,T.z))
|
||||
surroundings |= range(7, locate(T.x,T.y+size_y,T.z))
|
||||
surroundings |= range(7, locate(T.x+size_x,T.y+size_y,T.z))
|
||||
|
||||
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
|
||||
return 0
|
||||
|
||||
if(locate(/turf/space) in surroundings)
|
||||
return 0
|
||||
|
||||
/* /vg/: Allow combining rooms.
|
||||
if(locate(/area/asteroid/artifactroom) in surroundings)
|
||||
return 0
|
||||
|
||||
if(locate(/turf/unsimulated/floor/asteroid) in surroundings)
|
||||
return 0
|
||||
*/
|
||||
|
||||
// /vg/: Stop spawning shit inside of the vox hideout
|
||||
if(locate(/turf/simulated/wall) in surroundings && !ignore_walls)
|
||||
return 0
|
||||
return 1
|
||||
@@ -21,6 +21,9 @@
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
// Garbage collection
|
||||
var/gc_destroyed=null
|
||||
|
||||
/atom/proc/throw_impact(atom/hit_atom, var/speed)
|
||||
if(istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
@@ -41,6 +44,15 @@
|
||||
var/mob/living/M = src
|
||||
M.take_organ_damage(20)
|
||||
|
||||
/atom/Del()
|
||||
// Pass to Destroy().
|
||||
if(!gc_destroyed)
|
||||
Destroy()
|
||||
..()
|
||||
|
||||
/atom/proc/Destroy()
|
||||
gc_destroyed=world.time
|
||||
|
||||
|
||||
/atom/proc/CheckParts()
|
||||
return
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
|
||||
spawn( 0 )
|
||||
if ((A && yes))
|
||||
A.last_bumped = world.time
|
||||
A.Bumped(src)
|
||||
if ((A && yes))
|
||||
A.last_bumped = world.time
|
||||
A.Bumped(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
@@ -44,7 +43,7 @@
|
||||
if(destination)
|
||||
if(loc)
|
||||
loc.Exited(src)
|
||||
loc = destination
|
||||
setloc(destination)
|
||||
loc.Entered(src)
|
||||
for(var/atom/movable/AM in loc)
|
||||
AM.Crossed(src)
|
||||
@@ -166,8 +165,7 @@
|
||||
anchored = 1
|
||||
|
||||
/atom/movable/overlay/New()
|
||||
for(var/x in src.verbs)
|
||||
src.verbs -= x
|
||||
verbs.Cut()
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
|
||||
@@ -45,6 +45,9 @@ var/global/list/assigned_blocks[DNA_SE_LENGTH]
|
||||
|
||||
var/global/list/datum/dna/gene/dna_genes[0]
|
||||
|
||||
var/global/list/good_blocks[0]
|
||||
var/global/list/bad_blocks[0]
|
||||
|
||||
/////////////////
|
||||
// GENE DEFINES
|
||||
/////////////////
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
/proc/randmutb(var/mob/living/M)
|
||||
if(!M) return
|
||||
M.dna.check_integrity()
|
||||
var/block = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
|
||||
var/block = pick(bad_blocks)
|
||||
M.dna.SetSEState(block, 1)
|
||||
|
||||
// Give Random Good Mutation to M
|
||||
/proc/randmutg(var/mob/living/M)
|
||||
if(!M) return
|
||||
M.dna.check_integrity()
|
||||
var/block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,COLDBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
|
||||
var/block = pick(good_blocks)
|
||||
M.dna.SetSEState(block, 1)
|
||||
|
||||
// Random Appearance Mutation
|
||||
|
||||
@@ -86,14 +86,11 @@
|
||||
/obj/machinery/dna_scannernew/proc/eject_occupant()
|
||||
src.go_out()
|
||||
for(var/obj/O in src)
|
||||
if(!istype(O,/obj/item/weapon/circuitboard/clonescanner) && \
|
||||
!istype(O,/obj/item/weapon/stock_parts) && \
|
||||
!istype(O,/obj/item/stack/cable_coil) && \
|
||||
O != beaker)
|
||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker)
|
||||
if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/stack/cable_coil)))
|
||||
O.setloc(get_turf(src))//Ejects items that manage to get in there (exluding the components)
|
||||
if(!occupant)
|
||||
for(var/mob/M in src)//Failsafe so you can get mobs out
|
||||
M.loc = get_turf(src)
|
||||
M.setloc(get_turf(src))
|
||||
|
||||
/obj/machinery/dna_scannernew/verb/move_inside()
|
||||
set src in oview(1)
|
||||
@@ -116,7 +113,7 @@
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.setloc(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "scanner_1"
|
||||
src.add_fingerprint(usr)
|
||||
@@ -194,7 +191,7 @@
|
||||
|
||||
beaker = item
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
item.setloc(src)
|
||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||
return
|
||||
else if (!istype(item, /obj/item/weapon/grab))
|
||||
@@ -217,7 +214,7 @@
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "scanner_1"
|
||||
|
||||
@@ -240,7 +237,7 @@
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.setloc(src.loc)
|
||||
src.occupant = null
|
||||
src.icon_state = "scanner_0"
|
||||
return
|
||||
@@ -249,7 +246,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(35)
|
||||
//SN src = null
|
||||
@@ -258,7 +255,7 @@
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(108)
|
||||
//SN src = null
|
||||
@@ -267,7 +264,7 @@
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(181)
|
||||
//SN src = null
|
||||
@@ -280,7 +277,7 @@
|
||||
/obj/machinery/dna_scannernew/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
// SPEECH MANIPULATORS //
|
||||
/////////////////////////
|
||||
|
||||
/* Duplicate
|
||||
// WAS: /datum/bioEffect/stutter
|
||||
/datum/dna/gene/disability/stutter
|
||||
name = "Stutter"
|
||||
@@ -87,6 +88,7 @@
|
||||
if(is_type_in_list(/datum/dna/gene/disability/speech,M.active_genes))
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
*/
|
||||
|
||||
/* Figure out what the fuck this one does.
|
||||
// WAS: /datum/bioEffect/smile
|
||||
@@ -130,6 +132,7 @@
|
||||
block=CHAVBLOCK
|
||||
|
||||
OnSay(var/mob/M, var/message)
|
||||
// THIS ENTIRE THING BEGS FOR REGEX
|
||||
message = replacetext(message,"dick","prat")
|
||||
message = replacetext(message,"comdom","knob'ead")
|
||||
message = replacetext(message,"looking at","gawpin' at")
|
||||
@@ -144,7 +147,7 @@
|
||||
message = replacetext(message,"i don't know","wot mate")
|
||||
message = replacetext(message,"no","naw")
|
||||
message = replacetext(message,"robust","chin")
|
||||
message = replacetext(message,"hi","how what how")
|
||||
message = replacetext(message," hi ","how what how")
|
||||
message = replacetext(message,"hello","sup bruv")
|
||||
message = replacetext(message,"kill","bang")
|
||||
message = replacetext(message,"murder","bang")
|
||||
@@ -308,16 +311,15 @@
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
selection_type = "range"
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
include_user = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/immolate/cast(list/targets)
|
||||
if (istype(usr,/mob/living/))
|
||||
var/mob/living/L = usr
|
||||
var/mob/living/L = usr
|
||||
|
||||
L.adjust_fire_stacks(0.5) // Same as walking into fire. Was 100 (goon fire)
|
||||
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
|
||||
//playsound(L.loc, 'mag_fireballlaunch.ogg', 50, 0)
|
||||
|
||||
return
|
||||
L.adjust_fire_stacks(0.5) // Same as walking into fire. Was 100 (goon fire)
|
||||
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
|
||||
//playsound(L.loc, 'mag_fireballlaunch.ogg', 50, 0)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
#define EAT_MOB_DELAY 300 // 30s
|
||||
|
||||
// WAS: /datum/bioEffect/alcres
|
||||
/datum/dna/gene/basic/sober
|
||||
@@ -53,7 +53,7 @@
|
||||
var/turf/simulated/T = get_turf(M)
|
||||
if(!istype(T))
|
||||
return
|
||||
if(T.lighting_lumcount <= 2)
|
||||
if(T.lit_value <= 2)
|
||||
M.alpha = 0
|
||||
else
|
||||
M.alpha = round(255 * 0.80)
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
OnMobLife(var/mob/M)
|
||||
if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained())
|
||||
M.alpha = round(255 * 0.10)
|
||||
M.alpha = 0
|
||||
else
|
||||
M.alpha = round(255 * 0.80)
|
||||
|
||||
@@ -122,13 +122,15 @@
|
||||
panel = "Mutant Powers"
|
||||
|
||||
charge_type = "recharge"
|
||||
charge_max = 600
|
||||
charge_max = 1200
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
invocation_type = "none"
|
||||
range = 7
|
||||
selection_type = "range"
|
||||
include_user = 1
|
||||
// centcomm_cancast = 0
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/cryokinesis/cast(list/targets)
|
||||
@@ -142,7 +144,7 @@
|
||||
usr << "\red This will only work on normal organic beings."
|
||||
return
|
||||
|
||||
C.bodytemperature = -1500
|
||||
C.bodytemperature = -300
|
||||
C.ExtinguishMob()
|
||||
|
||||
C.visible_message("\red A cloud of fine ice crystals engulfs [C]!")
|
||||
@@ -195,16 +197,19 @@
|
||||
stat_allowed = 0
|
||||
invocation_type = "none"
|
||||
range = 1
|
||||
selection_type = "range"
|
||||
selection_type = "view"
|
||||
|
||||
var/list/types_allowed=list(/obj/item,/mob/living/simple_animal, /mob/living/carbon/monkey, /mob/living/carbon/human)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/eat/choose_targets(mob/user = usr)
|
||||
var/list/targets = list()
|
||||
var/list/possible_targets = list()
|
||||
|
||||
for(var/obj/item/O in view_or_range(range, user, selection_type))
|
||||
possible_targets += O
|
||||
for(var/atom/movable/O in view_or_range(range, user, selection_type))
|
||||
if(is_type_in_list(O,types_allowed))
|
||||
possible_targets += O
|
||||
|
||||
targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
|
||||
targets += input("Choose the target of your hunger.", "Targeting") as anything in possible_targets
|
||||
|
||||
if(!targets.len) //doesn't waste the spell
|
||||
revert_cast(user)
|
||||
@@ -212,20 +217,9 @@
|
||||
|
||||
perform(targets)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets)
|
||||
if(!targets.len)
|
||||
usr << "<span class='notice'>No target found in range.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/the_item = targets[1]
|
||||
|
||||
usr.visible_message("\red [usr] eats [the_item].")
|
||||
playsound(usr.loc, 'sound/items/eatfood.ogg', 50, 0)
|
||||
|
||||
del(the_item)
|
||||
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H=usr
|
||||
/obj/effect/proc_holder/spell/targeted/eat/proc/doHeal(var/mob/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H=user
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/affecting = null
|
||||
if(!H.organs[name])
|
||||
@@ -234,8 +228,63 @@
|
||||
if(!istype(affecting, /datum/organ/external))
|
||||
continue
|
||||
affecting.heal_damage(4, 0)
|
||||
usr:UpdateDamageIcon()
|
||||
usr:updatehealth()
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets)
|
||||
if(!targets.len)
|
||||
usr << "<span class='notice'>No target found in range.</span>"
|
||||
return
|
||||
|
||||
var/atom/movable/the_item = targets[1]
|
||||
if(ishuman(the_item))
|
||||
//My gender
|
||||
var/m_his="his"
|
||||
if(usr.gender==FEMALE)
|
||||
m_his="her"
|
||||
// Their gender
|
||||
var/t_his="his"
|
||||
if(the_item.gender==FEMALE)
|
||||
t_his="her"
|
||||
var/mob/living/carbon/human/H = the_item
|
||||
var/datum/organ/external/limb = H.get_organ(usr.zone_sel.selecting)
|
||||
if(!istype(limb))
|
||||
usr << "\red You can't eat this part of them!"
|
||||
revert_cast()
|
||||
return 0
|
||||
if(istype(limb,/datum/organ/external/head))
|
||||
// Bullshit, but prevents being unable to clone someone.
|
||||
usr << "\red You try to put \the [limb] in your mouth, but [t_his] ears tickle your throat!"
|
||||
revert_cast()
|
||||
return 0
|
||||
if(istype(limb,/datum/organ/external/chest))
|
||||
// Bullshit, but prevents being able to instagib someone.
|
||||
usr << "\red You try to put their [limb] in your mouth, but it's too big to fit!"
|
||||
revert_cast()
|
||||
return 0
|
||||
usr.visible_message("\red <b>[usr] begins stuffing [the_item]'s [limb.display_name] into [m_his] gaping maw!</b>")
|
||||
var/oldloc = H.loc
|
||||
if(!do_mob(usr,H,EAT_MOB_DELAY))
|
||||
usr << "\red You were interrupted before you could eat [the_item]!"
|
||||
else
|
||||
if(!limb || !H)
|
||||
return
|
||||
if(H.loc!=oldloc)
|
||||
usr << "\red \The [limb] moved away from your mouth!"
|
||||
return
|
||||
usr.visible_message("\red [usr] [pick("chomps","bites")] off [the_item]'s [limb]!")
|
||||
playsound(usr.loc, 'sound/items/eatfood.ogg', 50, 0)
|
||||
var/obj/limb_obj=limb.droplimb(1,1)
|
||||
if(limb_obj)
|
||||
var/datum/organ/external/chest=usr:get_organ("chest")
|
||||
chest.implants += limb_obj
|
||||
limb_obj.loc=usr
|
||||
doHeal(usr)
|
||||
else
|
||||
usr.visible_message("\red [usr] eats \the [the_item].")
|
||||
playsound(usr.loc, 'sound/items/eatfood.ogg', 50, 0)
|
||||
del(the_item)
|
||||
doHeal(usr)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
|
||||
if(!istype(M,/mob/living/carbon/human))
|
||||
testing("Cannot monkey-ify [M], type is [M.type].")
|
||||
// testing("Cannot monkey-ify [M], type is [M.type].")
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.monkeyizing = 1
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
..(M,connected,flags)
|
||||
M.pass_flags |= 1
|
||||
|
||||
/* OLD HULK BEHAVIOR
|
||||
/datum/dna/gene/basic/hulk
|
||||
name="Hulk"
|
||||
activation_messages=list("Your muscles hurt.")
|
||||
@@ -147,27 +148,29 @@
|
||||
block=HULKBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big and small.
|
||||
// Can't be big AND small.
|
||||
if(M_DWARF in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
if(M_HULK in M.mutations)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
return 0
|
||||
|
||||
OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M.health <= 25)
|
||||
M.mutations.Remove(M_HULK)
|
||||
M.dna.SetSEState(HULKBLOCK,0)
|
||||
M.update_mutations() //update our mutation overlays
|
||||
M << "\red You suddenly feel very weak."
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
|
||||
*/
|
||||
/datum/dna/gene/basic/xray
|
||||
name="X-Ray Vision"
|
||||
activation_messages=list("The walls suddenly disappear.")
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
This is /vg/'s nerf for hulk. Feel free to steal it.
|
||||
|
||||
Obviously, requires DNA2.
|
||||
*/
|
||||
|
||||
// When hulk was first applied (world.time).
|
||||
/mob/living/carbon/human/var/hulk_time=0
|
||||
|
||||
// In decaseconds.
|
||||
#define HULK_DURATION 300
|
||||
#define HULK_COOLDOWN 600
|
||||
|
||||
/datum/dna/gene/basic/grant_spell/hulk
|
||||
name = "Hulk"
|
||||
desc = "Allows the subject to become the motherfucking Hulk."
|
||||
activation_messages = list("Your muscles hurt.")
|
||||
deactivation_messages = list("Your muscles quit tensing.")
|
||||
|
||||
spelltype = /obj/effect/proc_holder/spell/targeted/hulk
|
||||
|
||||
New()
|
||||
..()
|
||||
block = HULKBLOCK
|
||||
|
||||
can_activate(var/mob/M,var/flags)
|
||||
// Can't be big AND small.
|
||||
if(M_DWARF in M.mutations)
|
||||
return 0
|
||||
return ..(M,flags)
|
||||
|
||||
OnDrawUnderlays(var/mob/M,var/g,var/fat)
|
||||
if(M_HULK in M.mutations)
|
||||
if(fat)
|
||||
return "hulk_[fat]_s"
|
||||
else
|
||||
return "hulk_[g]_s"
|
||||
return 0
|
||||
|
||||
OnMobLife(var/mob/living/carbon/human/M)
|
||||
if(!istype(M)) return
|
||||
if(M_HULK in M.mutations)
|
||||
var/timeleft=M.hulk_time - world.time
|
||||
if(M.health <= 25 || timeleft <= 0)
|
||||
M.hulk_time=0 // Just to be sure.
|
||||
M.mutations.Remove(M_HULK)
|
||||
//M.dna.SetSEState(HULKBLOCK,0)
|
||||
M.update_mutations() //update our mutation overlays
|
||||
M.update_body()
|
||||
M << "\red You suddenly feel very weak."
|
||||
M.Weaken(3)
|
||||
M.emote("collapse")
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/hulk
|
||||
name = "Hulk Out"
|
||||
panel = "Mutant Powers"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
charge_type = "recharge"
|
||||
charge_max = HULK_COOLDOWN
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
|
||||
invocation_type = "none"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/hulk/New()
|
||||
desc = "Get mad! For [HULK_DURATION/10] seconds, anyway."
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/hulk/cast(list/targets)
|
||||
if (istype(usr.loc,/mob/))
|
||||
usr << "\red You can't hulk out right now!"
|
||||
return
|
||||
var/mob/living/carbon/human/M=usr
|
||||
M.hulk_time = world.time + HULK_DURATION
|
||||
M.mutations.Add(M_HULK)
|
||||
M.update_mutations() //update our mutation overlays
|
||||
M.update_body()
|
||||
//M.say(pick("",";")+pick("HULK MAD","YOU MADE HULK ANGRY")) // Just a note to security.
|
||||
message_admins("[key_name(usr)] has hulked out! ([formatJumpTo(usr)])")
|
||||
return
|
||||
@@ -133,6 +133,7 @@
|
||||
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
|
||||
newtraitor << "<B>You are now a traitor.</B>"
|
||||
newtraitor.mind.special_role = "traitor"
|
||||
newtraitor.hud_updateflag |= 1 << SPECIALROLE_HUD
|
||||
var/obj_count = 1
|
||||
newtraitor << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in newtraitor.mind.objectives)
|
||||
|
||||
@@ -175,10 +175,10 @@ var/list/blob_nodes = list()
|
||||
return
|
||||
|
||||
if (1)
|
||||
command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
command_alert("NanoTrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert")
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/new_player))
|
||||
M << sound('sound/AI/outbreak7.ogg')
|
||||
M << sound('sound/AI/blob_confirmed.ogg')
|
||||
return
|
||||
|
||||
if (2)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
intercepttext += "Message ends."
|
||||
for (var/mob/living/silicon/ai/aiPlayer in player_list)
|
||||
if (aiPlayer.client)
|
||||
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs while minimizing collateral damage. The nuclear failsafe must be activated at any cost, the code is: [get_nuke_code()]."
|
||||
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs. The nuclear failsafe must be activated at any cost, the code is: [get_nuke_code()]."
|
||||
aiPlayer.set_zeroth_law(law)
|
||||
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
|
||||
aiPlayer << "Laws Updated: [law]"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
..(loc, h)
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
blob_cores -= src
|
||||
if(overmind)
|
||||
del(overmind)
|
||||
@@ -28,9 +28,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
if(health <= 0)
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
del(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/blobspore/Del()
|
||||
/mob/living/simple_animal/hostile/blobspore/Destroy()
|
||||
if(factory)
|
||||
factory.spores -= src
|
||||
if(contents)
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
processing_objects.Add(src)
|
||||
..(loc, h)
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
blob_nodes -= src
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "blob_idle"
|
||||
desc = "Some blob creature thingy"
|
||||
health = 60
|
||||
brute_resist = 1
|
||||
brute_resist = 4
|
||||
fire_resist = 2
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
|
||||
return 0
|
||||
|
||||
@@ -26,21 +26,61 @@
|
||||
sync_mind()
|
||||
|
||||
src << "<span class='notice'>You are the overmind!</span>"
|
||||
src << "You are the overmind and can control the blob by placing new blob pieces such as..."
|
||||
src << "You are the overmind and can control the blob! You can expand, which will attack people, and place new blob pieces such as..."
|
||||
src << "<b>Normal Blob</b> will expand your reach and allow you to upgrade into special blobs that perform certain functions."
|
||||
src << "<b>Shield Blob</b> is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires."
|
||||
src << "<b>Resource Blob</b> is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all."
|
||||
src << "<b>Node Blob</b> is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate."
|
||||
src << "<b>Factory Blob</b> is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores."
|
||||
src << "<b>Shortcuts:</b> CTRL Click = Expand Blob / Middle Mouse Click = Rally Spores / Alt Click = Create Shield"
|
||||
update_health()
|
||||
|
||||
/mob/camera/blob/proc/update_health()
|
||||
if(blob_core)
|
||||
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#e36600'>[blob_core.health]</font></div>"
|
||||
|
||||
mob/camera/blob/Life()
|
||||
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#82ed00'>[src.blob_points]</font></div>"
|
||||
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#e36600'>[blob_core.health]</font></div>"
|
||||
return
|
||||
/mob/camera/blob/proc/add_points(var/points)
|
||||
if(points != 0)
|
||||
blob_points = Clamp(blob_points + points, 0, max_blob_points)
|
||||
//sanity for manual spawned blob cameras
|
||||
if(hud_used)
|
||||
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#82ed00'>[src.blob_points]</font></div>"
|
||||
|
||||
/mob/camera/blob/say(var/message)
|
||||
return//No talking for you
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "You cannot send IC messages (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
if (stat)
|
||||
return
|
||||
|
||||
blob_talk(message)
|
||||
|
||||
/mob/camera/blob/proc/blob_talk(message)
|
||||
log_say("[key_name(src)] : [message]")
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<font color=\"#EE4000\"><i><span class='game say'>Blob Telepathy, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i></font>"
|
||||
|
||||
for (var/mob/camera/blob/S in world)
|
||||
if(istype(S))
|
||||
S.show_message(rendered, 2)
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||
rendered = "<font color=\"#EE4000\"><i><span class='game say'>Blob Telepathy, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i></font>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
/mob/camera/blob/emote(var/act,var/m_type=1,var/message = null)
|
||||
return
|
||||
@@ -64,3 +104,5 @@ mob/camera/blob/Life()
|
||||
loc = NewLoc
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
if(blob_points < cost)
|
||||
src << "<span class='warning'>You cannot afford this.</span>"
|
||||
return 0
|
||||
blob_points -= cost
|
||||
add_points(-cost)
|
||||
return 1
|
||||
|
||||
/mob/camera/blob/proc/add_points(var/points = 0)
|
||||
if(points)
|
||||
blob_points = min(max_blob_points, blob_points + points)
|
||||
|
||||
// Power verbs
|
||||
|
||||
/mob/camera/blob/verb/transport_core()
|
||||
@@ -35,16 +31,15 @@
|
||||
if(chosen_node)
|
||||
src.loc = chosen_node.loc
|
||||
|
||||
/mob/camera/blob/verb/create_shield()
|
||||
/mob/camera/blob/verb/create_shield_power()
|
||||
set category = "Blob"
|
||||
set name = "Create Shield Blob (10)"
|
||||
set desc = "Create a shield blob."
|
||||
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
create_shield(T)
|
||||
|
||||
if(!T)
|
||||
return
|
||||
/mob/camera/blob/proc/create_shield(var/turf/T)
|
||||
|
||||
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
|
||||
|
||||
@@ -64,6 +59,7 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/camera/blob/verb/create_resource()
|
||||
set category = "Blob"
|
||||
set name = "Create Resource Blob (40)"
|
||||
@@ -85,7 +81,7 @@
|
||||
src << "Unable to use this blob, find a normal one."
|
||||
return
|
||||
|
||||
for(var/obj/effect/blob/resource/blob in orange(4))
|
||||
for(var/obj/effect/blob/resource/blob in orange(4, T))
|
||||
src << "There is a resource blob nearby, move more than 4 tiles away from it!"
|
||||
return
|
||||
|
||||
@@ -154,7 +150,7 @@
|
||||
src << "Unable to use this blob, find a normal one."
|
||||
return
|
||||
|
||||
for(var/obj/effect/blob/node/blob in orange(5))
|
||||
for(var/obj/effect/blob/node/blob in orange(5, T))
|
||||
src << "There is another node nearby, move more than 5 tiles away from it!"
|
||||
return
|
||||
|
||||
@@ -186,7 +182,7 @@
|
||||
src << "Unable to use this blob, find a normal one."
|
||||
return
|
||||
|
||||
for(var/obj/effect/blob/factory/blob in orange(7))
|
||||
for(var/obj/effect/blob/factory/blob in orange(7, T))
|
||||
src << "There is a factory blob nearby, move more than 7 tiles away from it!"
|
||||
return
|
||||
|
||||
@@ -219,13 +215,15 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/camera/blob/verb/spawn_blob()
|
||||
/mob/camera/blob/verb/expand_blob_power()
|
||||
set category = "Blob"
|
||||
set name = "Expand Blob (5)"
|
||||
set name = "Expand/Attack Blob (5)"
|
||||
set desc = "Attempts to create a new blob in this tile. If the tile isn't clear we will attack it, which might clear it."
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
expand_blob(T)
|
||||
|
||||
/mob/camera/blob/proc/expand_blob(var/turf/T)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
@@ -234,7 +232,7 @@
|
||||
src << "There is a blob here!"
|
||||
return
|
||||
|
||||
var/obj/effect/blob/OB = locate() in circlerange(src, 1)
|
||||
var/obj/effect/blob/OB = locate() in circlerange(T, 1)
|
||||
if(!OB)
|
||||
src << "There is no blob adjacent to you."
|
||||
return
|
||||
@@ -249,56 +247,28 @@
|
||||
OB.expand(T, 0)
|
||||
return
|
||||
|
||||
/mob/camera/blob/proc/click_create_shield(obj/effect/blob/B)
|
||||
if(!B)//We are on a blob
|
||||
src << "There is no blob here!"
|
||||
return
|
||||
|
||||
if(!istype(B, /obj/effect/blob/normal))
|
||||
src << "Unable to use this blob, find a normal one."
|
||||
return
|
||||
|
||||
if(!can_buy(10))
|
||||
return
|
||||
|
||||
|
||||
B.change_to(/obj/effect/blob/shield)
|
||||
return
|
||||
|
||||
/mob/camera/blob/proc/click_expand_blob(var/turf/T)
|
||||
|
||||
if(!T)
|
||||
return
|
||||
|
||||
var/obj/effect/blob/B = locate() in T
|
||||
if(B)
|
||||
src << "There is a blob here!"
|
||||
return
|
||||
|
||||
var/obj/effect/blob/OB = locate() in circlerange(T, 1)
|
||||
if(!OB)
|
||||
src << "There is no blob adjacent to that tile."
|
||||
return
|
||||
|
||||
if(!can_buy(5))
|
||||
return
|
||||
OB.expand(T, 0)
|
||||
return
|
||||
|
||||
/mob/camera/blob/verb/rally_spores()
|
||||
/mob/camera/blob/verb/rally_spores_power()
|
||||
set category = "Blob"
|
||||
set name = "Rally Spores (5)"
|
||||
set desc = "Rally the spores to move to your location."
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
rally_spores(T)
|
||||
|
||||
/mob/camera/blob/proc/rally_spores(var/turf/T)
|
||||
|
||||
if(!can_buy(5))
|
||||
return
|
||||
|
||||
var/list/surrounding_turfs = block(locate(x - 1, y - 1, z), locate(x + 1, y + 1, z))
|
||||
src << "You rally your spores."
|
||||
|
||||
var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z))
|
||||
if(!surrounding_turfs.len)
|
||||
return
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/blobspore/BS in living_mob_list)
|
||||
if(isturf(BS.loc) && get_dist(BS, src) <= 20)
|
||||
if(isturf(BS.loc) && get_dist(BS, T) <= 35)
|
||||
BS.LoseTarget()
|
||||
BS.Goto(pick(surrounding_turfs), BS.move_to_delay)
|
||||
return
|
||||
@@ -2,12 +2,13 @@
|
||||
/obj/effect/blob
|
||||
name = "blob"
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
luminosity = 3
|
||||
luminosity = 0
|
||||
desc = "Some blob creature thingy"
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
var/health = 30
|
||||
var/health_timestamp = 0
|
||||
var/brute_resist = 4
|
||||
var/fire_resist = 1
|
||||
|
||||
@@ -22,7 +23,7 @@
|
||||
return
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
blobs -= src
|
||||
..()
|
||||
return
|
||||
@@ -40,12 +41,14 @@
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
var/damage = Clamp(0.01 * exposed_temperature / fire_resist, 0, 4 - fire_resist)
|
||||
var/damage = Clamp(0.03 * exposed_temperature / fire_resist, 0, 7 - fire_resist)
|
||||
if(damage)
|
||||
health -= damage
|
||||
update_icon()
|
||||
|
||||
proc/Life()
|
||||
for(var/atom/A in src.loc)//Hit everything in the turf
|
||||
A.blob_act()
|
||||
return
|
||||
|
||||
|
||||
@@ -56,7 +59,7 @@
|
||||
if(run_action())//If we can do something here then we dont need to pulse more
|
||||
return
|
||||
|
||||
if(pulse > 30)
|
||||
if(pulse > 20)
|
||||
return//Inf loop check
|
||||
|
||||
//Looking for another blob to pulse
|
||||
|
||||
@@ -377,27 +377,78 @@
|
||||
|
||||
spawn(rand(800,2000))
|
||||
if(changeling_power(20,1,100,DEAD))
|
||||
// charge the changeling chemical cost for stasis
|
||||
changeling.chem_charges -= 20
|
||||
if(C.stat == DEAD)
|
||||
dead_mob_list -= C
|
||||
living_mob_list += C
|
||||
C.stat = CONSCIOUS
|
||||
C.tod = null
|
||||
|
||||
// shut down various types of badness
|
||||
C.setToxLoss(0)
|
||||
C.setOxyLoss(0)
|
||||
C.setCloneLoss(0)
|
||||
C.setBrainLoss(0)
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
|
||||
// shut down ongoing problems
|
||||
C.radiation = 0
|
||||
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
|
||||
C.nutrition = 400
|
||||
C.bodytemperature = 310
|
||||
C.sdisabilities = 0
|
||||
C.disabilities = 0
|
||||
C.blinded = 0
|
||||
|
||||
// fix blindness and deafness
|
||||
C.eye_blind = 0
|
||||
C.eye_blurry = 0
|
||||
C.ear_deaf = 0
|
||||
C.ear_damage = 0
|
||||
|
||||
// head actual damage numbers
|
||||
C.heal_overall_damage(1000, 1000)
|
||||
|
||||
// get rid of the reagents
|
||||
C.reagents.clear_reagents()
|
||||
|
||||
// cure diseases
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
|
||||
// fix all the organs
|
||||
C.restore_all_organs()
|
||||
|
||||
// restore blood
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/human_mob = C
|
||||
human_mob.restore_blood()
|
||||
|
||||
// remove the character from the list of the dead
|
||||
if(C.stat == 2)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
|
||||
// make us conscious again
|
||||
C.stat = CONSCIOUS
|
||||
|
||||
// remove the time of death
|
||||
C.tod = null
|
||||
|
||||
// fix all the icons
|
||||
C.regenerate_icons()
|
||||
|
||||
// remove our fake death flag
|
||||
C.status_flags &= ~(FAKEDEATH)
|
||||
|
||||
// let us move again
|
||||
C.update_canmove()
|
||||
|
||||
// re-add out changeling powers
|
||||
C.make_changeling()
|
||||
|
||||
// sending display messages
|
||||
C << "<span class='notice'>We have regenerated.</span>"
|
||||
C.visible_message("<span class='warning'>[src] appears to wake from the dead, having healed all wounds.</span>")
|
||||
|
||||
C.status_flags &= ~(FAKEDEATH)
|
||||
C.update_canmove()
|
||||
C.make_changeling()
|
||||
|
||||
|
||||
feedback_add_details("changeling_powers","FD")
|
||||
return 1
|
||||
|
||||
@@ -762,7 +813,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
T << "<span class='danger'>You feel a small prick and your chest becomes tight.</span>"
|
||||
T.silent = 10
|
||||
T.Paralyse(10)
|
||||
T.make_jittery(1000)
|
||||
T.Jitter(1000)
|
||||
if(T.reagents) T.reagents.add_reagent("lexorin", 40)
|
||||
feedback_add_details("changeling_powers","DTHS")
|
||||
return 1
|
||||
@@ -785,4 +836,4 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
changeling.absorbed_dna |= T.dna
|
||||
|
||||
feedback_add_details("changeling_powers","ED")
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/item/weapon/melee/cultblade/pickup(mob/living/user as mob)
|
||||
if(!iscultist(user))
|
||||
user << "\red An overwhelming feeling of dread comes over you as you pick up the cultist's sword. It would be wise to be rid of this blade quickly."
|
||||
user.make_dizzy(120)
|
||||
user.Dizzy(120)
|
||||
|
||||
|
||||
/obj/item/clothing/head/culthood
|
||||
|
||||
@@ -775,13 +775,9 @@ var/list/sacrificed = list()
|
||||
return
|
||||
cultist.buckled = null
|
||||
if (cultist.handcuffed)
|
||||
cultist.handcuffed.loc = cultist.loc
|
||||
cultist.handcuffed = null
|
||||
cultist.update_inv_handcuffed()
|
||||
cultist.drop_from_inventory(cultist.handcuffed)
|
||||
if (cultist.legcuffed)
|
||||
cultist.legcuffed.loc = cultist.loc
|
||||
cultist.legcuffed = null
|
||||
cultist.update_inv_legcuffed()
|
||||
cultist.drop_from_inventory(cultist.legcuffed)
|
||||
if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
cultist.u_equip(cultist.wear_mask)
|
||||
if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
New()
|
||||
return
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(master)
|
||||
master.vines -= src
|
||||
master.growth_queue -= src
|
||||
@@ -60,7 +60,7 @@
|
||||
spawn_biomass_piece(src.loc)
|
||||
processing_objects.Add(src)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ ________________________________________________________________________________
|
||||
cell = new/obj/item/weapon/cell/high//The suit should *always* have a battery because so many things rely on it.
|
||||
cell.charge = 9000//Starting charge should not be higher than maximum charge. It leads to problems with recharging.
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/Del()
|
||||
/obj/item/clothing/suit/space/space_ninja/Destroy()
|
||||
if(affecting)//To make sure the window is closed.
|
||||
affecting << browse(null, "window=hack spideros")
|
||||
if(AI)//If there are AIs present when the ninja kicks the bucket.
|
||||
|
||||
@@ -39,6 +39,8 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick(\
|
||||
'sound/music/therock.ogg',\
|
||||
'sound/music/klendathu.ogg',\
|
||||
'sound/music/knights.ogg',\
|
||||
'sound/music/space.ogg',\
|
||||
'sound/music/Title1.ogg',\
|
||||
@@ -136,6 +138,15 @@ var/global/datum/controller/gameticker/ticker
|
||||
//Deleting Startpoints but we need the ai point to AI-ize people later
|
||||
if (S.name != "AI")
|
||||
del(S)
|
||||
var/list/obj/effect/landmark/spacepod/random/L = list()
|
||||
for(var/obj/effect/landmark/spacepod/random/SS in landmarks_list)
|
||||
if(istype(SS))
|
||||
L += SS
|
||||
var/obj/effect/landmark/spacepod/random/S = pick(L)
|
||||
new /obj/spacepod/random(S.loc)
|
||||
for(var/obj in L)
|
||||
if(istype(obj, /obj/effect/landmark/spacepod/random))
|
||||
del(obj)
|
||||
world << "<FONT color='blue'><B>Enjoy the game!</B></FONT>"
|
||||
world << sound('sound/AI/welcome.ogg') // Skie
|
||||
//Holiday Round-start stuff ~Carn
|
||||
@@ -153,7 +164,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
|
||||
master_controller.process() //Start master_controller.process()
|
||||
lighting_controller.process() //Start processing DynamicAreaLighting updates
|
||||
//lighting_controller.process() //Start processing DynamicAreaLighting updates
|
||||
|
||||
|
||||
if(config.sql_enabled)
|
||||
|
||||
@@ -213,11 +213,11 @@
|
||||
if(prob(prob_right_job))
|
||||
if(correct_person)
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
changeling_job = pick(get_all_jobs())
|
||||
changeling_job = pick(joblist)
|
||||
else
|
||||
changeling_job = correct_person:assigned_role
|
||||
else
|
||||
changeling_job = pick(get_all_jobs())
|
||||
changeling_job = pick(joblist)
|
||||
if(prob(prob_right_dude) && ticker.mode == "changeling")
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
changeling_name = correct_person:current
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/datum/game_mode/malfunction/pre_setup()
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(player.mind && player.mind.assigned_role == "AI")
|
||||
if(player.mind && player.mind.assigned_role == "AI" && (player.client.prefs.be_special & BE_MALF))
|
||||
malf_ai+=player.mind
|
||||
if(malf_ai.len)
|
||||
return 1
|
||||
|
||||
@@ -417,7 +417,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/disk/nuclear/Del()
|
||||
/obj/item/weapon/disk/nuclear/Destroy()
|
||||
if(blobstart.len > 0)
|
||||
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
|
||||
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
var/global/list/all_objectives = list()
|
||||
|
||||
var/list/potential_theft_objectives=typesof(/datum/theft_objective) \
|
||||
- /datum/theft_objective \
|
||||
- /datum/theft_objective/special \
|
||||
- /datum/theft_objective/number \
|
||||
- /datum/theft_objective/number/special
|
||||
- /datum/theft_objective/number/special \
|
||||
- /datum/theft_objective/number/coins
|
||||
|
||||
datum/objective
|
||||
var/datum/mind/owner = null //Who owns the objective.
|
||||
@@ -14,9 +16,14 @@ datum/objective
|
||||
var/completed = 0 //currently only used for custom objectives.
|
||||
|
||||
New(var/text)
|
||||
all_objectives |= src
|
||||
if(text)
|
||||
explanation_text = text
|
||||
|
||||
Del()
|
||||
all_objectives -= src
|
||||
..()
|
||||
|
||||
proc/check_completion()
|
||||
return completed
|
||||
|
||||
@@ -260,7 +267,6 @@ datum/objective/protect//The opposite of killing a dude.
|
||||
explanation_text = "Free Objective"
|
||||
return target
|
||||
|
||||
|
||||
find_target_by_role(role, role_type=0)
|
||||
..(role, role_type)
|
||||
if(target && target.current)
|
||||
@@ -299,6 +305,36 @@ datum/objective/hijack
|
||||
return 0
|
||||
return 1
|
||||
|
||||
datum/objective/speciesist
|
||||
var/datum/species/speciesist_target = null
|
||||
|
||||
find_target()
|
||||
var/list/possible_targets = list()
|
||||
var/mob/living/carbon/human/O = owner.current
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if(ishuman(possible_target.current))
|
||||
var/mob/living/carbon/human/M = possible_target.current
|
||||
if (M.species != O.species)
|
||||
possible_targets += M.species
|
||||
if(possible_targets.len > 0)
|
||||
speciesist_target = pick(possible_targets)
|
||||
explanation_text = "Do not allow any [speciesist_target.name]s to escape on the shuttle."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
return speciesist_target
|
||||
|
||||
check_completion()
|
||||
if(emergency_shuttle.location<2)
|
||||
return 0
|
||||
var/area/shuttle = locate(/area/shuttle/escape/centcom)
|
||||
for(var/mob/living/carbon/human/player in player_list)
|
||||
if (player.mind)
|
||||
if (player.species == speciesist_target)
|
||||
if(player.stat != DEAD) //they're not dead!
|
||||
if(get_turf(player) in shuttle)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
datum/objective/block
|
||||
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
|
||||
|
||||
@@ -202,6 +202,7 @@
|
||||
if(rev_mind in revolutionaries)
|
||||
revolutionaries -= rev_mind
|
||||
rev_mind.special_role = null
|
||||
rev_mind.current.hud_updateflag |= 1 << SPECIALROLE_HUD
|
||||
|
||||
if(beingborged)
|
||||
rev_mind.current << "\red <FONT size = 3><B>The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now.</B></FONT>"
|
||||
|
||||
@@ -304,4 +304,4 @@ mob/living/carbon/human/proc
|
||||
else if(choice == "No!")
|
||||
M << "\red You reject this traitorous cause!"
|
||||
src << "\red <b>[M] does not support the revolution!</b>"
|
||||
M.mind.rev_cooldown = world.time+50
|
||||
M.mind.rev_cooldown = world.time+50
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
rev_mind.current << "\red <FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill, capture or convert the heads to win the revolution!</FONT>"
|
||||
rev_mind.special_role = "Revolutionary"
|
||||
update_rev_icons_added(rev_mind)
|
||||
H.hud_updateflag |= 1 << SPECIALROLE_HUD
|
||||
return 1
|
||||
|
||||
/////////////////////////////
|
||||
@@ -155,9 +156,17 @@
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/RevConvert(mob/M as mob in oview(src))
|
||||
/mob/living/carbon/human/proc/RevConvert()
|
||||
set name = "Rev-Convert"
|
||||
set category = "IC"
|
||||
var/list/Possible = list()
|
||||
for (var/mob/living/carbon/human/P in oview(src))
|
||||
if(!stat && P.client && P.mind && !P.mind.special_role)
|
||||
Possible += P
|
||||
if(!Possible.len)
|
||||
src << "\red There doesn't appear to be anyone available for you to convert here."
|
||||
return
|
||||
var/mob/living/carbon/human/M = input("Select a person to convert", "Viva la revolution!", null) as mob in Possible
|
||||
if(((src.mind in ticker.mode:head_revolutionaries) || (src.mind in ticker.mode:revolutionaries)))
|
||||
if((M.mind in ticker.mode:head_revolutionaries) || (M.mind in ticker.mode:revolutionaries))
|
||||
src << "\red <b>[M] is already be a revolutionary!</b>"
|
||||
@@ -250,4 +259,4 @@
|
||||
rev_obj.target = M.mind
|
||||
rev_obj.explanation_text = "Assassinate, convert or capture [M.real_name], the [M.mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
rev_mind.current << "\red A new Head of Staff, [M.real_name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."
|
||||
rev_mind.current << "\red A new Head of Staff, [M.real_name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS)
|
||||
/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS, var/good=0)
|
||||
if(blocksLeft.len==0)
|
||||
warning("[name]: No more blocks left to assign!")
|
||||
return 0
|
||||
var/assigned = pick(blocksLeft)
|
||||
blocksLeft.Remove(assigned)
|
||||
if(good)
|
||||
good_blocks += assigned
|
||||
else
|
||||
bad_blocks += assigned
|
||||
assigned_blocks[assigned]=name
|
||||
dna_activity_bounds[assigned]=activity_bounds
|
||||
//Debug message_admins("[name] assigned to block #[assigned].")
|
||||
@@ -32,10 +36,10 @@
|
||||
// Standard muts
|
||||
BLINDBLOCK = getAssignedBlock("BLIND", numsToAssign)
|
||||
DEAFBLOCK = getAssignedBlock("DEAF", numsToAssign)
|
||||
HULKBLOCK = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS)
|
||||
TELEBLOCK = getAssignedBlock("TELE", numsToAssign, DNA_HARD_BOUNDS)
|
||||
FIREBLOCK = getAssignedBlock("FIRE", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
XRAYBLOCK = getAssignedBlock("XRAY", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
HULKBLOCK = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
TELEBLOCK = getAssignedBlock("TELE", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
FIREBLOCK = getAssignedBlock("FIRE", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
XRAYBLOCK = getAssignedBlock("XRAY", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
CLUMSYBLOCK = getAssignedBlock("CLUMSY", numsToAssign)
|
||||
FAKEBLOCK = getAssignedBlock("FAKE", numsToAssign)
|
||||
COUGHBLOCK = getAssignedBlock("COUGH", numsToAssign)
|
||||
@@ -46,17 +50,17 @@
|
||||
|
||||
// Bay muts
|
||||
HEADACHEBLOCK = getAssignedBlock("HEADACHE", numsToAssign)
|
||||
NOBREATHBLOCK = getAssignedBlock("NOBREATH", numsToAssign, DNA_HARD_BOUNDS)
|
||||
REMOTEVIEWBLOCK = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
REGENERATEBLOCK = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
INCREASERUNBLOCK = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
MORPHBLOCK = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
COLDBLOCK = getAssignedBlock("COLD", numsToAssign)
|
||||
NOBREATHBLOCK = getAssignedBlock("NOBREATH", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
REMOTEVIEWBLOCK = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
REGENERATEBLOCK = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
INCREASERUNBLOCK = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
MORPHBLOCK = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
COLDBLOCK = getAssignedBlock("COLD", numsToAssign, good=1)
|
||||
HALLUCINATIONBLOCK = getAssignedBlock("HALLUCINATION", numsToAssign)
|
||||
NOPRINTSBLOCK = getAssignedBlock("NOPRINTS", numsToAssign, DNA_HARD_BOUNDS)
|
||||
SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign)
|
||||
SMALLSIZEBLOCK = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS)
|
||||
NOPRINTSBLOCK = getAssignedBlock("NOPRINTS", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign, good=1)
|
||||
SMALLSIZEBLOCK = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
|
||||
//
|
||||
// Goon muts
|
||||
@@ -67,27 +71,26 @@
|
||||
MUTEBLOCK = getAssignedBlock("MUTE", numsToAssign)
|
||||
RADBLOCK = getAssignedBlock("RAD", numsToAssign)
|
||||
FATBLOCK = getAssignedBlock("FAT", numsToAssign)
|
||||
STUTTERBLOCK = getAssignedBlock("STUTTER", numsToAssign)
|
||||
CHAVBLOCK = getAssignedBlock("CHAV", numsToAssign)
|
||||
SWEDEBLOCK = getAssignedBlock("SWEDE", numsToAssign)
|
||||
SCRAMBLEBLOCK = getAssignedBlock("SCRAMBLE", numsToAssign)
|
||||
TOXICFARTBLOCK = getAssignedBlock("TOXICFART", numsToAssign)
|
||||
STRONGBLOCK = getAssignedBlock("STRONG", numsToAssign)
|
||||
TOXICFARTBLOCK = getAssignedBlock("TOXICFART", numsToAssign, good=1)
|
||||
STRONGBLOCK = getAssignedBlock("STRONG", numsToAssign, good=1)
|
||||
HORNSBLOCK = getAssignedBlock("HORNS", numsToAssign)
|
||||
|
||||
// Powers
|
||||
SOBERBLOCK = getAssignedBlock("SOBER", numsToAssign)
|
||||
PSYRESISTBLOCK = getAssignedBlock("PSYRESIST", numsToAssign, DNA_HARD_BOUNDS)
|
||||
SHADOWBLOCK = getAssignedBlock("SHADOW", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
CHAMELEONBLOCK = getAssignedBlock("CHAMELEON", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
CRYOBLOCK = getAssignedBlock("CRYO", numsToAssign, DNA_HARD_BOUNDS)
|
||||
EATBLOCK = getAssignedBlock("EAT", numsToAssign, DNA_HARD_BOUNDS)
|
||||
JUMPBLOCK = getAssignedBlock("JUMP", numsToAssign, DNA_HARD_BOUNDS)
|
||||
MELTBLOCK = getAssignedBlock("MELT", numsToAssign)
|
||||
IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign)
|
||||
EMPATHBLOCK = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS)
|
||||
SUPERFARTBLOCK = getAssignedBlock("SUPERFART", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
POLYMORPHBLOCK = getAssignedBlock("POLYMORPH", numsToAssign, DNA_HARDER_BOUNDS)
|
||||
SOBERBLOCK = getAssignedBlock("SOBER", numsToAssign, good=1)
|
||||
PSYRESISTBLOCK = getAssignedBlock("PSYRESIST", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
SHADOWBLOCK = getAssignedBlock("SHADOW", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
CHAMELEONBLOCK = getAssignedBlock("CHAMELEON", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
CRYOBLOCK = getAssignedBlock("CRYO", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
EATBLOCK = getAssignedBlock("EAT", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
JUMPBLOCK = getAssignedBlock("JUMP", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
MELTBLOCK = getAssignedBlock("MELT", numsToAssign, good=1)
|
||||
IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign, good=1)
|
||||
EMPATHBLOCK = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS, good=1)
|
||||
SUPERFARTBLOCK = getAssignedBlock("SUPERFART", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
POLYMORPHBLOCK = getAssignedBlock("POLYMORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1)
|
||||
|
||||
//
|
||||
// Static Blocks
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
name = "traitor"
|
||||
config_tag = "traitor"
|
||||
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative")//AI", Currently out of the list as malf does not work for shit
|
||||
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Internal Affairs Agent", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative")//AI", Currently out of the list as malf does not work for shit
|
||||
required_players = 0
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
@@ -96,16 +96,23 @@
|
||||
|
||||
else
|
||||
switch(rand(1,100))
|
||||
if(1 to 33)
|
||||
if(1 to 25)
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = traitor
|
||||
kill_objective.find_target()
|
||||
traitor.objectives += kill_objective
|
||||
if(34 to 50)
|
||||
var/datum/objective/brig/brig_objective = new
|
||||
brig_objective.owner = traitor
|
||||
brig_objective.find_target()
|
||||
traitor.objectives += brig_objective
|
||||
if(26 to 40)
|
||||
var/datum/objective/debrain/debrain_objective = new
|
||||
debrain_objective.owner = traitor
|
||||
debrain_objective.find_target()
|
||||
traitor.objectives += debrain_objective
|
||||
if(41 to 50)
|
||||
var/datum/objective/protect/protect_objective = new
|
||||
protect_objective.owner = traitor
|
||||
protect_objective.find_target_by_role("Traitor",0) //Protect your fellow traitor
|
||||
if (!protect_objective.target)
|
||||
protect_objective.find_target() //We could not find any traitors, protect somebody
|
||||
traitor.objectives += protect_objective
|
||||
if(51 to 66)
|
||||
var/datum/objective/harm/harm_objective = new
|
||||
harm_objective.owner = traitor
|
||||
@@ -118,10 +125,27 @@
|
||||
traitor.objectives += steal_objective
|
||||
switch(rand(1,100))
|
||||
if(1 to 30) // Die glorious death
|
||||
if (!(locate(/datum/objective/die) in traitor.objectives))
|
||||
if (!(locate(/datum/objective/die) in traitor.objectives) && !(locate(/datum/objective/steal) in traitor.objectives))
|
||||
var/datum/objective/die/die_objective = new
|
||||
die_objective.owner = traitor
|
||||
traitor.objectives += die_objective
|
||||
else
|
||||
if(prob(85))
|
||||
if (!(locate(/datum/objective/escape) in traitor.objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = traitor
|
||||
traitor.objectives += escape_objective
|
||||
else
|
||||
if(prob(50))
|
||||
if (!(locate(/datum/objective/hijack) in traitor.objectives))
|
||||
var/datum/objective/hijack/hijack_objective = new
|
||||
hijack_objective.owner = traitor
|
||||
traitor.objectives += hijack_objective
|
||||
else
|
||||
if (!(locate(/datum/objective/minimize_casualties) in traitor.objectives))
|
||||
var/datum/objective/minimize_casualties/escape_objective = new
|
||||
escape_objective.owner = traitor
|
||||
traitor.objectives += escape_objective
|
||||
if(31 to 90)
|
||||
if (!(locate(/datum/objective/escape) in traitor.objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
@@ -134,10 +158,11 @@
|
||||
hijack_objective.owner = traitor
|
||||
traitor.objectives += hijack_objective
|
||||
else // Honk
|
||||
if (!(locate(/datum/objective/minimize_casualties) in traitor.objectives))
|
||||
var/datum/objective/minimize_casualties/escape_objective = new
|
||||
escape_objective.owner = traitor
|
||||
traitor.objectives += escape_objective
|
||||
if (!(locate(/datum/objective/speciesist) in traitor.objectives))
|
||||
var/datum/objective/speciesist/speciesist_objective = new
|
||||
speciesist_objective.owner = traitor
|
||||
speciesist_objective.find_target()
|
||||
traitor.objectives += speciesist_objective
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
C.ear_deaf = 20
|
||||
C.stuttering = 20
|
||||
C.Stun(8)
|
||||
C.make_jittery(150)
|
||||
C.Jitter(150)
|
||||
for(var/obj/structure/window/W in oview(3))
|
||||
new W.shardtype(W.loc)
|
||||
if(W.reinf) new /obj/item/stack/rods(W.loc)
|
||||
@@ -278,7 +278,7 @@
|
||||
if(!mind.vampire.iscloaking)
|
||||
alpha = 255
|
||||
return 0
|
||||
if(T.lighting_lumcount <= 2)
|
||||
if(T.lit_value <= 2)
|
||||
alpha = round((255 * 0.15))
|
||||
return 1
|
||||
else
|
||||
@@ -432,7 +432,7 @@
|
||||
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
|
||||
|
||||
// LIGHTING CHECK
|
||||
if(T.lighting_lumcount > max_lum) continue
|
||||
if(T.lit_value > max_lum) continue
|
||||
turfs += T
|
||||
|
||||
if(!turfs.len)
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/datum/game_mode/wizard/raginmages
|
||||
name = "Ragin' Mages"
|
||||
config_tag = "raginmages"
|
||||
required_players = 1
|
||||
required_players_secret = 15
|
||||
var/max_mages = 0
|
||||
var/making_mage = 0
|
||||
var/mages_made = 1
|
||||
var/time_checked = 0
|
||||
|
||||
/datum/game_mode/wizard/announce()
|
||||
world << "<B>The current game mode is - Ragin' Mages!</B>"
|
||||
world << "<B>The \red Space Wizard Federation\black is pissed, help defeat all the space wizards!</B>"
|
||||
|
||||
/datum/game_mode/wizard/raginmages/post_setup()
|
||||
var/playercount = 0
|
||||
..()
|
||||
if(!max_mages)
|
||||
for(var/mob/living/player in mob_list)
|
||||
if (player.client && player.stat != 2)
|
||||
playercount += 1
|
||||
max_mages = round(playercount / 5)
|
||||
|
||||
/datum/game_mode/wizard/raginmages/greet_wizard(var/datum/mind/wizard, var/you_are=1)
|
||||
if (you_are)
|
||||
wizard.current << "<B>\red You are the Space Wizard!</B>"
|
||||
wizard.current << "<B>The Space Wizards Federation has given you the following tasks:</B>"
|
||||
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in wizard.objectives)
|
||||
wizard.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
wizard.current << "<b>Objective Alpha</b>: Make sure the station pays for its actions against our diplomats"
|
||||
return
|
||||
|
||||
/datum/game_mode/wizard/raginmages/check_finished()
|
||||
var/wizards_alive = 0
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
if(!istype(wizard.current,/mob/living/carbon))
|
||||
continue
|
||||
if(istype(wizard.current,/mob/living/carbon/brain))
|
||||
continue
|
||||
if(wizard.current.stat==2)
|
||||
continue
|
||||
if(wizard.current.stat==1)
|
||||
if(wizard.current.health < 0)
|
||||
wizard.current << "\red <font size='4'>The Space Wizard Federation is upset with your performance and have terminated your employment.</font>"
|
||||
wizard.current.stat = 2
|
||||
continue
|
||||
wizards_alive++
|
||||
|
||||
if (wizards_alive)
|
||||
if(!time_checked) time_checked = world.time
|
||||
if(world.time > time_checked + 3000 && (mages_made < max_mages))
|
||||
time_checked = world.time
|
||||
make_more_mages()
|
||||
else
|
||||
if(wizards.len >= max_mages)
|
||||
finished = 1
|
||||
return 1
|
||||
else
|
||||
make_more_mages()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/wizard/raginmages/proc/make_more_mages()
|
||||
|
||||
if(making_mage || emergency_shuttle.departed)
|
||||
return 0
|
||||
if(mages_made >= max_mages)
|
||||
return 0
|
||||
making_mage = 1
|
||||
mages_made++
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
spawn(rand(200, 600))
|
||||
message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.")
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client && !G.client.holder && !G.client.is_afk() && G.client.prefs.be_special & BE_WIZARD)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
candidates += G
|
||||
if(!candidates.len)
|
||||
message_admins("No applicable ghosts for the next ragin' mage, asking ghosts instead.")
|
||||
var/time_passed = world.time
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
continue
|
||||
candidates += G
|
||||
if("No")
|
||||
continue
|
||||
|
||||
sleep(300)
|
||||
if(!candidates.len)
|
||||
message_admins("This is awkward, sleeping until another mage check...")
|
||||
making_mage = 0
|
||||
mages_made--
|
||||
return
|
||||
else
|
||||
shuffle(candidates)
|
||||
for(var/mob/i in candidates)
|
||||
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
|
||||
|
||||
theghost = i
|
||||
break
|
||||
|
||||
if(theghost)
|
||||
var/mob/living/carbon/human/new_character= makeBody(theghost)
|
||||
new_character.mind.make_Wizard()
|
||||
making_mage = 0
|
||||
return 1
|
||||
|
||||
/datum/game_mode/wizard/raginmages/declare_completion()
|
||||
if(finished)
|
||||
feedback_set_details("round_end_result","loss - wizard killed")
|
||||
world << "\red <FONT size = 3><B> The crew has managed to hold off the wizard attack! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT>"
|
||||
..(1)
|
||||
@@ -211,8 +211,8 @@
|
||||
|
||||
|
||||
|
||||
/datum/game_mode/wizard/declare_completion()
|
||||
if(finished)
|
||||
/datum/game_mode/wizard/declare_completion(var/ragin = 0)
|
||||
if(finished && !ragin)
|
||||
feedback_set_details("round_end_result","loss - wizard killed")
|
||||
world << "\red <FONT size = 3><B> The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT>"
|
||||
..()
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
/datum/game_mode/xenos
|
||||
name = "xenos"
|
||||
config_tag = "xenos"
|
||||
required_players = 15
|
||||
recommended_players = 20
|
||||
required_players_secret = 15
|
||||
required_enemies = 3
|
||||
recommended_enemies = 5
|
||||
required_players = 0
|
||||
recommended_players = 30
|
||||
required_players_secret = 20
|
||||
required_enemies = 5
|
||||
recommended_enemies = 8
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
@@ -74,10 +74,9 @@
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
xeno_mind.current.loc = xenos_spawn[spawnpos]
|
||||
//XenoAI selection
|
||||
if(!xenoai_selected)
|
||||
var/mob/living/silicon/ai/O = new(xeno_mind.current.loc,,,1)//No MMI but safety is in effect.
|
||||
var/mob/living/silicon/ai/O = new(xenos_spawn[spawnpos],,,1)//No MMI but safety is in effect.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
|
||||
@@ -93,15 +92,23 @@
|
||||
loc_landmark = sloc
|
||||
O.loc = loc_landmark.loc
|
||||
O.icon_state = "ai-alien"
|
||||
O.verbs.Remove(/mob/living/silicon/ai/verb/pick_icon)
|
||||
O.verbs.Remove(,/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon)
|
||||
O.laws = new /datum/ai_laws/alienmov
|
||||
O.name = "Alien AI"
|
||||
O.real_name = name
|
||||
O.alienAI = 1
|
||||
O.network = list("SS13","Xeno")
|
||||
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
|
||||
O.alien_talk_understand = 1
|
||||
xenoai_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xeno_mind.current.loc)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
@@ -112,7 +119,7 @@
|
||||
continue
|
||||
//XenoBorg Selection
|
||||
if(!xenoborg_selected)
|
||||
var/mob/living/silicon/robot/O = new(xeno_mind.current.loc,0,0,1)
|
||||
var/mob/living/silicon/robot/O = new(xenos_spawn[spawnpos],0,0,1)
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.alien = 1
|
||||
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
|
||||
@@ -126,11 +133,16 @@
|
||||
del(xeno_mind)
|
||||
O.job = "Alien Cyborg"
|
||||
O.name = "Alien Cyborg"
|
||||
O.real_name = name
|
||||
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
|
||||
O.hands.icon_state = "standard"
|
||||
O.icon = "icons/mob/alien.dmi"
|
||||
O.icon = 'icons/mob/alien.dmi'
|
||||
O.icon_state = "xenoborg-state-a"
|
||||
O.modtype = "Xeno-Hu"
|
||||
O.connected_ai = select_active_alien_ai()
|
||||
O.laws = new /datum/ai_laws/alienmov()
|
||||
O.scrambledcodes = 1
|
||||
O.alien_talk_understand = 1
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
|
||||
|
||||
@@ -139,7 +151,7 @@
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xeno_mind.current.loc)
|
||||
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
|
||||
+22
-28
@@ -68,6 +68,7 @@
|
||||
/var/const/access_paramedic = 66
|
||||
/var/const/access_blueshield = 67
|
||||
/var/const/access_customs = 68
|
||||
/var/const/access_salvage_captain = 69 // Salvage ship captain's quarters
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
@@ -93,29 +94,6 @@
|
||||
/obj/var/list/req_one_access = null
|
||||
/obj/var/req_one_access_txt = "0"
|
||||
|
||||
/obj/New()
|
||||
..()
|
||||
//NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
|
||||
if(src.req_access_txt)
|
||||
var/list/req_access_str = text2list(req_access_txt,";")
|
||||
if(!req_access)
|
||||
req_access = list()
|
||||
for(var/x in req_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
req_access += n
|
||||
|
||||
if(src.req_one_access_txt)
|
||||
var/list/req_one_access_str = text2list(req_one_access_txt,";")
|
||||
if(!req_one_access)
|
||||
req_one_access = list()
|
||||
for(var/x in req_one_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
req_one_access += n
|
||||
|
||||
|
||||
|
||||
//returns 1 if this mob has sufficient access to use this object
|
||||
/obj/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
@@ -143,9 +121,25 @@
|
||||
return null
|
||||
|
||||
/obj/proc/check_access(obj/item/I)
|
||||
//These generations have been moved out of /obj/New() because they were slowing down the creation of objects that never even used the access system.
|
||||
if(!src.req_access)
|
||||
src.req_access = list()
|
||||
if(src.req_access_txt)
|
||||
var/list/req_access_str = text2list(req_access_txt,";")
|
||||
for(var/x in req_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
req_access += n
|
||||
|
||||
if(!src.req_one_access)
|
||||
src.req_one_access = list()
|
||||
if(src.req_one_access_txt)
|
||||
var/list/req_one_access_str = text2list(req_one_access_txt,";")
|
||||
for(var/x in req_one_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
req_one_access += n
|
||||
|
||||
if(!src.req_access && !src.req_one_access) //no requirements
|
||||
return 1
|
||||
if(!istype(src.req_access, /list)) //something's very wrong
|
||||
return 1
|
||||
|
||||
@@ -449,10 +443,10 @@
|
||||
rank = src:rank
|
||||
assignment = src:assignment
|
||||
|
||||
if( rank in get_all_jobs() )
|
||||
if( rank in joblist )
|
||||
return rank
|
||||
|
||||
if( assignment in get_all_jobs() )
|
||||
if( assignment in joblist )
|
||||
return assignment
|
||||
|
||||
return "Unknown"
|
||||
@@ -505,7 +499,7 @@ proc/FindNameFromID(var/mob/living/carbon/human/H)
|
||||
return ID.registered_name
|
||||
|
||||
proc/get_all_job_icons() //For all existing HUD icons
|
||||
return get_all_jobs() + list("Prisoner")
|
||||
return joblist + list("Prisoner")
|
||||
|
||||
/obj/proc/GetJobName() //Used in secHUD icon generation
|
||||
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
|
||||
|
||||
@@ -453,6 +453,10 @@ var/global/datum/controller/occupations/job_master
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
G.prescription = 1
|
||||
// H.update_icons()
|
||||
|
||||
H.hud_updateflag |= (1 << ID_HUD)
|
||||
H.hud_updateflag |= (1 << IMPLOYAL_HUD)
|
||||
H.hud_updateflag |= (1 << SPECIALROLE_HUD)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ proc/load_alienwhitelist()
|
||||
usr << "\red Unable to connect to whitelist database. Please try again later.<br>"
|
||||
return 0
|
||||
else
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT species FROM whitelist WHERE ckey='[M.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT species FROM whitelist WHERE ckey='[M.key]'")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
hide(T.intact)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(Beacon)
|
||||
del(Beacon)
|
||||
..()
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
A.blob_act()
|
||||
del(src)
|
||||
return
|
||||
@@ -198,7 +198,7 @@
|
||||
if(!beaker)
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
G.setloc(src)
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
@@ -228,7 +228,7 @@
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
@@ -248,21 +248,21 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -309,7 +309,7 @@
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.setloc(src.loc)
|
||||
src.occupant = null
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
@@ -411,8 +411,29 @@
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/living/carbon/slime/M in range(1,usr))
|
||||
if(M.Victim == usr)
|
||||
usr << "You're too busy getting your life sucked out of you."
|
||||
return
|
||||
visible_message("[usr] starts climbing into the sleeper.", 3)
|
||||
if(do_after(usr, 20))
|
||||
if(src.occupant)
|
||||
usr << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.setloc(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
usr << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
return
|
||||
return
|
||||
return
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
usr.pulling = null
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.setloc(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
@@ -60,12 +60,12 @@
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
O.setloc(src.loc)
|
||||
//Foreach goto(30)
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.setloc(src.loc)
|
||||
src.occupant = null
|
||||
src.icon_state = "body_scanner_0"
|
||||
return
|
||||
@@ -83,11 +83,11 @@
|
||||
if (M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
O.setloc(src.loc)
|
||||
//Foreach goto(154)
|
||||
src.add_fingerprint(user)
|
||||
//G = null
|
||||
@@ -98,7 +98,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(35)
|
||||
//SN src = null
|
||||
@@ -107,7 +107,7 @@
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(108)
|
||||
//SN src = null
|
||||
@@ -116,7 +116,7 @@
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
ex_act(severity)
|
||||
//Foreach goto(181)
|
||||
//SN src = null
|
||||
@@ -128,7 +128,7 @@
|
||||
/obj/machinery/bodyscanner/blob_act()
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.setloc(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||
@@ -180,10 +180,12 @@
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
/obj/machinery/body_scanconsole/process() //not really used right now
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(250) // power stuff
|
||||
//use_power(250) // power stuff
|
||||
|
||||
// var/mob/M //occupant
|
||||
// if (!( src.status )) //remove this
|
||||
@@ -199,6 +201,8 @@
|
||||
// src.updateDialog()
|
||||
// return
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -90,7 +90,7 @@ obj/machinery/door/airlock/Bumped(atom/AM)
|
||||
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
return
|
||||
|
||||
|
||||
obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
if(new_frequency)
|
||||
@@ -130,7 +130,7 @@ obj/machinery/airlock_sensor
|
||||
|
||||
var/on = 1
|
||||
var/alert = 0
|
||||
|
||||
var/previousPressure
|
||||
|
||||
obj/machinery/airlock_sensor/update_icon()
|
||||
if(on)
|
||||
@@ -152,21 +152,23 @@ obj/machinery/airlock_sensor/attack_hand(mob/user)
|
||||
|
||||
obj/machinery/airlock_sensor/process()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data["tag"] = id_tag
|
||||
signal.data["timestamp"] = world.time
|
||||
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
|
||||
var/pressure = round(air_sample.return_pressure(),0.1)
|
||||
alert = (pressure < ONE_ATMOSPHERE*0.8)
|
||||
|
||||
signal.data["pressure"] = num2text(pressure)
|
||||
if(abs(pressure - previousPressure) > 0.001 || previousPressure == null)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data["tag"] = id_tag
|
||||
signal.data["timestamp"] = world.time
|
||||
signal.data["pressure"] = num2text(pressure)
|
||||
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
|
||||
update_icon()
|
||||
previousPressure = pressure
|
||||
|
||||
alert = (pressure < ONE_ATMOSPHERE*0.8)
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
@@ -178,7 +180,6 @@ obj/machinery/airlock_sensor/initialize()
|
||||
|
||||
obj/machinery/airlock_sensor/New()
|
||||
..()
|
||||
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -238,4 +239,4 @@ obj/machinery/access_button/New()
|
||||
..()
|
||||
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -1043,6 +1043,13 @@ FIRE ALARM
|
||||
var/last_process = 0
|
||||
var/wiresexposed = 0
|
||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
||||
var/area/master_area
|
||||
|
||||
/obj/machinery/firealarm/New()
|
||||
var/area/A = get_area_master(src)
|
||||
if (!( istype(A, /area) ))
|
||||
return
|
||||
master_area=A
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
|
||||
@@ -1368,6 +1375,14 @@ Code shamelessly copied from apc_frame
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
|
||||
var/area/master_area
|
||||
|
||||
/obj/machinery/partyalarm/New()
|
||||
var/area/A = get_area_master(src)
|
||||
if (!( istype(A, /area) ))
|
||||
return
|
||||
master_area=A
|
||||
|
||||
/obj/machinery/partyalarm/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -90,16 +90,15 @@ obj/machinery/air_sensor
|
||||
if(..(user))
|
||||
return
|
||||
var/html=return_text()+"</body></html>"
|
||||
//testing("Remember to remove [__FILE__]:[__LINE__]!")
|
||||
//var/f = file("data/gac_debug.html")
|
||||
//fdel(f)
|
||||
//f << html
|
||||
user << browse(html,"window=gac")
|
||||
user.set_machine(src)
|
||||
onclose(user, "gac")
|
||||
|
||||
process()
|
||||
..()
|
||||
if(!sensors)
|
||||
warning("[src.type] at [x],[y],[z] has null sensors. Please fix.")
|
||||
sensors = list()
|
||||
src.updateUsrDialog()
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
@@ -139,7 +138,7 @@ obj/machinery/air_sensor
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
var/id_tag = signal.data["tag"]
|
||||
if(!id_tag || !sensors.Find(id_tag)) return
|
||||
if(!id_tag || !sensors || !sensors.Find(id_tag)) return
|
||||
|
||||
sensor_information[id_tag] = signal.data
|
||||
|
||||
|
||||
@@ -164,9 +164,7 @@
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
if (A.master)
|
||||
A = A.master
|
||||
var/area/A = get_area_master(T)
|
||||
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in world )
|
||||
var/turf/T2 = get_turf(scrubber)
|
||||
if(T2 && T2.loc)
|
||||
|
||||
@@ -18,16 +18,7 @@
|
||||
use_power = 0
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
/* m_amt=10*CC_PER_SHEET_METAL
|
||||
|
||||
// Need to redefine /obj/item's recyk method
|
||||
/obj/machinery/portable_atmospherics/canister/recycle(var/obj/machinery/mineral/processing_unit/recycle/rec)
|
||||
if (src.m_amt == 0 && src.g_amt == 0)
|
||||
return 0
|
||||
rec.iron += src.m_amt/CC_PER_SHEET_METAL
|
||||
rec.glass += src.g_amt/CC_PER_SHEET_GLASS
|
||||
return 1
|
||||
*/
|
||||
var/update_flag = 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||
name = "Canister: \[N2O\]"
|
||||
@@ -60,42 +51,65 @@
|
||||
_color = "grey"
|
||||
can_label = 0
|
||||
|
||||
/*
|
||||
* return 0 (reached the proc code end)
|
||||
* 1 (canister is destroyed)
|
||||
*/
|
||||
/obj/machinery/portable_atmospherics/canister/update_icon()
|
||||
var/L[0]
|
||||
overlays = L
|
||||
|
||||
if (destroyed)
|
||||
icon_state = "[_color]-1"
|
||||
return 1
|
||||
|
||||
icon_state = "[_color]"
|
||||
|
||||
L += "can-o3"
|
||||
/obj/machinery/portable_atmospherics/canister/proc/check_change()
|
||||
var/old_flag = update_flag
|
||||
update_flag = 0
|
||||
if(holding)
|
||||
update_flag |= 1
|
||||
if(connected_port)
|
||||
update_flag |= 2
|
||||
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
if(tank_pressure < 10)
|
||||
update_flag |= 4
|
||||
else if(tank_pressure < ONE_ATMOSPHERE)
|
||||
update_flag |= 8
|
||||
else if(tank_pressure < 15*ONE_ATMOSPHERE)
|
||||
update_flag |= 16
|
||||
else
|
||||
update_flag |= 32
|
||||
|
||||
if (tank_pressure < 10)
|
||||
L[L.len] = "can-o0"
|
||||
else if (tank_pressure < ONE_ATMOSPHERE)
|
||||
L[L.len] = "can-o1"
|
||||
else if (tank_pressure < 15 * ONE_ATMOSPHERE)
|
||||
L[L.len] = "can-o2"
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
tank_pressure = null
|
||||
/obj/machinery/portable_atmospherics/canister/update_icon()
|
||||
/*
|
||||
update_flag
|
||||
1 = holding
|
||||
2 = connected_port
|
||||
4 = tank_pressure < 10
|
||||
8 = tank_pressure < ONE_ATMOS
|
||||
16 = tank_pressure < 15*ONE_ATMOS
|
||||
32 = tank_pressure go boom.
|
||||
*/
|
||||
|
||||
if (holding)
|
||||
L += "can-open"
|
||||
if (src.destroyed)
|
||||
src.overlays = 0
|
||||
src.icon_state = text("[]-1", src._color)
|
||||
|
||||
if (connected_port)
|
||||
L += "can-connector"
|
||||
if(icon_state != "[_color]")
|
||||
icon_state = "[_color]"
|
||||
|
||||
overlays = L
|
||||
L = null
|
||||
return 0
|
||||
if(check_change()) //Returns 1 if no change needed to icons.
|
||||
return
|
||||
|
||||
src.overlays = 0
|
||||
|
||||
if(update_flag & 1)
|
||||
overlays += "can-open"
|
||||
if(update_flag & 2)
|
||||
overlays += "can-connector"
|
||||
if(update_flag & 4)
|
||||
overlays += "can-o0"
|
||||
if(update_flag & 8)
|
||||
overlays += "can-o1"
|
||||
else if(update_flag & 16)
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > temperature_resistance)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/id
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
active_power_usage = 5
|
||||
|
||||
/obj/machinery/meter/New()
|
||||
..()
|
||||
@@ -33,7 +33,7 @@
|
||||
icon_state = "meter0"
|
||||
return 0
|
||||
|
||||
use_power(5)
|
||||
//use_power(5)
|
||||
|
||||
var/datum/gas_mixture/environment = target.return_air()
|
||||
if(!environment)
|
||||
@@ -136,4 +136,4 @@
|
||||
src.target = loc
|
||||
|
||||
/obj/machinery/meter/turf/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(port)
|
||||
connect(port)
|
||||
update_icon()
|
||||
|
||||
|
||||
process()
|
||||
if(!connected_port) //only react when pipe_network will ont it do it for you
|
||||
//Allow for reactions
|
||||
@@ -34,7 +34,7 @@
|
||||
else
|
||||
update_icon()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
del(air_contents)
|
||||
|
||||
..()
|
||||
|
||||
@@ -46,6 +46,7 @@ var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
||||
new /obj/item/weapon/storage/box/blanks(), \
|
||||
new /obj/item/ammo_casing/shotgun(), \
|
||||
new /obj/item/ammo_casing/shotgun/incendiary(), \
|
||||
new /obj/item/ammo_box/c38(), \
|
||||
new /obj/item/ammo_box/a357(), \
|
||||
new /obj/item/clothing/ears/earmuffs/tribblemuffs(), \
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(M.melee_damage_upper == 0) return
|
||||
src.health -= M.melee_damage_upper
|
||||
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(src.loc)
|
||||
healthcheck()
|
||||
|
||||
@@ -611,8 +611,10 @@ Auto Patrol: []"},
|
||||
else if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(M.stat == DEAD)
|
||||
continue
|
||||
else
|
||||
src.threatlevel = 4
|
||||
// Ignore lazarus-injected mobs.
|
||||
if(M.faction == "lazarus")
|
||||
continue
|
||||
src.threatlevel = 4
|
||||
|
||||
if(!src.threatlevel)
|
||||
continue
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
src.locked = 0
|
||||
if (!src.mess)
|
||||
icon_state = "pod_0"
|
||||
use_power(200)
|
||||
//use_power(200)
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
// loadProgram(target)
|
||||
|
||||
//This could all be done better, but it works for now.
|
||||
/obj/machinery/computer/HolodeckControl/Del()
|
||||
/obj/machinery/computer/HolodeckControl/Destroy()
|
||||
emergencyShutdown()
|
||||
..()
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
flags = ON_BORDER
|
||||
|
||||
|
||||
/obj/structure/holowindow/Del()
|
||||
/obj/structure/holowindow/Destroy()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/holo
|
||||
|
||||
@@ -111,3 +111,7 @@
|
||||
minor_alarms -= zone
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Destroy()
|
||||
radio_controller.remove_object(src, receive_frequency)
|
||||
..()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
header += "<hr>"
|
||||
|
||||
var/jobs_all = ""
|
||||
var/list/alljobs = (istype(src,/obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
|
||||
var/list/alljobs = (istype(src,/obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : joblist) + "Custom"
|
||||
for(var/job in alljobs)
|
||||
jobs_all += "<a href='?src=\ref[src];choice=assign;assign_target=[job]'>[replacetext(job, " ", " ")]</a> " //make sure there isn't a line break in the middle of a job
|
||||
|
||||
|
||||
@@ -1,4 +1,36 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
#define COMM_SCREEN_MAIN 1
|
||||
#define COMM_SCREEN_STAT 2
|
||||
#define COMM_SCREEN_MESSAGES 3
|
||||
#define COMM_SCREEN_SECLEVEL 4
|
||||
|
||||
var/shuttle_call/shuttle_calls[0]
|
||||
|
||||
#define SHUTTLE_RECALL -1
|
||||
#define SHUTTLE_CALL 1
|
||||
#define SHUTTLE_TRANSFER 2
|
||||
|
||||
/shuttle_call
|
||||
var/direction=0
|
||||
var/who=""
|
||||
var/ckey=""
|
||||
var/turf/from=null
|
||||
var/where=""
|
||||
var/when
|
||||
var/eta=null
|
||||
|
||||
/shuttle_call/New(var/mob/user,var/obj/machinery/computer/communications/computer,var/dir)
|
||||
direction=dir
|
||||
if(user)
|
||||
who="[user]"
|
||||
ckey="[user.key]"
|
||||
if(computer)
|
||||
where="[computer]"
|
||||
from=get_turf(computer)
|
||||
when=worldtime2text()
|
||||
if(dir==SHUTTLE_RECALL)
|
||||
var/timeleft=emergency_shuttle.timeleft()
|
||||
eta="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
// The communications computer
|
||||
/obj/machinery/computer/communications
|
||||
@@ -13,40 +45,25 @@
|
||||
var/list/messagetext = list()
|
||||
var/currmsg = 0
|
||||
var/aicurrmsg = 0
|
||||
var/state = STATE_DEFAULT
|
||||
var/aistate = STATE_DEFAULT
|
||||
var/menu_state = COMM_SCREEN_MAIN
|
||||
var/ai_menu_state = COMM_SCREEN_MAIN
|
||||
var/message_cooldown = 0
|
||||
var/centcomm_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
var/const/STATE_DEFAULT = 1
|
||||
var/const/STATE_CALLSHUTTLE = 2
|
||||
var/const/STATE_CANCELSHUTTLE = 3
|
||||
var/const/STATE_MESSAGELIST = 4
|
||||
var/const/STATE_VIEWMESSAGE = 5
|
||||
var/const/STATE_DELMESSAGE = 6
|
||||
var/const/STATE_STATUSDISPLAY = 7
|
||||
var/const/STATE_ALERT_LEVEL = 8
|
||||
var/const/STATE_CONFIRM_LEVEL = 9
|
||||
var/const/STATE_CREWTRANSFER = 10
|
||||
|
||||
var/status_display_freq = "1435"
|
||||
var/stat_msg1
|
||||
var/stat_msg2
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/process()
|
||||
if(..())
|
||||
if(state != STATE_STATUSDISPLAY)
|
||||
src.updateDialog()
|
||||
|
||||
var/display_type="blank"
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..())
|
||||
if(..(href, href_list))
|
||||
return
|
||||
if (src.z > 1)
|
||||
|
||||
if (!(src.z in list(STATION_Z,CENTCOMM_Z)))
|
||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
if(!href_list["operation"])
|
||||
@@ -54,7 +71,7 @@
|
||||
switch(href_list["operation"])
|
||||
// main interface
|
||||
if("main")
|
||||
src.state = STATE_DEFAULT
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
@@ -68,8 +85,16 @@
|
||||
authenticated = 2
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("swipeidseclevel")
|
||||
// ALART LAVUL
|
||||
if("changeseclevel")
|
||||
setMenuState(usr,COMM_SCREEN_SECLEVEL)
|
||||
|
||||
if("newalertlevel")
|
||||
if(issilicon(usr))
|
||||
return
|
||||
tmp_alertlevel = text2num(href_list["level"])
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
@@ -95,12 +120,12 @@
|
||||
else:
|
||||
usr << "You are not authorized to do this."
|
||||
tmp_alertlevel = 0
|
||||
state = STATE_DEFAULT
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
else
|
||||
usr << "You need to swipe your ID."
|
||||
|
||||
if("announce")
|
||||
if(src.authenticated==2)
|
||||
if(src.authenticated==2 && !issilicon(usr))
|
||||
if(message_cooldown) return
|
||||
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
@@ -113,67 +138,63 @@
|
||||
message_cooldown = 0
|
||||
|
||||
if("callshuttle")
|
||||
src.state = STATE_DEFAULT
|
||||
if(src.authenticated)
|
||||
src.state = STATE_CALLSHUTTLE
|
||||
if("callshuttle2")
|
||||
if(src.authenticated)
|
||||
call_shuttle_proc(usr)
|
||||
if(emergency_shuttle.online)
|
||||
post_status("shuttle")
|
||||
src.state = STATE_DEFAULT
|
||||
var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
call_shuttle_proc(usr)
|
||||
if(emergency_shuttle.online)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
if("cancelshuttle")
|
||||
src.state = STATE_DEFAULT
|
||||
if(issilicon(usr)) return
|
||||
if(src.authenticated)
|
||||
src.state = STATE_CANCELSHUTTLE
|
||||
if("cancelshuttle2")
|
||||
if(src.authenticated)
|
||||
cancel_call_proc(usr)
|
||||
src.state = STATE_DEFAULT
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
recall_shuttle(usr)
|
||||
if(emergency_shuttle.online)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
if("messagelist")
|
||||
src.currmsg = 0
|
||||
src.state = STATE_MESSAGELIST
|
||||
if("viewmessage")
|
||||
src.state = STATE_VIEWMESSAGE
|
||||
if (!src.currmsg)
|
||||
if(href_list["message-num"])
|
||||
src.currmsg = text2num(href_list["message-num"])
|
||||
else
|
||||
src.state = STATE_MESSAGELIST
|
||||
if(href_list["msgid"])
|
||||
setCurrentMessage(usr, text2num(href_list["msgid"]))
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
if("delmessage")
|
||||
src.state = (src.currmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
if("delmessage2")
|
||||
if(src.authenticated)
|
||||
if(href_list["msgid"])
|
||||
src.currmsg = text2num(href_list["msgid"])
|
||||
var/response = alert("Are you sure you wish to delete this message?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
if(src.currmsg)
|
||||
var/title = src.messagetitle[src.currmsg]
|
||||
var/text = src.messagetext[src.currmsg]
|
||||
var/id = getCurrentMessage()
|
||||
var/title = src.messagetitle[id]
|
||||
var/text = src.messagetext[id]
|
||||
src.messagetitle.Remove(title)
|
||||
src.messagetext.Remove(text)
|
||||
if(src.currmsg == src.aicurrmsg)
|
||||
src.aicurrmsg = 0
|
||||
src.currmsg = 0
|
||||
src.state = STATE_MESSAGELIST
|
||||
else
|
||||
src.state = STATE_VIEWMESSAGE
|
||||
if(currmsg==id) currmsg=0
|
||||
if(aicurrmsg==id) aicurrmsg=0
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("status")
|
||||
src.state = STATE_STATUSDISPLAY
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
// Status display stuff
|
||||
if("setstat")
|
||||
switch(href_list["statdisp"])
|
||||
display_type=href_list["statdisp"]
|
||||
switch(display_type)
|
||||
if("message")
|
||||
post_status("message", stat_msg1, stat_msg2)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg1")
|
||||
stat_msg1 = input("Line 1", "Enter Message Text", stat_msg1) as text|null
|
||||
src.updateDialog()
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
if("setmsg2")
|
||||
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
|
||||
src.updateDialog()
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
// OMG CENTCOMM LETTERHEAD
|
||||
if("MessageCentcomm")
|
||||
@@ -190,6 +211,7 @@
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
@@ -207,59 +229,14 @@
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("RestoreBackup")
|
||||
usr << "Backup routing data restored!"
|
||||
src.emagged = 0
|
||||
src.updateDialog()
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
|
||||
|
||||
// AI interface
|
||||
if("ai-main")
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-callshuttle")
|
||||
src.aistate = STATE_CALLSHUTTLE
|
||||
if("ai-callshuttle2")
|
||||
call_shuttle_proc(usr)
|
||||
src.aistate = STATE_DEFAULT
|
||||
if("ai-messagelist")
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-viewmessage")
|
||||
src.aistate = STATE_VIEWMESSAGE
|
||||
if (!src.aicurrmsg)
|
||||
if(href_list["message-num"])
|
||||
src.aicurrmsg = text2num(href_list["message-num"])
|
||||
else
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-delmessage")
|
||||
src.aistate = (src.aicurrmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
|
||||
if("ai-delmessage2")
|
||||
if(src.aicurrmsg)
|
||||
var/title = src.messagetitle[src.aicurrmsg]
|
||||
var/text = src.messagetext[src.aicurrmsg]
|
||||
src.messagetitle.Remove(title)
|
||||
src.messagetext.Remove(text)
|
||||
if(src.currmsg == src.aicurrmsg)
|
||||
src.currmsg = 0
|
||||
src.aicurrmsg = 0
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
if("ai-status")
|
||||
src.aistate = STATE_STATUSDISPLAY
|
||||
|
||||
if("securitylevel")
|
||||
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
if(!tmp_alertlevel) tmp_alertlevel = 0
|
||||
state = STATE_CONFIRM_LEVEL
|
||||
|
||||
if("changeseclevel")
|
||||
state = STATE_ALERT_LEVEL
|
||||
|
||||
|
||||
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag/))
|
||||
@@ -270,154 +247,111 @@
|
||||
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
if(..(user))
|
||||
return
|
||||
if (src.z > 6)
|
||||
|
||||
if (!(src.z in list(STATION_Z, CENTCOMM_Z)))
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = "<head><title>Communications Console</title></head><body>"
|
||||
if (emergency_shuttle.online && emergency_shuttle.location==0)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
dat += "<B>Emergency shuttle</B>\n<BR>\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]<BR>"
|
||||
ui_interact(user)
|
||||
|
||||
if (istype(user, /mob/living/silicon))
|
||||
var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access
|
||||
if(dat2)
|
||||
dat += dat2
|
||||
user << browse(dat, "window=communications;size=400x500")
|
||||
onclose(user, "communications")
|
||||
/obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
switch(src.state)
|
||||
if(STATE_DEFAULT)
|
||||
if (src.authenticated)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]"
|
||||
if (src.authenticated==2)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=announce'>Make An Announcement</A> \]"
|
||||
if(src.emagged == 0)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageCentcomm'>Send an emergency message to Centcomm</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageSyndicate'>Send an emergency message to \[UNKNOWN\]</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["is_ai"] = issilicon(user)
|
||||
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
|
||||
data["emagged"] = emagged
|
||||
data["authenticated"] = authenticated
|
||||
data["screen"] = getMenuState(usr)
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=changeseclevel'>Change alert level</A> \]"
|
||||
if(emergency_shuttle.location==0)
|
||||
if (emergency_shuttle.online)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=cancelshuttle'>Cancel Shuttle Call</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
data["stat_display"] = list(
|
||||
"type"=display_type,
|
||||
"line_1"=(stat_msg1 ? stat_msg1 : "-----"),
|
||||
"line_2"=(stat_msg2 ? stat_msg2 : "-----"),
|
||||
"presets"=list(
|
||||
list("name"="blank", "label"="Clear", "desc"="Blank slate"),
|
||||
list("name"="shuttle", "label"="Shuttle ETA", "desc"="Display how much time is left."),
|
||||
list("name"="message", "label"="Message", "desc"="A custom message.")
|
||||
),
|
||||
"alerts"=list(
|
||||
list("alert"="default", "label"="NanoTrasen", "desc"="Oh god."),
|
||||
list("alert"="redalert", "label"="Red Alert", "desc"="Nothing to do with communists."),
|
||||
list("alert"="lockdown", "label"="Lockdown", "desc"="Let everyone know they're on lockdown."),
|
||||
list("alert"="biohazard", "label"="Biohazard", "desc"="Great for virus outbreaks and parties."),
|
||||
)
|
||||
)
|
||||
data["security_level"] = security_level
|
||||
data["str_security_level"] = get_security_level()
|
||||
data["levels"] = list(
|
||||
list("id"=SEC_LEVEL_GREEN, "name"="Green"),
|
||||
list("id"=SEC_LEVEL_BLUE, "name"="Blue"),
|
||||
//SEC_LEVEL_RED = list("name"="Red"),
|
||||
)
|
||||
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=status'>Set Status Display</A> \]"
|
||||
else
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=login'>Log In</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=messagelist'>Message List</A> \]"
|
||||
if(STATE_CALLSHUTTLE)
|
||||
dat += "Are you sure you want to call the shuttle? \[ <A HREF='?src=\ref[src];operation=callshuttle2'>OK</A> | <A HREF='?src=\ref[src];operation=main'>Cancel</A> \]"
|
||||
if(STATE_CANCELSHUTTLE)
|
||||
dat += "Are you sure you want to cancel the shuttle? \[ <A HREF='?src=\ref[src];operation=cancelshuttle2'>OK</A> | <A HREF='?src=\ref[src];operation=main'>Cancel</A> \]"
|
||||
if(STATE_MESSAGELIST)
|
||||
dat += "Messages:"
|
||||
for(var/i = 1; i<=src.messagetitle.len; i++)
|
||||
dat += "<BR><A HREF='?src=\ref[src];operation=viewmessage;message-num=[i]'>[src.messagetitle[i]]</A>"
|
||||
if(STATE_VIEWMESSAGE)
|
||||
if (src.currmsg)
|
||||
dat += "<B>[src.messagetitle[src.currmsg]]</B><BR><BR>[src.messagetext[src.currmsg]]"
|
||||
if (src.authenticated)
|
||||
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];operation=delmessage'>Delete \]"
|
||||
else
|
||||
src.state = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
if(STATE_DELMESSAGE)
|
||||
if (src.currmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];operation=delmessage2'>OK</A> | <A HREF='?src=\ref[src];operation=viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
src.state = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
if(STATE_STATUSDISPLAY)
|
||||
dat += "Set Status Displays<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=\ref[src];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=\ref[src];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
if(STATE_ALERT_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
if(security_level == SEC_LEVEL_DELTA)
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]<BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
||||
var/msg_data[0]
|
||||
for(var/i=1;i<=src.messagetext.len;i++)
|
||||
var/cur_msg[0]
|
||||
cur_msg["title"]=messagetitle[i]
|
||||
cur_msg["body"]=messagetext[i]
|
||||
msg_data += list(cur_msg)
|
||||
data["messages"] = msg_data
|
||||
data["current_message"] = data["is_ai"] ? aicurrmsg : currmsg
|
||||
|
||||
dat += "<BR>\[ [(src.state != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
|
||||
user << browse(dat, "window=communications;size=400x500")
|
||||
onclose(user, "communications")
|
||||
var/shuttle[0]
|
||||
shuttle["on"]=emergency_shuttle.online
|
||||
if (emergency_shuttle.online && emergency_shuttle.location==0)
|
||||
var/timeleft=emergency_shuttle.timeleft()
|
||||
shuttle["eta"]="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
shuttle["pos"] = emergency_shuttle.location
|
||||
shuttle["can_recall"]=!(recall_time_limit && world.time >= recall_time_limit)
|
||||
|
||||
data["shuttle"]=shuttle
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/computer/communications/proc/setCurrentMessage(var/mob/user,var/value)
|
||||
if(issilicon(user))
|
||||
aicurrmsg=value
|
||||
else
|
||||
currmsg=value
|
||||
|
||||
/obj/machinery/computer/communications/proc/interact_ai(var/mob/living/silicon/ai/user as mob)
|
||||
var/dat = ""
|
||||
switch(src.aistate)
|
||||
if(STATE_DEFAULT)
|
||||
if(emergency_shuttle.location==0 && !emergency_shuttle.online)
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-callshuttle'>Call Emergency Shuttle</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-messagelist'>Message List</A> \]"
|
||||
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-status'>Set Status Display</A> \]"
|
||||
if(STATE_CALLSHUTTLE)
|
||||
dat += "Are you sure you want to call the shuttle? \[ <A HREF='?src=\ref[src];operation=ai-callshuttle2'>OK</A> | <A HREF='?src=\ref[src];operation=ai-main'>Cancel</A> \]"
|
||||
if(STATE_MESSAGELIST)
|
||||
dat += "Messages:"
|
||||
for(var/i = 1; i<=src.messagetitle.len; i++)
|
||||
dat += "<BR><A HREF='?src=\ref[src];operation=ai-viewmessage;message-num=[i]'>[src.messagetitle[i]]</A>"
|
||||
if(STATE_VIEWMESSAGE)
|
||||
if (src.aicurrmsg)
|
||||
dat += "<B>[src.messagetitle[src.aicurrmsg]]</B><BR><BR>[src.messagetext[src.aicurrmsg]]"
|
||||
dat += "<BR><BR>\[ <A HREF='?src=\ref[src];operation=ai-delmessage'>Delete</A> \]"
|
||||
else
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return null
|
||||
if(STATE_DELMESSAGE)
|
||||
if(src.aicurrmsg)
|
||||
dat += "Are you sure you want to delete this message? \[ <A HREF='?src=\ref[src];operation=ai-delmessage2'>OK</A> | <A HREF='?src=\ref[src];operation=ai-viewmessage'>Cancel</A> \]"
|
||||
else
|
||||
src.aistate = STATE_MESSAGELIST
|
||||
src.attack_hand(user)
|
||||
return
|
||||
/obj/machinery/computer/communications/proc/getCurrentMessage(var/mob/user)
|
||||
if(issilicon(user))
|
||||
return aicurrmsg
|
||||
else
|
||||
return currmsg
|
||||
|
||||
if(STATE_STATUSDISPLAY)
|
||||
dat += "Set Status Displays<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=blank'>Clear</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=shuttle'>Shuttle ETA</A> \]<BR>"
|
||||
dat += "\[ <A HREF='?src=\ref[src];operation=setstat;statdisp=message'>Message</A> \]"
|
||||
dat += "<ul><li> Line 1: <A HREF='?src=\ref[src];operation=setmsg1'>[ stat_msg1 ? stat_msg1 : "(none)"]</A>"
|
||||
dat += "<li> Line 2: <A HREF='?src=\ref[src];operation=setmsg2'>[ stat_msg2 ? stat_msg2 : "(none)"]</A></ul><br>"
|
||||
dat += "\[ Alert: <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=default'>None</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
||||
dat += " <A HREF='?src=\ref[src];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
||||
/obj/machinery/computer/communications/proc/setMenuState(var/mob/user,var/value)
|
||||
if(issilicon(user))
|
||||
ai_menu_state=value
|
||||
else
|
||||
menu_state=value
|
||||
|
||||
|
||||
dat += "<BR>\[ [(src.aistate != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=ai-main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
|
||||
return dat
|
||||
/obj/machinery/computer/communications/proc/getMenuState(var/mob/user)
|
||||
if(issilicon(user))
|
||||
return ai_menu_state
|
||||
else
|
||||
return menu_state
|
||||
|
||||
/proc/enable_prison_shuttle(var/mob/user)
|
||||
for(var/obj/machinery/computer/prison_shuttle/PS in world)
|
||||
@@ -488,12 +422,12 @@
|
||||
emergency_shuttle.shuttlealert(1)
|
||||
emergency_shuttle.incall()
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
|
||||
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
|
||||
|
||||
return
|
||||
|
||||
/proc/cancel_call_proc(var/mob/user)
|
||||
/proc/recall_shuttle(var/mob/user)
|
||||
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0 || emergency_shuttle.timeleft() < 300))
|
||||
return
|
||||
if(ticker.mode.name == "meteor")
|
||||
@@ -502,7 +436,7 @@
|
||||
if(emergency_shuttle.direction != -1 && emergency_shuttle.online) //check that shuttle isn't already heading to centcomm
|
||||
emergency_shuttle.recall()
|
||||
log_game("[key_name(user)] has recalled the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle - [formatJumpTo(user)].", 1)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
|
||||
@@ -528,7 +462,7 @@
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/Del()
|
||||
/obj/machinery/computer/communications/Destroy()
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf) && commconsole != src)
|
||||
@@ -553,7 +487,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/communications/Del()
|
||||
/obj/item/weapon/circuitboard/communications/Destroy()
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf))
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
#define SALVAGE_SHIP_MOVE_TIME 300
|
||||
#define SALVAGE_SHIP_COOLDOWN 800
|
||||
|
||||
/obj/machinery/computer/salvage_ship
|
||||
name = "salvage ship terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list(access_salvage_captain)
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/New()
|
||||
curr_location= locate(/area/shuttle/salvage/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/proc/salvage_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + SALVAGE_SHIP_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/shuttle/salvage/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(SALVAGE_SHIP_MOVE_TIME)
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attack_ai(mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/salvage_ship/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + SALVAGE_SHIP_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SALVAGE_SHIP_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=\ref[src];start=1'>Middle of Nowhere</a><br>
|
||||
<a href='?src=\ref[src];arrivals=1'>Station Auxiliary Docking</a> |
|
||||
<a href='?src=\ref[src];north=1'>North of the Station</a> |
|
||||
<a href='?src=\ref[src];east=1'>East of the Station</a> |
|
||||
<a href='?src=\ref[src];south=1'>South of the Station</a><br>
|
||||
<a href='?src=\ref[src];mining=1'>South-west of the Mining Asteroid</a> |
|
||||
<a href='?src=\ref[src];trading_post=1'>Trading Post</a><br>
|
||||
<a href='?src=\ref[src];clown_asteroid=1'>Clown Asteroid</a> |
|
||||
<a href='?src=\ref[src];derelict=1'>Derelict Station</a> |
|
||||
<a href='?src=\ref[src];djstation=1'>Ruskie DJ Station</a><br>
|
||||
<a href='?src=\ref[src];commssat=1'>Communications Satellite</a> |
|
||||
<a href='?src=\ref[src];abandoned_ship=1'>Abandoned Ship</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/salvage_ship/Topic(href, href_list)
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if(href_list["salvage"])
|
||||
salvage_move_to(/area/shuttle/salvage/start)
|
||||
else if(href_list["start"])
|
||||
salvage_move_to(/area/shuttle/salvage/start)
|
||||
else if(href_list["arrivals"])
|
||||
salvage_move_to(/area/shuttle/salvage/arrivals)
|
||||
else if(href_list["derelict"])
|
||||
salvage_move_to(/area/shuttle/salvage/derelict)
|
||||
else if(href_list["djstation"])
|
||||
salvage_move_to(/area/shuttle/salvage/djstation)
|
||||
else if(href_list["north"])
|
||||
salvage_move_to(/area/shuttle/salvage/north)
|
||||
else if(href_list["east"])
|
||||
salvage_move_to(/area/shuttle/salvage/east)
|
||||
else if(href_list["south"])
|
||||
salvage_move_to(/area/shuttle/salvage/south)
|
||||
else if(href_list["commssat"])
|
||||
salvage_move_to(/area/shuttle/salvage/commssat)
|
||||
else if(href_list["mining"])
|
||||
salvage_move_to(/area/shuttle/salvage/mining)
|
||||
else if(href_list["abandoned_ship"])
|
||||
salvage_move_to(/area/shuttle/salvage/abandoned_ship)
|
||||
else if(href_list["clown_asteroid"])
|
||||
salvage_move_to(/area/shuttle/salvage/clown_asteroid)
|
||||
else if(href_list["trading_post"])
|
||||
salvage_move_to(/area/shuttle/salvage/trading_post)
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/salvage_ship/bullet_act(var/obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!")
|
||||
@@ -500,7 +500,7 @@ What a mess.*/
|
||||
if ((istype(active1, /datum/data/record) && L.Find(rank)))
|
||||
temp = "<h5>Rank:</h5>"
|
||||
temp += "<ul>"
|
||||
for(var/rank in get_all_jobs())
|
||||
for(var/rank in joblist)
|
||||
temp += "<li><a href='?src=\ref[src];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
|
||||
temp += "</ul>"
|
||||
else
|
||||
@@ -519,11 +519,13 @@ What a mess.*/
|
||||
if ("Change Rank")
|
||||
if (active1)
|
||||
active1.fields["rank"] = href_list["rank"]
|
||||
if(href_list["rank"] in get_all_jobs())
|
||||
if(href_list["rank"] in joblist)
|
||||
active1.fields["real_rank"] = href_list["real_rank"]
|
||||
|
||||
if ("Change Criminal Status")
|
||||
if (active2)
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
H.hud_updateflag |= 1 << WANTED_HUD
|
||||
switch(href_list["criminal2"])
|
||||
if("none")
|
||||
active2.fields["criminal"] = "None"
|
||||
|
||||
@@ -273,6 +273,8 @@ What a mess.*/
|
||||
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
||||
|
||||
if ("Purge All Records")
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
del(R)
|
||||
temp = "All Employment records deleted."
|
||||
@@ -284,6 +286,9 @@ What a mess.*/
|
||||
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
||||
//RECORD CREATE
|
||||
if ("New Record (General)")
|
||||
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
var/datum/data/record/G = new /datum/data/record()
|
||||
G.fields["name"] = "New Record"
|
||||
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
|
||||
@@ -338,7 +343,7 @@ What a mess.*/
|
||||
if ((istype(active1, /datum/data/record) && L.Find(rank)))
|
||||
temp = "<h5>Rank:</h5>"
|
||||
temp += "<ul>"
|
||||
for(var/rank in get_all_jobs())
|
||||
for(var/rank in joblist)
|
||||
temp += "<li><a href='?src=\ref[src];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
|
||||
temp += "</ul>"
|
||||
else
|
||||
@@ -356,12 +361,16 @@ What a mess.*/
|
||||
switch(href_list["choice"])
|
||||
if ("Change Rank")
|
||||
if (active1)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
active1.fields["rank"] = href_list["rank"]
|
||||
if(href_list["rank"] in get_all_jobs())
|
||||
if(href_list["rank"] in joblist)
|
||||
active1.fields["real_rank"] = href_list["real_rank"]
|
||||
|
||||
if ("Delete Record (ALL) Execute")
|
||||
if (active1)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
del(R)
|
||||
@@ -400,4 +409,4 @@ What a mess.*/
|
||||
del(R)
|
||||
continue
|
||||
|
||||
..(severity)
|
||||
..(severity)
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
|
||||
var/has_cryo_medicine = has_cryo || has_clonexa
|
||||
if(beaker && !has_cryo_medicine)
|
||||
beaker.reagents.trans_to(occupant, 1, 10)
|
||||
beaker.reagents.trans_to(occupant, 1, 1)
|
||||
beaker.reagents.reaction(occupant)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
|
||||
@@ -251,7 +251,7 @@
|
||||
if (occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
occupant.setloc(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||
occupant.bodytemperature = 261
|
||||
// occupant.metabslow = 0
|
||||
@@ -275,7 +275,7 @@
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
if(M.health > -100 && (M.health < 0 || M.sleeping))
|
||||
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
|
||||
occupant = M
|
||||
|
||||
@@ -80,7 +80,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
|
||||
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
|
||||
|
||||
I.loc = get_turf(src)
|
||||
I.setloc(get_turf(src))
|
||||
frozen_items -= I
|
||||
|
||||
else if(href_list["allitems"])
|
||||
@@ -92,11 +92,10 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
|
||||
|
||||
for(var/obj/item/I in frozen_items)
|
||||
I.loc = get_turf(src)
|
||||
I.setloc(get_turf(src))
|
||||
frozen_items -= I
|
||||
|
||||
else if(href_list["crew"])
|
||||
|
||||
user << "\red Functionality unavailable at this time."
|
||||
|
||||
src.updateUsrDialog()
|
||||
@@ -187,11 +186,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
//Drop all items into the pod.
|
||||
for(var/obj/item/W in occupant)
|
||||
occupant.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
W.setloc(src)
|
||||
|
||||
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
|
||||
for(var/obj/item/O in W.contents)
|
||||
O.loc = src
|
||||
O.setloc(src)
|
||||
|
||||
//Delete all items not on the preservation list.
|
||||
var/list/items = src.contents
|
||||
@@ -211,20 +210,21 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
frozen_items += W
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/mob/living/M in world) //There has to be a more efficient way to do this.
|
||||
if(!(M.mind) || !(M.mind.objectives.len)) continue
|
||||
|
||||
for(var/datum/objective/O in M.mind.objectives)
|
||||
if(O.target && istype(O.target,/datum/mind))
|
||||
if(O.target == occupant.mind)
|
||||
if(O.owner && O.owner.current)
|
||||
O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..."
|
||||
O.target = null
|
||||
spawn(1) //This should ideally fire after the occupant is deleted.
|
||||
if(!O) return
|
||||
O.find_target()
|
||||
if(!(O.target))
|
||||
O.owner.objectives -= O
|
||||
for(var/datum/objective/O in all_objectives)
|
||||
if(istype(O,/datum/objective/mutiny) && O.target == occupant.mind) //We don't want revs to get objectives that aren't for heads of staff. Letting them win or lose based on cryo is silly so we remove the objective.
|
||||
del(O) //TODO: Update rev objectives on login by head (may happen already?) ~ Z
|
||||
else if(O.target && istype(O.target,/datum/mind))
|
||||
if(O.target == occupant.mind)
|
||||
if(O.owner && O.owner.current)
|
||||
O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..."
|
||||
O.target = null
|
||||
spawn(1) //This should ideally fire after the occupant is deleted.
|
||||
if(!O) return
|
||||
O.find_target()
|
||||
if(!(O.target))
|
||||
all_objectives -= O
|
||||
O.owner.objectives -= O
|
||||
del(O)
|
||||
|
||||
//Handle job slot/tater cleanup.
|
||||
var/job = occupant.mind.assigned_role
|
||||
@@ -240,6 +240,9 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
current_mode.possible_traitors.Remove(occupant)
|
||||
|
||||
// Delete them from datacore.
|
||||
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == occupant.real_name))
|
||||
del(R)
|
||||
@@ -302,7 +305,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
if(do_after(user, 20))
|
||||
if(!M || !G || !G:affecting) return
|
||||
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
@@ -372,7 +375,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.setloc(src)
|
||||
src.occupant = usr
|
||||
|
||||
if(orient_right)
|
||||
@@ -398,7 +401,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
occupant.client.eye = src.occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
occupant.loc = get_turf(src)
|
||||
occupant.setloc(get_turf(src))
|
||||
occupant = null
|
||||
|
||||
if(orient_right)
|
||||
|
||||
@@ -966,6 +966,8 @@ About the new airlock wires panel:
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -1162,4 +1164,3 @@ About the new airlock wires panel:
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/Del()
|
||||
/obj/machinery/door/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
@@ -264,39 +264,16 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
update_heat_protection(loc)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
if(width > 1)
|
||||
var/turf/simulated/next_turf = src
|
||||
var/step_dir = turn(dir, 180)
|
||||
for(var/current_step = 2, current_step <= width, current_step++)
|
||||
next_turf = get_step(src, step_dir)
|
||||
north = get_step(next_turf, step_dir)
|
||||
east = get_step(next_turf, turn(step_dir, 90))
|
||||
south = get_step(next_turf, turn(step_dir, -90))
|
||||
|
||||
update_heat_protection(next_turf)
|
||||
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
for(var/turf/simulated/turf in locs)
|
||||
update_heat_protection(turf)
|
||||
air_master.mark_for_update(turf)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
|
||||
if(istype(source))
|
||||
if(src.density && (src.opacity || src.heat_proof))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
areas_added += A
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/Del()
|
||||
/obj/machinery/door/firedoor/Destroy()
|
||||
for(var/area/A in areas_added)
|
||||
A.all_doors.Remove(src)
|
||||
. = ..()
|
||||
@@ -136,7 +136,7 @@
|
||||
user << "\red \The [src] is welded solid!"
|
||||
return
|
||||
|
||||
var/area/A = get_area(src)
|
||||
var/area/A = get_area_master(src)
|
||||
ASSERT(istype(A))
|
||||
if(A.master)
|
||||
A = A.master
|
||||
@@ -273,4 +273,4 @@
|
||||
|
||||
/obj/machinery/door/firedoor/multi_tile/triple
|
||||
icon = 'icons/obj/doors/DoorHazard3x1.dmi'
|
||||
width = 3
|
||||
width = 3
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
..()
|
||||
@@ -318,7 +318,7 @@
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
..()
|
||||
@@ -345,7 +345,7 @@
|
||||
f4.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
del f3
|
||||
@@ -374,7 +374,7 @@
|
||||
f4.SetOpacity(opacity)
|
||||
f3.SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
del f1
|
||||
del f2
|
||||
del f3
|
||||
|
||||
@@ -17,11 +17,7 @@
|
||||
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -35,7 +31,7 @@
|
||||
color = color_windows()
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/Del()
|
||||
/obj/machinery/door/window/Destroy()
|
||||
density = 0
|
||||
playsound(src, "shatter", 70, 1)
|
||||
..()
|
||||
@@ -135,6 +131,8 @@
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -191,6 +189,14 @@
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
/obj/machinery/door/window/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||
take_damage(M.melee_damage_upper)
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
@@ -234,6 +240,8 @@
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -350,4 +358,3 @@
|
||||
dir = SOUTH
|
||||
icon_state = "rightsecure"
|
||||
base_state = "rightsecure"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ var/list/doppler_arrays = list()
|
||||
..()
|
||||
doppler_arrays += src
|
||||
|
||||
/obj/machinery/doppler_array/Del()
|
||||
/obj/machinery/doppler_array/Destroy()
|
||||
doppler_arrays -= src
|
||||
..()
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/machinery/hologram/Del()
|
||||
/obj/machinery/hologram/Destroy()
|
||||
if(hologram)
|
||||
src:clear_holo()
|
||||
..()
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
..(severity)
|
||||
return
|
||||
power_change()
|
||||
..(severity)
|
||||
..(severity)
|
||||
|
||||
@@ -49,7 +49,7 @@ Class Variables:
|
||||
Class Procs:
|
||||
New() 'game/machinery/machine.dm'
|
||||
|
||||
Del() 'game/machinery/machine.dm'
|
||||
Destroy() 'game/machinery/machine.dm'
|
||||
|
||||
auto_use_power() 'game/machinery/machine.dm'
|
||||
This proc determines how power mode power is deducted by the machine.
|
||||
@@ -67,8 +67,10 @@ Class Procs:
|
||||
Checks to see if area that contains the object has power available for power
|
||||
channel given in 'chan'.
|
||||
|
||||
use_power(amount, chan=EQUIP) 'modules/power/power.dm'
|
||||
use_power(amount, chan=EQUIP, autocalled) 'modules/power/power.dm'
|
||||
Deducts 'amount' from the power channel 'chan' of the area that contains the object.
|
||||
If it's autocalled then everything is normal, if something else calls use_power we are going to
|
||||
need to recalculate the power two ticks in a row.
|
||||
|
||||
power_change() 'modules/power/power.dm'
|
||||
Called by the area that contains the object when ever that area under goes a
|
||||
@@ -115,7 +117,7 @@ Class Procs:
|
||||
..()
|
||||
machines += src
|
||||
|
||||
/obj/machinery/Del()
|
||||
/obj/machinery/Destroy()
|
||||
machines -= src
|
||||
..()
|
||||
|
||||
@@ -161,9 +163,9 @@ Class Procs:
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
if(src.use_power == 1)
|
||||
use_power(idle_power_usage,power_channel)
|
||||
use_power(idle_power_usage,power_channel, 1)
|
||||
else if(src.use_power >= 2)
|
||||
use_power(active_power_usage,power_channel)
|
||||
use_power(active_power_usage,power_channel, 1)
|
||||
return 1
|
||||
|
||||
/obj/machinery/Topic(href, href_list)
|
||||
@@ -191,9 +193,16 @@ Class Procs:
|
||||
return 1
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/area/A = get_area(src)
|
||||
A.powerupdate = 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/attack_ai(mob/user as mob)
|
||||
/obj/machinery/attack_ai(var/mob/user as mob)
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/A = user
|
||||
if(A.alienAI) return
|
||||
if(isrobot(user))
|
||||
// For some reason attack_robot doesn't work
|
||||
// This is to stop robots from using cameras to remotely control machines.
|
||||
@@ -230,6 +239,10 @@ Class Procs:
|
||||
return 1
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
var/area/A = get_area(src)
|
||||
A.powerupdate = 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/CheckParts()
|
||||
|
||||
@@ -108,7 +108,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.update_icon() //for any custom ones on the map...
|
||||
..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that
|
||||
|
||||
/obj/machinery/newscaster/Del()
|
||||
/obj/machinery/newscaster/Destroy()
|
||||
allCasters -= src
|
||||
..()
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
egun = 1
|
||||
reqpower = 200
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
// deletes its own cover with it
|
||||
del(cover)
|
||||
..()
|
||||
@@ -450,8 +450,12 @@ Status: []<BR>"},
|
||||
|
||||
if(src.check_anomalies) // if its set to check for xenos/carps, check for non-mob "crittersssss"(And simple_animals)
|
||||
for(var/mob/living/simple_animal/C in view(7,src))
|
||||
if(!C.stat)
|
||||
targets += C
|
||||
if(C.stat)
|
||||
continue
|
||||
// Ignore lazarus-injected mobs.
|
||||
if(C.faction == "lazarus")
|
||||
continue
|
||||
targets += C
|
||||
|
||||
for (var/mob/living/carbon/C in view(7,src)) // loops through all living carbon-based lifeforms in view(12)
|
||||
if(istype(C, /mob/living/carbon/alien) && src.check_anomalies) // git those fukken xenos
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if (src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.setloc(src.loc)
|
||||
src.occupant = null
|
||||
build_icon()
|
||||
src.use_power = 1
|
||||
@@ -179,7 +179,7 @@
|
||||
if(usr && usr.client)
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.setloc(src)
|
||||
src.occupant = usr
|
||||
/*for(var/obj/O in src)
|
||||
O.loc = src.loc*/
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
var/const/SAFETY_COOLDOWN = 100
|
||||
|
||||
/obj/machinery/recycler
|
||||
name = "crusher"
|
||||
desc = "A large crushing machine which is used to recycle small items ineffeciently; there are lights on the side of it."
|
||||
icon = 'icons/obj/recycling.dmi'
|
||||
icon_state = "grinder-o0"
|
||||
layer = MOB_LAYER+1 // Overhead
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/safety_mode = 0 // Temporality stops the machine if it detects a mob
|
||||
var/grinding = 0
|
||||
var/icon_name = "grinder-o"
|
||||
var/blood = 0
|
||||
var/eat_dir = WEST
|
||||
|
||||
/obj/machinery/recycler/New()
|
||||
// On us
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recycler/examine()
|
||||
set src in view()
|
||||
..()
|
||||
usr << "The power light is [(stat & NOPOWER) ? "off" : "on"]."
|
||||
usr << "The safety-mode light is [safety_mode ? "on" : "off"]."
|
||||
usr << "The safety-sensors status light is [emagged ? "off" : "on"]."
|
||||
|
||||
/obj/machinery/recycler/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
|
||||
emagged = 1
|
||||
if(safety_mode)
|
||||
safety_mode = 0
|
||||
update_icon()
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
else if(istype(I, /obj/item/weapon/screwdriver) && emagged)
|
||||
emagged = 0
|
||||
update_icon()
|
||||
user << "<span class='notice'>You reset the crusher to its default factory settings.</span>"
|
||||
else
|
||||
..()
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
var/is_powered = !(stat & (BROKEN|NOPOWER))
|
||||
if(safety_mode)
|
||||
is_powered = 0
|
||||
icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
|
||||
|
||||
// This is purely for admin possession !FUN!.
|
||||
/obj/machinery/recycler/Bump(var/atom/movable/AM)
|
||||
..()
|
||||
if(AM)
|
||||
Bumped(AM)
|
||||
|
||||
|
||||
/obj/machinery/recycler/Bumped(var/atom/movable/AM)
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(safety_mode)
|
||||
return
|
||||
// If we're not already grinding something.
|
||||
if(!grinding)
|
||||
grinding = 1
|
||||
spawn(1)
|
||||
grinding = 0
|
||||
else
|
||||
return
|
||||
|
||||
var/move_dir = get_dir(loc, AM.loc)
|
||||
if(move_dir == eat_dir)
|
||||
if(isliving(AM))
|
||||
if(emagged)
|
||||
eat(AM)
|
||||
else
|
||||
stop(AM)
|
||||
else if(istype(AM, /obj/item))
|
||||
recycle(AM)
|
||||
else // Can't recycle
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
AM.loc = src.loc
|
||||
|
||||
/obj/machinery/recycler/proc/recycle(var/obj/item/I, var/sound = 1)
|
||||
I.loc = src.loc
|
||||
if(!istype(I, /obj/item/weapon/disk/nuclear))
|
||||
del(I)
|
||||
if(prob(15))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
if(prob(10))
|
||||
new /obj/item/stack/sheet/glass(loc)
|
||||
if(prob(2))
|
||||
new /obj/item/stack/sheet/plasteel(loc)
|
||||
if(prob(1))
|
||||
new /obj/item/stack/sheet/rglass(loc)
|
||||
if(sound)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/machinery/recycler/proc/stop(var/mob/living/L)
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
safety_mode = 1
|
||||
update_icon()
|
||||
L.loc = src.loc
|
||||
|
||||
spawn(SAFETY_COOLDOWN)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
safety_mode = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recycler/proc/eat(var/mob/living/L)
|
||||
|
||||
L.loc = src.loc
|
||||
|
||||
if(issilicon(L))
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/gib = 1
|
||||
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
|
||||
if(iscarbon(L))
|
||||
gib = 0
|
||||
if(L.stat == CONSCIOUS)
|
||||
L.say("ARRRRRRRRRRRGH!!!")
|
||||
add_blood(L)
|
||||
|
||||
if(!blood && !issilicon(L))
|
||||
blood = 1
|
||||
update_icon()
|
||||
|
||||
// Remove and recycle the equipped items.
|
||||
for(var/obj/item/I in L.get_equipped_items())
|
||||
if(L.u_equip(I))
|
||||
recycle(I, 0)
|
||||
|
||||
// Instantly lie down, also go unconscious from the pain, before you die.
|
||||
L.Paralyse(5)
|
||||
|
||||
// For admin fun, var edit emagged to 2.
|
||||
if(gib || emagged == 2)
|
||||
L.gib()
|
||||
else if(emagged == 1)
|
||||
L.adjustBruteLoss(1000)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/paper/recycler
|
||||
name = "paper - 'garbage duty instructions'"
|
||||
info = "<h2>New Assignment</h2> You have been assigned to collect garbage from trash bins, located around the station. The crewmembers will put their trash into it and you will collect the said trash.<br><br>There is a recycling machine near your closet, inside maintenance; use it to recycle the trash for a small chance to get useful minerals. Then deliver these minerals to cargo or engineering. You are our last hope for a clean station, do not screw this up!"
|
||||
@@ -15,7 +15,7 @@
|
||||
..()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/machinery/shield/Del()
|
||||
/obj/machinery/shield/Destroy()
|
||||
opacity = 0
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
@@ -29,17 +29,7 @@
|
||||
/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
if(istype(west)) air_master.tiles_to_update |= west
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -162,7 +152,7 @@
|
||||
var/is_open = 0 //Whether or not the wires are exposed
|
||||
var/locked = 0
|
||||
|
||||
/obj/machinery/shieldgen/Del()
|
||||
/obj/machinery/shieldgen/Destroy()
|
||||
for(var/obj/machinery/shield/shield_tile in deployed_shields)
|
||||
qdel(shield_tile)
|
||||
..()
|
||||
@@ -393,7 +383,7 @@
|
||||
user.visible_message("[user] turned the shield generator off.", \
|
||||
"You turn off the shield generator.", \
|
||||
"You hear heavy droning fade out.")
|
||||
src.cleanup()
|
||||
for(var/dir in list(1,2,4,8)) src.cleanup(dir)
|
||||
else
|
||||
src.active = 1
|
||||
icon_state = "Shield_Gen +a"
|
||||
@@ -433,14 +423,7 @@
|
||||
"You hear heavy droning fade out")
|
||||
icon_state = "Shield_Gen"
|
||||
src.active = 0
|
||||
spawn(1)
|
||||
src.cleanup(1)
|
||||
spawn(1)
|
||||
src.cleanup(2)
|
||||
spawn(1)
|
||||
src.cleanup(4)
|
||||
spawn(1)
|
||||
src.cleanup(8)
|
||||
for(var/dir in list(1,2,4,8)) src.cleanup(dir)
|
||||
|
||||
/obj/machinery/shieldwallgen/proc/setup_field(var/NSEW = 0)
|
||||
var/turf/T = src.loc
|
||||
@@ -536,7 +519,7 @@
|
||||
if(!G.active)
|
||||
break
|
||||
|
||||
/obj/machinery/shieldwallgen/Del()
|
||||
/obj/machinery/shieldwallgen/Destroy()
|
||||
src.cleanup(1)
|
||||
src.cleanup(2)
|
||||
src.cleanup(4)
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
|
||||
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
||||
src.OCCUPANT.loc = src.loc
|
||||
src.OCCUPANT.setloc(src.loc)
|
||||
src.OCCUPANT = null
|
||||
if(!src.isopen)
|
||||
src.isopen = 1
|
||||
@@ -453,7 +453,7 @@
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.setloc(src)
|
||||
// usr.metabslow = 1
|
||||
src.OCCUPANT = usr
|
||||
src.isopen = 0 //Close the thing after the guy gets inside
|
||||
@@ -499,7 +499,7 @@
|
||||
if (M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
src.OCCUPANT = M
|
||||
src.isopen = 0 //close ittt
|
||||
|
||||
@@ -520,7 +520,7 @@
|
||||
return
|
||||
user << "You load the [S.name] into the storage compartment."
|
||||
user.drop_item()
|
||||
S.loc = src
|
||||
S.setloc(src)
|
||||
src.SUIT = S
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
@@ -534,7 +534,7 @@
|
||||
return
|
||||
user << "You load the [H.name] into the storage compartment."
|
||||
user.drop_item()
|
||||
H.loc = src
|
||||
H.setloc(src)
|
||||
src.HELMET = H
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
@@ -548,7 +548,7 @@
|
||||
return
|
||||
user << "You load the [M.name] into the storage compartment."
|
||||
user.drop_item()
|
||||
M.loc = src
|
||||
M.setloc(src)
|
||||
src.MASK = M
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
return
|
||||
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
if(active) Deactivate()
|
||||
..()
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
/* --- Do a snazzy animation! --- */
|
||||
flick("broadcaster_send", src)
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/Del()
|
||||
/obj/machinery/telecomms/broadcaster/Destroy()
|
||||
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
|
||||
if(message_delay)
|
||||
message_delay = 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,8 @@
|
||||
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
var/seconds_electrified = 0 //Shock customers like an airlock.
|
||||
var/shoot_inventory = 0 //Fire items at customers! We're broken!
|
||||
var/shoot_speed = 3 //How hard are we firing the items?
|
||||
var/shoot_chance = 2 //How often are we firing the items?
|
||||
var/shut_up = 0 //Stop spouting those godawful pitches!
|
||||
var/extended_inventory = 0 //can we access the hidden inventory?
|
||||
var/scan_id = 1
|
||||
@@ -463,7 +465,7 @@
|
||||
src.speak(slogan)
|
||||
src.last_slogan = world.time
|
||||
|
||||
if(src.shoot_inventory && prob(2))
|
||||
if(src.shoot_inventory && prob(shoot_chance))
|
||||
src.throw_item()
|
||||
|
||||
return
|
||||
@@ -529,7 +531,7 @@
|
||||
if (!throw_item)
|
||||
return 0
|
||||
spawn(0)
|
||||
throw_item.throw_at(target, 16, 3)
|
||||
throw_item.throw_at(target, 16, shoot_speed)
|
||||
src.visible_message("\red <b>[src] launches [throw_item.name] at [target.name]!</b>")
|
||||
return 1
|
||||
|
||||
@@ -792,7 +794,7 @@
|
||||
/obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/blackskirt = 1,/obj/item/clothing/head/beret = 1,
|
||||
/obj/item/clothing/suit/wcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/head/cueball = 1,
|
||||
/obj/item/clothing/under/scratch = 1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/suit/wcoat = 1,
|
||||
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowler = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
|
||||
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowlerhat = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
|
||||
/obj/item/clothing/mask/fakemoustache = 1,/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1,/obj/item/clothing/head/plaguedoctorhat = 1,/obj/item/clothing/mask/gas/plaguedoctor = 1,
|
||||
/obj/item/clothing/under/owl = 1,/obj/item/clothing/mask/gas/owl_mask = 1,/obj/item/clothing/suit/apron = 1,/obj/item/clothing/under/waiter = 1,
|
||||
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate = 1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
|
||||
@@ -872,6 +874,7 @@
|
||||
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
|
||||
//everything after the power cell had no amounts, I improvised. -Sayu
|
||||
|
||||
|
||||
/obj/machinery/vending/eva
|
||||
name = "Hardsuit Kits"
|
||||
desc = "Conversion kits for your alien hardsuit needs."
|
||||
@@ -888,3 +891,34 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice = 12,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candy_corn = 6)
|
||||
contraband = list(/obj/item/weapon/kitchen/utensil/knife = 6)
|
||||
|
||||
/obj/machinery/vending/hatdispenser
|
||||
name = "Hatlord 9000"
|
||||
desc = "It doesn't seem the slightist bit unusual. This frustrates you immensly."
|
||||
icon_state = "hats"
|
||||
product_ads = "Warning, not all hats are dog/monkey compatable. Apply forcefully with care.;Apply directly to the forehead.;Who doesn't love spending cash on hats?!;From the people that brought you collectable hat crates, Hatlord!"
|
||||
products = list(/obj/item/clothing/head/bowlerhat = 10,/obj/item/clothing/head/beaverhat = 10,/obj/item/clothing/head/boaterhat = 10,/obj/item/clothing/head/fedora = 10,/obj/item/clothing/head/fez = 10)
|
||||
contraband = list(/obj/item/clothing/head/bearpelt = 5)
|
||||
premium = list(/obj/item/clothing/head/soft/rainbow = 1)
|
||||
|
||||
/obj/machinery/vending/suitdispenser
|
||||
name = "Suitlord 9000"
|
||||
desc = "You wonder for a moment why all of your shirts and pants come conjoined. This hurts your head and you stop thinking about it."
|
||||
icon_state = "suits"
|
||||
product_ads = "Pre-Ironed, Pre-Washed, Pre-Wor-*BZZT*;Blood of your enemys washes right out!;Who are YOU wearing?;Look dapper! Look like an idiot!;Dont carry your size? How about you shave off some pounds you fat lazy- *BZZT*"
|
||||
products = list(/obj/item/clothing/under/color/black = 10,/obj/item/clothing/under/color/blue = 10,/obj/item/clothing/under/color/green = 10,/obj/item/clothing/under/color/grey = 10,/obj/item/clothing/under/color/pink = 10,/obj/item/clothing/under/color/red = 10,
|
||||
/obj/item/clothing/under/color/white = 10, /obj/item/clothing/under/color/yellow = 10,/obj/item/clothing/under/lightblue = 10,/obj/item/clothing/under/aqua = 10,/obj/item/clothing/under/purple = 10,/obj/item/clothing/under/lightgreen = 10,
|
||||
/obj/item/clothing/under/lightblue = 10,/obj/item/clothing/under/lightbrown = 10,/obj/item/clothing/under/brown = 10,/obj/item/clothing/under/yellowgreen = 10,/obj/item/clothing/under/darkblue = 10,/obj/item/clothing/under/lightred = 10, /obj/item/clothing/under/darkred = 10)
|
||||
contraband = list(/obj/item/clothing/under/syndicate/tacticool = 5,/obj/item/clothing/under/color/orange = 5,/obj/item/clothing/under/psyche = 5)
|
||||
premium = list(/obj/item/clothing/under/rainbow = 1)
|
||||
|
||||
//THIS IS WHERE THE FEET LIVE, GIT YE SOME
|
||||
/obj/machinery/vending/shoedispenser
|
||||
name = "Shoelord 9000"
|
||||
desc = "Wow, hatlord looked fancy, suitlord looked streamlined, and this is just normal. The guy who disigned these must be an idiot."
|
||||
icon_state = "shoes"
|
||||
product_ads = "Put your foot down!;One size fits all!;IM WALKING ON SUNSHINE!;No hobbits allowed.;NO PLEASE WILLY, DONT HURT ME- *BZZT*"
|
||||
products = list(/obj/item/clothing/shoes/black = 10,/obj/item/clothing/shoes/brown = 10,/obj/item/clothing/shoes/blue = 10,/obj/item/clothing/shoes/green = 10,/obj/item/clothing/shoes/yellow = 10,/obj/item/clothing/shoes/purple = 10,/obj/item/clothing/shoes/red = 10,/obj/item/clothing/shoes/white = 10)
|
||||
contraband = list(/obj/item/clothing/shoes/jackboots = 5,/obj/item/clothing/shoes/orange = 5)
|
||||
premium = list(/obj/item/clothing/shoes/rainbow = 1)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
insisting = 0
|
||||
|
||||
if (!(M_HULK in user.mutations))
|
||||
user.mutations.Add(M_HULK)
|
||||
user.dna.SetSEState(HULKBLOCK,1)
|
||||
|
||||
if (!(M_LASER in user.mutations))
|
||||
user.mutations.Add(M_LASER)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
if(!istype(target, /obj) && !istype(target, /mob)) return
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.make_dizzy(3)
|
||||
M.Dizzy(3)
|
||||
M.adjustBruteLoss(1)
|
||||
M.updatehealth()
|
||||
for (var/mob/V in viewers(src))
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/obj/mecha/combat/recitence
|
||||
desc = "A silent, fast, and nigh-invisible miming exosuit. Popular among mimes and mime assassins."
|
||||
name = "\improper Recitence"
|
||||
icon_state = "mime"
|
||||
initial_icon = "mime"
|
||||
step_in = 2
|
||||
dir_in = 1 //Facing North.
|
||||
health = 100
|
||||
deflect_chance = 3
|
||||
damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1)
|
||||
max_temperature = 15000
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/mime
|
||||
internal_damage_threshold = 25
|
||||
max_equip = 2
|
||||
step_energy_drain = 3
|
||||
// color = "#87878715"
|
||||
stepsound = null
|
||||
|
||||
/obj/mecha/combat/recitence/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/rcd //HAHA IT MAKES WALLS GET IT
|
||||
ME.attach(src)
|
||||
return
|
||||
@@ -148,7 +148,7 @@
|
||||
M.Stun(10)
|
||||
M.Paralyse(4)
|
||||
else
|
||||
M.make_jittery(500)
|
||||
M.Jitter(500)
|
||||
///else the mousetraps are useless
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -200,10 +200,20 @@
|
||||
name = "\improper FNX-66 Carbine"
|
||||
icon_state = "mecha_carbine"
|
||||
equip_cooldown = 5
|
||||
projectile = /obj/item/projectile/bullet/incendiary
|
||||
projectile = /obj/item/projectile/bullet/incendiary/mech
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
fire_sound = "sound/weapons/Gunshot_silenced.ogg"
|
||||
icon_state = "mecha_mime"
|
||||
equip_cooldown = 30
|
||||
projectile = /obj/item/projectile/bullet/mime
|
||||
projectiles = 6
|
||||
projectile_energy_cost = 50
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||
name = "LBX AC 10 \"Scattershot\""
|
||||
icon_state = "mecha_scatter"
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
if(time_coeff!=diff)
|
||||
time_coeff = diff
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Del()
|
||||
/obj/machinery/mecha_part_fabricator/Destroy()
|
||||
for(var/atom/A in src)
|
||||
del A
|
||||
..()
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
var/datum/global_iterator/pr_give_air //moves air from tank to cabin
|
||||
var/datum/global_iterator/pr_internal_damage //processes internal damage
|
||||
|
||||
|
||||
var/wreckage
|
||||
|
||||
var/list/equipment = new
|
||||
@@ -69,6 +68,9 @@
|
||||
var/max_equip = 3
|
||||
var/datum/events/events
|
||||
|
||||
var/stepsound = 'sound/mecha/mechturn.ogg'
|
||||
|
||||
|
||||
/obj/mecha/New()
|
||||
..()
|
||||
events = new
|
||||
@@ -89,7 +91,7 @@
|
||||
mechas_list += src //global mech list
|
||||
return
|
||||
|
||||
/obj/mecha/Del()
|
||||
/obj/mecha/Destroy()
|
||||
src.go_out()
|
||||
mechas_list -= src //global mech list
|
||||
..()
|
||||
@@ -309,20 +311,20 @@
|
||||
|
||||
/obj/mecha/proc/mechturn(direction)
|
||||
dir = direction
|
||||
playsound(src,'sound/mecha/mechturn.ogg',40,1)
|
||||
if(stepsound)
|
||||
playsound(src,stepsound,40,1)
|
||||
return 1
|
||||
|
||||
/obj/mecha/proc/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
playsound(src,'sound/mecha/mechstep.ogg',40,1)
|
||||
if(result && stepsound)
|
||||
playsound(src,stepsound,40,1)
|
||||
return result
|
||||
|
||||
|
||||
/obj/mecha/proc/mechsteprand()
|
||||
var/result = step_rand(src)
|
||||
if(result)
|
||||
playsound(src,'sound/mecha/mechstep.ogg',40,1)
|
||||
if(result && stepsound)
|
||||
playsound(src,stepsound,40,1)
|
||||
return result
|
||||
|
||||
/obj/mecha/Bump(var/atom/obstacle)
|
||||
@@ -533,7 +535,7 @@
|
||||
var/obj/mecha/working/ripley/R = src
|
||||
if(R.cargo)
|
||||
for(var/obj/O in R.cargo) //Dump contents of stored cargo
|
||||
O.loc = T
|
||||
O.setloc(T)
|
||||
R.cargo -= O
|
||||
T.Entered(O)
|
||||
|
||||
|
||||
@@ -116,6 +116,10 @@
|
||||
name = "Seraph wreckage"
|
||||
icon_state = "seraph-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/recitence
|
||||
name = "\improper Recitence wreckage"
|
||||
icon_state = "recitence-broken"
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ripley
|
||||
name = "Ripley wreckage"
|
||||
icon_state = "ripley-broken"
|
||||
@@ -221,4 +225,4 @@
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return
|
||||
return
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/working/ripley/Del()
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
for(var/mob/M in src)
|
||||
if(M==src.occupant)
|
||||
continue
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
// unacidable = 1 //Aliens won't ment their own.
|
||||
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
@@ -29,7 +28,7 @@
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
var/health = 200
|
||||
//var/mob/living/affecting = null
|
||||
var/turf/linked_turf
|
||||
|
||||
wall
|
||||
name = "resin wall"
|
||||
@@ -45,14 +44,13 @@
|
||||
|
||||
/obj/effect/alien/resin/New()
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
linked_turf = get_turf(src)
|
||||
linked_turf.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
/obj/effect/alien/resin/Del()
|
||||
var/turf/T = get_turf(src)
|
||||
T.thermal_conductivity = initial(T.thermal_conductivity)
|
||||
/obj/effect/alien/resin/Destroy()
|
||||
if(linked_turf)
|
||||
linked_turf.thermal_conductivity = initial(linked_turf.thermal_conductivity)
|
||||
..()
|
||||
density = 0
|
||||
|
||||
|
||||
/obj/effect/alien/resin/proc/healthcheck()
|
||||
@@ -195,14 +193,28 @@
|
||||
desc = "Weird purple octopus-like thing."
|
||||
luminosity = NODERANGE
|
||||
var/node_range = NODERANGE
|
||||
var/list/obj/effect/alien/weeds/spawns
|
||||
|
||||
/obj/effect/alien/weeds/node/Destroy()
|
||||
for(var/obj/effect/alien/weeds/W in spawns)
|
||||
if(W.linked_node == src)
|
||||
W.linked_node = null
|
||||
..()
|
||||
|
||||
/obj/effect/alien/weeds/Destroy()
|
||||
if(linked_node)
|
||||
linked_node.spawns.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
spawns = new()
|
||||
..(src.loc, src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/New(pos, node)
|
||||
/obj/effect/alien/weeds/New(pos, var/obj/effect/alien/weeds/node/node)
|
||||
..()
|
||||
linked_node = node
|
||||
linked_node.spawns.Add(src)
|
||||
if(istype(loc, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
@@ -264,6 +276,13 @@ Alien plants should do something if theres a lot of poison
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/fire_act(null, temperature, volume)
|
||||
if(temperature > T0C+200)
|
||||
health -= 1 * temperature
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
@@ -284,7 +303,7 @@ Alien plants should do something if theres a lot of poison
|
||||
|
||||
/obj/effect/alien/weeds/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
@@ -412,27 +431,33 @@ Alien plants should do something if theres a lot of poison
|
||||
return
|
||||
|
||||
proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
return locate(/mob/living/carbon/alien/facehugger) in contents
|
||||
|
||||
proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
new /mob/living/carbon/alien/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
var/mob/living/carbon/alien/facehugger/child = GetFacehugger()
|
||||
icon_state = "egg_hatched"
|
||||
flick("egg_opening", src)
|
||||
status = BURSTING
|
||||
spawn(15)
|
||||
status = BURST
|
||||
var/mob/living/carbon/alien/facehugger/F = new /mob/living/carbon/alien/facehugger(src.loc)
|
||||
if(kill)
|
||||
F.stat=2
|
||||
if(!child)
|
||||
src.visible_message("\red The egg bursts apart revealing nothing")
|
||||
status = "GROWN"
|
||||
new /obj/effect/decal/cleanable/xenoblood(src)
|
||||
loc.contents += child//need to write the code for giving it to the alien later
|
||||
if(kill && istype(child))
|
||||
child.death()
|
||||
else
|
||||
for(var/mob/M in range(1,src))
|
||||
if(CanHug(M))
|
||||
F.Attach(M)
|
||||
child.Attach(M)
|
||||
break
|
||||
|
||||
|
||||
@@ -457,7 +482,7 @@ Alien plants should do something if theres a lot of poison
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
src.health -= damage
|
||||
src.healthcheck()
|
||||
|
||||
@@ -15,7 +15,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
..()
|
||||
BUMP_TELEPORTERS += src
|
||||
|
||||
/obj/effect/bump_teleporter/Del()
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
BUMP_TELEPORTERS -= src
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
|
||||
Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
|
||||
Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
random_icon_states = null
|
||||
@@ -1,385 +1,386 @@
|
||||
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/amount = 5
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Del()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
|
||||
return // We handle our own drying.
|
||||
if(src.type == /obj/effect/decal/cleanable/blood)
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
if (B.blood_DNA)
|
||||
blood_DNA |= B.blood_DNA.Copy()
|
||||
del(B)
|
||||
spawn(DRYING_TIME * (amount+1))
|
||||
dry()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
if(perp.shoes)
|
||||
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,0)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
else
|
||||
perp.track_blood = max(amount,perp.track_blood) //Or feet
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||
name = "dried [src]"
|
||||
desc = "It's dark red and crusty. Someone is not doing their job."
|
||||
var/icon/I = icon(icon,icon_state)
|
||||
I.SetIntensity(0.7)
|
||||
icon = I
|
||||
amount = 0
|
||||
spawn(DRYING_TIME)
|
||||
Del()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
|
||||
..()
|
||||
if (amount && istype(user))
|
||||
add_fingerprint(user)
|
||||
if (user.gloves)
|
||||
return
|
||||
var/taken = rand(1,amount)
|
||||
amount -= taken
|
||||
user << "<span class='notice'>You get some blood on your hands.</span>"
|
||||
if (!user.blood_DNA)
|
||||
user.blood_DNA = list()
|
||||
user.blood_DNA |= blood_DNA.Copy()
|
||||
user.bloody_hands += taken
|
||||
user.update_inv_gloves(1)
|
||||
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
amount = 2
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing
|
||||
icon_state = "tracks"
|
||||
desc = "It looks like a writing in blood."
|
||||
gender = NEUTER
|
||||
random_icon_states = list("writing1","writing2","writing3","writing4","writing5")
|
||||
amount = 0
|
||||
var/message
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/New()
|
||||
..()
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
icon_state = pick(random_icon_states)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/examine()
|
||||
..()
|
||||
usr << "It reads: <font color='#600000'>\"[message]\"<font>"
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green
|
||||
name = "green blood"
|
||||
desc = "It's green and gooey. Perhaps it's the chef's cooking?"
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
if(perp.shoes)
|
||||
perp.shoes:track_blood_green= max(amount,perp.shoes:track_blood_green) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.blood_overlay_color = 1
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,1)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
else
|
||||
perp.track_blood_green = max(amount,perp.track_blood_green) //Or feet
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/green
|
||||
name = "drips of blood"
|
||||
desc = "It's green."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "g1"
|
||||
amount = 0
|
||||
|
||||
// The idea is to have 4 bits for coming and 4 for going.
|
||||
#define TRACKS_COMING_NORTH 1
|
||||
#define TRACKS_COMING_SOUTH 2
|
||||
#define TRACKS_COMING_EAST 4
|
||||
#define TRACKS_COMING_WEST 8
|
||||
#define TRACKS_GOING_NORTH 16
|
||||
#define TRACKS_GOING_SOUTH 32
|
||||
#define TRACKS_GOING_EAST 64
|
||||
#define TRACKS_GOING_WEST 128
|
||||
// 5 seconds
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// Footprints, tire trails...
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
amount = 0
|
||||
random_icon_states = null
|
||||
var/dirs=0
|
||||
icon='icons/effects/footprints.dmi'
|
||||
var/coming_state="blood1"
|
||||
var/going_state="blood2"
|
||||
|
||||
|
||||
var/newtracks=0 // Cleared after every icon_update
|
||||
var/crustytracks=0 // Cleared after every icon_update
|
||||
|
||||
// dir = last wetting
|
||||
var/list/wet=list(
|
||||
"1"=0,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=0,
|
||||
"128"=0
|
||||
)
|
||||
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
*/
|
||||
proc/AddTracks(var/mob/living/carbon/human/H, var/list/DNA, var/comingdir, var/goingdir,var/typepath)
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="bloodclaw1"
|
||||
going_state="bloodclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="bloodpaw1"
|
||||
going_state="bloodpaw2"
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints/green)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="xenoclaw1"
|
||||
going_state="xenoclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="xenopaw1"
|
||||
going_state="xenopaw2"
|
||||
else
|
||||
coming_state="xeno1"
|
||||
going_state="xeno2"
|
||||
|
||||
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
|
||||
// Current bit
|
||||
var/b=0
|
||||
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
if(comingdir&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
process()
|
||||
return PROCESS_KILL // Do not process us or we'll lag like hell.
|
||||
|
||||
update_icon()
|
||||
// Clear everything.
|
||||
//overlays.Cut()
|
||||
var/b=0
|
||||
|
||||
var/t=world.time
|
||||
var/crusty=0
|
||||
// Clear out any images that have been wetted or have crustified.
|
||||
for(var/image/overlay in overlays)
|
||||
b=overlay.dir
|
||||
if(overlay.icon_state==going_state)
|
||||
b=b<<4
|
||||
if(wet["[b]"]<t && !(crustytracks&b)) // NEW crusty ones get special treatment
|
||||
crusty|=b
|
||||
if(wet["[b]"]>t || crusty&b) // Wet or crusty? Nuke'em either way.
|
||||
overlays.Remove(overlay)
|
||||
newtracks |= b // Mark as needing an update.
|
||||
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
// COMING
|
||||
b=1<<bi
|
||||
// New or crusty
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=coming_state, dir=num2dir(b))
|
||||
// If crusty, make them look crusty.
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
// Add to overlays
|
||||
overlays += I
|
||||
// GOING
|
||||
b=b<<4
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=going_state, dir=num2dir(b>>4))
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
overlays += I
|
||||
newtracks=0 // Clear our memory of updated tracks.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "bloody footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints/green
|
||||
name = "bloody green footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/wheels
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip
|
||||
name = "drips of blood"
|
||||
desc = "It's red."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "1"
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/mucus
|
||||
name = "mucus"
|
||||
desc = "Disgusting mucus."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "mucus"
|
||||
random_icon_states = list("mucus")
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/dry=0 // Keeps the lag down
|
||||
|
||||
/obj/effect/decal/cleanable/mucus/New()
|
||||
spawn(DRYING_TIME * 2)
|
||||
dry=1
|
||||
|
||||
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/amount = 5
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
D.holder = null
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
|
||||
return // We handle our own drying.
|
||||
if(src.type == /obj/effect/decal/cleanable/blood)
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
if(B != src)
|
||||
if (B.blood_DNA)
|
||||
blood_DNA |= B.blood_DNA.Copy()
|
||||
del(B)
|
||||
spawn(DRYING_TIME * (amount+1))
|
||||
dry()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
if(perp.shoes)
|
||||
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,0)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
else
|
||||
perp.track_blood = max(amount,perp.track_blood) //Or feet
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||
name = "dried [src]"
|
||||
desc = "It's dark red and crusty. Someone is not doing their job."
|
||||
var/icon/I = icon(icon,icon_state)
|
||||
I.SetIntensity(0.7)
|
||||
icon = I
|
||||
amount = 0
|
||||
spawn(DRYING_TIME)
|
||||
Destroy()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
|
||||
..()
|
||||
if (amount && istype(user))
|
||||
add_fingerprint(user)
|
||||
if (user.gloves)
|
||||
return
|
||||
var/taken = rand(1,amount)
|
||||
amount -= taken
|
||||
user << "<span class='notice'>You get some blood on your hands.</span>"
|
||||
if (!user.blood_DNA)
|
||||
user.blood_DNA = list()
|
||||
user.blood_DNA |= blood_DNA.Copy()
|
||||
user.bloody_hands += taken
|
||||
user.update_inv_gloves(1)
|
||||
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
amount = 2
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing
|
||||
icon_state = "tracks"
|
||||
desc = "It looks like a writing in blood."
|
||||
gender = NEUTER
|
||||
random_icon_states = list("writing1","writing2","writing3","writing4","writing5")
|
||||
amount = 0
|
||||
var/message
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/New()
|
||||
..()
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
icon_state = pick(random_icon_states)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/examine()
|
||||
..()
|
||||
usr << "It reads: <font color='#600000'>\"[message]\"<font>"
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green
|
||||
name = "green blood"
|
||||
desc = "It's green and gooey. Perhaps it's the chef's cooking?"
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
if(perp.shoes)
|
||||
perp.shoes:track_blood_green= max(amount,perp.shoes:track_blood_green) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.blood_overlay_color = 1
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,1)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
else
|
||||
perp.track_blood_green = max(amount,perp.track_blood_green) //Or feet
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/green
|
||||
name = "drips of blood"
|
||||
desc = "It's green."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "g1"
|
||||
amount = 0
|
||||
|
||||
// The idea is to have 4 bits for coming and 4 for going.
|
||||
#define TRACKS_COMING_NORTH 1
|
||||
#define TRACKS_COMING_SOUTH 2
|
||||
#define TRACKS_COMING_EAST 4
|
||||
#define TRACKS_COMING_WEST 8
|
||||
#define TRACKS_GOING_NORTH 16
|
||||
#define TRACKS_GOING_SOUTH 32
|
||||
#define TRACKS_GOING_EAST 64
|
||||
#define TRACKS_GOING_WEST 128
|
||||
// 5 seconds
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// Footprints, tire trails...
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
amount = 0
|
||||
random_icon_states = null
|
||||
var/dirs=0
|
||||
icon='icons/effects/footprints.dmi'
|
||||
var/coming_state="blood1"
|
||||
var/going_state="blood2"
|
||||
|
||||
|
||||
var/newtracks=0 // Cleared after every icon_update
|
||||
var/crustytracks=0 // Cleared after every icon_update
|
||||
|
||||
// dir = last wetting
|
||||
var/list/wet=list(
|
||||
"1"=0,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=0,
|
||||
"128"=0
|
||||
)
|
||||
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
*/
|
||||
proc/AddTracks(var/mob/living/carbon/human/H, var/list/DNA, var/comingdir, var/goingdir,var/typepath)
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="bloodclaw1"
|
||||
going_state="bloodclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="bloodpaw1"
|
||||
going_state="bloodpaw2"
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints/green)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="xenoclaw1"
|
||||
going_state="xenoclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="xenopaw1"
|
||||
going_state="xenopaw2"
|
||||
else
|
||||
coming_state="xeno1"
|
||||
going_state="xeno2"
|
||||
|
||||
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
|
||||
// Current bit
|
||||
var/b=0
|
||||
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
if(comingdir&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
process()
|
||||
return PROCESS_KILL // Do not process us or we'll lag like hell.
|
||||
|
||||
update_icon()
|
||||
// Clear everything.
|
||||
//overlays.Cut()
|
||||
var/b=0
|
||||
|
||||
var/t=world.time
|
||||
var/crusty=0
|
||||
// Clear out any images that have been wetted or have crustified.
|
||||
for(var/image/overlay in overlays)
|
||||
b=overlay.dir
|
||||
if(overlay.icon_state==going_state)
|
||||
b=b<<4
|
||||
if(wet["[b]"]<t && !(crustytracks&b)) // NEW crusty ones get special treatment
|
||||
crusty|=b
|
||||
if(wet["[b]"]>t || crusty&b) // Wet or crusty? Nuke'em either way.
|
||||
overlays.Remove(overlay)
|
||||
newtracks |= b // Mark as needing an update.
|
||||
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
// COMING
|
||||
b=1<<bi
|
||||
// New or crusty
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=coming_state, dir=num2dir(b))
|
||||
// If crusty, make them look crusty.
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
// Add to overlays
|
||||
overlays += I
|
||||
// GOING
|
||||
b=b<<4
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=going_state, dir=num2dir(b>>4))
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
overlays += I
|
||||
newtracks=0 // Clear our memory of updated tracks.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "bloody footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints/green
|
||||
name = "bloody green footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/wheels
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip
|
||||
name = "drips of blood"
|
||||
desc = "It's red."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "1"
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/mucus
|
||||
name = "mucus"
|
||||
desc = "Disgusting mucus."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "mucus"
|
||||
random_icon_states = list("mucus")
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/dry=0 // Keeps the lag down
|
||||
|
||||
/obj/effect/decal/cleanable/mucus/New()
|
||||
spawn(DRYING_TIME * 2)
|
||||
dry=1
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
New()
|
||||
..()
|
||||
spawn(1200)// 2 minutes
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
@@ -97,9 +97,10 @@
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/list/viruses = list()
|
||||
|
||||
Del()
|
||||
Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
D.holder = null
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/poop
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user