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

View File

@@ -515,7 +515,7 @@
#include "code\game\machinery\bots\medbot.dm"
#include "code\game\machinery\bots\mulebot.dm"
#include "code\game\machinery\bots\secbot.dm"
#include "code\game\machinery\computer\AIcore.dm"
#include "code\game\machinery\computer\ai_core.dm"
#include "code\game\machinery\computer\aifixer.dm"
#include "code\game\machinery\computer\arcade.dm"
#include "code\game\machinery\computer\atmos.dm"
@@ -524,13 +524,13 @@
#include "code\game\machinery\computer\communications.dm"
#include "code\game\machinery\computer\computer.dm"
#include "code\game\machinery\computer\crew.dm"
#include "code\game\machinery\computer\explosive.dm"
#include "code\game\machinery\computer\hologram.dm"
#include "code\game\machinery\computer\id.dm"
#include "code\game\machinery\computer\lockdown.dm"
#include "code\game\machinery\computer\medical.dm"
#include "code\game\machinery\computer\Operating.dm"
#include "code\game\machinery\computer\power.dm"
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\robot.dm"
#include "code\game\machinery\computer\security.dm"
#include "code\game\machinery\computer\shuttle.dm"
@@ -1003,6 +1003,7 @@
#include "code\modules\power\engine.dm"
#include "code\modules\power\generator.dm"
#include "code\modules\power\generator_type2.dm"
#include "code\modules\power\gravitygenerator.dm"
#include "code\modules\power\lighting.dm"
#include "code\modules\power\port_gen.dm"
#include "code\modules\power\power.dm"

View File

@@ -61,6 +61,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 0
if(clothes_req) //clothes check
if(!istype(usr, /mob/living/carbon/human))
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
return 0
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe))
usr << "I don't feel strong enough without my robe."
return 0

View File

@@ -64,6 +64,7 @@ var
///////////////
diary = null
diaryofmeanpeople = null
station_name = null
game_version = "Baystation 12"

View File

@@ -1320,31 +1320,6 @@
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
/obj/item/stack/sheet/r_metal
name = "steel"
singular_name = "steel sheet"
desc = "This sheet is an alloy of iron and plasma."
icon_state = "sheet-r_metal"
item_state = "sheet-metal"
m_amt = 7500
throwforce = 15.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=2"
/obj/item/stack/tile/steel
name = "Metal floor tile"
singular_name = "Steel floor tile"
desc = "Those could work as a pretty decent throwing weapon"
icon_state = "tile"
w_class = 3.0
force = 6.0
m_amt = 937.5
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
max_amount = 60
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"

View File

@@ -431,8 +431,8 @@
obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
/obj/machinery/hologram/holopad
name = "AI holopad"
desc = "A floor-mounted device for projecting a holographic image. It will activate remotely."
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
var
mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.

View File

@@ -161,7 +161,7 @@
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src)
G.amount = 50
G.loc = src
var/obj/item/stack/sheet/r_metal/R = new /obj/item/stack/sheet/r_metal(src)
var/obj/item/stack/sheet/plasteel/R = new /obj/item/stack/sheet/plasteel(src)
R.amount = 50
R.loc = src
var/obj/item/weapon/storage/box/B1 = new /obj/item/weapon/storage/box(src)

View File

@@ -564,61 +564,6 @@
access = get_all_centcom_access()
..()
/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/chemsprayer
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/pepperspray //This is riot control
desc = "Manufactred 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/clipboard
name = "clipboard"
@@ -870,19 +815,6 @@
/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/caution
desc = "Caution! Wet Floor!"
@@ -1885,4 +1817,4 @@
desc = "spooky"
gender = PLURAL
icon = 'wizard.dmi'
icon_state = "ectoplasm"
icon_state = "ectoplasm"

View File

@@ -1,28 +1,48 @@
/proc/log_admin(text)
admin_log.Add(text)
if (config.log_admin)
diary << "ADMIN: [text]"
diary << "\[[time_stamp()]]ADMIN: [text]"
/proc/log_game(text)
if (config.log_game)
diary << "GAME: [text]"
diary << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
if (config.log_vote)
diary << "VOTE: [text]"
diary << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
if (config.log_access)
diary << "ACCESS: [text]"
diary << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
if (config.log_say)
diary << "SAY: [text]"
diary << "\[[time_stamp()]]SAY: [text]"
/proc/log_ooc(text)
if (config.log_ooc)
diary << "OOC: [text]"
diary << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
if (config.log_whisper)
diary << "WHISPER: [text]"
diary << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
if (config.log_emote)
diary << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
if (config.log_attack)
diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
/proc/log_adminsay(text)
if (config.log_adminchat)
diary << "\[[time_stamp()]]ADMINSAY: [text]"
/proc/log_adminwarn(text)
if (config.log_adminwarn)
diary << "\[[time_stamp()]]ADMINWARN: [text]"
/proc/log_pda(text)
if (config.log_pda)
diary << "\[[time_stamp()]]PDA: [text]"

View File

@@ -1,6 +1,6 @@
/turf
icon = 'floors.dmi'
var/intact = 1 //for floors, use is_plating(), is_steel_floor() and is_light_floor()
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
level = 1.0
@@ -26,7 +26,7 @@
return 0
proc/is_asteroid_floor()
return 0
proc/is_steel_floor()
proc/is_plasteel_floor()
return 0
proc/is_light_floor()
return 0
@@ -82,7 +82,7 @@
blocks_air = 1
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m steel wall
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
var/walltype = "wall"

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()

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!"

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)

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

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!"

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>"

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

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()

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)

View File

@@ -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

View File

@@ -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

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()

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)

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

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)

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

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

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

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)

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

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"

View File

@@ -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

View File

@@ -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))

View File

@@ -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)

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)))
..()

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()

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)

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

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))

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

View File

@@ -258,13 +258,17 @@ var/global/BSACooldown = 0
jobban_unban(M, job)
href_list["jobban2"] = 1
else
ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]")
var/reason = input(usr,"Reason?","reason","griefer") as text|null
if(!reason)
return
ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]. reason: [reason]")
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
feedback_inc("ban_job",1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from [job].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red Jooban can be lifted only on demand."
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [job]", 1)
jobban_fullban(M, job)
jobban_fullban(M, job, reason)
href_list["jobban2"] = 1 // lets it fall through and refresh
@@ -2024,10 +2028,14 @@ var/global/BSACooldown = 0
return
/obj/admins/proc/Jobbans()
if ((src.rank in list( "Game Admin", "Game Master" )))
var/dat = "<B>Job Bans!</B><HR><table>"
for(var/t in jobban_keylist)
dat += text("<tr><td><A href='?src=\ref[src];removejobban=[t]'>[t]</A></td></tr>")
var/r = t
if( findtext(r,"##") )
r = copytext( r, 1, findtext(r,"##") )//removes the description
dat += text("<tr><td>[t] (<A href='?src=\ref[src];removejobban=[r]'>unban</A>)</td></tr>")
dat += "</table>"
usr << browse(dat, "window=ban;size=400x400")
@@ -2734,6 +2742,25 @@ var/global/BSACooldown = 0
onclose(usr,"server_logfile")
return
/obj/admins/proc/view_atk_log()
set category = "Admin"
set desc="Shows todays server attack log in new window"
set name="Show Server Attack Log"
var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")] Attack.log"
var/output = {"<html>
<head>
<title>[time2text(world.realtime,"Day, MMM DD, YYYY")] - Attack Log</title>
</head>
<body>
<pre>
[file2text(path)]
</pre>
</body>
</html>"}
usr << browse(output,"window=server_logfile")
onclose(usr,"server_logfile")
return
/*/client/proc/unjobban_panel()
set name = "Unjobban Panel"
set category = "Admin"

View File

@@ -25,7 +25,7 @@
holder.rank = rank
if(!holder.state)
var/state = alert("Which state do you the admin to begin in?", "Admin-state", "Play", "Observe", "Neither")
var/state = alert("Which state do you want the admin to begin in?", "Admin-state", "Play", "Observe", "Neither")
if(state == "Play")
holder.state = 1
admin_play()
@@ -145,6 +145,7 @@
if (holder.level >= 5)//Game Admin********************************************************************
verbs += /obj/admins/proc/view_txt_log
verbs += /obj/admins/proc/view_atk_log
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
verbs += /client/proc/cmd_admin_list_open_jobs
verbs += /client/proc/cmd_admin_direct_narrate
@@ -169,6 +170,8 @@
verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/Blobize//I need to remember to move/remove this later
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
verbs += /client/proc/toggle_gravity_on
verbs += /client/proc/toggle_gravity_off
// Moved over from tg's Game Master:
verbs += /client/proc/colorooc
verbs += /obj/admins/proc/toggle_aliens //toggle aliens
@@ -419,6 +422,8 @@
verbs -= /client/proc/toggle_hear_deadcast
verbs -= /client/proc/toggle_hear_radio
verbs -= /client/proc/tension_report
verbs -= /client/proc/toggle_gravity_on
verbs -= /client/proc/toggle_gravity_off
verbs -= /client/proc/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen

View File

@@ -1,10 +1,15 @@
var
jobban_runonce // Updates legacy bans with new info
jobban_runonce // Updates legacy bans with new info
jobban_keylist[0] //to store the keys & ranks
/proc/jobban_fullban(mob/M, rank)
/proc/jobban_fullban(mob/M, rank, reason)
if (!M || !M.key || !M.client) return
jobban_keylist.Add(text("[M.ckey] - [rank]"))
jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
jobban_savebanfile()
/proc/jobban_client_fullban(ckey, rank)
if (!ckey || !rank) return
jobban_keylist.Add(text("[ckey] - [rank]"))
jobban_savebanfile()
/proc/jobban_isbanned(mob/M, rank)
@@ -15,17 +20,41 @@ var
return 1
if(config.usewhitelist && !check_whitelist(M))
return 1
if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
return 1
else
return 0
for (var/s in jobban_keylist)
if( findtext(s,"[M.ckey] - [rank]") )
return 1
return 0
/*
DEBUG
/mob/verb/list_all_jobbans()
set name = "list all jobbans"
for(var/s in jobban_keylist)
world << s
/mob/verb/reload_jobbans()
set name = "reload jobbans"
jobban_loadbanfile()
*/
/proc/jobban_loadbanfile()
var/savefile/S=new("data/job_full.ban")
S["keys[0]"] >> jobban_keylist
log_admin("Loading jobban_rank")
S["runonce"] >> jobban_runonce
/*
for(var/i = 1; i <= length(jobban_keylist); i++)
if( findtext(jobban_keylist[i],"##") )
var/index = findtext(jobban_keylist[i],"##")
var/s = jobban_keylist[i]
s = copytext( s , 1 , index ) //Removes the reason for the ban from this list
jobban_keylist[i] = s
world << "DEBUG: index: [index] - s: [s] - jobban_keylist\[[i]\] = [jobban_keylist[i]]"*/
if (!length(jobban_keylist))
jobban_keylist=list()
log_admin("jobban_keylist was empty")
@@ -36,7 +65,7 @@ var
S["keys[0]"] << jobban_keylist
/proc/jobban_unban(mob/M, rank)
jobban_keylist.Remove(text("[M.ckey] - [rank]"))
jobban_remove("[M.ckey] - [rank]")
jobban_savebanfile()
@@ -54,8 +83,9 @@ var
/proc/jobban_remove(X)
if(jobban_keylist.Find(X))
jobban_keylist.Remove(X)
jobban_savebanfile()
return 1
return 0
for (var/i = 1; i <= length(jobban_keylist); i++)
if( findtext(jobban_keylist[i], "[X]") )
jobban_keylist.Remove(jobban_keylist[i])
jobban_savebanfile()
return 1
return 0

View File

@@ -612,13 +612,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_if_possible(new /obj/item/weapon/chem_grenade/cleaner(M), M.slot_r_store)
M.equip_if_possible(new /obj/item/weapon/chem_grenade/cleaner(M), M.slot_l_store)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/steel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
M.equip_if_possible(new /obj/item/stack/tile/plasteel(M), M.slot_in_backpack)
if ("pirate")
M.equip_if_possible(new /obj/item/clothing/under/pirate(M), M.slot_w_uniform)

View File

@@ -650,12 +650,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
//Due to the delay here its easy for something to have happened to the mob
if(!M) return
if(usr.key != M.key && M.client)
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
if (istype(M, /mob/dead/observer))
if(istype(M, /mob/dead/observer))
gibs(M.loc, M.viruses)
return
@@ -871,6 +873,36 @@ Traitors and the like can also be revived with the previous role mostly intact.
ticker.random_players = 1
/client/proc/toggle_gravity_on()
set category = "Debug"
set name = "Toggle station gravity on"
set desc = "Toggles all gravity to active on the station."
if (!(ticker && ticker.mode))
usr << "Please wait until the game starts! Not sure how it will work otherwise."
return
for(var/area/A in world)
A.gravitychange(1,A)
command_alert("CentComm is now beaming gravitons to your station. We appoligize for any inconvience.")
/client/proc/toggle_gravity_off()
set category = "Debug"
set name = "Toggle station gravity off"
set desc = "Toggles all gravity to inactive on the station."
if (!(ticker && ticker.mode))
usr << "Please wait until the game starts! Not sure how it will work otherwise."
return
for(var/area/A in world)
A.gravitychange(0,A)
command_alert("For budget reasons, Centcomm is no longer beaming gravitons to your station. We appoligize for any inconvience.")
/client/proc/rnd_check_designs()
set category = "Debug"
set name = "Check RnD Designs"

View File

@@ -99,11 +99,19 @@
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
item_state = "helmet"
/obj/item/clothing/head/cargosoft
name = "cargo cap"
desc = "It's a baseball hat in a tasteless yellow colour."
icon_state = "cargosoft"
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
item_state = "helmet"
var/flipped = 0
/obj/item/clothing/head/syndicatefake
name = "red space helmet replica"
desc = "A plastic replica of a red space space helmet. This is a toy, it is not made for use in space!"
icon_state = "syndicate"
item_state = "syndicate"
desc = "A plastic replica of a syndicate agent's space helmet, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!"
see_face = 0.0
flags = FPRINT | TABLEPASS | BLOCKHAIR

View File

@@ -298,7 +298,7 @@
if (ore_iron > 0 && ore_plasma > 0)
ore_iron--;
ore_plasma--;
new /obj/item/stack/sheet/r_metal(output.loc)
new /obj/item/stack/sheet/plasteel(output.loc)
else
on = 0
continue

View File

@@ -27,8 +27,8 @@
if(machine.ore_iron)
dat += text("Iron: [machine.ore_iron] <A href='?src=\ref[src];release=iron'>Release</A><br>")
if(machine.ore_steel)
dat += text("Steel: [machine.ore_steel] <A href='?src=\ref[src];release=steel'>Release</A><br>")
if(machine.ore_plasteel)
dat += text("Plasteel: [machine.ore_plasteel] <A href='?src=\ref[src];release=plasteel'>Release</A><br>")
if(machine.ore_glass)
dat += text("Glass: [machine.ore_glass] <A href='?src=\ref[src];release=glass'>Release</A><br>")
if(machine.ore_rglass)
@@ -107,12 +107,12 @@
G.amount = machine.ore_iron
G.loc = machine.output.loc
machine.ore_iron = 0
if ("steel")
if (machine.ore_steel > 0)
var/obj/item/stack/sheet/r_metal/G = new /obj/item/stack/sheet/r_metal
G.amount = machine.ore_steel
if ("plasteel")
if (machine.ore_plasteel > 0)
var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel
G.amount = machine.ore_plasteel
G.loc = machine.output.loc
machine.ore_steel = 0
machine.ore_plasteel = 0
if ("clown")
if (machine.ore_clown > 0)
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown
@@ -153,7 +153,7 @@
var/ore_clown = 0;
var/ore_glass = 0;
var/ore_rglass = 0;
var/ore_steel = 0;
var/ore_plasteel = 0;
var/ore_adamantine = 0;
var/stack_amt = 50; //ammount to stack before releassing
@@ -211,8 +211,8 @@
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/r_metal))
ore_steel+= O:amount
if (istype(O,/obj/item/stack/sheet/plasteel))
ore_plasteel+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/adamantine))
@@ -277,11 +277,11 @@
G.loc = output.loc
ore_rglass -= stack_amt
return
if (ore_steel >= stack_amt)
var/obj/item/stack/sheet/r_metal/G = new /obj/item/stack/sheet/r_metal
if (ore_plasteel >= stack_amt)
var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel
G.amount = stack_amt
G.loc = output.loc
ore_steel -= stack_amt
ore_plasteel -= stack_amt
return
if (ore_adamantine >= stack_amt)
var/obj/item/stack/sheet/adamantine/G = new /obj/item/stack/sheet/adamantine

View File

@@ -2563,6 +2563,9 @@ It can still be worn/put on as normal.
src.stat = 0
return
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
if(getFireLoss() > (100 - config.health_threshold_dead) && stat == DEAD) //100 only being used as the magic human max health number, feel free to change it if you add a var for it -- Urist
ChangeToHusk()
return
/mob/living/carbon/human/abiotic(var/full_body = 0)
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask)))

View File

@@ -975,85 +975,43 @@ note dizziness decrements automatically in the mob's Life() proc.
statpanel("Spells","[S.charge_counter]/[S.charge_max]",S)
if("holdervar")
statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S)
#if 1
/client/proc/station_explosion_cinematic(var/derp)
if(mob)
var/mob/M = mob
M.loc = null // HACK, but whatever, this works
if (M.client&&M.hud_used)//They may some times not have a hud, apparently.
var/obj/screen/boom = M.hud_used.station_explosion
M.client.screen += boom
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
flick("start_nuke", boom)
if("AI malfunction")
flick("start_malf", boom)
else
boom.icon_state = "start"
sleep(40)
M << sound('explosionfar.ogg')
boom.icon_state = "end"
if(!derp) flick("explode", boom)
else flick("explode2", boom)
sleep(40)
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
if (!derp) boom.icon_state = "loss_nuke"
else boom.icon_state = "loss_nuke2"
if("malfunction")
boom.icon_state = "loss_malf"
if("blob")
return//Nothin here yet and the general one does not fit.
else
boom.icon_state = "loss_general"
#elif
/client/proc/station_explosion_cinematic(var/derp)
if(!mob)
return
var/mob/M = mob
M.loc = null // HACK, but whatever, this works
/client/proc/station_explosion_cinematic(var/station_missed)
if(!mob || !ticker) return
if(!mob.client || !mob.hud_used || !ticker.mode) return
// M.loc = null this might make it act weird but fuck putting them in nullspace, it causes issues.
var/obj/screen/boom = mob.hud_used.station_explosion
if(!istype(boom)) return
if(!M.hud_used)
return
mob.client.screen += boom
switch(ticker.mode.name)
if("nuclear emergency")
flick("start_nuke", boom)
if("AI malfunction")
flick("start_malf", boom)
else
boom.icon_state = "start"
var/obj/screen/boom = M.hud_used.station_explosion
screen += boom
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
flick("start_nuke", boom)
if("AI malfunction")
flick("start_malf", boom)
else
boom.icon_state = "start"
sleep(40)
M << sound('explosionfar.ogg')
mob << sound('explosionfar.ogg')
boom.icon_state = "end"
if(!derp)
flick("explode", boom)
else
flick("explode2", boom)
if(!station_missed) flick("explode", boom)
else flick("explode2", boom)
sleep(40)
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
if (!derp)
boom.icon_state = "loss_nuke"
else
boom.icon_state = "loss_nuke2"
if("AI malfunction")
boom.icon_state = "loss_malf"
else
boom.icon_state = "loss_general"
#endif
switch(ticker.mode.name)
if("nuclear emergency")
if(!station_missed) boom.icon_state = "loss_nuke"
else boom.icon_state = "loss_nuke2"
if("malfunction")
boom.icon_state = "loss_malf"
if("blob")
return//Nothin here yet and the general one does not fit.
else
boom.icon_state = "loss_general"
return
// facing verbs

View File

@@ -133,6 +133,7 @@
/client/Move(n, direct)
if(mob.control_object) Move_object(direct)
if(isobserver(mob)) return mob.Move(n,direct)
@@ -143,6 +144,11 @@
if(!mob) return
if(locate(/obj/effect/stop/, mob.loc))
for(var/obj/effect/stop/S in mob.loc)
if(S.victim == mob)
return
if(mob.stat==2) return
if(isAI(mob)) return AIMove(n,direct,mob)
@@ -162,9 +168,15 @@
else
mob.canmove = 1
if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
// if(!mob.Process_Spacemove(0)) return 0
var/area/a = get_area(mob.loc)
if((istype(mob.loc, /turf/space)) || (a.has_gravity == 0))
if(!mob.Process_Spacemove(0)) return 0
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
var/atom/O = mob.loc
return O.relaymove(mob, direct)
@@ -328,12 +340,35 @@
//First check to see if we can do things
if(restrained()) return 0
/*
if(istype(src,/mob/living/carbon))
if(src.l_hand && src.r_hand)
return 0
*/
var/dense_object = 0
for(var/turf/turf in oview(1,src))
if(istype(turf,/turf/space))
continue
if(istype(turf,/turf/simulated/floor) && (flags & NOGRAV))
var/area/a = get_area(turf)
if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
continue
else
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0)) // No one else gets a chance.
continue
/*
if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
continue
*/
dense_object++
break

View File

@@ -265,6 +265,7 @@
job_master.EquipRank(character, rank, 1)
EquipCustomItems(character)
character.loc = pick(latejoin)
character.lastarea = get_area(loc)
if(character.client)
character.client.be_syndicate = preferences.be_special
ticker.mode.latespawn(character)
@@ -369,6 +370,7 @@
proc/create_character()
spawning = 1
var/mob/living/carbon/human/new_character = new(loc)
new_character.lastarea = get_area(loc)
close_spawn_windows()

View File

@@ -21,26 +21,31 @@
max_co2 = 0
max_tox = 0
/mob/living/simple_animal/shade/Life()
..()
if (stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
del src
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
if(O.force)
health -= O.force
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
if((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize(0)
del src
return
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
return

View File

@@ -0,0 +1,144 @@
// It.. uses a lot of power. Everything under power is engineering stuff, at least.
/obj/machinery/computer/gravity_control_computer
name = "Gravity Generator Control"
desc = "A computer to control a local gravity generator. Qualified personnel only."
icon = 'computer.dmi'
icon_state = "airtunnel0e"
anchored = 1
density = 1
var/obj/machinery/gravity_generator = null
/obj/machinery/gravity_generator/
name = "Gravitational Generator"
desc = "A device which produces a gravaton field when set up."
icon = 'singularity.dmi'
icon_state = "TheSingGen"
anchored = 1
density = 1
use_power = 1
idle_power_usage = 200
active_power_usage = 1000
var/on = 1
var/list/localareas = list()
var/effectiverange = 25
// Borrows code from cloning computer
/obj/machinery/computer/gravity_control_computer/New()
..()
spawn(5)
updatemodules()
return
return
/obj/machinery/gravity_generator/New()
..()
spawn(5)
locatelocalareas()
return
return
/obj/machinery/computer/gravity_control_computer/proc/updatemodules()
src.gravity_generator = findgenerator()
/obj/machinery/gravity_generator/proc/locatelocalareas()
for(var/area/A in range(src,effectiverange))
if(A.name == "Space")
continue // No (de)gravitizing space.
if(A.master && !( A.master in localareas) )
localareas += A.master
/obj/machinery/computer/gravity_control_computer/proc/findgenerator()
var/obj/machinery/gravity_generator/foundgenerator = null
for(dir in list(NORTH,EAST,SOUTH,WEST))
//world << "SEARCHING IN [dir]"
foundgenerator = locate(/obj/machinery/gravity_generator/, get_step(src, dir))
if (!isnull(foundgenerator))
//world << "FOUND"
break
return foundgenerator
/obj/machinery/computer/gravity_control_computer/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/gravity_control_computer/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/gravity_control_computer/attack_hand(mob/user as mob)
user.machine = src
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
updatemodules()
var/dat = "<h3>Generator Control System</h3>"
//dat += "<font size=-1><a href='byond://?src=\ref[src];refresh=1'>Refresh</a></font>"
if(gravity_generator)
if(gravity_generator:on)
dat += "<font color=green><br><tt>Gravity Status: ON</tt></font><br>"
else
dat += "<font color=red><br><tt>Gravity Status: OFF</tt></font><br>"
dat += "<br><tt>Currently Supplying Gravitons To:</tt><br>"
for(var/area/A in gravity_generator:localareas)
if(A.has_gravity && gravity_generator:on)
dat += "<tt><font color=green>[A]</tt></font><br>"
else if (A.has_gravity)
dat += "<tt><font color=yellow>[A]</tt></font><br>"
else
dat += "<tt><font color=red>[A]</tt></font><br>"
dat += "<br><tt>Maintainence Functions:</tt><br>"
if(gravity_generator:on)
dat += "<a href='byond://?src=\ref[src];gentoggle=1'><font color=red> TURN GRAVITY GENERATOR OFF. </font></a>"
else
dat += "<a href='byond://?src=\ref[src];gentoggle=1'><font color=green> TURN GRAVITY GENERATOR ON. </font></a>"
else
dat += "No local gravity generator detected!"
user << browse(dat, "window=gravgen")
onclose(user, "gravgen")
/obj/machinery/computer/gravity_control_computer/Topic(href, href_list)
set background = 1
..()
if ( (get_dist(src, usr) > 1 ))
if (!istype(usr, /mob/living/silicon))
usr.machine = null
usr << browse(null, "window=air_alarm")
return
if(href_list["gentoggle"])
if(gravity_generator:on)
gravity_generator:on = 0
for(var/area/A in gravity_generator:localareas)
var/obj/machinery/gravity_generator/G
for(G in world)
if((A.master in G.localareas) && (G.on))
break
if(!G)
A.gravitychange(0,A)
else
for(var/area/A in gravity_generator:localareas)
gravity_generator:on = 1
A.gravitychange(1,A)
src.updateUsrDialog()
return

View File

@@ -1,8 +1,6 @@
var/global/list/uneatable = list(
/turf/space,
/obj/effect,
/obj/effect/overlay,
/obj/effect/rune,
/mob/aiEye
)

View File

@@ -4,14 +4,6 @@
#define SMESMAXCHARGELEVEL 200000
#define SMESMAXOUTPUT 200000
/obj/machinery/power/smes/magical
name = "magical power storage unit"
desc = "A high-capacity superconducting magnetic energy storage (SMES) unit. Magically produces power."
process()
capacity = INFINITY
charge = INFINITY
..()
/obj/machinery/power/smes
name = "power storage unit"
desc = "A high-capacity superconducting magnetic energy storage (SMES) unit."
@@ -32,336 +24,345 @@
var/obj/machinery/power/terminal/terminal = null
/obj/machinery/power/smes/New()
..()
spawn(5)
dir_loop:
for(var/d in cardinal)
var/turf/T = get_step(src, d)
for(var/obj/machinery/power/terminal/term in T)
if(term && term.dir == turn(d, 180))
terminal = term
break dir_loop
if(!terminal)
stat |= BROKEN
return
terminal.master = src
updateicon()
/obj/machinery/power/smes/proc/updateicon()
overlays = null
if(stat & BROKEN)
New()
..()
spawn(5)
dir_loop:
for(var/d in cardinal)
var/turf/T = get_step(src, d)
for(var/obj/machinery/power/terminal/term in T)
if(term && term.dir == turn(d, 180))
terminal = term
break dir_loop
if(!terminal)
stat |= BROKEN
return
terminal.master = src
updateicon()
return
overlays += image('power.dmi', "smes-op[online]")
proc/updateicon()
overlays = null
if(stat & BROKEN) return
if(charging)
overlays += image('power.dmi', "smes-oc1")
else
if(chargemode)
overlays += image('power.dmi', "smes-oc0")
overlays += image('power.dmi', "smes-op[online]")
var/clevel = chargedisplay()
if(clevel>0)
overlays += image('power.dmi', "smes-og[clevel]")
if(charging)
overlays += image('power.dmi', "smes-oc1")
else
if(chargemode)
overlays += image('power.dmi', "smes-oc0")
/obj/machinery/power/smes/proc/chargedisplay()
return round(5.5*charge/capacity)
var/clevel = chargedisplay()
if(clevel>0)
overlays += image('power.dmi', "smes-og[clevel]")
return
proc/chargedisplay()
return round(5.5*charge/capacity)
#define SMESRATE 0.05 // rate of internal charge to external power
/obj/machinery/power/smes/process()
process()
if(stat & BROKEN)
return
if(stat & BROKEN) return
//store machine state to see if we need to update the icon overlays
var/last_disp = chargedisplay()
var/last_chrg = charging
var/last_onln = online
//store machine state to see if we need to update the icon overlays
var/last_disp = chargedisplay()
var/last_chrg = charging
var/last_onln = online
if(terminal)
var/excess = terminal.surplus()
if(terminal)
var/excess = terminal.surplus()
if(charging)
if(excess >= 0) // if there's power available, try to charge
if(charging)
if(excess >= 0) // if there's power available, try to charge
var/load = min((capacity-charge)/SMESRATE, chargelevel) // charge at set rate, limited to spare capacity
var/load = min((capacity-charge)/SMESRATE, chargelevel) // charge at set rate, limited to spare capacity
charge += load * SMESRATE // increase the charge
charge += load * SMESRATE // increase the charge
add_load(load) // add the load to the terminal side network
add_load(load) // add the load to the terminal side network
else // if not enough capcity
charging = 0 // stop charging
chargecount = 0
else // if not enough capcity
charging = 0 // stop charging
chargecount = 0
else
if(chargemode)
if(chargecount > rand(3,6))
charging = 1
chargecount = 0
else
if(chargemode)
if(chargecount > rand(3,6))
charging = 1
chargecount = 0
if(excess > chargelevel)
chargecount++
if(excess > chargelevel)
chargecount++
else
chargecount = 0
else
chargecount = 0
else
chargecount = 0
if(online) // if outputting
lastout = min( charge/SMESRATE, output) //limit output to that stored
if(online) // if outputting
lastout = min( charge/SMESRATE, output) //limit output to that stored
charge -= lastout*SMESRATE // reduce the storage (may be recovered in /restore() if excessive)
charge -= lastout*SMESRATE // reduce the storage (may be recovered in /restore() if excessive)
add_avail(lastout) // add output to powernet (smes side)
add_avail(lastout) // add output to powernet (smes side)
if(charge < 0.0001)
online = 0 // stop output if charge falls to zero
if(charge < 0.0001)
online = 0 // stop output if charge falls to zero
// only update icon if state changed
if(last_disp != chargedisplay() || last_chrg != charging || last_onln != online)
updateicon()
// only update icon if state changed
if(last_disp != chargedisplay() || last_chrg != charging || last_onln != online)
updateicon()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.interact(M)
AutoUpdateAI(src)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.interact(M)
AutoUpdateAI(src)
return
// called after all power processes are finished
// restores charge level to smes if there was excess this ptick
/obj/machinery/power/smes/proc/restore()
if(stat & BROKEN)
return
if(!online)
loaddemand = 0
return
var/excess = powernet.netexcess // this was how much wasn't used on the network last ptick, minus any removed by other SMESes
excess = min(lastout, excess) // clamp it to how much was actually output by this SMES last ptick
excess = min((capacity-charge)/SMESRATE, excess) // for safety, also limit recharge by space capacity of SMES (shouldn't happen)
// now recharge this amount
var/clev = chargedisplay()
charge += excess * SMESRATE
powernet.netexcess -= excess // remove the excess from the powernet, so later SMESes don't try to use it
loaddemand = lastout-excess
if(clev != chargedisplay() )
updateicon()
/obj/machinery/power/smes/add_load(var/amount)
if(terminal && terminal.powernet)
terminal.powernet.newload += amount
/obj/machinery/power/smes/attack_ai(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit)
proc/restore()
if(stat & BROKEN)
return
interact(user)
if(!online)
loaddemand = 0
return
/obj/machinery/power/smes/proc/interact(mob/user)
var/excess = powernet.netexcess // this was how much wasn't used on the network last ptick, minus any removed by other SMESes
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon/ai))
excess = min(lastout, excess) // clamp it to how much was actually output by this SMES last ptick
excess = min((capacity-charge)/SMESRATE, excess) // for safety, also limit recharge by space capacity of SMES (shouldn't happen)
// now recharge this amount
var/clev = chargedisplay()
charge += excess * SMESRATE
powernet.netexcess -= excess // remove the excess from the powernet, so later SMESes don't try to use it
loaddemand = lastout-excess
if(clev != chargedisplay() )
updateicon()
return
add_load(var/amount)
if(terminal && terminal.powernet)
terminal.powernet.newload += amount
attack_ai(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit)
return
interact(user)
proc/interact(mob/user)
if(get_dist(src, user) > 1 && !istype(user, /mob/living/silicon/ai))
user.machine = null
user << browse(null, "window=smes")
return
user.machine = src
user.machine = src
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
t += "Stored capacity : [round(100.0*charge/capacity, 0.1)]%<BR><BR>"
t += "Input: [charging ? "Charging" : "Not Charging"] [chargemode ? "<B>Auto</B> <A href = '?src=\ref[src];cmode=1'>Off</A>" : "<A href = '?src=\ref[src];cmode=1'>Auto</A> <B>Off</B> "]<BR>"
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
t += "Input level: <A href = '?src=\ref[src];input=-4'>M</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(chargelevel,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>M</A><BR>"
t += "Stored capacity : [round(100.0*charge/capacity, 0.1)]%<BR><BR>"
t += "<BR><BR>"
t += "Input: [charging ? "Charging" : "Not Charging"] [chargemode ? "<B>Auto</B> <A href = '?src=\ref[src];cmode=1'>Off</A>" : "<A href = '?src=\ref[src];cmode=1'>Auto</A> <B>Off</B> "]<BR>"
t += "Output: [online ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "Output level: <A href = '?src=\ref[src];output=-4'>M</A> <A href = '?src=\ref[src];output=-3'>-</A> <A href = '?src=\ref[src];output=-2'>-</A> <A href = '?src=\ref[src];output=-1'>-</A> [add_lspace(output,5)] <A href = '?src=\ref[src];output=1'>+</A> <A href = '?src=\ref[src];output=2'>+</A> <A href = '?src=\ref[src];output=3'>+</A> <A href = '?src=\ref[src];output=4'>M</A><BR>"
t += "Input level: <A href = '?src=\ref[src];input=-4'>M</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(chargelevel,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>M</A><BR>"
t += "Output load: [round(loaddemand)] W<BR>"
t += "<BR><BR>"
t += "<BR></PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "Output: [online ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "Output level: <A href = '?src=\ref[src];output=-4'>M</A> <A href = '?src=\ref[src];output=-3'>-</A> <A href = '?src=\ref[src];output=-2'>-</A> <A href = '?src=\ref[src];output=-1'>-</A> [add_lspace(output,5)] <A href = '?src=\ref[src];output=1'>+</A> <A href = '?src=\ref[src];output=2'>+</A> <A href = '?src=\ref[src];output=3'>+</A> <A href = '?src=\ref[src];output=4'>M</A><BR>"
t += "Output load: [round(loaddemand)] W<BR>"
t += "<BR></PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT>"
user << browse(t, "window=smes;size=460x300")
onclose(user, "smes")
return
/obj/machinery/power/smes/Topic(href, href_list)
..()
if (usr.stat || usr.restrained() )
t += "</TT>"
user << browse(t, "window=smes;size=460x300")
onclose(user, "smes")
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
if(!istype(usr, /mob/living/silicon/ai))
usr << "\red You don't have the dexterity to do this!"
Topic(href, href_list)
..()
if (usr.stat || usr.restrained() )
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
if(!istype(usr, /mob/living/silicon/ai))
usr << "\red You don't have the dexterity to do this!"
return
//world << "[href] ; [href_list[href]]"
if (( usr.machine==src && ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
if (( usr.machine==src && ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
if( href_list["close"] )
if( href_list["close"] )
usr << browse(null, "window=smes")
usr.machine = null
return
else if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = 0
switch(i)
if(-4)
chargelevel = 0
if(4)
chargelevel = SMESMAXCHARGELEVEL //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
chargelevel += d
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["output"] )
var/i = text2num(href_list["output"])
var/d = 0
switch(i)
if(-4)
output = 0
if(4)
output = SMESMAXOUTPUT //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
output += d
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
src.updateUsrDialog()
else
usr << browse(null, "window=smes")
usr.machine = null
return
else if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = 0
switch(i)
if(-4)
chargelevel = 0
if(4)
chargelevel = SMESMAXCHARGELEVEL //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
chargelevel += d
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["output"] )
var/i = text2num(href_list["output"])
var/d = 0
switch(i)
if(-4)
output = 0
if(4)
output = SMESMAXOUTPUT //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
output += d
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
return
src.updateUsrDialog()
proc/ion_act()
if(src.z == 1)
if(prob(1)) //explosion
world << "\red SMES explosion in [src.loc.loc]"
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
sleep(10*pick(4,5,6,7,10,14))
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
explosion(src.loc, -1, 0, 1, 3, 0)
del(src)
return
if(prob(15)) //Power drain
world << "\red SMES power drain in [src.loc.loc]"
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
if(prob(50))
emp_act(1)
else
emp_act(2)
if(prob(5)) //smoke only
world << "\red SMES smoke in [src.loc.loc]"
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
else
usr << browse(null, "window=smes")
usr.machine = null
return
emp_act(severity)
online = 0
charging = 0
output = 0
charge -= 1e6/severity
if (charge < 0)
charge = 0
spawn(100)
output = initial(output)
charging = initial(charging)
online = initial(online)
..()
/obj/machinery/power/smes/magical
name = "magical power storage unit"
desc = "A high-capacity superconducting magnetic energy storage (SMES) unit. Magically produces power."
process()
capacity = INFINITY
charge = INFINITY
..()
/obj/machinery/power/smes/proc/ion_act()
if(src.z == 1)
if(prob(1)) //explosion
world << "\red SMES explosion in [src.loc.loc]"
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
sleep(10*pick(4,5,6,7,10,14))
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
explosion(src.loc, -1, 0, 1, 3, 0)
del(src)
return
if(prob(15)) //Power drain
world << "\red SMES power drain in [src.loc.loc]"
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
if(prob(50))
emp_act(1)
else
emp_act(2)
if(prob(5)) //smoke only
world << "\red SMES smoke in [src.loc.loc]"
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
/obj/machinery/power/smes/emp_act(severity)
online = 0
charging = 0
output = 0
charge -= 1e6/severity
if (charge < 0)
charge = 0
spawn(100)
output = initial(output)
charging = initial(charging)
online = initial(online)
..()
/proc/rate_control(var/S, var/V, var/C, var/Min=1, var/Max=5, var/Limit=null)
var/href = "<A href='?src=\ref[S];rate control=1;[V]"
var/rate = "[href]=-[Max]'>-</A>[href]=-[Min]'>-</A> [(C?C : 0)] [href]=[Min]'>+</A>[href]=[Max]'>+</A>"
if(Limit) return "[href]=-[Limit]'>-</A>"+rate+"[href]=[Limit]'>+</A>"
return rate

View File

@@ -140,17 +140,6 @@ var/MAX_EXPLOSION_RANGE = 14
//turf-only flags
#define NOJAUNT 1
//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!!
#define HIDEMASK 1 //APPLIES ONLY TO HELMETS!!
#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!!
#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!!
//Cant seem to find a mob bitflags area other than the powers one
#define NOGRAV 1
//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!!
@@ -286,4 +275,4 @@ var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','h
#define SEC_LEVEL_GREEN 0
#define SEC_LEVEL_BLUE 1
#define SEC_LEVEL_RED 2
#define SEC_LEVEL_DELTA 3
#define SEC_LEVEL_DELTA 3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -223,7 +223,7 @@
"aeo" = (/obj/machinery/mecha_part_fabricator,/obj/effect/decal/cleanable/oil/streak{icon_state = "floor5"},/obj/effect/decal/cleanable/oil/streak{icon_state = "floor6"},/turf/simulated/floor,/area/assembly/assembly_line)
"aep" = (/obj/structure/stool,/turf/simulated/floor,/area/assembly/assembly_line)
"aeq" = (/obj/machinery/conveyor_switch{id = "assemblyline1"},/turf/simulated/floor,/area/assembly/assembly_line)
"aer" = (/obj/structure/table,/obj/item/stack/sheet/r_metal{amount = 20},/obj/item/stack/sheet/glass{amount = 20},/turf/simulated/floor,/area/assembly/assembly_line)
"aer" = (/obj/structure/table,/obj/item/stack/sheet/plasteel{amount = 20},/obj/item/stack/sheet/glass{amount = 20},/turf/simulated/floor,/area/assembly/assembly_line)
"aes" = (/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 27},/obj/machinery/disposal,/turf/simulated/floor,/area/assembly/assembly_line)
"aet" = (/obj/machinery/firealarm{dir = 4; layer = 4; pixel_x = 24},/turf/simulated/floor{icon_state = "whitehall"; dir = 4},/area/toxins/hallway)
"aeu" = (/obj/machinery/disposal,/turf/simulated/floor,/area/toxins/rdoffice)
@@ -338,7 +338,7 @@
"agz" = (/obj/effect/sign/vacuum,/turf/simulated/wall/r_wall,/area/ai_monitored/storage/eva)
"agA" = (/obj/machinery/door/airlock/external{name = "E.V.A."; req_access_txt = "18"},/turf/simulated/floor/plating,/area/ai_monitored/storage/eva)
"agB" = (/turf/simulated/wall/r_wall,/area/ai_monitored/storage/eva)
"agC" = (/obj/item/stack/tile/steel,/obj/item/stack/tile/steel,/turf/simulated/floor/plating/airless,/area)
"agC" = (/obj/item/stack/tile/plasteel,/obj/item/stack/tile/plasteel,/turf/simulated/floor/plating/airless,/area)
"agD" = (/obj/machinery/door/firedoor/border_only,/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/assembly/assembly_line)
"agE" = (/obj/structure/table,/obj/item/device/multitool,/obj/item/weapon/crowbar,/obj/item/device/multitool,/turf/simulated/floor,/area/assembly/assembly_line)
"agF" = (/obj/machinery/camera{c_tag = "Robotics Port"; dir = 1; network = "Research"},/obj/machinery/alarm{dir = 1; pixel_y = -22},/turf/simulated/floor,/area/assembly/assembly_line)
@@ -430,7 +430,7 @@
"ain" = (/turf/simulated/wall,/area/security/hos)
"aio" = (/obj/effect/sign/securearea{name = "EXTERNAL AIRLOCK"; desc = "A warning sign which reads 'EXTERNAL AIRLOCK'"},/turf/simulated/wall/r_wall,/area/ai_monitored/storage/eva)
"aip" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/external{name = "E.V.A."; req_access_txt = "18"},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor,/area/ai_monitored/storage/eva)
"aiq" = (/obj/item/stack/sheet/r_metal,/obj/item/stack/sheet/r_metal,/obj/item/stack/sheet/r_metal,/turf/simulated/floor/plating/airless,/area)
"aiq" = (/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/plasteel,/turf/simulated/floor/plating/airless,/area)
"air" = (/obj/item/stack/rods{amount = 50},/obj/item/stack/rods{amount = 50},/turf/simulated/floor/plating/airless,/area)
"ais" = (/obj/item/stack/rods{amount = 50},/turf/simulated/floor/plating/airless,/area)
"ait" = (/obj/machinery/disposal,/obj/effect/decal/cleanable/dirt,/obj/machinery/firealarm{dir = 8; pixel_x = -24},/turf/simulated/floor,/area/assembly/assembly_line)
@@ -1208,8 +1208,8 @@
"axl" = (/obj/machinery/light/small/spot{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor,/area/construction/under_construction_small)
"axm" = (/turf/simulated/floor,/area/construction/under_construction_small)
"axn" = (/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axo" = (/obj/item/stack/tile/steel,/obj/machinery/light/small/spot{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axp" = (/obj/item/stack/tile/steel,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axo" = (/obj/item/stack/tile/plasteel,/obj/machinery/light/small/spot{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axp" = (/obj/item/stack/tile/plasteel,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axq" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axr" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor/plating,/area/hallway/secondary/docking)
"axs" = (/obj/effect/decal/cleanable/dirt,/obj/structure/closet/emcloset,/turf/simulated/floor,/area/hallway/secondary/docking)
@@ -1240,7 +1240,7 @@
"axR" = (/obj/effect/decal/warning_stripes{tag = "icon-E-corner"; icon_state = "E-corner"},/obj/effect/decal/cleanable/dirt,/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = -32},/turf/simulated/floor{icon_state = "dark"},/area/turret_protected/ai)
"axS" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/machinery/alarm{dir = 1; layer = 4; pixel_y = -22},/turf/simulated/floor/grid,/area/turret_protected/ai)
"axT" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor,/area/hallway/primary/starboard)
"axU" = (/obj/item/stack/tile/steel,/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axU" = (/obj/item/stack/tile/plasteel,/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axV" = (/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/turf/simulated/floor/plating,/area/construction/under_construction_small)
"axW" = (/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/maintenance/starboard)
"axX" = (/obj/machinery/light,/turf/simulated/floor,/area/hallway/secondary/docking)
@@ -3140,7 +3140,7 @@
"bit" = (/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/obj/structure/table/reinforced,/turf/simulated/floor/plating,/area/engine/construction_storage)
"biu" = (/turf/simulated/floor/plating,/area/engine/construction_storage)
"biv" = (/obj/structure/closet/secure_closet/engineering_welding,/turf/simulated/floor/plating,/area/engine/construction_storage)
"biw" = (/obj/item/stack/sheet/r_metal,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = "Streight"},/obj/structure/table/reinforced,/turf/simulated/floor/plating,/area/engine/construction_storage)
"biw" = (/obj/item/stack/sheet/plasteel,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = "Streight"},/obj/structure/table/reinforced,/turf/simulated/floor/plating,/area/engine/construction_storage)
"bix" = (/obj/structure/grille,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/space,/area)
"biy" = (/obj/effect/sign/securearea{desc = "A warning sign which reads 'HIGH VOLTAGE'"; icon_state = "shock"; name = "HIGH VOLTAGE"},/turf/simulated/wall/r_wall,/area)
"biz" = (/obj/machinery/power/terminal{dir = 2; icon_state = "term"},/obj/structure/cable,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating,/area)

View File

@@ -5171,7 +5171,7 @@
"bVw" = (/obj/machinery/door/window{dir = 8; icon = 'windoor.dmi'; name = "Virology Holding Rooms"; req_access_txt = "39"},/obj/structure/disposalpipe/segment{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/virology)
"bVx" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/machinery/camera{c_tag = "Virology East"; dir = 8; network = "Medbay"},/turf/simulated/floor{icon_state = "white"},/area)
"bVy" = (/obj/structure/table,/obj/item/weapon/cell{charge = 100; maxcharge = 15000},/obj/item/weapon/cell{pixel_x = 5; pixel_y = -5; charge = 100; maxcharge = 15000},/obj/item/device/assembly/prox_sensor{pixel_x = -8; pixel_y = 4},/turf/simulated/floor,/area/assembly/assembly_line)
"bVz" = (/obj/structure/table,/obj/item/stack/sheet/r_metal{amount = 20},/obj/structure/disposalpipe/segment,/obj/item/stack/sheet/glass{amount = 20},/turf/simulated/floor,/area/assembly/assembly_line)
"bVz" = (/obj/structure/table,/obj/item/stack/sheet/plasteel{amount = 20},/obj/structure/disposalpipe/segment,/obj/item/stack/sheet/glass{amount = 20},/turf/simulated/floor,/area/assembly/assembly_line)
"bVA" = (/obj/machinery/conveyor{dir = 4; id = "Skynet_heavy"},/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/assembly/assembly_line)
"bVB" = (/obj/machinery/conveyor{dir = 4; id = "Skynet_heavy"},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = -32},/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/assembly/assembly_line)
"bVC" = (/obj/machinery/conveyor{dir = 4; id = "Skynet_heavy"},/obj/machinery/light,/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/assembly/assembly_line)

BIN
sound/items/zip.ogg Normal file

Binary file not shown.