Merge branch 'master' of git://github.com/Baystation12/Baystation12

This commit is contained in:
Ren Erthilo
2012-04-11 20:49:14 +01:00
64 changed files with 1951 additions and 1481 deletions
+13
View File
@@ -9,6 +9,19 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
"}
diaryofmeanpeople = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] Attack.log")
diaryofmeanpeople << {"
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
---------------------
Dear Diary....
Today, these people were mean:
"}
jobban_loadbanfile()
jobban_updatelegacybans()
LoadBans()
+95 -1
View File
@@ -1,3 +1,7 @@
// Areas.dm
// ===
/area/
var/global/global_uid = 0
@@ -5,6 +9,7 @@
/area/New()
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references src.loc.loc.master ~Carn
src.icon = 'alert.dmi'
uid = ++global_uid
spawn(1)
@@ -14,7 +19,6 @@
if(sd_created)
related += src
return
master = src
related = list(src)
src.icon = 'alert.dmi'
@@ -27,6 +31,7 @@
power_light = 0
power_equip = 0
power_environ = 0
//has_gravity = 0 // Space has gravity. Because.. because.
if(!requires_power)
power_light = 0//rastaf0
@@ -40,6 +45,8 @@
//sd_SetLuminosity(0) // *DAL*
/*spawn(5)
for(var/turf/T in src) // count the number of turfs (for lighting calc)
if(no_air)
@@ -269,3 +276,90 @@
master.used_light += amount
if(ENVIRON)
master.used_environ += amount
/area/Entered(A)
var/sound = null
var/musVolume = 25
sound = 'ambigen1.ogg'
if (ismob(A))
if (istype(A, /mob/dead/observer)) return
if (!A:ckey)
return
if(istype(A,/mob/living))
if(!A:lastarea)
A:lastarea = get_area(A:loc)
//world << "Entered new area [get_area(A:loc)]"
var/area/newarea = get_area(A:loc)
var/area/oldarea = A:lastarea
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (A:m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(A)
A:lastarea = newarea
//if (A:ear_deaf) return
// if (A && A:client && !A:client:ambience_playing && !A:client:no_ambi) // 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
// A:client:ambience_playing = 1
// A << sound('shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
switch(src.name)
if ("Chapel") sound = pick('ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg')
if ("Morgue") sound = pick('ambimo1.ogg','ambimo2.ogg','title2.ogg')
if ("Space") sound = pick('ambispace.ogg','title2.ogg',)
if ("Engine Control", "Engineering", "Engineering SMES") sound = pick('ambisin1.ogg','ambisin2.ogg','ambisin3.ogg','ambisin4.ogg')
if ("AI Satellite Teleporter Room") sound = pick('ambimalf.ogg')
if ("AI Upload Foyer") sound = pick('ambimalf.ogg')
if ("AI Upload Chamber") sound = pick('ambimalf.ogg')
if ("Mine")
sound = pick('ambimine.ogg')
musVolume = 25
else
sound = pick('ambigen1.ogg','ambigen3.ogg','ambigen4.ogg','ambigen5.ogg','ambigen6.ogg','ambigen7.ogg','ambigen8.ogg','ambigen9.ogg','ambigen10.ogg','ambigen11.ogg','ambigen12.ogg','ambigen14.ogg')
if(findtext(src.name, "Telecommunications"))
sound = pick('ambisin2.ogg', 'signal.ogg', 'signal.ogg', 'ambigen10.ogg')
if (prob(35))
if(A && A:client && !A:client:played)
A << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
A:client:played = 1
spawn(600)
if(A && A:client)
A:client:played = 0
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
A.has_gravity = gravitystate
for(var/area/SubA in A.related)
SubA.has_gravity = gravitystate
if(gravitystate)
for(var/mob/living/carbon/human/M in SubA)
thunk(M)
/area/proc/thunk(mob)
if(istype(mob,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
if((istype(mob:shoes, /obj/item/clothing/shoes/magboots) && (mob:shoes.flags & NOSLIP)))
return
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
return
if((istype(mob,/mob/living/carbon/human/)) && (mob:m_intent == "run")) // Only clumbsy humans can fall on their asses.
mob:AdjustStunned(5)
mob:AdjustWeakened(5)
else if (istype(mob,/mob/living/carbon/human/))
mob:AdjustStunned(2)
mob:AdjustWeakened(2)
mob << "Gravity!"
+148 -138
View File
@@ -1020,41 +1020,42 @@
src.subblock--
dopage(src,"unimenu")
if (href_list["unipulse"])
var/block
var/newblock
var/tstructure2
block = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),src.subblock,1)
src.delete = 1
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
sleep(10*src.radduration)
if (!src.connected.occupant)
temphtml = null
delete = 0
return null
///
if (prob((80 + (src.radduration / 2))))
block = miniscramble(block, src.radstrength, src.radduration)
newblock = null
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)
if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)
if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1) + block
tstructure2 = setblock(src.connected.occupant.dna.uni_identity, src.uniblock, newblock,3)
src.connected.occupant.dna.uni_identity = tstructure2
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
src.connected.occupant.radiation += (src.radstrength+src.radduration)
else
if (prob(20+src.radstrength))
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
else
randmuti(src.connected.occupant)
if(src.connected.occupant)
var/block
var/newblock
var/tstructure2
block = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),src.subblock,1)
src.delete = 1
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
sleep(10*src.radduration)
if (!src.connected.occupant)
temphtml = null
delete = 0
return null
///
if (prob((80 + (src.radduration / 2))))
block = miniscramble(block, src.radstrength, src.radduration)
newblock = null
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)
if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)
if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1) + block
tstructure2 = setblock(src.connected.occupant.dna.uni_identity, src.uniblock, newblock,3)
src.connected.occupant.dna.uni_identity = tstructure2
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
src.connected.occupant.radiation += ((src.radstrength*2)+src.radduration)
src.connected.locked = lock_state
src.connected.occupant.radiation += (src.radstrength+src.radduration)
else
if (prob(20+src.radstrength))
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
else
randmuti(src.connected.occupant)
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
src.connected.occupant.radiation += ((src.radstrength*2)+src.radduration)
src.connected.locked = lock_state
dopage(src,"unimenu")
src.delete = 0
////////////////////////////////////////////////////////
@@ -1191,7 +1192,7 @@
src.temphtml += text("Data: <font color='blue'>[]</FONT><BR>", src.buffer2)
src.temphtml += text("By: <font color='blue'>[]</FONT><BR>", src.buffer2owner)
src.temphtml += text("Label: <font color='blue'>[]</FONT><BR>", src.buffer2label)
if (src.connected.occupant && !(src.connected.occupant.mutations & HUSK)) src.temphtml += text("Save : <A href='?src=\ref[];b2addui=1'>UI</A> - <A href='?src=\ref[];b2adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b2addse=1'>SE</A><BR>", src, src, src)
if (src.connected.occupant && !(src.connected.occupant.mutations2 & NOCLONE)) src.temphtml += text("Save : <A href='?src=\ref[];b2addui=1'>UI</A> - <A href='?src=\ref[];b2adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b2addse=1'>SE</A><BR>", src, src, src)
if (src.buffer2) src.temphtml += text("Transfer to: <A href='?src=\ref[];b2transfer=1'>Occupant</A> - <A href='?src=\ref[];b2injector=1'>Injector</A><BR>", src, src)
//if (src.buffer2) src.temphtml += text("<A href='?src=\ref[];b2iso=1'>Isolate Block</A><BR>", src)
if (src.buffer2) src.temphtml += "Disk: <A href='?src=\ref[src];save_disk=2'>Save To</a> | <A href='?src=\ref[src];load_disk=2'>Load From</a><br>"
@@ -1205,7 +1206,7 @@
src.temphtml += text("Data: <font color='blue'>[]</FONT><BR>", src.buffer3)
src.temphtml += text("By: <font color='blue'>[]</FONT><BR>", src.buffer3owner)
src.temphtml += text("Label: <font color='blue'>[]</FONT><BR>", src.buffer3label)
if (src.connected.occupant && !(src.connected.occupant.mutations & HUSK)) src.temphtml += text("Save : <A href='?src=\ref[];b3addui=1'>UI</A> - <A href='?src=\ref[];b3adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b3addse=1'>SE</A><BR>", src, src, src)
if (src.connected.occupant && !(src.connected.occupant.mutations2 & NOCLONE)) src.temphtml += text("Save : <A href='?src=\ref[];b3addui=1'>UI</A> - <A href='?src=\ref[];b3adduiue=1'>UI+UE</A> - <A href='?src=\ref[];b3addse=1'>SE</A><BR>", src, src, src)
if (src.buffer3) src.temphtml += text("Transfer to: <A href='?src=\ref[];b3transfer=1'>Occupant</A> - <A href='?src=\ref[];b3injector=1'>Injector</A><BR>", src, src)
//if (src.buffer3) src.temphtml += text("<A href='?src=\ref[];b3iso=1'>Isolate Block</A><BR>", src)
if (src.buffer3) src.temphtml += "Disk: <A href='?src=\ref[src];save_disk=3'>Save To</a> | <A href='?src=\ref[src];load_disk=3'>Load From</a><br>"
@@ -1213,122 +1214,131 @@
if (src.buffer3) src.temphtml += text("<A href='?src=\ref[];b3clear=1'>Clear Buffer</A><BR><BR>", src)
if (!src.buffer3) src.temphtml += "<BR>"
if (href_list["b1addui"])
src.buffer1iue = 0
src.buffer1 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer1iue = 0
src.buffer1 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Unique Identifier"
src.buffer1type = "ui"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Unique Identifier"
src.buffer1type = "ui"
dopage(src,"buffermenu")
if (href_list["b1adduiue"])
src.buffer1 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer1 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Unique Identifier & Unique Enzymes"
src.buffer1type = "ui"
src.buffer1iue = 1
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Unique Identifier & Unique Enzymes"
src.buffer1type = "ui"
src.buffer1iue = 1
dopage(src,"buffermenu")
if (href_list["b2adduiue"])
src.buffer2 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer2 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Unique Identifier & Unique Enzymes"
src.buffer2type = "ui"
src.buffer2iue = 1
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Unique Identifier & Unique Enzymes"
src.buffer2type = "ui"
src.buffer2iue = 1
dopage(src,"buffermenu")
if (href_list["b3adduiue"])
src.buffer3 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer3 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Unique Identifier & Unique Enzymes"
src.buffer3type = "ui"
src.buffer3iue = 1
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Unique Identifier & Unique Enzymes"
src.buffer3type = "ui"
src.buffer3iue = 1
dopage(src,"buffermenu")
if (href_list["b2addui"])
src.buffer2iue = 0
src.buffer2 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer2iue = 0
src.buffer2 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Unique Identifier"
src.buffer2type = "ui"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Unique Identifier"
src.buffer2type = "ui"
dopage(src,"buffermenu")
if (href_list["b3addui"])
src.buffer3iue = 0
src.buffer3 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer3iue = 0
src.buffer3 = src.connected.occupant.dna.uni_identity
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Unique Identifier"
src.buffer3type = "ui"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Unique Identifier"
src.buffer3type = "ui"
dopage(src,"buffermenu")
if (href_list["b1addse"])
src.buffer1iue = 0
src.buffer1 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer1iue = 0
src.buffer1 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer1owner = src.connected.occupant.name
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Structural Enzymes"
src.buffer1type = "se"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer1owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer1owner = src.connected.occupant.real_name
src.buffer1label = "Structural Enzymes"
src.buffer1type = "se"
dopage(src,"buffermenu")
if (href_list["b2addse"])
src.buffer2iue = 0
src.buffer2 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer2iue = 0
src.buffer2 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer2owner = src.connected.occupant.name
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Structural Enzymes"
src.buffer2type = "se"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer2owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer2owner = src.connected.occupant.real_name
src.buffer2label = "Structural Enzymes"
src.buffer2type = "se"
dopage(src,"buffermenu")
if (href_list["b3addse"])
src.buffer3iue = 0
src.buffer3 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
if(src.connected.occupant && src.connected.occupant.dna)
src.buffer3iue = 0
src.buffer3 = src.connected.occupant.dna.struc_enzymes
if (!istype(src.connected.occupant,/mob/living/carbon/human))
src.buffer3owner = src.connected.occupant.name
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Structural Enzymes"
src.buffer3type = "se"
dopage(src,"buffermenu")
if(src.connected.occupant.real_name == "Unknown" && src.connected.occupant.dna.original_name != "Unknown")
src.buffer3owner = src.connected.occupant.dna.original_name //Good god, is that unweildy
else
src.buffer3owner = src.connected.occupant.real_name
src.buffer3label = "Structural Enzymes"
src.buffer3type = "se"
dopage(src,"buffermenu")
if (href_list["b1clear"])
src.buffer1 = null
src.buffer1owner = null
@@ -1357,7 +1367,7 @@
src.buffer3label = sanitize(input("New Label:","Edit Label","Infos here"))
dopage(src,"buffermenu")
if (href_list["b1transfer"])
if (!src.connected.occupant || src.connected.occupant.mutations & HUSK)
if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna)
return
if (src.buffer1type == "ui")
if (src.buffer1iue)
@@ -1373,7 +1383,7 @@
src.connected.occupant.radiation += rand(20,50)
src.delete = 0
if (href_list["b2transfer"])
if (!src.connected.occupant || src.connected.occupant.mutations & HUSK)
if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna)
return
if (src.buffer2type == "ui")
if (src.buffer2iue)
@@ -1389,7 +1399,7 @@
src.connected.occupant.radiation += rand(20,50)
src.delete = 0
if (href_list["b3transfer"])
if (!src.connected.occupant || src.connected.occupant.mutations & HUSK)
if (!src.connected.occupant || src.connected.occupant.mutations2 & NOCLONE || !src.connected.occupant.dna)
return
if (src.buffer3type == "ui")
if (src.buffer3iue)
+7 -2
View File
@@ -12,6 +12,8 @@ var
uplink_welcome = "Syndicate Uplink Console:"
uplink_uses = 10
var/const/waittime_l = 1800 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 3600 //upper bound on time before intercept arrives (in tenths of seconds)
@@ -26,6 +28,9 @@ var
autoexpand = 0
expanding = 0
blobnukecount = 500
blobwincount = 700
announce()
world << "<B>The current game mode is - <font color='green'>Blob</font>!</B>"
@@ -114,11 +119,11 @@ var
return
if (2)
if((blobs.len > 500) && (declared == 1))
if((blobs.len > blobnukecount) && (declared == 1))
command_alert("Uncontrolled spread of the biohazard onboard the station. We have issued directive 7-12 for [station_name()]. Any living Heads of Staff are ordered to enact directive 7-12 at any cost, a print out with detailed instructions has been sent to your communications computers.", "Biohazard Alert")
send_intercept(2)
declared = 2
if(blobs.len > 700)//This needs work
if(blobs.len > blobwincount)//This needs work
stage = 3
return
+4 -4
View File
@@ -17,7 +17,7 @@
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/nukes_left = 1 // Call 3714-PRAY right now and order more nukes! Limited offer!
var/derp = 0 //Used for tracking if the syndies actually haul the nuke to the station
var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station
var/herp = 0 //Used for tracking if the syndies got the shuttle off of the z-level
//It is so hillarious so I wont rename those two variables --rastaf0
@@ -222,6 +222,7 @@
/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob,radio_freq)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/nuclear(synd_mob)
synd_mob.equip_if_possible(R, synd_mob.slot_ears)
synd_mob.equip_if_possible(new /obj/item/clothing/under/syndicate(synd_mob), synd_mob.slot_w_uniform)
synd_mob.equip_if_possible(new /obj/item/clothing/shoes/black(synd_mob), synd_mob.slot_shoes)
synd_mob.equip_if_possible(new /obj/item/clothing/suit/armor/vest(synd_mob), synd_mob.slot_wear_suit)
@@ -238,7 +239,6 @@
O.implant += E
E.imp_in = synd_mob
E.implanted = 1
return 1
@@ -283,12 +283,12 @@
world << "<FONT size = 3><B>Total Annihilation</B></FONT>"
world << "<B>[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion.</B> Next time, don't lose the disk!"
else if (!disk_rescued && !station_was_nuked && derp && !herp)
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !herp)
feedback_set_details("round_end_result","halfwin - blew wrong station")
world << "<FONT size = 3><B>Crew Minor Victory</B></FONT>"
world << "<B>[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].</B> Next time, don't lose the disk!"
else if (!disk_rescued && !station_was_nuked && derp && herp)
else if (!disk_rescued && !station_was_nuked && nuke_off_station && herp)
feedback_set_details("round_end_result","halfwin - blew wrong station - did not evacuate in time")
world << "<FONT size = 3><B>[syndicate_name()] operatives have earned Darwin Award!</B></FONT>"
world << "<B>[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.</B> Next time, don't lose the disk!"
+7 -8
View File
@@ -183,26 +183,25 @@
var/derp = 0
for (var/turf/T in range(1,src))
if (!is_type_in_list(T.loc, the_station_areas))
derp = 1
break
var/off_station = 0
var/area/A = get_area(src.loc)
if(A && (istype(A,/area/syndicate_station) || A.type == "/area"))
off_station = 1
if (ticker && ticker.mode && ticker.mode.name == "nuclear emergency")
ticker.mode:herp = syndicate_station_at_station
ticker.mode:derp = derp
ticker.mode:nuke_off_station = off_station
for(var/mob/M in world)
if(M.client)
spawn(0)
M.client.station_explosion_cinematic(derp)
M.client.station_explosion_cinematic(off_station)
sleep(110)
if (ticker && ticker.mode)
ticker.mode.explosion_in_progress = 0
if(ticker.mode.name == "nuclear emergency")
ticker.mode:nukes_left --
ticker.mode.station_was_nuked = (derp==0)
ticker.mode.station_was_nuked = (off_station==0)
else
world << "<B>The station was destoyed by the nuclear blast!</B>"
+6 -2
View File
@@ -377,9 +377,13 @@
if(clear)
L+=T
usr.loc = pick(L)
if(!L.len)
usr <<"Invalid teleport destination."
return
smoke.start()
else
usr.loc = pick(L)
smoke.start()
//JAUNT
+14 -10
View File
@@ -10,7 +10,7 @@
var/release_pressure = ONE_ATMOSPHERE
var/color = "yellow"
var/is_labeled = 0
var/can_label = 1
var/filled = 0.5
pressure_resistance = 7*ONE_ATMOSPHERE
var/temperature_resistance = 1000 + T0C
@@ -22,32 +22,32 @@
name = "Canister: \[N2O\]"
icon_state = "redws"
color = "redws"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/nitrogen
name = "Canister: \[N2\]"
icon_state = "red"
color = "red"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/oxygen
name = "Canister: \[O2\]"
icon_state = "blue"
color = "blue"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/toxins
name = "Canister \[Toxin (Bio)\]"
icon_state = "orange"
color = "orange"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
name = "Canister \[CO2\]"
icon_state = "black"
color = "black"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/air
name = "Canister \[Air\]"
icon_state = "grey"
color = "grey"
is_labeled = 1
can_label = 0
/obj/machinery/portable_atmospherics/canister/update_icon()
src.overlays = 0
@@ -131,6 +131,11 @@
loc.assume_air(removed)
src.update_icon()
if(air_contents.return_pressure() < 1)
can_label = 1
else
can_label = 0
src.updateDialog()
return
@@ -184,7 +189,7 @@
holding_text = {"<BR><B>Tank Pressure</B>: [holding.air_contents.return_pressure()] KPa<BR>
<A href='?src=\ref[src];remove_tank=1'>Remove Tank</A><BR>
"}
var/output_text = {"<TT><B>[name]</B>[!is_labeled?" <A href='?src=\ref[src];relabel=1'><small>relabel</small></a>":""]<BR>
var/output_text = {"<TT><B>[name]</B>[can_label?" <A href='?src=\ref[src];relabel=1'><small>relabel</small></a>":""]<BR>
Pressure: [air_contents.return_pressure()] KPa<BR>
Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text]
@@ -232,7 +237,7 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
if (href_list["relabel"])
if (!is_labeled)
if (can_label)
var/list/colors = list(\
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
@@ -247,7 +252,6 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
src.color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
is_labeled = 1
src.updateUsrDialog()
src.add_fingerprint(usr)
update_icon()
+12 -12
View File
@@ -99,8 +99,8 @@
/obj/machinery/bot/floorbot/attackby(var/obj/item/W , mob/user as mob)
if(istype(W, /obj/item/stack/tile/steel))
var/obj/item/stack/tile/steel/T = W
if(istype(W, /obj/item/stack/tile/plasteel))
var/obj/item/stack/tile/plasteel/T = W
if(src.amount >= 50)
return
var/loaded = min(50-src.amount, T.amount)
@@ -169,7 +169,7 @@
floorbottargets += bot.target
if(src.amount <= 0 && ((src.target == null) || !src.target))
if(src.eattiles)
for(var/obj/item/stack/tile/steel/T in view(7, src))
for(var/obj/item/stack/tile/plasteel/T in view(7, src))
if(T != src.oldtarget && !(target in floorbottargets))
src.oldtarget = T
src.target = T
@@ -215,7 +215,7 @@
src.target = F
break
if((!src.target || src.target == null) && src.eattiles)
for(var/obj/item/stack/tile/steel/T in view(7, src))
for(var/obj/item/stack/tile/plasteel/T in view(7, src))
if(!(T in floorbottargets) && T != src.oldtarget)
src.oldtarget = T
src.target = T
@@ -245,7 +245,7 @@
src.path = new()
if(src.loc == src.target || src.loc == src.target.loc)
if(istype(src.target, /obj/item/stack/tile/steel))
if(istype(src.target, /obj/item/stack/tile/plasteel))
src.eattile(src.target)
else if(istype(src.target, /obj/item/stack/sheet/metal))
src.maketile(src.target)
@@ -270,7 +270,7 @@
if(istype(target, /turf/space/))
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to repair the hole"), 1)
var/obj/item/stack/tile/steel/T = new /obj/item/stack/tile/steel
var/obj/item/stack/tile/plasteel/T = new /obj/item/stack/tile/plasteel
src.repairing = 1
spawn(50)
T.build(src.loc)
@@ -291,8 +291,8 @@
src.anchored = 0
src.target = null
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/steel/T)
if(!istype(T, /obj/item/stack/tile/steel))
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/plasteel/T)
if(!istype(T, /obj/item/stack/tile/plasteel))
return
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [src] begins to collect tiles."), 1)
@@ -326,7 +326,7 @@
src.target = null
src.repairing = 0
return
var/obj/item/stack/tile/steel/T = new /obj/item/stack/tile/steel
var/obj/item/stack/tile/plasteel/T = new /obj/item/stack/tile/plasteel
T.amount = 4
T.loc = M.loc
del(M)
@@ -353,7 +353,7 @@
new /obj/item/robot_parts/l_arm(Tsec)
if (amount)
new /obj/item/stack/tile/steel(Tsec) // only one tile, yes
new /obj/item/stack/tile/plasteel(Tsec) // only one tile, yes
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
@@ -362,8 +362,8 @@
return
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/steel/T, mob/user as mob)
if(!istype(T, /obj/item/stack/tile/steel))
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/plasteel/T, mob/user as mob)
if(!istype(T, /obj/item/stack/tile/plasteel))
..()
return
if(src.contents.len >= 1)
@@ -1,389 +1,389 @@
/obj/structure/AIcore
density = 1
anchored = 0
name = "AI core"
icon = 'AI.dmi'
icon_state = "0"
var/state = 0
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You wrench the frame into place."
anchored = 1
state = 1
if(istype(P, /obj/item/weapon/weldingtool))
playsound(loc, 'Welder.ogg', 50, 1)
P:welding = 2
if(do_after(user, 20))
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/r_metal( loc, 4)
del(src)
P:welding = 1
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You unfasten the frame."
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
playsound(loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You place the circuit board inside the frame."
icon_state = "1"
circuit = P
user.drop_item()
P.loc = src
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You screw the circuit board into place."
state = 2
icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the circuit board."
state = 1
icon_state = "0"
circuit.loc = loc
circuit = null
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You unfasten the circuit board."
state = 1
icon_state = "1"
if(istype(P, /obj/item/weapon/cable_coil))
if(P:amount >= 5)
playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
P:amount -= 5
if(!P:amount) del(P)
user << "\blue You add cables to the frame."
state = 3
icon_state = "3"
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
if (brain)
user << "Get that brain out of there first"
else
playsound(loc, 'wirecutter.ogg', 50, 1)
user << "\blue You remove the cables."
state = 2
icon_state = "2"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( loc )
A.amount = 5
if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2)
playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (P)
P:amount -= 2
if(!P:amount) del(P)
user << "\blue You put in the glass panel."
state = 4
icon_state = "4"
if(istype(P, /obj/item/weapon/aiModule/asimov))
laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/nanotrasen))
laws.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
laws.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
//laws.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.")
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/purge))
laws.clear_inherent_laws()
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/freeform))
var/obj/item/weapon/aiModule/freeform/M = P
laws.add_inherent_law(M.newFreeFormLaw)
usr << "Added a freeform law."
if(istype(P, /obj/item/device/mmi))
if(!P:brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return
if(P:brainmob.stat == 2)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return
if(P:brainmob.mind in ticker.mode.head_revolutionaries)
user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI."
return
if(P:brainmob.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(P:brainmob.mind , 1)
if(jobban_isbanned(P:brainmob, "AI"))
user << "\red This MMI does not seem to fit."
return
user.drop_item()
P.loc = src
brain = P
usr << "Added a brain."
icon_state = "3b"
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the brain."
brain.loc = loc
brain = null
icon_state = "3"
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the glass panel."
state = 3
if (brain)
icon_state = "3b"
else
icon_state = "3"
new /obj/item/stack/sheet/rglass( loc, 2 )
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."
new /mob/living/silicon/ai ( loc, laws, brain )
del(src)
/obj/structure/AIcore/deactivated
name = "Inactive AI"
icon = 'AI.dmi'
icon_state = "ai-empty"
anchored = 1
state = 20//So it doesn't interact based on the above. Not really necessary.
attackby(var/obj/item/device/aicard/A as obj, var/mob/user as mob)
if(istype(A, /obj/item/device/aicard))//Is it?
A.transfer_ai("INACTIVE","AICARD",src,user)
return
attack_hand(var/mob/user as mob)
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:s_control)
user:wear_suit:transfer_ai("INACTIVE","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
/*
This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
That prevents a few funky behaviors.
*/
//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc.
/obj/item/proc/transfer_ai(var/choice as text, var/interaction as text, var/target, var/mob/U as mob)
if(!src:flush)
switch(choice)
if("AICORE")//AI mob.
var/mob/living/silicon/ai/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(C.contents.len)//If there is an AI on card.
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
else
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (T.mind == malfai)
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."//Do ho ho ho~
return
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location.
T.aiRestorePowerRoutine = 0//So the AI initially has power.
T.control_disabled = 1//Can't control things remotely if you're stuck in a card!
T.loc = C//Throw AI into the card.
C.name = "inteliCard - [T.name]"
if (T.stat == 2)
C.icon_state = "aicard-404"
else
C.icon_state = "aicard-full"
T.cancel_camera()
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
if(C.AI)//If there is an AI on card.
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
else
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (T.mind == malfai)
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."
return
if(T.stat)//If the ai is dead/dying.
U << "\red <b>ERROR</b>: \black [T.name] data core is corrupted. Unable to install."
else
new /obj/structure/AIcore/deactivated(T.loc)
T.aiRestorePowerRoutine = 0
T.control_disabled = 1
T.loc = C
C.AI = T
T.cancel_camera()
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
if("INACTIVE")//Inactive AI object.
var/obj/structure/AIcore/deactivated/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever.
if(A)//If AI exists on the card. Else nothing since both are empty.
A.control_disabled = 0
A.loc = T.loc//To replace the terminal.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
del(T)
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
var/mob/living/silicon/ai/A = C.AI
if(A)
A.control_disabled = 0
C.AI = null
A.loc = T.loc
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer succesful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
del(T)
if("AIFIXER")//AI Fixer terminal.
var/obj/machinery/computer/aifixer/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(!T.contents.len)
if (!C.contents.len)
U << "No AI to copy over!"//Well duh
else for(var/mob/living/silicon/ai/A in C)
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
A.loc = T
T.occupant = A
A.control_disabled = 1
if (A.stat == 2)
T.overlays += image('computer.dmi', "ai-fixer-404")
else
T.overlays += image('computer.dmi', "ai-fixer-full")
T.overlays -= image('computer.dmi', "ai-fixer-empty")
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
else
if(!C.contents.len && T.occupant && !T.active)
C.name = "inteliCard - [T.occupant.name]"
T.overlays += image('computer.dmi', "ai-fixer-empty")
if (T.occupant.stat == 2)
C.icon_state = "aicard-404"
T.overlays -= image('computer.dmi', "ai-fixer-404")
else
C.icon_state = "aicard-full"
T.overlays -= image('computer.dmi', "ai-fixer-full")
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
U << "\blue <b>Transfer succesful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupant.loc = C
T.occupant.cancel_camera()
T.occupant = null
else if (C.contents.len)
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
else if (T.active)
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
else if (!T.occupant)
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
if(!T.contents.len)
if (!C.AI)
U << "No AI to copy over!"
else
var/mob/living/silicon/ai/A = C.AI
A.loc = T
T.occupant = A
C.AI = null
A.control_disabled = 1
T.overlays += image('computer.dmi', "ai-fixer-full")
T.overlays -= image('computer.dmi', "ai-fixer-empty")
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
else
if(!C.AI && T.occupant && !T.active)
if (T.occupant.stat)
U << "\red <b>ERROR</b>: \black [T.occupant.name] data core is corrupted. Unable to install."
else
T.overlays += image('computer.dmi', "ai-fixer-empty")
T.overlays -= image('computer.dmi', "ai-fixer-full")
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
U << "\blue <b>Transfer successful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupant.loc = C
T.occupant.cancel_camera()
T.occupant = null
else if (C.AI)
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
else if (T.active)
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
else if (!T.occupant)
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
if("NINJASUIT")//Ninjasuit
var/obj/item/clothing/suit/space/space_ninja/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(T.s_initialized&&U==T.affecting)//If the suit is initialized and the actor is the user.
var/mob/living/silicon/ai/A_T = locate() in C//Determine if there is an AI on target card. Saves time when checking later.
var/mob/living/silicon/ai/A = T.AI//Deterine if there is an AI in suit.
if(A)//If the host AI card is not empty.
if(A_T)//If there is an AI on the target card.
U << "\red <b>ERROR</b>: \black [A_T.name] already installed. Remove [A_T.name] to install a new one."
else
A.loc = C//Throw them into the target card. Since they are already on a card, transfer is easy.
C.name = "inteliCard - [A.name]"
C.icon_state = "aicard-full"
T.AI = null
A.cancel_camera()
A << "You have been uploaded to a mobile storage device."
U << "\blue <b>SUCCESS</b>: \black [A.name] ([rand(1000,9999)].exe) removed from host and stored within local memory."
else//If host AI is empty.
if(C.flush)//If the other card is flushing.
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
else
if(A_T&&!A_T.stat)//If there is an AI on the target card and it's not inactive.
A_T.loc = T//Throw them into suit.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
T.AI = A_T
A_T.cancel_camera()
A_T << "You have been uploaded to a mobile storage device."
U << "\blue <b>SUCCESS</b>: \black [A_T.name] ([rand(1000,9999)].exe) removed from local memory and installed to host."
else if(A_T)//If the target AI is dead. Else just go to return since nothing would happen if both are empty.
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."
else
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
/obj/structure/AIcore
density = 1
anchored = 0
name = "AI core"
icon = 'AI.dmi'
icon_state = "0"
var/state = 0
var/datum/ai_laws/laws = new /datum/ai_laws/nanotrasen
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
switch(state)
if(0)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You wrench the frame into place."
anchored = 1
state = 1
if(istype(P, /obj/item/weapon/weldingtool))
playsound(loc, 'Welder.ogg', 50, 1)
P:welding = 2
if(do_after(user, 20))
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/plasteel( loc, 4)
del(src)
P:welding = 1
if(1)
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "\blue You unfasten the frame."
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
playsound(loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You place the circuit board inside the frame."
icon_state = "1"
circuit = P
user.drop_item()
P.loc = src
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You screw the circuit board into place."
state = 2
icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the circuit board."
state = 1
icon_state = "0"
circuit.loc = loc
circuit = null
if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You unfasten the circuit board."
state = 1
icon_state = "1"
if(istype(P, /obj/item/weapon/cable_coil))
if(P:amount >= 5)
playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
P:amount -= 5
if(!P:amount) del(P)
user << "\blue You add cables to the frame."
state = 3
icon_state = "3"
if(3)
if(istype(P, /obj/item/weapon/wirecutters))
if (brain)
user << "Get that brain out of there first"
else
playsound(loc, 'wirecutter.ogg', 50, 1)
user << "\blue You remove the cables."
state = 2
icon_state = "2"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( loc )
A.amount = 5
if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2)
playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (P)
P:amount -= 2
if(!P:amount) del(P)
user << "\blue You put in the glass panel."
state = 4
icon_state = "4"
if(istype(P, /obj/item/weapon/aiModule/asimov))
laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/nanotrasen))
laws.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
laws.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
//laws.add_inherent_law("Command Link: Maintain an active connection to Central Command at all times in case of software or directive updates.")
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/purge))
laws.clear_inherent_laws()
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/freeform))
var/obj/item/weapon/aiModule/freeform/M = P
laws.add_inherent_law(M.newFreeFormLaw)
usr << "Added a freeform law."
if(istype(P, /obj/item/device/mmi))
if(!P:brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return
if(P:brainmob.stat == 2)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return
if(P:brainmob.mind in ticker.mode.head_revolutionaries)
user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI."
return
if(P:brainmob.mind in ticker.mode:revolutionaries)
ticker.mode:remove_revolutionary(P:brainmob.mind , 1)
if(jobban_isbanned(P:brainmob, "AI"))
user << "\red This MMI does not seem to fit."
return
user.drop_item()
P.loc = src
brain = P
usr << "Added a brain."
icon_state = "3b"
if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the brain."
brain.loc = loc
brain = null
icon_state = "3"
if(4)
if(istype(P, /obj/item/weapon/crowbar))
playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the glass panel."
state = 3
if (brain)
icon_state = "3b"
else
icon_state = "3"
new /obj/item/stack/sheet/rglass( loc, 2 )
return
if(istype(P, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."
new /mob/living/silicon/ai ( loc, laws, brain )
del(src)
/obj/structure/AIcore/deactivated
name = "Inactive AI"
icon = 'AI.dmi'
icon_state = "ai-empty"
anchored = 1
state = 20//So it doesn't interact based on the above. Not really necessary.
attackby(var/obj/item/device/aicard/A as obj, var/mob/user as mob)
if(istype(A, /obj/item/device/aicard))//Is it?
A.transfer_ai("INACTIVE","AICARD",src,user)
return
attack_hand(var/mob/user as mob)
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:s_control)
user:wear_suit:transfer_ai("INACTIVE","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
/*
This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
That prevents a few funky behaviors.
*/
//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc.
/obj/item/proc/transfer_ai(var/choice as text, var/interaction as text, var/target, var/mob/U as mob)
if(!src:flush)
switch(choice)
if("AICORE")//AI mob.
var/mob/living/silicon/ai/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(C.contents.len)//If there is an AI on card.
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
else
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (T.mind == malfai)
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."//Do ho ho ho~
return
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location.
T.aiRestorePowerRoutine = 0//So the AI initially has power.
T.control_disabled = 1//Can't control things remotely if you're stuck in a card!
T.loc = C//Throw AI into the card.
C.name = "inteliCard - [T.name]"
if (T.stat == 2)
C.icon_state = "aicard-404"
else
C.icon_state = "aicard-full"
T.cancel_camera()
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
if(C.AI)//If there is an AI on card.
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
else
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (T.mind == malfai)
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."
return
if(T.stat)//If the ai is dead/dying.
U << "\red <b>ERROR</b>: \black [T.name] data core is corrupted. Unable to install."
else
new /obj/structure/AIcore/deactivated(T.loc)
T.aiRestorePowerRoutine = 0
T.control_disabled = 1
T.loc = C
C.AI = T
T.cancel_camera()
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
if("INACTIVE")//Inactive AI object.
var/obj/structure/AIcore/deactivated/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever.
if(A)//If AI exists on the card. Else nothing since both are empty.
A.control_disabled = 0
A.loc = T.loc//To replace the terminal.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
del(T)
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
var/mob/living/silicon/ai/A = C.AI
if(A)
A.control_disabled = 0
C.AI = null
A.loc = T.loc
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer succesful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
del(T)
if("AIFIXER")//AI Fixer terminal.
var/obj/machinery/computer/aifixer/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(!T.contents.len)
if (!C.contents.len)
U << "No AI to copy over!"//Well duh
else for(var/mob/living/silicon/ai/A in C)
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
A.loc = T
T.occupant = A
A.control_disabled = 1
if (A.stat == 2)
T.overlays += image('computer.dmi', "ai-fixer-404")
else
T.overlays += image('computer.dmi', "ai-fixer-full")
T.overlays -= image('computer.dmi', "ai-fixer-empty")
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
else
if(!C.contents.len && T.occupant && !T.active)
C.name = "inteliCard - [T.occupant.name]"
T.overlays += image('computer.dmi', "ai-fixer-empty")
if (T.occupant.stat == 2)
C.icon_state = "aicard-404"
T.overlays -= image('computer.dmi', "ai-fixer-404")
else
C.icon_state = "aicard-full"
T.overlays -= image('computer.dmi', "ai-fixer-full")
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
U << "\blue <b>Transfer succesful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupant.loc = C
T.occupant.cancel_camera()
T.occupant = null
else if (C.contents.len)
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
else if (T.active)
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
else if (!T.occupant)
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
if("NINJASUIT")
var/obj/item/clothing/suit/space/space_ninja/C = src
if(!T.contents.len)
if (!C.AI)
U << "No AI to copy over!"
else
var/mob/living/silicon/ai/A = C.AI
A.loc = T
T.occupant = A
C.AI = null
A.control_disabled = 1
T.overlays += image('computer.dmi', "ai-fixer-full")
T.overlays -= image('computer.dmi', "ai-fixer-empty")
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
else
if(!C.AI && T.occupant && !T.active)
if (T.occupant.stat)
U << "\red <b>ERROR</b>: \black [T.occupant.name] data core is corrupted. Unable to install."
else
T.overlays += image('computer.dmi', "ai-fixer-empty")
T.overlays -= image('computer.dmi', "ai-fixer-full")
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
U << "\blue <b>Transfer successful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupant.loc = C
T.occupant.cancel_camera()
T.occupant = null
else if (C.AI)
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
else if (T.active)
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
else if (!T.occupant)
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
if("NINJASUIT")//Ninjasuit
var/obj/item/clothing/suit/space/space_ninja/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(T.s_initialized&&U==T.affecting)//If the suit is initialized and the actor is the user.
var/mob/living/silicon/ai/A_T = locate() in C//Determine if there is an AI on target card. Saves time when checking later.
var/mob/living/silicon/ai/A = T.AI//Deterine if there is an AI in suit.
if(A)//If the host AI card is not empty.
if(A_T)//If there is an AI on the target card.
U << "\red <b>ERROR</b>: \black [A_T.name] already installed. Remove [A_T.name] to install a new one."
else
A.loc = C//Throw them into the target card. Since they are already on a card, transfer is easy.
C.name = "inteliCard - [A.name]"
C.icon_state = "aicard-full"
T.AI = null
A.cancel_camera()
A << "You have been uploaded to a mobile storage device."
U << "\blue <b>SUCCESS</b>: \black [A.name] ([rand(1000,9999)].exe) removed from host and stored within local memory."
else//If host AI is empty.
if(C.flush)//If the other card is flushing.
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
else
if(A_T&&!A_T.stat)//If there is an AI on the target card and it's not inactive.
A_T.loc = T//Throw them into suit.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
T.AI = A_T
A_T.cancel_camera()
A_T << "You have been uploaded to a mobile storage device."
U << "\blue <b>SUCCESS</b>: \black [A_T.name] ([rand(1000,9999)].exe) removed from local memory and installed to host."
else if(A_T)//If the target AI is dead. Else just go to return since nothing would happen if both are empty.
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."
else
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
return
@@ -1,107 +1,107 @@
/obj/machinery/computer/prisoner
name = "Prisoner Management"
icon = 'computer.dmi'
icon_state = "explosive"
req_access = list(access_armory)
circuit = "/obj/item/weapon/circuitboard/prisoner"
var
id = 0.0
temp = null
status = 0
timeleft = 60
stop = 0.0
screen = 0 // 0 - No Access Denied, 1 - Access allowed
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
dat += "<B>Prisoner Implant Manager System</B><BR>"
if(screen == 0)
dat += "<HR><A href='?src=\ref[src];lock=1'>Unlock Console</A>"
else if(screen == 1)
dat += "<HR>Chemical Implants<BR>"
var/turf/Tr = null
for(var/obj/item/weapon/implant/chem/C in world)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if(!C.implanted) continue
dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font color=red>(1)</font>)</A>"
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font color=red>(5)</font>)</A>"
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font color=red>(10)</font>)</A><BR>"
dat += "********************************<BR>"
dat += "<HR>Tracking Implants<BR>"
for(var/obj/item/weapon/implant/tracking/T in world)
Tr = get_turf(T)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
loc_display = mob_loc.loc
dat += "ID: [T.id] | Location: [loc_display]<BR>"
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font color=red><i>Message Holder</i></font>)</A> |<BR>"
dat += "********************************<BR>"
dat += "<HR><A href='?src=\ref[src];lock=1'>Lock Console</A>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
return
Topic(href, href_list)
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
I.activate(1)
else if(href_list["inject5"])
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
I.activate(5)
else if(href_list["inject10"])
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
I.activate(10)
else if(href_list["lock"])
if(src.allowed(usr))
screen = !screen
else
usr << "Unauthorized Access."
else if(href_list["warn"])
var/warning = input(usr,"Message:","Enter your message here!","")
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
var/mob/living/carbon/R = I.imp_in
R << "\green You hear a voice in your head saying: '[warning]'"
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/prisoner
name = "Prisoner Management"
icon = 'computer.dmi'
icon_state = "explosive"
req_access = list(access_armory)
circuit = "/obj/item/weapon/circuitboard/prisoner"
var
id = 0.0
temp = null
status = 0
timeleft = 60
stop = 0.0
screen = 0 // 0 - No Access Denied, 1 - Access allowed
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
dat += "<B>Prisoner Implant Manager System</B><BR>"
if(screen == 0)
dat += "<HR><A href='?src=\ref[src];lock=1'>Unlock Console</A>"
else if(screen == 1)
dat += "<HR>Chemical Implants<BR>"
var/turf/Tr = null
for(var/obj/item/weapon/implant/chem/C in world)
Tr = get_turf(C)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if(!C.implanted) continue
dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: "
dat += "<A href='?src=\ref[src];inject1=\ref[C]'>(<font color=red>(1)</font>)</A>"
dat += "<A href='?src=\ref[src];inject5=\ref[C]'>(<font color=red>(5)</font>)</A>"
dat += "<A href='?src=\ref[src];inject10=\ref[C]'>(<font color=red>(10)</font>)</A><BR>"
dat += "********************************<BR>"
dat += "<HR>Tracking Implants<BR>"
for(var/obj/item/weapon/implant/tracking/T in world)
Tr = get_turf(T)
if((Tr) && (Tr.z != src.z)) continue//Out of range
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
loc_display = mob_loc.loc
dat += "ID: [T.id] | Location: [loc_display]<BR>"
dat += "<A href='?src=\ref[src];warn=\ref[T]'>(<font color=red><i>Message Holder</i></font>)</A> |<BR>"
dat += "********************************<BR>"
dat += "<HR><A href='?src=\ref[src];lock=1'>Lock Console</A>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
return
Topic(href, href_list)
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
if(I) I.activate(1)
else if(href_list["inject5"])
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
if(I) I.activate(5)
else if(href_list["inject10"])
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
if(I) I.activate(10)
else if(href_list["lock"])
if(src.allowed(usr))
screen = !screen
else
usr << "Unauthorized Access."
else if(href_list["warn"])
var/warning = input(usr,"Message:","Enter your message here!","")
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
var/mob/living/carbon/R = I.imp_in
R << "\green You hear a voice in your head saying: '[warning]'"
src.add_fingerprint(usr)
src.updateUsrDialog()
return
+10 -10
View File
@@ -746,16 +746,16 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
while ( t_amount < (yield * parent.yieldmod ))
var/obj/item/weapon/reagent_containers/food/snacks/grown/t_prod = new produce(user.loc, potency) // User gets a consumable
if ( !isnull(t_prod) ) // Needed for /obj/item/weapon/reagent_containers/food/snacks/grown/grass/New(), which deletes itself after it spawns a tile/grass
t_prod.seed = mypath
t_prod.species = species
t_prod.lifespan = lifespan
t_prod.endurance = endurance
t_prod.maturation = maturation
t_prod.production = production
t_prod.yield = yield
t_prod.potency = potency
t_prod.plant_type = plant_type
if(!t_prod) return
t_prod.seed = mypath
t_prod.species = species
t_prod.lifespan = lifespan
t_prod.endurance = endurance
t_prod.maturation = maturation
t_prod.production = production
t_prod.yield = yield
t_prod.potency = potency
t_prod.plant_type = plant_type
t_amount++
parent.update_tray()
+31 -18
View File
@@ -251,32 +251,45 @@
return //don't let you cremate something twice or w/e
if(length(contents) == 0)
for (var/mob/M in viewers(user))
for (var/mob/M in viewers(src))
M.show_message("\red You hear a hollow crackle.", 1)
return
else if(contents)
for (var/mob/M in viewers(src))
M.show_message("\red You hear a roar as the crematorium activates.", 1)
cremating = 1
locked = 1
for (var/mob/living/M in contents)
M.Stun(100) //You really dont want to place this inside the loop.
spawn(1)
for(var/i=1 to 10)
sleep(10)
M.take_overall_damage(0,30)
if (M.stat!=2 && prob(30))
M.emote("scream")
new /obj/effect/decal/ash(src)
for (var/obj/item/W in M)
if (prob(10))
W.loc = src
M.death(1)
M.ghostize()
del(M)
if(locate(/mob/living/, src))
for (var/obj/item/I in contents)
del(I)
for (var/mob/living/M in contents)
M.Stun(100) //You really dont want to place this inside the loop.
spawn(1)
for(var/i=1 to 10)
sleep(10)
if(M)
M.take_overall_damage(0,30)
if (M.stat!=2 && prob(30))
M.emote("scream")
new /obj/effect/decal/ash(src)
for (var/obj/item/W in M)
if (prob(10))
W.loc = src
M.death(1)
M.ghostize()
del(M)
cremating = 0
locked = 0
playsound(src.loc, 'ding.ogg', 50, 1)
else
for(var/obj/item/I in contents)
if(!istype(I, /obj/item/weapon/disk/nuclear))
del(I)
new /obj/effect/decal/ash(src)
sleep(30)
cremating = 0
locked = 0
playsound(src.loc, 'ding.ogg', 50, 1)
for (var/mob/M in viewers(src))
M.show_message("\red You hear a roar as the crematorium activates.", 1)
return
/obj/structure/c_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+5 -4
View File
@@ -1,6 +1,6 @@
/////////////////////////////////////////
// SUIT STORAGE UNIT :3 /////////////////
/////////////////////////////////////////
//////////////////////////////////////
// SUIT STORAGE UNIT /////////////////
//////////////////////////////////////
/obj/machinery/suit_storage_unit
@@ -84,8 +84,9 @@
if(prob(50))
src.dump_everything()
del(src)
return
return
else
return
return
+8 -8
View File
@@ -110,7 +110,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is installed."),
//3
list("key"=/obj/item/stack/sheet/r_metal,
list("key"=/obj/item/stack/sheet/plasteel,
"backkey"=/obj/item/weapon/weldingtool,
"desc"="Internal armor is welded."),
//4
@@ -261,7 +261,7 @@
user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.")
else
user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].")
var/obj/item/stack/sheet/r_metal/MS = new /obj/item/stack/sheet/r_metal(get_turf(holder))
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
MS.amount = 5
if(1)
if(diff==FORWARD)
@@ -557,11 +557,11 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is installed."),
//3
list("key"=/obj/item/stack/sheet/r_metal,
list("key"=/obj/item/stack/sheet/plasteel,
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is being installed."),
//4
list("key"=/obj/item/stack/sheet/r_metal,
list("key"=/obj/item/stack/sheet/plasteel,
"backkey"=/obj/item/weapon/weldingtool,
"desc"="Internal armor is welded."),
//5
@@ -574,7 +574,7 @@
"desc"="Internal armor is installed"),
//7
list("key"=/obj/item/stack/sheet/r_metal,
list("key"=/obj/item/stack/sheet/plasteel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Peripherals control module is secured"),
//8
@@ -673,7 +673,7 @@
user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.")
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/r_metal/MS = new /obj/item/stack/sheet/r_metal(get_turf(holder))
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
MS.amount = 5
if(5)
if(diff==FORWARD)
@@ -690,14 +690,14 @@
user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].")
else
user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].")
var/obj/item/stack/sheet/r_metal/MS = new /obj/item/stack/sheet/r_metal(get_turf(holder))
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
MS.amount = 5
if(2)
if(diff==FORWARD)
user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.")
else
user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].")
var/obj/item/stack/sheet/r_metal/MS = new /obj/item/stack/sheet/r_metal(get_turf(holder))
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
MS.amount = 5
if(1)
if(diff==FORWARD)
+1 -1
View File
@@ -10,7 +10,7 @@
density = 1
anchored = 0
opacity = 0
var/list/welder_salvage = list(/obj/item/stack/sheet/r_metal,/obj/item/stack/sheet/metal,/obj/item/stack/rods)
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/metal,/obj/item/stack/rods)
var/list/wirecutters_salvage = list(/obj/item/weapon/cable_coil)
var/list/crowbar_salvage
var/salvage_num = 5
+14 -6
View File
@@ -16,6 +16,7 @@
desc = "This box contains body bags."
icon_state = "bodybags"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
New()
@@ -40,10 +41,10 @@
density = 0
attackby(P as obj, mob/user as mob)
if (istype(P, /obj/item/weapon/pen))
attackby(W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.equipped() != P)
if (user.equipped() != W)
return
if (!in_range(src, user) && src.loc != user)
return
@@ -51,10 +52,16 @@
if (t)
src.name = "body bag - "
src.name += t
src.overlays += image(src.icon, "bodybag_label")
else
src.name = "body bag"
..()
return
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(istype(W, /obj/item/weapon/wirecutters))
user << "You cut the tag off the bodybag"
src.name = "body bag"
src.overlays = null
return
close()
@@ -74,4 +81,5 @@
new/obj/item/bodybag(get_turf(src))
spawn(0)
del(src)
return
return
+10 -4
View File
@@ -37,7 +37,10 @@
src.icon_state = src.icon_opened
src.opened = 1
playsound(src.loc, 'click.ogg', 15, 1, -3)
if(istype(src, /obj/structure/closet/body_bag))
playsound(src.loc, 'zip.ogg', 15, 1, -3)
else
playsound(src.loc, 'click.ogg', 15, 1, -3)
density = 0
return 1
@@ -64,7 +67,10 @@
M.loc = src
src.icon_state = src.icon_closed
src.opened = 0
playsound(src.loc, 'click.ogg', 15, 1, -3)
if(istype(src, /obj/structure/closet/body_bag))
playsound(src.loc, 'zip.ogg', 15, 1, -3)
else
playsound(src.loc, 'click.ogg', 15, 1, -3)
density = 1
return 1
@@ -121,7 +127,7 @@
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
if(!W:remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
@@ -142,7 +148,7 @@
if(W)
W.loc = src.loc
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
if(!W:remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
return
+8 -6
View File
@@ -263,12 +263,14 @@ obj/structure/door_assembly
playsound(src.loc, 'Crowbar.ogg', 100, 1)
user.visible_message("[user] adds reinforced glass windows to the airlock assembly.", "You start to install reinforced glass windows into the airlock assembly.")
var/obj/item/stack/sheet/rglass/G = W
if(do_after(user, 40) && G.amount>=1)
user << "\blue You installed glass windows the airlock assembly!"
G.use(1)
src.glass = 1
src.name = "Near finished Window Airlock Assembly"
src.airlock_type = glass_type
if(do_after(user, 40))
if(G)
if(G.amount>=1)
user << "\blue You installed glass windows into the airlock assembly!"
G.use(1)
src.glass = 1
src.name = "Near finished Window Airlock Assembly"
src.airlock_type = glass_type
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
var/turf/T = get_turf(user)
+6 -1
View File
@@ -145,10 +145,15 @@
if(W.loc == my_target) break
sleep(2)
if(istype(usr.loc, /turf/space)|| (user.flags & NOGRAV))
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
/*
if(istype(usr.loc, /turf/space)|| (user.flags & NOGRAV))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
*/
else
return ..()
return
+17
View File
@@ -270,6 +270,23 @@ THERMAL GLASSES
usr << "You push the mask up out of your face."
usr.update_clothing()
/obj/item/clothing/head/cargosoft/dropped()
src.icon_state = "cargosoft"
src.flipped=0
..()
/obj/item/clothing/head/cargosoft/verb/flip()
set category = "Object"
set name = "Flip cap"
src.flipped = !src.flipped
if(src.flipped)
icon_state = "cargosoft_flipped"
usr << "You flip the hat backwards."
else
icon_state = "cargosoft"
usr << "You flip the hat back in normal position."
/obj/item/clothing/shoes/magboots/verb/toggle()
set name = "Toggle Magboots"
set category = "Object"
@@ -156,8 +156,8 @@ will suffer from an increased appetite.</B><BR>
<b>Function:</b> Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal<BR>
the implant releases the chemicals directly into the blood stream.<BR>
<b>Special Features:</b>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 25 units.<BR>
Can only be loaded while still in it's original case.<BR>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 15 units.<BR>
Can only be loaded while still in its original case.<BR>
<b>Integrity:</b> Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,<BR>
the implant may become unstable and either pre-maturely inject the subject or simply break."}
return dat
@@ -1,9 +1,16 @@
/*
CONTAINS:
SPACE CLEANER
MOP
/obj/item/weapon/cleaner
desc = "A chemical that cleans messes."
icon = 'janitor.dmi'
name = "space cleaner"
icon_state = "cleaner"
item_state = "cleaner"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
throwforce = 3
w_class = 2.0
throw_speed = 2
throw_range = 10
var/catch = 1
*/
/obj/item/weapon/cleaner/New()
var/datum/reagents/R = new/datum/reagents(250)
reagents = R
@@ -84,13 +91,12 @@ MOP
spawn(600)
src.reagents.add_reagent(refill, 10)
if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Cleaner bottle.
message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Cleaner bottle.") // Polymorph
log_game("[key_name(user)] fired Polyacid/Space lube from a Cleaner bottle.")
if(src.reagents.has_reagent("pacid"))
message_admins("[key_name_admin(user)] fired Polyacid from a Cleaner bottle.")
log_game("[key_name(user)] fired Polyacid from a Cleaner bottle.")
if(src.reagents.has_reagent("lube"))
message_admins("[key_name_admin(user)] fired Space lube from a Cleaner bottle.")
log_game("[key_name(user)] fired Space lube from a Cleaner bottle.")
return
/obj/item/weapon/cleaner/examine()
@@ -101,6 +107,21 @@ MOP
..()
return
/obj/item/weapon/chemsprayer//Another copy paste with a tiny change it seems
desc = "A utility used to spray large amounts of reagent in a given area."
icon = 'gun.dmi'
name = "chem sprayer"
icon_state = "chemsprayer"
item_state = "chemsprayer"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
throwforce = 3
w_class = 3.0
throw_speed = 2
throw_range = 10
origin_tech = "combat=3;materials=3;engineering=3"
/obj/item/weapon/chemsprayer/New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
@@ -183,15 +204,44 @@ MOP
spawn(600)
src.reagents.add_reagent(refill, 10)
if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Chem Sprayer.
message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Chem Sprayer.") // Polymorph
log_game("[key_name(user)] fired Polyacid/Space lube from a Chem Sprayer.")
return
return
//Pepper spray, set up to make the 2 different types
/obj/item/weapon/pepperspray //This is riot control
desc = "Manufactured by UhangInc., used to blind and down an opponent quickly."
icon = 'weapons.dmi'
name = "pepperspray"
icon_state = "pepperspray"
item_state = "pepperspray"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
throwforce = 3
w_class = 2.0
throw_speed = 2
throw_range = 10
var/catch = 1
var/BottleSize = 1
var/ReagentAmount = 30
/obj/item/weapon/pepperspray/small //And this is for personal defense.
desc = "This appears to be a small, nonlethal, single use personal defense weapon. Hurts like a bitch, though."
icon = 'weapons.dmi'
name = "mace"
icon_state = "pepperspray"
item_state = "pepperspray"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
throwforce = 3
w_class = 1.0
throw_speed = 2
throw_range = 10
catch = 1
BottleSize = 0
ReagentAmount = 1
/obj/item/weapon/pepperspray/New()
var/datum/reagents/R = new/datum/reagents(ReagentAmount)
@@ -331,12 +381,26 @@ MOP
return
// MOP
/obj/item/weapon/mop
desc = "The world of the janitor wouldn't be complete without a mop."
name = "mop"
icon = 'janitor.dmi'
icon_state = "mop"
var/mopping = 0
var/mopcount = 0
force = 3.0
throwforce = 10.0
throw_speed = 5
throw_range = 10
w_class = 3.0
flags = FPRINT | TABLEPASS
/obj/item/weapon/mop/New()
var/datum/reagents/R = new/datum/reagents(5)
reagents = R
R.my_atom = src
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
src.reagents.reaction(A,1,10)
A.clean_blood()
@@ -347,6 +411,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
for(var/obj/effect/overlay/R in A)
del(R)
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/mop))
return
@@ -365,14 +430,16 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] begins to clean \the [A]</B>", 1)
sleep(40)
clean(A)
if(A)
clean(A)
user << "\blue You have finished mopping!"
mopcount++
else if (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay) || istype(A, /obj/effect/rune))
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] begins to clean \the [get_turf(A)]</B>", 1)
sleep(40)
clean(get_turf(A))
if(A)
clean(get_turf(A))
user << "\blue You have finished mopping!"
mopcount++
@@ -380,7 +447,6 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
spawn(5)
src.reagents.clear_reagents()
mopcount = 0
return
@@ -389,18 +455,18 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
* Hope it's okay to stick this shit here: it basically just turns a hexadecimal color into rgb
*/
proc/GetColors(hex)
hex = uppertext(hex)
var
hi1 = text2ascii(hex, 2)
lo1 = text2ascii(hex, 3)
hi2 = text2ascii(hex, 4)
lo2 = text2ascii(hex, 5)
hi3 = text2ascii(hex, 6)
lo3 = text2ascii(hex, 7)
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
/proc/GetColors(hex)
hex = uppertext(hex)
var
hi1 = text2ascii(hex, 2)
lo1 = text2ascii(hex, 3)
hi2 = text2ascii(hex, 4)
lo2 = text2ascii(hex, 5)
hi3 = text2ascii(hex, 6)
lo3 = text2ascii(hex, 7)
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
@@ -42,7 +42,7 @@ RACK PARTS
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/r_metal( src.loc )
new /obj/item/stack/sheet/plasteel( src.loc )
//SN src = null
del(src)
+116 -79
View File
@@ -6,79 +6,10 @@ SHARDS
*/
/proc/construct_window(mob/usr as mob, obj/item/stack/sheet/src as obj)
if (!( istype(usr.loc, /turf/simulated) ))
return
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
return 1
var/reinf = istype(src, /obj/item/stack/sheet/rglass)
var/title = reinf?"Sheet Reinf. Glass":"Sheet-Glass"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null))
if("one direct")
if (src.loc != usr)
return 1
if (src.amount < 1)
return 1
var/list/directions = new/list(cardinal)
for (var/obj/structure/window/win in usr.loc)
directions-=win.dir
if(!(win.ini_dir in cardinal))
usr << "\red Can't let you do that."
return 1
var/dir_to_set = 2
//yes, this could probably be done better but hey... it works...
for(var/obj/structure/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 4
for(var/obj/structure/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 1
for(var/obj/structure/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 8
for(var/obj/structure/window/WT in usr.loc)
if (WT.dir == dir_to_set)
dir_to_set = 2
var/obj/structure/window/W
if(reinf)
W = new /obj/structure/window/reinforced( usr.loc, reinf )
W.state = 0
else
W = new /obj/structure/window/basic( usr.loc, reinf )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("full (2 sheets)")
if (src.loc != usr)
return 1
if (src.amount < 2)
return 1
if (locate(/obj/structure/window) in usr.loc)
usr << "\red Can't let you do that."
return 1
var/obj/structure/window/W
if(reinf)
W = new /obj/structure/window/reinforced( usr.loc, reinf )
W.state = 0
else
W = new /obj/structure/window/basic( usr.loc, reinf )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
else
//do nothing
return
// GLASS
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
construct_window(usr, src)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
..()
@@ -111,16 +42,117 @@ SHARDS
else
return ..()
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
var/title = "Sheet-Glass"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null))
if("one direct")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
for (var/obj/structure/window/win in user.loc)
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "\red Can't let you do that."
return 1
var/dir_to_set = 2
//yes, this could probably be done better but hey... it works...
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 4
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 1
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 8
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 2
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("full (2 sheets)")
if(!src) return 1
if(src.loc != user) return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
W = new /obj/structure/window/basic( user.loc, 0 )
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
return 0
// REINFORCED GLASS
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(usr, src)
construct_window(user)
/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
var/title = "Sheet Reinf. Glass"
title += " ([src.amount] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null))
if("one direct")
if(!src) return 1
if(src.loc != user) return 1
var/list/directions = new/list(cardinal)
for (var/obj/structure/window/win in user.loc)
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "\red Can't let you do that."
return 1
var/dir_to_set = 2
//yes, this could probably be done better but hey... it works...
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 4
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 1
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 8
for(var/obj/structure/window/WT in user.loc)
if (WT.dir == dir_to_set)
dir_to_set = 2
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.dir = dir_to_set
W.ini_dir = W.dir
W.anchored = 0
src.use(1)
if("full (2 sheets)")
if(!src) return 1
if(src.loc != user) return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.dir = SOUTHWEST
W.ini_dir = SOUTHWEST
W.anchored = 0
src.use(2)
return 0
// SHARDS
@@ -158,7 +190,14 @@ SHARDS
..()
if ( istype(W, /obj/item/weapon/weldingtool) && W:welding )
W:eyecheck(user)
new /obj/item/stack/sheet/glass( user.loc )
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/G in user.loc)
if(G==NG)
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
@@ -179,6 +218,4 @@ SHARDS
affecting.take_damage(5, 0)
H.UpdateDamageIcon()
H.updatehealth()
..()
//&& H.wear_suit.body_parts_covered&FEET)))
..()
+7 -7
View File
@@ -71,7 +71,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 2, one_per_turf = 1), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/steel, 1, 4, 10), \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 10), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, one_per_turf = 1), \
@@ -98,27 +98,27 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
// REINFORCED METAL SHEET
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
var/global/list/datum/stack_recipe/r_metal_recipes = list ( \
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/reinforced, 2), \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, one_per_turf = 1), \
)
/obj/item/stack/sheet/r_metal
/obj/item/stack/sheet/plasteel
New(var/loc, var/amount=null)
recipes = r_metal_recipes
recipes = plasteel_recipes
return ..()
// TILES
/obj/item/stack/tile/steel/New(var/loc, var/amount=null)
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
..()
src.pixel_x = rand(1, 14)
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/steel/attack_self(mob/user as mob)
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
if (usr.stat)
return
var/T = user.loc
@@ -133,7 +133,7 @@ var/global/list/datum/stack_recipe/r_metal_recipes = list ( \
use(1)
return
/obj/item/stack/tile/steel/proc/build(turf/S as turf)
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
S.ReplaceWithPlating()
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
+5 -3
View File
@@ -33,12 +33,14 @@ obj/structure
W:use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
add_hiddenprint(usr)
del(src)
else if(istype(W, /obj/item/stack/sheet/r_metal) && istype(src,/obj/structure/girder/displaced))
else if(istype(W, /obj/item/stack/sheet/plasteel) && istype(src,/obj/structure/girder/displaced))
W:use(2)
user << "\blue You create a false r wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
add_hiddenprint(usr)
del(src)
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
@@ -86,7 +88,7 @@ obj/structure
del(src)
return
else if (istype(W, /obj/item/stack/sheet/r_metal))
else if (istype(W, /obj/item/stack/sheet/plasteel))
if (src.icon_state == "reinforced") //Time to finalize!
user << "\blue Now finalising reinforced wall."
if(do_after(user, 50))
@@ -176,7 +178,7 @@ obj/structure
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile))
if (istype(C, /obj/item/stack/tile/plasteel))
C:build(get_turf(src))
C:use(1)
-41
View File
@@ -77,44 +77,3 @@ client/verb/Toggle_Soundscape() //All new ambience should be added here so it wo
return
/area/Entered(A)
var/sound = null
var/musVolume = 25
sound = 'ambigen1.ogg'
if (ismob(A))
if (istype(A, /mob/dead/observer)) return
if (!A:client) return
//if (A:ear_deaf) return
// if (A && A:client && !A:client:ambience_playing && !A:client:no_ambi) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas next to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
// A:client:ambience_playing = 1
// A << sound('shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
switch(src.name)
if ("Chapel") sound = pick('ambicha1.ogg','ambicha2.ogg','ambicha3.ogg','ambicha4.ogg')
if ("Morgue") sound = pick('ambimo1.ogg','ambimo2.ogg','title2.ogg')
if ("Space") sound = pick('ambispace.ogg','title2.ogg',)
if ("Engine Control") sound = pick('ambisin1.ogg','ambisin2.ogg','ambisin3.ogg','ambisin4.ogg')
if ("Atmospherics") sound = pick('ambiatm1.ogg')
if ("AI Sat Ext") sound = pick('ambiruntime.ogg','ambimalf.ogg')
if ("AI Satellite") sound = pick('ambimalf.ogg')
if ("AI Satellite Teleporter Room") sound = pick('ambiruntime.ogg','ambimalf.ogg')
if ("Bar") sound = pick('null.ogg')
if ("AI Upload Foyer") sound = pick('ambimalf.ogg', 'null.ogg')
if ("AI Upload Chamber") sound = pick('ambimalf.ogg','null.ogg')
if ("Mine")
sound = pick('ambimine.ogg')
musVolume = 25
else
sound = pick('ambiruntime.ogg','ambigen1.ogg','ambigen3.ogg','ambigen4.ogg','ambigen5.ogg','ambigen6.ogg','ambigen7.ogg','ambigen8.ogg','ambigen9.ogg','ambigen10.ogg','ambigen11.ogg','ambigen12.ogg','ambigen14.ogg')
if (prob(35))
if(A && A:client && !A:client:played)
A << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
A:client:played = 1
spawn(600)
if(A && A:client)
A:client:played = 0
+20 -2
View File
@@ -64,10 +64,20 @@
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
var/area/a = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (a.has_gravity == 0))
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)
/*
if(istype(src.loc, /turf/space) || (src.flags & NOGRAV)) //they're in space, move em one space in the opposite direction
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)
*/
item.throw_at(target, item.throw_range, item.throw_speed)
@@ -150,10 +160,14 @@
dy = SOUTH
var/dist_travelled = 0
var/dist_since_sleep = 0
var/area/a = get_area(src.loc)
var/turf/target_turf = get_turf(target)
if(dist_x > dist_y)
var/error = dist_x/2 - dist_y
while(((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
while(((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
if(error < 0)
var/atom/step = get_step(src, dy)
@@ -179,9 +193,11 @@
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
a = get_area(src.loc)
else
var/error = dist_y/2 - dist_x
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
if(error < 0)
var/atom/step = get_step(src, dx)
@@ -208,6 +224,8 @@
dist_since_sleep = 0
sleep(1)
a = get_area(src.loc)
//done throwing, either because it hit something or it finished moving
src.throwing = 0
if(isobj(src)) src:throw_impact(get_turf(src))
+91 -53
View File
@@ -81,8 +81,18 @@
/turf/Entered(atom/movable/M as mob|obj)
if(ismob(M))
if(!M:lastarea)
M:lastarea = get_area(M.loc)
if(M:lastarea.has_gravity == 0)
inertial_drift(M)
/*
if(M.flags & NOGRAV)
inertial_drift(M)
*/
else if(!istype(src, /turf/space))
M:inertia_dir = 0
..()
@@ -273,11 +283,11 @@
if(!devastated)
playsound(src.loc, 'Welder.ogg', 100, 1)
new /obj/structure/girder/reinforced(src)
new /obj/item/stack/sheet/r_metal( src )
new /obj/item/stack/sheet/plasteel( src )
else
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/metal( src )
new /obj/item/stack/sheet/r_metal( src )
new /obj/item/stack/sheet/plasteel( src )
else
if(!devastated)
playsound(src.loc, 'Welder.ogg', 100, 1)
@@ -384,11 +394,11 @@
user << "\blue Now disassembling the outer wall plating."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100)
if (istype(src, /turf/simulated/wall))
if (W && istype(src, /turf/simulated/wall))
if ((get_turf(user) == T && user.equipped() == W))
user << "\blue You disassembled the outer wall plating."
dismantle_wall()
W:welding = 1
W:welding = 1
else
user << "\blue You need more welding fuel to complete this task."
return
@@ -419,7 +429,7 @@
user << "\blue Now disassembling the outer wall plating."
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(60)
if (istype(src, /turf/simulated/wall))
if (W && istype(src, /turf/simulated/wall))
if ((get_turf(user) == T && user.equipped() == W))
user << "\blue You disassembled the outer wall plating."
dismantle_wall()
@@ -431,10 +441,11 @@
var/turf/T = user.loc
user << "\blue Now drilling through wall."
sleep(60)
if ((user.loc == T && user.equipped() == W))
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2)
if (W && istype(src, /turf/simulated/wall))
if ((user.loc == T && user.equipped() == W))
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2)
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
@@ -443,13 +454,14 @@
W:spark_system.start()
playsound(src.loc, "sparks", 50, 1)
sleep(70)
if ((user.loc == T && user.equipped() == W))
W:spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
if (W && istype(src, /turf/simulated/wall))
if ((user.loc == T && user.equipped() == W))
W:spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'blade1.ogg', 50, 1)
dismantle_wall(1)
for(var/mob/O in viewers(user, 5))
O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
return
else if(istype(W,/obj/item/apc_frame))
@@ -469,6 +481,7 @@
if(!istype(src, /turf/simulated/wall/r_wall))
return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
W:eyecheck(user)
var/turf/T = user.loc
@@ -663,7 +676,7 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
/turf/simulated/floor
//Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not.
//Use the is_plating(), is_sttel_floor() and is_light_floor() procs instead. --Errorage
//Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage
name = "floor"
icon = 'floors.dmi'
icon_state = "floor"
@@ -673,7 +686,7 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
heat_capacity = 10000
var/broken = 0
var/burnt = 0
var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/steel
var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel
airless
icon_state = "floor"
@@ -818,7 +831,7 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
return
turf/simulated/floor/proc/update_icon()
if(is_steel_floor())
if(is_plasteel_floor())
if(!broken && !burnt)
icon_state = icon_regular_floor
if(is_plating())
@@ -914,8 +927,8 @@ turf/simulated/floor/return_siding_icon_state()
make_plating()
break_tile()
/turf/simulated/floor/is_steel_floor()
if(istype(floor_tile,/obj/item/stack/tile/steel))
/turf/simulated/floor/is_plasteel_floor()
if(istype(floor_tile,/obj/item/stack/tile/plasteel))
return 1
else
return 0
@@ -942,10 +955,10 @@ turf/simulated/floor/return_siding_icon_state()
if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor))
src.ReplaceWithPlating()
if(broken) return
if(is_steel_floor())
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
broken = 1
else if(is_steel_floor())
else if(is_plasteel_floor())
src.icon_state = "light_broken"
broken = 1
else if(is_plating())
@@ -958,10 +971,10 @@ turf/simulated/floor/return_siding_icon_state()
/turf/simulated/floor/proc/burn_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(broken || burnt) return
if(is_steel_floor())
if(is_plasteel_floor())
src.icon_state = "damaged[pick(1,2,3,4,5)]"
burnt = 1
else if(is_steel_floor())
else if(is_plasteel_floor())
src.icon_state = "floorscorched[pick(1,2)]"
burnt = 1
else if(is_plating())
@@ -994,16 +1007,16 @@ turf/simulated/floor/return_siding_icon_state()
update_icon()
levelupdate()
//This proc will make the turf a steel floor tile. The expected argument is the tile to make the turf with
//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
//this proc.
/turf/simulated/floor/proc/make_steel_floor(var/obj/item/stack/tile/steel/T = null)
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null)
broken = 0
burnt = 0
intact = 1
sd_SetLuminosity(0)
if(T)
if(istype(T,/obj/item/stack/tile/steel))
if(istype(T,/obj/item/stack/tile/plasteel))
floor_tile = T
if (icon_regular_floor)
icon_state = icon_regular_floor
@@ -1014,7 +1027,7 @@ turf/simulated/floor/return_siding_icon_state()
levelupdate()
return
//if you gave a valid parameter, it won't get thisf ar.
floor_tile = new/obj/item/stack/tile/steel
floor_tile = new/obj/item/stack/tile/plasteel
icon_state = "floor"
icon_regular_floor = icon_state
@@ -1088,13 +1101,14 @@ turf/simulated/floor/return_siding_icon_state()
return
if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if (is_plating())
if (C:amount >= 2)
if (R.amount >= 2)
user << "\blue Reinforcing the floor..."
if(do_after(user, 30) && C && C:amount >= 2 && is_plating())
if(do_after(user, 30) && R && R.amount >= 2 && is_plating())
ReplaceWithEngineFloor()
playsound(src.loc, 'Deconstruct.ogg', 80, 1)
C:use(2)
R.use(2)
return
else
user << "\red You need more rods."
@@ -1104,23 +1118,26 @@ turf/simulated/floor/return_siding_icon_state()
if(istype(C, /obj/item/stack/tile))
if(is_plating())
var/obj/item/stack/tile/T = C
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
floor_tile:state = T:state
floor_tile:on = T:on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
T.use(1)
update_icon()
levelupdate()
playsound(src.loc, 'Genhit.ogg', 50, 1)
else
user << "\blue This section already has a tile on it. Use a crowbar to pry it off."
if(!broken && !burnt)
var/obj/item/stack/tile/T = C
floor_tile = new T.type
intact = 1
if(istype(T,/obj/item/stack/tile/light))
var/obj/item/stack/tile/light/L = T
var/obj/item/stack/tile/light/F = floor_tile
F.state = L.state
F.on = L.on
if(istype(T,/obj/item/stack/tile/grass))
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding gets updated properly
T.use(1)
update_icon()
levelupdate()
playsound(src.loc, 'Genhit.ogg', 50, 1)
else
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."
if(istype(C, /obj/item/weapon/cable_coil))
@@ -1139,6 +1156,19 @@ turf/simulated/floor/return_siding_icon_state()
else
user << "\red You cannot shovel this."
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = C
if(welder.welding && (is_plating()))
if(broken || burnt)
if(welder.remove_fuel(0,user))
user << "\red You fix some dents on the broken plating."
playsound(src.loc, 'Welder.ogg', 80, 1)
icon_state = "plating"
burnt = 0
broken = 0
else
user << "\blue You need more welding fuel to complete this task."
/turf/unsimulated/floor/attack_paw(user as mob)
return src.attack_hand(user)
@@ -1184,19 +1214,21 @@ turf/simulated/floor/return_siding_icon_state()
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
user << "\blue Constructing support lattice ..."
playsound(src.loc, 'Genhit.ogg', 50, 1)
ReplaceWithLattice()
C:use(1)
R.use(1)
return
if (istype(C, /obj/item/stack/tile/steel))
if (istype(C, /obj/item/stack/tile/plasteel))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/plasteel/S = C
del(L)
playsound(src.loc, 'Genhit.ogg', 50, 1)
C:build(src)
C:use(1)
S.build(src)
S.use(1)
return
else
user << "\red The plating is going to need some support."
@@ -1212,6 +1244,7 @@ turf/simulated/floor/return_siding_icon_state()
inertial_drift(A)
if(ticker && ticker.mode)
// Okay, so let's make it so that people can travel z levels but not nuke disks!
// if(ticker.mode.name == "nuclear emergency") return
@@ -1234,6 +1267,8 @@ turf/simulated/floor/return_siding_icon_state()
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
return
var/move_to_z_str = pickweight(accessable_z_levels)
var/move_to_z = text2num(move_to_z_str)
@@ -1241,8 +1276,11 @@ turf/simulated/floor/return_siding_icon_state()
if(!move_to_z)
return
A.z = move_to_z
if(src.x <= 2)
A.x = world.maxx - 2