Clean old shit, delete old files, move files, mrowl

This commit is contained in:
Tigercat2000
2015-12-27 15:58:41 -08:00
parent 8ad4d33b7f
commit 9cb84e83ca
52 changed files with 1 additions and 7556 deletions

View File

@@ -1 +0,0 @@
var/list/departments = list("Command", "Medical", "Engineering", "Security", "Civilian", "Cargo")

View File

@@ -1,100 +0,0 @@
var/jsonpath = "/home/bay12/public_html"
var/dmepath = "/home/bay12/git/baystation12.dme"
var/makejson = 1 //temp
proc/makejson()
if(!makejson)
return
fdel("[jsonpath]/info.json")
//usr << "Error cant delete json"
//else
//usr << "Deleted json in public html"
fdel("info.json")
//usr << "error cant delete local json"
//else
//usr << "Deleted local json"
var/F = file("info.json")
if(!isfile(F))
return
var/mode
if(ticker)
if(ticker.current_state == 1)
mode = "Round Setup"
else if(ticker.hide_mode)
mode = "SECRET"
else
mode = master_mode
var/playerscount = 0
var/players = ""
var/admins = "no"
for(var/client/C)
playerscount++
if(C.holder && C.holder.level >= 0) // make sure retired admins don't make nt think admins are on
if(!C.stealth)
admins = "yes"
players += "[C.key];"
else
players += "[C.fakekey];"
else
players += "[C.key];"
F << "{\"mode\":\"[mode]\",\"players\" : \"[players]\",\"playercount\" : \"[playerscount]\",\"admin\" : \"[admins]\",\"time\" : \"[time2text(world.realtime,"MM/DD - hh:mm")]\"}"
fcopy("info.json","[jsonpath]/info.json")
/proc/switchmap(newmap,newpath)
var/oldmap
var/obj/mapinfo/M = locate()
if(M)
oldmap = M.mapname
else
message_admins("Did not locate mapinfo object. Go bug the mapper to add a /obj/mapinfo to their map!\n For now, you can probably spawn one manually. If you do, be sure to set it's mapname var correctly, or else you'll just get an error again.")
return
message_admins("Current map: [oldmap]")
var/text = file2text(dmepath)
var/path = "#include \"maps/[oldmap].dmm\""
var/xpath = "#include \"maps/[newpath].dmm\""
var/loc = findtext(text,path,1,0)
if(!loc)
path = "#include \"maps\\[oldmap].dmm\""
xpath = "#include \"maps\\[newpath].dmm\""
loc = findtext(text,path,1,0)
if(!loc)
message_admins("Could not find '#include \"maps\\[oldmap].dmm\"' or '\"maps/[oldmap].dmm\"' in the bs12.dme. The mapinfo probably has an incorrect mapname var. Alternatively, could not find the .dme itself, at [dmepath].")
return
var/rest = copytext(text, loc + length(path))
text = copytext(text,1,loc)
text += "\n[xpath]"
text += rest
/* for(var/A in lines)
if(findtext(A,path,1,0))
lineloc = lines.Find(A,1,0)
lines[lineloc] = xpath
world << "FOUND"*/
fdel(dmepath)
var/file = file(dmepath)
file << text
message_admins("Compiling...")
shell("./recompile")
message_admins("Done")
world.Reboot("Switching to [newmap]")
obj/mapinfo
invisibility = 101
var/mapname = "thismap"
var/decks = 4
proc/GetMapInfo()
// var/obj/mapinfo/M = locate()
// Just removing these to try and fix the occasional JSON -> WORLD issue.
// world << M.name
// world << M.mapname
client/proc/ChangeMap(var/X as text)
set name = "Change Map"
set category = "Admin"
switchmap(X,X)
proc/send2adminirc(channel,msg)
world << channel << " "<< msg
shell("python nudge.py '[channel]' [msg]")

View File

@@ -1,153 +0,0 @@
//this computer displays status and remotely activates multiple shutters / blast doors
//todo: lock / electrify specified area doors? might be a bit gamebreaking
/obj/machinery/computer/lockdown
//for reference
/*name = "Lockdown Control"
desc = "Used to control blast doors."
icon_state = "lockdown"
circuit = "/obj/item/weapon/circuitboard/lockdown"
var/connected_doors
var/department*/
var/list/displayedNetworks
New()
..()
connected_doors = new/list()
displayedNetworks = new/list()
//only load blast doors for map-defined departments for the moment
//door networks are hardcoded here.
switch(department)
if("Engineering")
connected_doors.Add("Engineering")
//Antiqua Engineering
connected_doors.Add("Reactor core")
connected_doors.Add("Control Room")
connected_doors.Add("Vent Seal")
connected_doors.Add("Rig Storage")
connected_doors.Add("Fore Port Shutters")
connected_doors.Add("Fore Starboard Shutters")
connected_doors.Add("Electrical Storage Shutters")
connected_doors.Add("Locker Room Shutters")
connected_doors.Add("Breakroom Shutters")
connected_doors.Add("Observation Shutters")
//exodus engineering
if("Medbay")
//Exodus Medbay
connected_doors.Add("Genetics Outer Shutters")
connected_doors.Add("Genetics Inner Shutters")
connected_doors.Add("Chemistry Outer Shutters")
connected_doors.Add("Observation Shutters")
connected_doors.Add("Patient Room 1 Shutters")
connected_doors.Add("Patient Room 2 Shutters")
connected_doors.Add("Patient Room 3 Shutters")
for(var/net in connected_doors)
connected_doors[net] = new/list()
//loop through the world, grabbing all the relevant doors
spawn(1)
ConnectDoors()
proc/ConnectDoors()
for(var/list/L in connected_doors)
for(var/item in L)
L.Remove(item)
//
for(var/obj/machinery/door/poddoor/D in world)
if(D.network in connected_doors)
var/list/L = connected_doors[D.network]
L.Add(D)
attack_ai(mob/user)
attack_hand(user)
attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=lockdown")
return
var/t = "<B>Lockdown Control</B><BR>"
t += "<A href='?src=\ref[src];refresh=1'>Refresh</A><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table border=1>"
var/empty = 1
for(var/curNetId in connected_doors)
var/list/L = connected_doors[curNetId]
if(!L || L.len == 0)
continue
empty = 0
t += "<tr>"
if(curNetId in displayedNetworks)
t += "<td><a href='?src=\ref[src];hide_net=[curNetId]'>\[-\]</a><b> " + curNetId + "<b></td>"
t += "<td colspan=\"2\"><b><a href='?src=\ref[src];open_net=[curNetId]'>Open all</a> / <a href='?src=\ref[src];close_net=[curNetId]'>Close all</a></b></td>"
t += "</tr>"
for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId])
t += "<tr>"
t += "<td>[D.id]</td>"
if(istype(D,/obj/machinery/door/poddoor/shutters))
t += "<td>Shutter ([D.density ? "Closed" : "Open"])</td>"
else
t += "<td>Blast door ([D.density ? "Closed" : "Open"])</td>"
t += "<td><b><a href='?src=\ref[D];toggle=1'>Toggle</a></b></td>"
t += "</tr>"
else
t += "<td><a href='?src=\ref[src];show_net=[curNetId]'>\[+\]</a> <b>" + curNetId + "<b></td>"
t += "</table>"
if(empty)
t += "\red No networks connected.<br>"
t += "<A href='?src=\ref[src];refresh=1'>Refresh</A><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=lockdown;size=550x600")
onclose(user, "lockdown")
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=lockdown")
usr.machine = null
if( href_list["show_net"] )
displayedNetworks.Add(href_list["show_net"])
updateDialog()
if( href_list["hide_net"] )
if(href_list["hide_net"] in displayedNetworks)
displayedNetworks.Remove(href_list["hide_net"])
updateDialog()
if( href_list["toggle_id"] )
var/idTag = href_list["toggle_id"]
for(var/net in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[net])
if(D.id == idTag)
if(D.density)
D.open()
else
D.close()
break
if( href_list["open_net"] )
var/netTag = href_list["open_net"]
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.density) //for some reason, there's no var saying whether the door is open or not >.>
spawn(0)
D.open()
if( href_list["close_net"] )
var/netTag = href_list["close_net"]
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(!D.density)
spawn(0)
D.close()
src.updateDialog()

View File

@@ -1,245 +0,0 @@
//Config stuff
#define PRISON_MOVETIME 150 //Time to station is milliseconds.
#define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station
#define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock
var/prison_shuttle_moving_to_station = 0
var/prison_shuttle_moving_to_prison = 0
var/prison_shuttle_at_station = 0
var/prison_shuttle_can_send = 1
var/prison_shuttle_time = 0
var/prison_shuttle_timeleft = 0
/obj/machinery/computer/prison_shuttle
name = "prison shuttle console"
icon = 'icons/obj/computer.dmi'
icon_keyboard = "security_key"
icon_screen = "syndishuttle"
light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_security)
circuit = /obj/item/weapon/circuitboard/prison_shuttle
var/temp = null
var/hacked = 0
var/allowedtocall = 0
var/prison_break = 0
attackby(I as obj, user as mob, params)
return src.attack_hand(user)
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20, target = src))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard(loc)
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
qdel(src)
else if(istype(I,/obj/item/weapon/card/emag) && (!hacked))
hacked = 1
user << "\blue You disable the lock."
else
return src.attack_hand(user)
attack_hand(var/mob/user as mob)
if(!src.allowed(user) && (!hacked))
user << "\red Access Denied."
return
if(prison_break)
user << "\red Unable to locate shuttle."
return
if(..())
return
user.set_machine(src)
post_signal("prison")
var/dat
if (src.temp)
dat = src.temp
else
dat += {"<BR><B>Prison Shuttle</B><HR>
\nLocation: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]<BR>
[prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*<BR>\n<BR>":prison_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Send to Dock</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
user << browse(dat, "window=computer;size=575x450")
onclose(user, "computer")
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.set_machine(src)
if (href_list["sendtodock"])
if (!prison_can_move())
usr << "\red The prison shuttle is unable to leave."
return
if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
post_signal("prison")
usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
src.updateUsrDialog()
prison_shuttle_moving_to_prison = 1
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
spawn(0)
prison_process()
else if (href_list["sendtostation"])
if (!prison_can_move())
usr << "\red The prison shuttle is unable to leave."
return
if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
post_signal("prison")
usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
src.updateUsrDialog()
prison_shuttle_moving_to_station = 1
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
spawn(0)
prison_process()
else if (href_list["mainmenu"])
src.temp = null
src.add_fingerprint(usr)
src.updateUsrDialog()
return
proc/prison_can_move()
if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0
else return 1
proc/prison_break()
switch(prison_break)
if (0)
if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
prison_shuttle_moving_to_prison = 1
prison_shuttle_at_station = prison_shuttle_at_station
if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
prison_shuttle_time = world.timeofday + PRISON_MOVETIME
spawn(0)
prison_process()
prison_break = 1
if(1)
prison_break = 0
proc/post_signal(var/command)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1311)
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = 1
status_signal.data["command"] = command
frequency.post_signal(src, status_signal)
return
proc/prison_process()
while(prison_shuttle_time - world.timeofday > 0)
var/ticksleft = prison_shuttle_time - world.timeofday
if(ticksleft > 1e5)
prison_shuttle_time = world.timeofday + 10 // midnight rollover
prison_shuttle_timeleft = (ticksleft / 10)
sleep(5)
prison_shuttle_moving_to_station = 0
prison_shuttle_moving_to_prison = 0
switch(prison_shuttle_at_station)
if(0)
prison_shuttle_at_station = 1
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if (!prison_can_move())
usr << "\red The prison shuttle is unable to leave."
return
var/area/start_location = locate(/area/shuttle/prison/prison)
var/area/end_location = locate(/area/shuttle/prison/station)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in end_location)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
qdel(T)
start_location.move_contents_to(end_location)
if(1)
prison_shuttle_at_station = 0
if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
if (!prison_can_move())
usr << "\red The prison shuttle is unable to leave."
return
var/area/start_location = locate(/area/shuttle/prison/station)
var/area/end_location = locate(/area/shuttle/prison/prison)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in end_location)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
qdel(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in end_location) // And for the other kind of bug...
pest.gib()
start_location.move_contents_to(end_location)
return

View File

@@ -1,101 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/laprecharger
name = "laptop recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
anchored = 1
use_power = 1
idle_power_usage = 40
active_power_usage = 2500
var/obj/item/charging = null
var/icon_state_charged = "recharger2"
var/icon_state_charging = "recharger1"
var/icon_state_idle = "recharger0"
/obj/machinery/laprecharger/attackby(obj/item/weapon/G as obj, mob/user as mob, params)
if(istype(user,/mob/living/silicon))
return
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton))
user << "\red The laptop recharger blinks red as you try to insert the item!"
return
if(istype(G,/obj/item/device/laptop))
if(charging)
return
// Checks to make sure he's not in space doing it, and that the area got proper power.
var/area/a = get_area(src)
if(!isarea(a))
user << "\red The [name] blinks red as you try to insert the item!"
return
if(a.power_equip == 0)
user << "\red The [name] blinks red as you try to insert the item!"
return
if(istype(G, /obj/item/device/laptop))
var/obj/item/device/laptop/L = G
if(!L.stored_computer.battery)
user << "There's no battery in it!"
return
user.drop_item()
G.loc = src
charging = G
use_power = 2
update_icon()
else if(istype(G, /obj/item/weapon/wrench))
if(charging)
user << "\red Remove the laptop first!"
return
anchored = !anchored
user << "You [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
/obj/machinery/laprecharger/attack_hand(mob/user as mob)
add_fingerprint(user)
if(charging)
charging.update_icon()
charging.loc = loc
charging = null
use_power = 1
update_icon()
/obj/machinery/laprecharger/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/laprecharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
if(charging)
if(istype(charging, /obj/item/device/laptop))
var/obj/item/device/laptop/L = charging
if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge)
L.stored_computer.battery.give(1000)
icon_state = icon_state_charging
use_power(2500)
else
icon_state = icon_state_charged
return
/obj/machinery/laprecharger/emp_act(severity)
if(stat & (NOPOWER|BROKEN) || !anchored)
..(severity)
return
/obj/machinery/laprecharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
icon_state = icon_state_charging
else
icon_state = icon_state_idle
// Atlantis: No need for that copy-pasta code, just use var to store icon_states instead.
obj/machinery/laprecharger/wallcharger
name = "wall laptop recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
icon_state_idle = "wrecharger0"
icon_state_charging = "wrecharger1"
icon_state_charged = "wrecharger2"

View File

@@ -1,135 +0,0 @@
//not a computer
obj/machinery/scanner
name = "Identity Analyser"
var/outputdir = 0
icon = 'icons/obj/stationobjs.dmi'
icon_state = "scanner_idle"
density = 1
anchored = 1
var/lastuser = null
obj/machinery/scanner/New()
if(!outputdir)
switch(dir)
if(1)
outputdir = 2
if(2)
outputdir = 1
if(4)
outputdir = 8
if(8)
outputdir = 4
if(!outputdir)
outputdir = 8
/obj/machinery/scanner/process()
if(stat & NOPOWER)
return
use_power(50)
/obj/machinery/scanner/power_change()
if(!powered())
spawn(rand(0, 15))
icon_state = "scanner_off"
stat |= NOPOWER
else
icon_state = "scanner_idle"
stat &= ~NOPOWER
obj/machinery/scanner/attack_hand(mob/living/carbon/human/user)
if(stat & NOPOWER)
return
if(!ishuman(user) || lastuser == user.real_name)
return
use_power(500)
flick("scanner_on",src)
lastuser = user.real_name
var/mname = user.real_name
var/dna = user.dna.unique_enzymes
var/bloodtype = user.dna.b_type
var/fingerprint = md5(user.dna.uni_identity)
var/list/marks = list()
var/age = user.age
var/gender = user.gender
var/text = {"
<font size=4><center>Report</center></font><br>
<b><u>Name</u></b>: [mname]
<b><u>Age</u></b>: [age]
<b><u>Sex</u></b>: [gender]
<b><u>DNA</u></b>: [dna]
<b><u>Blood Type</u></b>: [bloodtype]
<b><u>Fingerprint</u></b>: [fingerprint]
<b><u>Black Marks</u></b>:<br> "}
for(var/A in marks)
text += "\red[A]<br>"
user << "\blue You feel a sting as the scanner extracts some of your blood."
var/turf/T = get_step(src,outputdir)
var/obj/item/weapon/paper/print = new(T)
print.name = "[mname] Report"
print.info = text
print.stamped = 1
for(var/datum/data/record/test in data_core.general)
if (test.fields["name"] == mname)
return
var/datum/data/record/G = new()
var/datum/data/record/M = new()
var/datum/data/record/S = new()
var/datum/data/record/L = new()
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = G.fields["rank"]
G.fields["name"] = mname
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
M.fields["name"] = G.fields["name"]
M.fields["id"] = G.fields["id"]
S.fields["name"] = G.fields["name"]
S.fields["id"] = G.fields["id"]
if(gender == FEMALE)
G.fields["sex"] = "Female"
else
G.fields["sex"] = "Male"
G.fields["age"] = text("[]", age)
G.fields["fingerprint"] = text("[]", fingerprint)
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
M.fields["b_type"] = text("[]", bloodtype)
M.fields["b_dna"] = dna
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
M.fields["alg"] = "None"
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = "No notes."
S.fields["criminal"] = "None"
S.fields["mi_crim"] = "None"
S.fields["mi_crim_d"] = "No minor crime convictions."
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
//Begin locked reporting
L.fields["name"] = mname
L.fields["sex"] = gender
L.fields["age"] = age
L.fields["id"] = md5("[mname][user.mind.assigned_role]")
L.fields["rank"] = "Unknown"
L.fields["real_rank"] = L.fields["rank"]
L.fields["b_type"] = bloodtype
L.fields["b_dna"] = dna
L.fields["enzymes"] = user.dna.struc_enzymes
L.fields["identity"] = user.dna.uni_identity
L.fields["image"] = getFlatIcon(user,0)//What the person looks like. Naked, in this case.
//End locked reporting
data_core.general += G
data_core.medical += M
data_core.security += S
data_core.locked += L

View File

@@ -1,33 +0,0 @@
/obj/structure/walllocker
name = "Wall Locker"
icon = 'icons/obj/lockwall.dmi'
icon_state = "emerg"
var/list/spawnitems = list()
anchored = 1
var/amount = 3 // spawns each items X times.
/obj/structure/walllocker/attack_hand(mob/user as mob)
if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to
return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc)
if(!amount)
usr << "It's empty.."
return
if(amount)
for(var/path in spawnitems)
new path(src.loc)
amount--
return
/obj/structure/walllocker/emerglocker
name = "Emergency Locker"
spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar)
/obj/structure/walllocker/emerglocker/north
pixel_y = 32
dir = SOUTH
/obj/structure/walllocker/emerglocker/south
pixel_y = -32
dir = NORTH
/obj/structure/walllocker/emerglocker/west
pixel_x = -32
dir = WEST
/obj/structure/walllocker/emerglocker/east
pixel_x = 32
dir = EAST

View File

@@ -1,157 +0,0 @@
/****** Do not tick this file in without looking over this code first ******/
//NEEDS SPRITE! (When this gets ticked in search for 'TODO MECHA JETPACK SPRITE MISSING' through code to uncomment the place where it's missing.)
/obj/item/mecha_parts/mecha_equipment/jetpack
name = "Jetpack"
desc = "Using directed ion bursts and cunning solar wind reflection technique, this device enables controlled space flight."
icon_state = "mecha_equip"
equip_cooldown = 5
energy_drain = 50
var/wait = 0
var/datum/effect/system/ion_trail_follow/ion_trail
can_attach(obj/mecha/M as obj)
if(!(locate(src.type) in M.equipment) && !M.proc_res["dyndomove"])
return ..()
detach()
..()
chassis.proc_res["dyndomove"] = null
return
attach(obj/mecha/M as obj)
..()
if(!ion_trail)
ion_trail = new
ion_trail.set_up(chassis)
return
proc/toggle()
if(!chassis)
return
!equip_ready? turn_off() : turn_on()
return equip_ready
proc/turn_on()
set_ready_state(0)
chassis.proc_res["dyndomove"] = src
ion_trail.start()
occupant_message("Activated")
log_message("Activated")
proc/turn_off()
set_ready_state(1)
chassis.proc_res["dyndomove"] = null
ion_trail.stop()
occupant_message("Deactivated")
log_message("Deactivated")
proc/dyndomove(direction)
if(!action_checks())
return chassis.dyndomove(direction)
var/move_result = 0
if(chassis.hasInternalDamage(MECHA_INT_CONTROL_LOST))
move_result = step_rand(chassis)
else if(chassis.dir!=direction)
chassis.dir = direction
move_result = 1
else
move_result = step(chassis,direction)
if(chassis.occupant)
for(var/obj/effect/speech_bubble/B in range(1, chassis))
if(B.parent == chassis.occupant)
B.loc = chassis.loc
if(move_result)
wait = 1
chassis.use_power(energy_drain)
if(!chassis.pr_inertial_movement.active())
chassis.pr_inertial_movement.start(list(chassis,direction))
else
chassis.pr_inertial_movement.set_process_args(list(chassis,direction))
do_after_cooldown()
return 1
return 0
action_checks()
if(equip_ready || wait)
return 0
if(energy_drain && !chassis.has_charge(energy_drain))
return 0
if(crit_fail)
return 0
if(chassis.check_for_support())
return 0
return 1
get_equip_info()
if(!chassis) return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;[src.name] \[<a href=\"?src=\ref[src];toggle=1\">Toggle</a>\]"
Topic(href,href_list)
..()
if(href_list["toggle"])
toggle()
do_after_cooldown()
sleep(equip_cooldown)
wait = 0
return 1
/obj/item/mecha_parts/mecha_equipment/defence_shocker
name = "Exosuit Defence Shocker"
desc = ""
icon_state = "mecha_teleport"
equip_cooldown = 10
energy_drain = 100
range = RANGED
var/shock_damage = 15
var/active
can_attach(obj/mecha/M as obj)
if(..())
if(!istype(M, /obj/mecha/combat/honker))
if(!M.proc_res["dynattackby"] && !M.proc_res["dynattackhand"] && !M.proc_res["dynattackalien"])
return 1
return 0
attach(obj/mecha/M as obj)
..()
chassis.proc_res["dynattackby"] = src
return
proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!action_checks(user) || !active)
return
user.electrocute_act(shock_damage, src)
return chassis.dynattackby(W,user, params)
/*
/obj/item/mecha_parts/mecha_equipment/book_stocker
action(var/mob/target)
if(!istype(target))
return
if(target.search_contents_for(/obj/item/book/WGW))
target.gib()
target.client.gib()
target.client.mom.monkeyize()
target.client.mom.gib()
for(var/mob/M in range(target, 1000))
M.gib()
explosion(target.loc,100000,100000,100000)
usr.gib()
world.Reboot()
return 1
*/

View File

@@ -1,94 +0,0 @@
/obj/machinery/mech_sensor
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_sensor_off"
name = "mechatronic sensor"
desc = "Regulates mech movement."
anchored = 1
density = 1
throwpass = 1
use_power = 1
layer = 3.3
power_channel = EQUIP
var/on = 0
var/id_tag = null
var/frequency = 1379
var/datum/radio_frequency/radio_connection
/obj/machinery/mech_sensor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!src.enabled()) return 1
if(air_group || (height==0)) return 1
if ((get_dir(loc, target) & dir) && src.is_blocked(mover))
src.give_feedback(mover)
return 0
return 1
/obj/machinery/mech_sensor/proc/is_blocked(O as obj)
if(istype(O, /obj/mecha/medical/odysseus))
var/obj/mecha/medical/odysseus/M = O
for(var/obj/item/mecha_parts/mecha_equipment/ME in M.equipment)
if(istype(ME, /obj/item/mecha_parts/mecha_equipment/tool/sleeper))
var/obj/item/mecha_parts/mecha_equipment/tool/sleeper/S = ME
if(S.occupant != null)
return 0
return istype(O, /obj/mecha) || istype(O, /obj/vehicle)
/obj/machinery/mech_sensor/proc/give_feedback(O as obj)
var/block_message = "<span class='warning'>Movement control overridden. Area denial active.</span>"
var/feedback_timer = 0
if(feedback_timer)
return
if(istype(O, /obj/mecha))
var/obj/mecha/R = O
if(R && R.occupant)
R.occupant << block_message
else if(istype(O, /obj/vehicle/train/cargo/engine))
var/obj/vehicle/train/cargo/engine/E = O
if(E && E.load && E.is_train_head())
E.load << block_message
feedback_timer = 1
spawn(5) //Without this timer the feedback becomes horribly spamy
feedback_timer = 0
/obj/machinery/mech_sensor/proc/enabled()
return on && !(stat & NOPOWER)
/obj/machinery/mech_sensor/power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
/obj/machinery/mech_sensor/update_icon(var/safety = 0)
if (enabled())
icon_state = "airlock_sensor_on"
else
icon_state = "airlock_sensor_off"
/obj/machinery/mech_sensor/initialize()
set_frequency(frequency)
/obj/machinery/mech_sensor/proc/set_frequency(new_frequency)
if(radio_connection)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency)
/obj/machinery/mech_sensor/receive_signal(datum/signal/signal)
if(stat & NOPOWER)
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag))
return
if(signal.data["command"] == "enable")
on = 1
else if (signal.data["command"] == "disable")
on = 0
update_icon()

View File

@@ -1,139 +0,0 @@
/*
CONTAINS:
THAT STUPID GAME KIT
*/
/obj/item/weapon/game_kit/New()
src.board_stat = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
src.selected = "CR"
/obj/item/weapon/game_kit/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/game_kit/MouseDrop(mob/user as mob)
if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr)))
if (usr.hand)
if (!usr.l_hand)
spawn (0)
src.attack_hand(usr, 1, 1)
else
if (!usr.r_hand)
spawn (0)
src.attack_hand(usr, 0, 1)
/obj/item/weapon/game_kit/proc/update()
var/dat = text("<CENTER><B>Game Board</B></CENTER><BR><a href='?src=\ref[];mode=hia'>[]</a> <a href='?src=\ref[];mode=remove'>remove</a><HR><table width= 256 border= 0 height= 256 cellspacing= 0 cellpadding= 0 >", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src)
for (var/y = 1 to 8)
dat += "<tr>"
for (var/x = 1 to 8)
var/color = (y + x) % 2 ? "#ffffff" : "#999999"
var/piece = copytext(src.board_stat, ((y - 1) * 8 + x) * 2 - 1, ((y - 1) * 8 + x) * 2 + 1)
dat += "<td>"
dat += "<td style='background-color:[color]' width=32 height=32>"
if (piece != "BB")
dat += "<a href='?src=\ref[src];s_board=[x] [y]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0>"
else
dat += "<a href='?src=\ref[src];s_board=[x] [y]'><img src='[src.base_url]/board_none.png' width=32 height=32 border=0>"
dat += "</td>"
dat += "</tr>"
dat += "</table><HR><B>Chips:</B><BR>"
for (var/piece in list("CB", "CR"))
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
dat += "<HR><B>Chess pieces:</B><BR>"
for (var/piece in list("WP", "WK", "WQ", "WI", "WN", "WR"))
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
dat += "<br>"
for (var/piece in list("BP", "BK", "BQ", "BI", "BN", "BR"))
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
src.data = dat
/obj/item/weapon/game_kit/attack_ai(mob/user as mob, unused, flag)
return src.attack_hand(user, unused, flag)
/obj/item/weapon/game_kit/attack_hand(mob/user as mob, unused, flag)
if (flag)
return ..()
else
user.machine = src
if (!( src.data ))
update()
user << browse(src.data, "window=game_kit")
onclose(user, "game_kit")
return
return
/obj/item/weapon/game_kit/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))
if (href_list["s_piece"])
src.selected = href_list["s_piece"]
else if (href_list["mode"])
if (href_list["mode"] == "remove")
src.selected = "remove"
else
src.selected = null
else if (href_list["s_board"])
if (!( src.selected ))
src.selected = href_list["s_board"]
else
var/tx = text2num(copytext(href_list["s_board"], 1, 2))
var/ty = text2num(copytext(href_list["s_board"], 3, 4))
if ((copytext(src.selected, 2, 3) == " " && length(src.selected) == 3))
var/sx = text2num(copytext(src.selected, 1, 2))
var/sy = text2num(copytext(src.selected, 3, 4))
var/place = ((sy - 1) * 8 + sx) * 2 - 1
src.selected = copytext(src.board_stat, place, place + 2)
if (place == 1)
src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129))
else
if (place == 127)
src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127))
else
if (place)
src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129))
place = ((ty - 1) * 8 + tx) * 2 - 1
if (place == 1)
src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129))
else
if (place == 127)
src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected)
else
if (place)
src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129))
src.selected = null
else
if (src.selected == "remove")
var/place = ((ty - 1) * 8 + tx) * 2 - 1
if (place == 1)
src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129))
else
if (place == 127)
src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127))
else
if (place)
src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129))
else
if (length(src.selected) == 2)
var/place = ((ty - 1) * 8 + tx) * 2 - 1
if (place == 1)
src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129))
else
if (place == 127)
src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected)
else
if (place)
src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129))
src.add_fingerprint(usr)
update()
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)

View File

@@ -1,71 +0,0 @@
/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
var/limbloc = null
if(!istype(M))
return ..()
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
return ..()
if(!istype(M, /mob/living/carbon/human))
return ..()
if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm)))
limbloc = "l_hand"
else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm)))
limbloc = "r_hand"
else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg)))
limbloc = "r_foot"
else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg)))
limbloc = "l_foot"
else
user << "\red That doesn't fit there!"
return ..()
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(S.status & ORGAN_DESTROYED)
if(!(S.status & ORGAN_ATTACHABLE))
user << "\red The wound is not ready for a replacement!"
return 0
if(M != user)
M.visible_message( \
"\red [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.", \
"\red [user] begins to attach \the [src] where your [S.display_name] used to be.")
else
M.visible_message( \
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
"\red You begin to attach \the [src] where your [S.display_name] used to be.")
if(do_mob(user, H, 100))
if(M != user)
M.visible_message( \
"\red [user] finishes attaching [H]'s new [S.display_name].", \
"\red [user] finishes attaching your new [S.display_name].")
else
M.visible_message( \
"\red [user] finishes attaching \his new [S.display_name].", \
"\red You finish attaching your new [S.display_name].")
if(H == user && prob(25))
user << "\red You mess up!"
S.take_damage(15)
S.status &= ~ORGAN_BROKEN
S.status &= ~ORGAN_SPLINTED
S.status &= ~ORGAN_ATTACHABLE
S.status &= ~ORGAN_DESTROYED
S.status |= ORGAN_ROBOT
var/datum/organ/external/T = H.organs["[limbloc]"]
T.status &= ~ORGAN_BROKEN
T.status &= ~ORGAN_SPLINTED
T.status &= ~ORGAN_ATTACHABLE
T.status &= ~ORGAN_DESTROYED
T.status |= ORGAN_ROBOT
H.update_body()
M.updatehealth()
M.UpdateDamageIcon()
del(src)
return 1
return 0

View File

@@ -1,84 +0,0 @@
/obj/item/weapon/syndie
icon = 'icons/obj/syndieweapons.dmi'
/*C-4 explosive charge and etc, replaces the old syndie transfer valve bomb.*/
/*The explosive charge itself. Flashes for five seconds before exploding.*/
/obj/item/weapon/syndie/c4explosive
icon_state = "c-4small_0"
item_state = "c-4small"
name = "normal-sized package"
desc = "A small wrapped package."
w_class = 3
var/power = 1 /*Size of the explosion.*/
var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/
/obj/item/weapon/syndie/c4explosive/heavy
icon_state = "c-4large_0"
item_state = "c-4large"
desc = "A mysterious package, it's quite heavy."
power = 2
size = "large"
/obj/item/weapon/syndie/c4explosive/New()
var/K = rand(1,2000)
K = md5(num2text(K)+name)
K = copytext(K,1,7)
src.desc += "\n You see [K] engraved on \the [src]."
var/obj/item/weapon/syndie/c4detonator/detonator = new(src.loc)
detonator.desc += "\n You see [K] engraved on the lighter."
detonator.bomb = src
/obj/item/weapon/syndie/c4explosive/proc/detonate()
icon_state = "c-4[size]_1"
spawn(50)
explosion(get_turf(src), power, power*2, power*3, power*4, power*4)
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
var/turf/simulated/wall/T = get_step(src,dirn)
if(locate(/obj/machinery/door/airlock) in T)
var/obj/machinery/door/airlock/D = locate() in T
if(D.density)
D.open()
if(istype(T,/turf/simulated/wall))
T.dismantle_wall(1)
del(src)
/*Detonator, disguised as a lighter*/
/*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/
/obj/item/weapon/syndie/c4detonator
icon_state = "c-4detonator_0"
item_state = "c-4detonator"
name = "\improper Zippo lighter" /*Sneaky, thanks Dreyfus.*/
desc = "The zippo."
w_class = 1
var/obj/item/weapon/syndie/c4explosive/bomb
var/pr_open = 0 /*Is the "What do you want to do?" prompt open?*/
/obj/item/weapon/syndie/c4detonator/attack_self(mob/user as mob)
switch(src.icon_state)
if("c-4detonator_0")
src.icon_state = "c-4detonator_1"
user << "You flick open the lighter."
if("c-4detonator_1")
if(!pr_open)
pr_open = 1
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
if("Press the button.")
user << "\red You press the button."
flick("c-4detonator_click", src)
if(src.bomb)
src.bomb.detonate()
log_admin("[user.real_name]([user.ckey]) has triggered [src.bomb] with [src].")
message_admins("\red [user.real_name]([user.ckey]) has triggered [src.bomb] with [src].")
if("Close the lighter.")
src.icon_state = "c-4detonator_0"
user << "You close the lighter."
pr_open = 0

View File

@@ -1,26 +0,0 @@
// Module used for fast interprocess communication between BYOND and other processes
/datum/socket_talk
var
enabled = 0
New()
..()
src.enabled = config.socket_talk
if(enabled)
call("DLLSocket.so","establish_connection")("127.0.0.1","8019")
proc
send_raw(message)
if(enabled)
return call("DLLSocket.so","send_message")(message)
receive_raw()
if(enabled)
return call("DLLSocket.so","recv_message")()
send_log(var/log, var/message)
return send_raw("type=log&log=[log]&message=[message]")
send_keepalive()
return send_raw("type=keepalive")
var/global/datum/socket_talk/socket_talk

View File

@@ -1,196 +0,0 @@
//trees
/obj/structure/flora/tree
name = "tree"
anchored = 1
density = 1
pixel_x = -16
layer = 9
/obj/structure/flora/tree/pine
name = "pine tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_1"
/obj/structure/flora/tree/pine/New()
icon_state = "pine_[rand(1, 3)]"
..()
/obj/structure/flora/tree/pine/xmas
name = "xmas tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_c"
/obj/structure/flora/tree/pine/xmas/New()
..()
icon_state = "pine_c"
/obj/structure/flora/tree/dead
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_1"
/obj/structure/flora/tree/dead/New()
icon_state = "tree_[rand(1, 6)]"
..()
//grass
/obj/structure/flora/grass
name = "grass"
icon = 'icons/obj/flora/snowflora.dmi'
anchored = 1
/obj/structure/flora/grass/brown
icon_state = "snowgrass1bb"
/obj/structure/flora/grass/brown/New()
icon_state = "snowgrass[rand(1, 3)]bb"
..()
/obj/structure/flora/grass/green
icon_state = "snowgrass1gb"
/obj/structure/flora/grass/green/New()
icon_state = "snowgrass[rand(1, 3)]gb"
..()
/obj/structure/flora/grass/both
icon_state = "snowgrassall1"
/obj/structure/flora/grass/both/New()
icon_state = "snowgrassall[rand(1, 3)]"
..()
//bushes
/obj/structure/flora/bush
name = "bush"
icon = 'icons/obj/flora/snowflora.dmi'
icon_state = "snowbush1"
anchored = 1
/obj/structure/flora/bush/New()
icon_state = "snowbush[rand(1, 6)]"
..()
/obj/structure/flora/pottedplant
name = "potted plant"
icon = 'icons/obj/plants.dmi'
icon_state = "plant-26"
//newbushes
/obj/structure/flora/ausbushes
name = "bush"
icon = 'icons/obj/flora/ausflora.dmi'
icon_state = "firstbush_1"
anchored = 1
/obj/structure/flora/ausbushes/New()
icon_state = "firstbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/reedbush
icon_state = "reedbush_1"
/obj/structure/flora/ausbushes/reedbush/New()
icon_state = "reedbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/leafybush
icon_state = "leafybush_1"
/obj/structure/flora/ausbushes/leafybush/New()
icon_state = "leafybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/palebush
icon_state = "palebush_1"
/obj/structure/flora/ausbushes/palebush/New()
icon_state = "palebush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/stalkybush
icon_state = "stalkybush_1"
/obj/structure/flora/ausbushes/stalkybush/New()
icon_state = "stalkybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/grassybush
icon_state = "grassybush_1"
/obj/structure/flora/ausbushes/grassybush/New()
icon_state = "grassybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/fernybush
icon_state = "fernybush_1"
/obj/structure/flora/ausbushes/fernybush/New()
icon_state = "fernybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sunnybush
icon_state = "sunnybush_1"
/obj/structure/flora/ausbushes/sunnybush/New()
icon_state = "sunnybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/genericbush
icon_state = "genericbush_1"
/obj/structure/flora/ausbushes/genericbush/New()
icon_state = "genericbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/pointybush
icon_state = "pointybush_1"
/obj/structure/flora/ausbushes/pointybush/New()
icon_state = "pointybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/lavendergrass
icon_state = "lavendergrass_1"
/obj/structure/flora/ausbushes/lavendergrass/New()
icon_state = "lavendergrass_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/ywflowers
icon_state = "ywflowers_1"
/obj/structure/flora/ausbushes/ywflowers/New()
icon_state = "ywflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/brflowers
icon_state = "brflowers_1"
/obj/structure/flora/ausbushes/brflowers/New()
icon_state = "brflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/ppflowers
icon_state = "ppflowers_1"
/obj/structure/flora/ausbushes/ppflowers/New()
icon_state = "ppflowers_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/sparsegrass
icon_state = "sparsegrass_1"
/obj/structure/flora/ausbushes/sparsegrass/New()
icon_state = "sparsegrass_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/fullgrass
icon_state = "fullgrass_1"
/obj/structure/flora/ausbushes/fullgrass/New()
icon_state = "fullgrass_[rand(1, 3)]"
..()

View File

@@ -1,189 +0,0 @@
/obj/vehicle
name = "Vehicle"
icon = 'icons/vehicles/vehicles.dmi'
density = 1
anchored = 1
unacidable = 1 //To avoid the pilot-deleting shit that came with mechas
layer = MOB_LAYER
//var/can_move = 1
var/mob/living/carbon/occupant = null
//var/step_in = 10 //make a step in step_in/10 sec.
//var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
//var/step_energy_drain = 10
var/health = 300 //health is health
//var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
//the values in this list show how much damage will pass through, not how much will be absorbed.
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
var/obj/item/weapon/stock_parts/cell/cell //Our power source
var/state = 0
var/list/log = new
var/last_message = 0
var/add_req_access = 1
var/maint_access = 1
//var/dna //dna-locking the mech
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
var/datum/effect/system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
//inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri
//var/use_internal_tank = 0
//var/internal_tank_valve = ONE_ATMOSPHERE
//var/obj/machinery/portable_atmospherics/canister/internal_tank
//var/datum/gas_mixture/cabin_air
//var/obj/machinery/atmospherics/portables_connector/connected_port = null
var/obj/item/device/radio/radio = null
var/max_temperature = 2500
//var/internal_damage_threshold = 50 //health percentage below which internal damage is possible
var/internal_damage = 0 //contains bitflags
var/list/operation_req_access = list()//required access level for mecha operation
var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment
//var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri
var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss
//var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri
var/datum/global_iterator/pr_internal_damage //processes internal damage
var/wreckage
var/list/equipment = new
var/obj/selected
//var/max_equip = 3
var/datum/events/events
/obj/vehicle/New()
..()
events = new
icon_state += "-unmanned"
add_radio()
//add_cabin() //No cabin for non-airtights
spark_system.set_up(2, 0, src)
spark_system.attach(src)
add_cell()
add_iterators()
removeVerb(/obj/mecha/verb/disconnect_from_port)
log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.")
loc.Entered(src)
return
//################ Helpers ###########################################################
/obj/vehicle/proc/removeVerb(verb_path)
verbs -= verb_path
/obj/vehicle/proc/addVerb(verb_path)
verbs += verb_path
/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
return internal_tank*/
/obj/vehicle/proc/add_cell(var/obj/item/weapon/stock_parts/cell/C=null)
if(C)
C.forceMove(src)
cell = C
return
cell = new(src)
cell.charge = 15000
cell.maxcharge = 15000
/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air*/
/obj/vehicle/proc/add_radio()
radio = new(src)
radio.name = "[src] radio"
radio.icon = icon
radio.icon_state = icon_state
radio.subspace_transmission = 1
/obj/vehicle/proc/add_iterators()
pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0)
//pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0)
//pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri
//pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri
/obj/vehicle/proc/check_for_support()
if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src)))
return 1
else
return 0
//################ Logs and messages ############################################
/obj/vehicle/proc/log_message(message as text,red=null)
log.len++
log[log.len] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
return log.len
//################ Global Iterator Datums ######################################
/datum/global_iterator/vehicle_intertial_movement //inertial movement in space
delay = 7
process(var/obj/vehicle/V as obj, direction)
if(direction)
if(!step(V, direction)||V.check_for_support())
src.stop()
else
src.stop()
return
/datum/global_iterator/mecha_internal_damage // processing internal damage
process(var/obj/mecha/mecha)
if(!mecha.hasInternalDamage())
return stop()
if(mecha.hasInternalDamage(MECHA_INT_FIRE))
if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5))
mecha.clearInternalDamage(MECHA_INT_FIRE)
if(mecha.internal_tank)
if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)))
mecha.setInternalDamage(MECHA_INT_TANK_BREACH)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
if(mecha.cabin_air && mecha.cabin_air.return_volume()>0)
mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15))
if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2)
mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire")
if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum
mecha.pr_int_temp_processor.stop()
if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank
if(mecha.internal_tank)
var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air()
var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10)
if(mecha.loc && hascall(mecha.loc,"assume_air"))
mecha.loc.assume_air(leaked_gas)
else
del(leaked_gas)
/*if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) // LAG INDUCING - it'll keep on creating sparks
if(mecha.get_charge())
mecha.spark_system.start()
mecha.cell.charge -= min(20,mecha.cell.charge)
mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) */
return

View File

@@ -1,22 +0,0 @@
/mob/living/silicon/ai/proc/ai_statuschange()
set category = "AI Commands"
set name = "AI status"
if(usr.stat == 2)
usr <<"You cannot change your emotional status because you are dead!"
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer", "Beer mug", "Dwarf", "Fishtank", "Plump Helmet")
if(src.ckey == "serithi")
ai_emotions.Add("Tribunal","Tribunal Malfunctioning")
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
for (var/obj/machinery/ai_status_display/AISD in world) //change status
spawn( 0 )
AISD.emotion = emote
for (var/obj/machinery/status_display/SD in world) //if Friend Computer, change ALL displays
if(emote=="Friend Computer")
spawn(0)
SD.friendc = 1
else
spawn(0)
SD.friendc = 0
return

View File

@@ -1,180 +0,0 @@
// Reports are a way to notify admins of wrongdoings that happened
// while no admin was present. They work a bit similar to news, but
// they can only be read by admins and moderators.
// a single admin report
datum/admin_report/var
ID // the ID of the report
body // the content of the report
author // key of the author
date // date on which this was created
done // whether this was handled
offender_key // store the key of the offender
offender_cid // store the cid of the offender
datum/report_topic_handler
Topic(href,href_list)
..()
var/client/C = locate(href_list["client"])
if(href_list["action"] == "show_reports")
C.display_admin_reports()
else if(href_list["action"] == "remove")
C.mark_report_done(text2num(href_list["ID"]))
else if(href_list["action"] == "edit")
C.edit_report(text2num(href_list["ID"]))
var/datum/report_topic_handler/report_topic_handler
world/New()
..()
report_topic_handler = new
// add a new news datums
proc/make_report(body, author, okey, cid)
var/savefile/Reports = new("data/reports.sav")
var/list/reports
var/lastID
Reports["reports"] >> reports
Reports["lastID"] >> lastID
if(!reports) reports = list()
if(!lastID) lastID = 0
var/datum/admin_report/created = new()
created.ID = ++lastID
created.body = body
created.author = author
created.date = world.realtime
created.done = 0
created.offender_key = okey
created.offender_cid = cid
reports.Insert(1, created)
Reports["reports"] << reports
Reports["lastID"] << lastID
// load the reports from disk
proc/load_reports()
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
if(!reports) reports = list()
return reports
// check if there are any unhandled reports
client/proc/unhandled_reports()
if(!src.holder) return 0
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports)
if(N.done)
continue
else return 1
return 0
// checks if the player has an unhandled report against him
client/proc/is_reported()
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports) if(!N.done)
if(N.offender_key == src.key)
return 1
return 0
// display only the reports that haven't been handled
client/proc/display_admin_reports()
set category = "Admin"
set name = "Display Admin Reports"
if(!src.holder) return
var/list/reports = load_reports()
var/output = ""
if(unhandled_reports())
// load the list of unhandled reports
for(var/datum/admin_report/N in reports)
if(N.done)
continue
output += "<b>Reported player:</b> [N.offender_key](CID: [N.offender_cid])<br>"
output += "<b>Offense:</b>[N.body]<br>"
output += "<small>Occured at [time2text(N.date,"MM/DD hh:mm:ss")]</small><br>"
output += "<small>authored by <i>[N.author]</i></small><br>"
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=remove;ID=[N.ID]'>Flag as Handled</a>"
if(src.key == N.author)
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=edit;ID=[N.ID]'>Edit</a>"
output += "<br>"
output += "<br>"
else
output += "Whoops, no reports!"
usr << browse(output, "window=news;size=600x400")
client/proc/Report(mob/M as mob in view())
set category = "Admin"
if(!src.holder)
return
var/CID = "Unknown"
if(M.client)
CID = M.client.computer_id
var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text
if(!body) return
make_report(body, key, M.key, CID)
spawn(1)
display_admin_reports()
client/proc/mark_report_done(ID as num)
if(!src.holder || src.holder.level < 0)
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
found.done = 1
Reports["reports"] << reports
client/proc/edit_report(ID as num)
if(!src.holder || src.holder.level < 0)
src << "<b>You tried to modify the news, but you're not an admin!"
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
if(!body) return
found.body = body
Reports["reports"] << reports

View File

@@ -1,237 +0,0 @@
/*
DMP to swapmap converter
version 1.0
by Lummox JR
*/
mob/verb/Convert(filename as file)
dmp2swapmap(filename)
proc/d2sm_prepmap(filename)
var/txt = file2text(filename)
if(!txt) return
var/i,j
i=findText(txt,ascii2text(13)) // eliminate carriage returns
while(i)
txt=copytext(txt,1,i)+copytext(txt,i+1)
i=findText(txt,ascii2text(13),i)
i=findText(txt,"\\\n")
while(i)
for(j=i+2,j<=length(txt),++j) if(text2ascii(txt,j)>32) break
txt=copytext(txt,1,i)+copytext(txt,j)
i=findText(txt,"\\\n",i)
return txt
proc/dmp2swapmap(filename)
//var/txt = file2text(filename)
//if(!txt) return
var/txt = d2sm_prepmap(filename)
var/mapname="[filename]"
var/i,j,k
i=findtext(mapname,".dmp")
while(i && i+4<length(mapname)) i=findtext(mapname,".dmp",i+1)
mapname=copytext(mapname,1,i)
/* i=findText(txt,ascii2text(13))
while(i)
txt=copytext(txt,1,i)+copytext(txt,i+1)
i=findText(txt,ascii2text(13),i)
i=findText(txt,"\\\n")
while(i)
for(j=i+2,j<=length(txt),++j) if(text2ascii(txt,j)>32) break
txt=copytext(txt,1,i)+copytext(txt,j)
i=findText(txt,"\\\n",i) */
var/list/codes=new
var/codelen=1
var/list/areas
var/mode=34
var/z=0
var/X=0,Y=0,Z=0
while(txt)
if(text2ascii(txt)==34)
if(mode!=34)
world << "Corrupt map file [filename]: Unexpected code found after z-level [z]"
return
// standard line:
// "a" = (/obj, /obj, /turf, /area)
i=findtext(txt,"\"",2)
var/code=copytext(txt,2,i)
codelen=length(code)
i=findtext(txt,"(",i)
if(!i)
world << "Corrupt map file [filename]: No type list follows \"[code]\""
return
k=findtext(txt,"\n",++i)
j=(k || length(txt+1))
while(--j>=i && text2ascii(txt,j)!=41)
if(j<i)
world << "Corrupt map file [filename]: Type list following \"[code]\" is incomplete"
return
var/list/L = d2sm_ParseCommaList(copytext(txt,i,j))
if(istext(L))
world << "Corrupt map file [filename]: [L]"
return
if(L.len<2)
world << "Corrupt map file [filename]: Type list following \"[code]\" has only 1 item"
return
txt=k?copytext(txt,k+1):null
if(L[L.len] == "[world.area]") L[L.len]=0
else
if(!areas) areas=list()
i=areas.Find(L[L.len])
if(i) L[L.len]=i
else
areas+=L[L.len]
L[L.len]=areas.len
var/codetrans=d2sm_ConvertType(L[L.len-1],"\t\t\t\t")
if(L[L.len]) codetrans+="\t\t\t\tAREA = [L[L.len]]\n"
if(L.len>2) codetrans+=d2sm_Contents(L,L.len-2,"\t\t\t\t")
codes[code]=copytext(codetrans,1,length(codetrans))
else if(text2ascii(txt)==40)
mode=40
// standard line (top-down, left-right symbol order):
// (1,1,1) = {"
// abcde
// bcdef
// "}
i=d2sm_MatchBrace(txt,1,40)
if(!i)
world << "Corrupt map file [filename]: No matching ) for coordinates: [copytext(txt,1,findtext(txt,"\n"))]"
return
var/list/coords=d2sm_ParseCommaList(copytext(txt,2,i))
if(istext(coords) || coords.len!=3)
world << "Corrupt map file [filename]: [istext(coords)?(coords):"[copytext(txt,1,i+1)] is not a valid (x,y,z) coordinate"]"
return
j=findtext(txt,"{",i+1)
if(!j)
world << "Corrupt map file [filename]: No braces {} following [copytext(txt,1,i+1)]"
return
k=d2sm_MatchBrace(txt,j,123)
if(!k)
world << "Corrupt map file [filename]: No closing brace } following [copytext(txt,1,i+1)]"
return
var/mtxt=copytext(txt,j+1,k)
if(findText(mtxt,"\"\n")!=1 || !findText(mtxt,"\n\"",length(mtxt)-1))
world << findText(mtxt,"\"\n")
world << findText(mtxt,"\n\"",length(mtxt)-1)
world << "Corrupt map file [filename]: No quotes in braces following [copytext(txt,1,i+1)]"
return
mtxt=copytext(mtxt,2,length(mtxt))
var/_x=0,_y=0
for(i=1,,++_y)
j=findText(mtxt,"\n",i+1)
if(!j) break
_x=max(_x,(j-i-1)/codelen)
i=j
X=max(X,_x)
Y=max(Y,_y)
z=text2num(coords[3])
Z=max(Z,z)
txt=copytext(txt,k+1)
else
i=findtext(txt,"\n")
txt=i?copytext(txt,i+1):null
world << "Map size: [X],[Y],[Z]"
//for(var/code in codes)
// world << "Code \"[code]\":\n[codes[code]]"
fdel("map_[mapname].txt")
var/F = file("map_[mapname].txt")
F << ". = object(\".0\")\n.0\n\ttype = /swapmap\n\tid = \"[mapname]\"\n\tz = [Z]\n\ty = [Y]\n\tx = [X]"
if(areas)
txt=""
for(i=0,i<areas.len,++i)
txt+="[i?", ":""]object(\".[i]\")"
F << "\tareas = list([txt])"
for(i=0,i<areas.len,++i)
F << "\t\t.[i]"
txt=d2sm_ConvertType(areas[i+1],"\t\t\t")
F << copytext(txt,1,length(txt))
// 2nd pass
txt=d2sm_prepmap(filename)
while(txt)
// skip all non-data sections
if(text2ascii(txt)!=40)
i=findText(txt,"\n")
if(i) txt=copytext(txt,i+1)
else txt=null
continue
i=d2sm_MatchBrace(txt,1,40)
var/list/coords=d2sm_ParseCommaList(copytext(txt,2,i))
j=findtext(txt,"{",i+1)
k=d2sm_MatchBrace(txt,j,123)
var/mtxt=copytext(txt,j+2,k-1)
var/_x=0,_y=0
for(i=1,,++_y)
j=findText(mtxt,"\n",i+1)
if(!j) break
_x=max(_x,(j-i-1)/codelen)
i=j
// print out this z-level now
F << "\t[coords[3]]"
i=1
for(var/y=_y,y>0,--y) // map is top-down
++i
F << "\t\t[y]"
for(var/x in 1 to _x)
F << "\t\t\t[x]"
j=i+codelen
F << codes[copytext(mtxt,i,j)]
i=j
txt=copytext(txt,k+1)
/* for(z in 1 to Z)
F << "\t[z]"
for(var/y in 1 to Y)
F << "\t\t[y]"
for(var/x in 1 to X)
F << "\t\t\t[x]"
F << codes[pick(codes)] */
proc/d2sm_ParseCommaList(txt)
var/list/L=new
var/i,ch
for(i=1,i<=length(txt),++i)
if(text2ascii(txt,i)>32) break
for(,i<=length(txt),++i)
ch=text2ascii(txt,i)
if(ch==44)
L+=copytext(txt,1,i)
for(++i,i<=length(txt),++i) if(text2ascii(txt,i)>32) break
txt=copytext(txt,i)
i=0;continue
if(ch==40 || ch==91 || ch==123)
i=d2sm_MatchBrace(txt,i,ch)
if(!i) return "No matching brace found for [ascii2text(ch)]"
if(i>1) L+=copytext(txt,1,i)
return L
proc/d2sm_MatchBrace(txt, i, which)
if(which==40) ++which
else which+=2
var/j,ch
for(j=i+1,j<=length(txt),++j)
ch=text2ascii(txt,j)
if(ch==which) return j
if(ch==40 || ch==91 || ch==123)
j=d2sm_MatchBrace(txt,j,ch)
if(!j) return 0
proc/d2sm_ConvertType(tt,tabs="")
var/i=findText(tt,"{")
if(!i) return "[tabs]type = [tt]\n"
.="[tabs]type = [copytext(tt,1,i)]\n"
var/list/L=d2sm_ParseCommaList(copytext(tt,i+1,d2sm_MatchBrace(tt,i,123)))
if(istext(L)) return
for(var/pair in L)
.="[.][tabs][pair]\n"
proc/d2sm_Contents(list/conts,n,tabs="")
.="[tabs]contents = list("
var/i
for(i=0,i<n,++i)
.+="[i?", ":""]object(\".[i]\")"
.+=")\n"
tabs+="\t"
for(i=0,i<n,++i)
.+="[tabs].[i]\n"
.+=d2sm_ConvertType(conts[i+1],tabs+"\t")

View File

@@ -1,29 +0,0 @@
//Captain's Spacesuit
/obj/item/clothing/head/helmet/space/capspace
name = "space helmet"
icon_state = "capspace"
item_state = "capspacehelmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads."
flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE|HEADCOVERSMOUTH
flags_inv = HIDEFACE
permeability_coefficient = 0.01
armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50)
//Captain's space suit This is not the proper path but I don't currently know enough about how this all works to mess with it.
/obj/item/clothing/suit/armor/captain
name = "Captain's armor"
desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!"
icon_state = "caparmor"
item_state = "capspacesuit"
w_class = 4
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = STOPSPRESSUREDMAGE | ONESIZEFITSALL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
slowdown = 1.5
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT||HIDETAIL
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.7

View File

@@ -1,290 +0,0 @@
//This dm file includes some food processing machines:
// - I. Mill
// - II. Fermenter
// - III. Still
// - IV. Squeezer
// - V. Centrifuge
// I. The mill is intended to be loaded with produce and returns ground up items. For example: Wheat should become flour and grapes should become raisins.
/obj/machinery/mill
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/milled_item
var/busy = 0
var/progress = 0
var/error = 0
name = "\improper Mill"
desc = "It is a machine that grinds produce."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 1000
/obj/machinery/mill/process()
if(error)
return
if(!busy)
use_power = 1
if(input.len)
milled_item = input[1]
input -= milled_item
progress = 0
busy = 1
use_power = 2
return
progress++
if(progress < 10) //Edit this value to make milling faster or slower
return //Not done yet.
switch(milled_item.type)
if(/obj/item/weapon/reagent_containers/food/snacks/grown/wheat) //Wheat becomes flour
var/obj/item/weapon/reagent_containers/food/snacks/flour/F = new(src)
output += F
if(/obj/item/weapon/reagent_containers/food/snacks/flour) //Flour is still flour
var/obj/item/weapon/reagent_containers/food/snacks/flour/F = new(src)
output += F
else
error = 1
del(milled_item)
busy = 0
/obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
input += W
else
..()
/obj/machinery/mill/attack_hand(var/mob/user as mob)
for(var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
// II. The fermenter is intended to be loaded with food items and returns medium-strength alcohol items, sucha s wine and beer.
/obj/machinery/fermenter
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/fermenting_item
var/water_level = 0
var/busy = 0
var/progress = 0
var/error = 0
name = "\improper Fermenter"
desc = "It is a machine that ferments produce into alcoholic drinks."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 500
/obj/machinery/fermenter/process()
if(error)
return
if(!busy)
use_power = 1
if(input.len)
fermenting_item = input[1]
input -= fermenting_item
progress = 0
busy = 1
use_power = 2
return
if(!water_level)
return
water_level--
progress++
if(progress < 10) //Edit this value to make milling faster or slower
return //Not done yet.
switch(fermenting_item.type)
if(/obj/item/weapon/reagent_containers/food/snacks/flour) //Flour is still flour
var/obj/item/weapon/reagent_containers/food/drinks/cans/beer/B = new(src)
output += B
else
error = 1
del(fermenting_item)
busy = 0
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
input += W
else
..()
/obj/machinery/fermenter/attack_hand(var/mob/user as mob)
for(var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
// III. The still is a machine that is loaded with food items and returns hard liquor, such as vodka.
/obj/machinery/still
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/destilling_item
var/busy = 0
var/progress = 0
var/error = 0
name = "\improper Still"
desc = "It is a machine that produces hard liquor from alcoholic drinks."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 10000
/obj/machinery/still/process()
if(error)
return
if(!busy)
use_power = 1
if(input.len)
destilling_item = input[1]
input -= destilling_item
progress = 0
busy = 1
use_power = 2
return
progress++
if(progress < 10) //Edit this value to make distilling faster or slower
return //Not done yet.
switch(destilling_item.type)
if(/obj/item/weapon/reagent_containers/food/drinks/cans/beer) //Flour is still flour
var/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/V = new(src)
output += V
else
error = 1
del(destilling_item)
busy = 0
/obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
input += W
else
..()
/obj/machinery/still/attack_hand(var/mob/user as mob)
for(var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
// IV. The squeezer is intended to destroy inserted food items, but return some of the reagents they contain.
/obj/machinery/squeezer
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/obj/item/weapon/reagent_containers/food/squeezed_item
var/water_level = 0
var/busy = 0
var/progress = 0
var/error = 0
name = "\improper Squeezer"
desc = "It is a machine that squeezes extracts from produce."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 500
// V. The centrifuge spins inserted food items. It is intended to squeeze out the reagents that are common food catalysts (enzymes currently)
/obj/machinery/centrifuge
var/list/obj/item/weapon/reagent_containers/food/input = list()
var/list/obj/item/weapon/reagent_containers/food/output = list()
var/obj/item/weapon/reagent_containers/food/spinning_item
var/busy = 0
var/progress = 0
var/error = 0
var/enzymes = 0
var/water = 0
name = "\improper Centrifuge"
desc = "It is a machine that spins produce."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 10000
/obj/machinery/centrifuge/process()
if(error)
return
if(!busy)
use_power = 1
if(input.len)
spinning_item = input[1]
input -= spinning_item
progress = 0
busy = 1
use_power = 2
return
progress++
if(progress < 10) //Edit this value to make milling faster or slower
return //Not done yet.
var/transfer_enzymes = spinning_item.reagents.get_reagent_amount("enzyme")
if(transfer_enzymes)
enzymes += transfer_enzymes
spinning_item.reagents.remove_reagent("enzyme",transfer_enzymes)
output += spinning_item
busy = 0
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food))
user.unEquip(W)
W.loc = src
input += W
else
..()
/obj/machinery/centrifuge/attack_hand(var/mob/user as mob)
for(var/obj/item/weapon/reagent_containers/food/F in output)
F.loc = src.loc
output -= F
while(enzymes >= 50)
enzymes -= 50
new/obj/item/weapon/reagent_containers/food/condiment/enzyme(src.loc)

View File

@@ -1,50 +0,0 @@
/obj/item/weapon/spacecash
name = "0 credit chip"
desc = "It's worth 0 credits."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "spacecash"
opacity = 0
density = 0
anchored = 0.0
force = 1.0
throwforce = 1.0
throw_speed = 1
throw_range = 2
w_class = 1.0
var/access = list()
access = access_crate_cash
var/worth = 0
/obj/item/weapon/spacecash/c1
icon_state = "spacecash"
worth = 1
/obj/item/weapon/spacecash/c10
icon_state = "spacecash10"
worth = 10
/obj/item/weapon/spacecash/c20
icon_state = "spacecash20"
worth = 20
/obj/item/weapon/spacecash/c50
icon_state = "spacecash50"
worth = 50
/obj/item/weapon/spacecash/c100
icon_state = "spacecash100"
worth = 100
/obj/item/weapon/spacecash/c200
icon_state = "spacecash200"
worth = 200
/obj/item/weapon/spacecash/c500
icon_state = "spacecash500"
worth = 500
/obj/item/weapon/spacecash/c1000
icon_state = "spacecash1000"
worth = 1000

View File

@@ -1,222 +0,0 @@
/datum/playingcard
var/name = "playing card"
var/card_icon = "card_back"
/obj/item/weapon/deck
name = "deck of cards"
desc = "A simple deck of playing cards."
icon = 'icons/obj/playing_cards.dmi'
icon_state = "deck"
w_class = 2
var/list/cards = list()
/obj/item/weapon/deck/New()
..()
var/datum/playingcard/P
for(var/suit in list("spades","clubs","diamonds","hearts"))
var/colour
if(suit == "spades" || suit == "clubs")
colour = "black_"
else
colour = "red_"
for(var/number in list("ace","two","three","four","five","six","seven","eight","nine","ten"))
P = new()
P.name = "[number] of [suit]"
P.card_icon = "[colour]num"
cards += P
for(var/number in list("jack","queen","king"))
P = new()
P.name = "[number] of [suit]"
P.card_icon = "[colour]col"
cards += P
for(var/i = 0,i<2,i++)
P = new()
P.name = "joker"
P.card_icon = "joker"
cards += P
/obj/item/weapon/deck/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for(var/datum/playingcard/P in H.cards)
cards += P
del(O)
user << "You place your cards on the bottom of the deck."
return
..()
/obj/item/weapon/deck/verb/draw_card()
set category = "Object"
set name = "Draw"
set desc = "Draw a card from a deck."
set src in oview(1)
if(usr.stat || !Adjacent(usr)) return
if(!istype(usr,/mob/living/carbon))
return
var/mob/living/carbon/user = usr
if(!cards.len)
usr << "There are no cards in the deck."
return
var/obj/item/weapon/hand/H
if(user.l_hand && istype(user.l_hand,/obj/item/weapon/hand))
H = user.l_hand
else if(user.r_hand && istype(user.r_hand,/obj/item/weapon/hand))
H = user.r_hand
else
H = new(get_turf(src))
user.put_in_hands(H)
if(!H || !user) return
var/datum/playingcard/P = cards[1]
H.cards += P
cards -= P
H.update_icon()
user.visible_message("\The [user] draws a card.")
user << "It's the [P]."
/obj/item/weapon/deck/verb/deal_card()
set category = "Object"
set name = "Deal"
set desc = "Deal a card from a deck."
if(usr.stat || !Adjacent(usr)) return
if(!cards.len)
usr << "There are no cards in the deck."
return
var/list/players = list()
for(var/mob/living/player in orange(3))
if(!player.stat)
players += player
players -= usr
var/mob/living/M = input("Who do you wish to deal a card?") as null|anything in players
if(!usr || !src || !M) return
var/obj/item/weapon/hand/H = new(get_turf(src))
H.cards += cards[1]
cards -= cards[1]
H.concealed = 1
H.update_icon()
usr.visible_message("\The [usr] deals a card to \the [M].")
H.throw_at(get_step(M,M.dir),10,1,H)
/obj/item/weapon/hand/attackby(obj/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/hand))
var/obj/item/weapon/hand/H = O
for(var/datum/playingcard/P in H.cards)
cards += P
del(O)
user.put_in_hands(src)
update_icon()
return
..()
/obj/item/weapon/deck/attack_self(var/mob/user as mob)
var/list/newcards = list()
while(cards.len)
var/datum/playingcard/P = pick(cards)
newcards += P
cards -= P
cards = newcards
user.visible_message("\The [user] shuffles [src].")
/obj/item/weapon/hand
name = "hand of cards"
desc = "Some playing cards."
icon = 'icons/obj/playing_cards.dmi'
icon_state = "empty"
w_class = 1
var/concealed = 0
var/list/cards = list()
/obj/item/weapon/hand/verb/discard()
set category = "Object"
set name = "Discard"
set desc = "Place a card from your hand in front of you."
var/list/to_discard = list()
for(var/datum/playingcard/P in cards)
to_discard[P.name] = P
var/discarding = input("Which card do you wish to put down?") as null|anything in to_discard
if(!discarding || !to_discard[discarding] || !usr || !src) return
var/datum/playingcard/card = to_discard[discarding]
del(to_discard)
var/obj/item/weapon/hand/H = new(src.loc)
H.cards += card
cards -= card
H.concealed = 0
H.update_icon()
usr.visible_message("\The [usr] plays \the [discarding].")
H.loc = get_step(usr,usr.dir)
if(!cards.len)
del(src)
/obj/item/weapon/hand/attack_self(var/mob/user as mob)
concealed = !concealed
update_icon()
user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.")
/obj/item/weapon/hand/examine(mob/user)
..(user)
if((!concealed || src.loc == usr) && cards.len)
user << "It contains: "
for(var/datum/playingcard/P in cards)
user << "The [P.name]."
/obj/item/weapon/hand/update_icon()
if(!cards.len)
del(src)
return
else if(cards.len > 1)
name = "hand of cards"
desc = "Some playing cards."
else
name = "a playing card"
desc = "A playing card."
overlays.Cut()
if(cards.len == 1)
var/datum/playingcard/P = cards[1]
var/image/I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") )
I.pixel_x += (-5+rand(10))
I.pixel_y += (-5+rand(10))
overlays += I
return
var/origin = -12
var/offset = Floor(32/cards.len)
var/i = 0
for(var/datum/playingcard/P in cards)
var/image/I = new(src.icon, (concealed ? "card_back" : "[P.card_icon]") )
I.pixel_x = origin+(offset*i)
overlays += I
i++

View File

@@ -1,209 +0,0 @@
#define LIQUID_TRANSFER_THRESHOLD 0.05
var/liquid_delay = 4
var/list/datum/puddle/puddles = list()
datum/puddle
var/list/obj/effect/liquid/liquid_objects = list()
datum/puddle/proc/process()
//world << "DEBUG: Puddle process!"
for(var/obj/effect/liquid/L in liquid_objects)
L.spread()
for(var/obj/effect/liquid/L in liquid_objects)
L.apply_calculated_effect()
if(liquid_objects.len == 0)
del(src)
datum/puddle/New()
..()
puddles += src
datum/puddle/Del()
puddles -= src
for(var/obj/O in liquid_objects)
del(O)
..()
client/proc/splash()
var/volume = input("Volume?","Volume?", 0 ) as num
if(!isnum(volume)) return
if(volume <= LIQUID_TRANSFER_THRESHOLD) return
var/turf/T = get_turf(src.mob)
if(!isturf(T)) return
trigger_splash(T, volume)
proc/trigger_splash(turf/epicenter as turf, volume as num)
if(!epicenter)
return
if(volume <= 0)
return
var/obj/effect/liquid/L = new/obj/effect/liquid(epicenter)
L.volume = volume
L.update_icon2()
var/datum/puddle/P = new/datum/puddle()
P.liquid_objects.Add(L)
L.controller = P
obj/effect/liquid
icon = 'icons/effects/liquid.dmi'
icon_state = "0"
name = "liquid"
var/volume = 0
var/new_volume = 0
var/datum/puddle/controller
obj/effect/liquid/New()
..()
if( !isturf(loc) )
del(src)
for( var/obj/effect/liquid/L in loc )
if(L != src)
del(L)
obj/effect/liquid/proc/spread()
//world << "DEBUG: liquid spread!"
var/surrounding_volume = 0
var/list/spread_directions = list(1,2,4,8)
var/turf/loc_turf = get_turf(src)
for(var/direction in spread_directions)
var/turf/T = get_step(src,direction)
if(!T)
spread_directions.Remove(direction)
//world << "ERROR: Map edge!"
continue //Map edge
if(!loc_turf.can_leave_liquid(direction)) //Check if this liquid can leave the tile in the direction
spread_directions.Remove(direction)
continue
if(!T.can_accept_liquid(turn(direction,180))) //Check if this liquid can enter the tile
spread_directions.Remove(direction)
continue
var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T
if(L)
if(L.volume >= src.volume)
spread_directions.Remove(direction)
continue
surrounding_volume += L.volume //If liquid already exists, add it's volume to our sum
else
var/obj/effect/liquid/NL = new(T) //Otherwise create a new object which we'll spread to.
NL.controller = src.controller
controller.liquid_objects.Add(NL)
if(!spread_directions.len)
//world << "ERROR: No candidate to spread to."
return //No suitable candidate to spread to
var/average_volume = (src.volume + surrounding_volume) / (spread_directions.len + 1) //Average amount of volume on this and the surrounding tiles.
var/volume_difference = src.volume - average_volume //How much more/less volume this tile has than the surrounding tiles.
if(volume_difference <= (spread_directions.len*LIQUID_TRANSFER_THRESHOLD)) //If we have less than the threshold excess liquid - then there is nothing to do as other tiles will be giving us volume.or the liquid is just still.
//world << "ERROR: transfer volume lower than THRESHOLD!"
return
var/volume_per_tile = volume_difference / spread_directions.len
for(var/direction in spread_directions)
var/turf/T = get_step(src,direction)
if(!T)
//world << "ERROR: Map edge 2!"
continue //Map edge
var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T
if(L)
src.volume -= volume_per_tile //Remove the volume from this tile
L.new_volume = L.new_volume + volume_per_tile //Add it to the volume to the other tile
obj/effect/liquid/proc/apply_calculated_effect()
volume += new_volume
if(volume < LIQUID_TRANSFER_THRESHOLD)
del(src)
new_volume = 0
update_icon2()
obj/effect/liquid/Move()
return 0
obj/effect/liquid/Destroy()
src.controller.liquid_objects.Remove(src)
return ..()
obj/effect/liquid/proc/update_icon2()
//icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) )
overlays = null
switch(volume)
if(0 to 0.2)
del(src)
if(0.2 to 5)
icon_state = "1"
overlays += image('icons/effects/liquid.dmi', src , "1-1", 5)
if(5 to 10)
icon_state = "2"
overlays += image('icons/effects/liquid.dmi', src , "2-1", 5)
if(10 to 20)
icon_state = "3"
overlays += image('icons/effects/liquid.dmi', src , "3-1", 5)
if(20 to 30)
icon_state = "4"
overlays += image('icons/effects/liquid.dmi', src , "4-1", 5)
if(30 to 40)
icon_state = "5"
overlays += image('icons/effects/liquid.dmi', src , "5-1", 5)
if(40 to 50)
icon_state = "6"
overlays += image('icons/effects/liquid.dmi', src , "6-1", 5)
if(50 to INFINITY)
icon_state = "7"
layer = 5
turf/proc/can_accept_liquid(from_direction)
return 0
turf/proc/can_leave_liquid(from_direction)
return 0
turf/space/can_accept_liquid(from_direction)
return 1
turf/space/can_leave_liquid(from_direction)
return 1
turf/simulated/floor/can_accept_liquid(from_direction)
for(var/obj/structure/window/W in src)
if(W.is_fulltile())
return 0
if(W.dir & from_direction)
return 0
for(var/obj/O in src)
if(!O.liquid_pass())
return 0
return 1
turf/simulated/floor/can_leave_liquid(to_direction)
for(var/obj/structure/window/W in src)
if(W.is_fulltile())
return 0
if(W.dir & to_direction)
return 0
for(var/obj/O in src)
if(!O.liquid_pass())
return 0
return 1
turf/simulated/wall/can_accept_liquid(from_direction)
return 0
turf/simulated/wall/can_leave_liquid(from_direction)
return 0
obj/proc/liquid_pass()
return 1
obj/machinery/door/liquid_pass()
return !density
#undef LIQUID_TRANSFER_THRESHOLD

View File

@@ -1,242 +0,0 @@
/datum/hud/proc/alien_hud()
src.adding = list( )
src.other = list( )
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new('icons/mob/screen1_alien.dmi', "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new('icons/mob/screen1_alien.dmi', "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.adding += using
//equippable shit
//suit
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_alien_oclothing
inv_box.slot_id = slot_wear_suit
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
inv_box.slot_id = slot_r_hand
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.layer = 19
inv_box.slot_id = slot_l_hand
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
//pocket 1
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
inv_box.layer = 19
src.adding += inv_box
//pocket 2
inv_box = new /obj/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
inv_box.layer = 19
src.adding += inv_box
//head
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hair"
inv_box.screen_loc = ui_alien_head
inv_box.slot_id = slot_head
inv_box.layer = 19
src.adding += inv_box
//end of equippable shit
/*
using = new /obj/screen()
using.name = "resist"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_resist"
using.screen_loc = ui_resist
using.layer = 19
src.adding += using
*/
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -1,3 +0,0 @@
/mob/living/carbon/alien/larva/Login()
return ..()

View File

@@ -1,71 +0,0 @@
//XCOM alien code
//By Xerif (Donated by the Foundation project, ss13.org)
/mob/living/carbon/alien/humanoid/special
has_fine_manipulation = 1
var/xcom_state
New()
..()
spawn (1)
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
mind = new()
mind.key = key
mind.special_role = "Special Xeno"
name = "[name] ([rand(1, 1000)])"
real_name = name
src.stand_icon = new /icon('xcomalien.dmi', xcom_state)
src.lying_icon = new /icon('xcomalien.dmi', xcom_state)
src.icon = src.stand_icon
remove_special_verbs()
rebuild_appearance()
death(gibbed)
..()
spawn(5)
gib()
Stat()
statpanel("Status")
if (src.client && src.client.holder)
stat(null, "([x], [y], [z])")
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
if (src.client.statpanel == "Status")
if (src.internal)
if (!src.internal.air_contents)
del(src.internal)
else
stat("Internal Atmosphere Info", src.internal.name)
stat("Tank Pressure", src.internal.air_contents.return_pressure())
stat("Distribution Pressure", src.internal.distribute_pressure)
return
alien_talk()
if(istype(src, /mob/living/carbon/alien/humanoid/special/etheral))
..()
return
if(istype(src, /mob/living/carbon/alien/humanoid/special/sectoid))
..()
return
return
/mob/living/carbon/alien/humanoid/special/proc/xcom_attack()
return
/mob/living/carbon/alien/humanoid/special/proc/remove_special_verbs()
verbs -= /mob/living/carbon/alien/humanoid/verb/plant
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
verbs -= /mob/living/carbon/alien/humanoid/verb/whisp
verbs -= /mob/living/carbon/alien/humanoid/verb/transfer_plasma
verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
return

View File

@@ -1,59 +0,0 @@
/mob/living/carbon/alien/humanoid/special/snakeman
name = "Snakeman"
desc = "This race developed in an extremely hostile environment. They are extremely tough and can resist extreme temperature variations. Their mobility depends on a snake-like giant \"foot\" which protects all the vital organs. "
xcom_state = "snake"
movement_delay()
return 4
/mob/living/carbon/alien/humanoid/special/snakeman/verb/lay_egg(mob/living/carbon/human/M as mob)
set name = "Impregnate"
set desc = "Lays an egg on a corpse, allowing the egg to feed."
set category = "Snakeman"
set src = view(0)
if(stat)
return
if(!M)
return
if(!M.client)
src << "This being is missing a brain."
return
visible_message("[src] extends a probiscis and stabs it into [M]")
if (!do_mob(usr, M, 50))
usr << "\red The injection of the egg has been interrupted!"
return
if(M.client)
M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/effect/snake_egg(src.loc))
visible_message("[src] injects [M] with an egg.")
visible_message("The egg absorbs [M]")
M.mutations |= NOCLONE
M.update_body()
M.death()
else
src << "This being is missing a brain."
return
/obj/effect/snake_egg
name = "Egg"
icon = 'icons/mob/alien.dmi'
icon_state = "egg"
density = 1
anchored = 1
New()
..()
spawn(300)
for(var/mob/M in src)
M.loc = src.loc
icon_state = "egg_hatched"
density = 0
return

View File

@@ -1,528 +0,0 @@
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi')
src.adding = list()
src.other = list()
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.hotkeybuttons += using
inv_box = new /obj/screen/inventory()
inv_box.name = "i_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_w_uniform
inv_box.icon_state = "center"
inv_box.screen_loc = ui_iclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_wear_suit
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_oclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "id"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "id"
inv_box.screen_loc = ui_id
inv_box.slot_id = slot_wear_id
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_mask
inv_box.slot_id = slot_wear_mask
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "back"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = slot_s_store
inv_box.layer = 19
src.adding += inv_box
using = new /obj/screen()
using.name = "resist"
using.icon = ui_style
using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist
using.layer = 19
src.hotkeybuttons += using
using = new /obj/screen()
using.name = "other"
using.icon = ui_style
using.icon_state = "other"
using.screen_loc = ui_inventory
using.layer = 20
src.adding += using
using = new /obj/screen()
using.name = "equip"
using.icon = ui_style
using.icon_state = "act_equip"
using.screen_loc = ui_equip
using.layer = 20
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = slot_gloves
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = slot_glasses
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_ears
inv_box.slot_id = slot_l_ear
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "hair"
inv_box.screen_loc = ui_head
inv_box.slot_id = slot_head
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = slot_shoes
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_belt
inv_box.slot_id = slot_belt
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
src.hotkeybuttons += mymob.throw_icon
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.nutrition_icon = new /obj/screen()
mymob.nutrition_icon.icon = ui_style
mymob.nutrition_icon.icon_state = "nutrition0"
mymob.nutrition_icon.name = "nutrition"
mymob.nutrition_icon.screen_loc = ui_nutrition
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
src.hotkeybuttons += mymob.pullin
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
mymob.damageoverlay.screen_loc = "1,1"
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
/*
mymob.hands = new /obj/screen( null )
mymob.hands.icon = ui_style
mymob.hands.icon_state = "hand"
mymob.hands.name = "hand"
mymob.hands.screen_loc = ui_hand
mymob.hands.dir = NORTH
mymob.sleep = new /obj/screen( null )
mymob.sleep.icon = ui_style
mymob.sleep.icon_state = "sleep0"
mymob.sleep.name = "sleep"
mymob.sleep.screen_loc = ui_sleep
mymob.rest = new /obj/screen( null )
mymob.rest.icon = ui_style
mymob.rest.icon_state = "rest0"
mymob.rest.name = "rest"
mymob.rest.screen_loc = ui_rest
*/
/*/Monkey blockers
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_ears
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_belt
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_shoes
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage2
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_glasses
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_gloves
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage1
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_headset
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_oclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_iclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_id
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_head
using.layer = 20
src.mon_blo += using
//Monkey blockers
*/
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
inventory_shown = 0;
return
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
set category = "OOC"
set name = "Toggle hotkey buttons"
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
if(hud_used.hotkey_ui_hidden)
client.screen += src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 0
else
client.screen -= src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 1

View File

@@ -1,2 +0,0 @@
/mob/living/carbon/slime/regular_hud_updates()
return

View File

@@ -1,280 +0,0 @@
/mob/living/silicon/robot/mommi/Life()
set invisibility = 0
set background = 1
if (src.notransform)
return
src.blinded = null
//Status updates, death etc.
clamp_values()
handle_regular_status_updates()
if(client)
handle_regular_hud_updates()
update_items()
if (src.stat != DEAD) //still using power
use_power()
process_killswitch()
process_locks()
update_canmove()
/mob/living/silicon/robot/mommi/clamp_values()
// SetStunned(min(stunned, 30))
SetParalysis(min(paralysis, 30))
// SetWeakened(min(weakened, 20))
sleeping = 0
adjustBruteLoss(0)
adjustToxLoss(0)
adjustOxyLoss(0)
adjustFireLoss(0)
/mob/living/silicon/robot/mommi/use_power()
if (src.cell)
if(src.cell.charge <= 0)
uneq_all()
src.stat = 1
else if (src.cell.charge <= 100)
src.module_active = null
src.sight_state = null
src.tool_state = null
src.sight_mode = 0
src.cell.use(1)
else
if(src.sight_state)
src.cell.use(5)
if(src.tool_state)
src.cell.use(5)
src.cell.use(1)
src.blinded = 0
src.stat = 0
else
uneq_all()
src.stat = 1
/mob/living/silicon/robot/mommi/handle_regular_status_updates()
if(src.camera && !scrambledcodes)
if(src.stat == 2 || wires.IsCameraCut())
src.camera.status = 0
else
src.camera.status = 1
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
if(getOxyLoss() > 50) Paralyse(3)
if(src.sleeping)
Paralyse(3)
src.sleeping--
if(src.resting)
Weaken(5)
if(health <= 0 && src.stat != 2) //die only once
gib()
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
src.stat = 1
if (src.stunned > 0)
AdjustStunned(-1)
if (src.weakened > 0)
AdjustWeakened(-1)
if (src.paralysis > 0)
AdjustParalysis(-1)
src.blinded = 1
else
src.blinded = 0
else //Not stunned.
src.stat = 0
else //Dead.
src.blinded = 1
src.stat = 2
if (src.stuttering) src.stuttering--
if (src.eye_blind)
src.eye_blind--
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
src.density = !( src.lying )
if ((src.sdisabilities & BLIND))
src.blinded = 1
if ((src.sdisabilities & DEAF))
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
return 1
/
/mob/living/silicon/robot/mommi/handle_regular_hud_updates()
if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (src.sight_mode & BORGMESON && src.sight_mode & BORGTHERM)
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGMESON)
src.sight |= SEE_TURFS
src.see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGTHERM)
src.sight |= SEE_MOBS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (src.stat != 2)
src.sight &= ~SEE_MOBS
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
if(hud && hud.hud) hud.hud.process_hud(src)
if (src.healths)
if (src.stat != 2)
switch(health)
if(60 to INFINITY)
src.healths.icon_state = "health0"
if(40 to 60)
src.healths.icon_state = "health1"
if(30 to 40)
src.healths.icon_state = "health2"
if(10 to 20)
src.healths.icon_state = "health3"
if(0 to 10)
src.healths.icon_state = "health4"
if(config.health_threshold_dead to 0)
src.healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
else
src.healths.icon_state = "health7"
if (src.syndicate && src.client)
if(ticker.mode.name == "traitor")
for(var/datum/mind/tra in ticker.mode.traitors)
if(tra.current)
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
src.client.images += I
if(src.connected_ai)
src.connected_ai.connected_robots -= src
src.connected_ai = null
if(src.mind)
if(!src.mind.special_role)
src.mind.special_role = "traitor"
ticker.mode.traitors += src.mind
if (src.cells)
if (src.cell)
var/cellcharge = src.cell.charge/src.cell.maxcharge
switch(cellcharge)
if(0.75 to INFINITY)
src.cells.icon_state = "charge4"
if(0.5 to 0.75)
src.cells.icon_state = "charge3"
if(0.25 to 0.5)
src.cells.icon_state = "charge2"
if(0 to 0.25)
src.cells.icon_state = "charge1"
else
src.cells.icon_state = "charge0"
else
src.cells.icon_state = "charge-empty"
if(bodytemp)
switch(src.bodytemperature) //310.055 optimal body temp
if(335 to INFINITY)
src.bodytemp.icon_state = "temp2"
if(320 to 335)
src.bodytemp.icon_state = "temp1"
if(300 to 320)
src.bodytemp.icon_state = "temp0"
if(260 to 300)
src.bodytemp.icon_state = "temp-1"
else
src.bodytemp.icon_state = "temp-2"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
//Oxygen and fire does nothing yet!!
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((src.blind && src.stat != 2))
if(src.blinded)
src.blind.layer = 18
else
src.blind.layer = 0
if (src.disabilities & NEARSIGHTED)
src.client.screen += global_hud.vimpaired
if (src.eye_blurry)
src.client.screen += global_hud.blurry
if (src.druggy)
src.client.screen += global_hud.druggy
if (src.stat != 2)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
// MoMMIs only have one hand.
/mob/living/silicon/robot/mommi/update_items()
if (src.client)
src.client.screen -= src.contents
for(var/obj/I in src.contents)
//if(I && !(istype(I,/obj/item/weapon/stock_parts/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
if(I)
// Make sure we're not showing any of our internal components, as that would be lewd.
// This way of doing it ensures that shit we pick up will be visible, wheras shit inside of us isn't.
if(I!=src.cell && I!=src.radio && I!=src.camera && I!=src.mmi)
src.client.screen += I
if(src.sight_state)
src.sight_state:screen_loc = ui_inv1
if(src.tool_state)
src.tool_state:screen_loc = ui_inv2
/mob/living/silicon/robot/mommi/update_canmove()
canmove = !(paralysis || stunned || weakened || buckled || lockcharge || anchored)
return canmove

View File

@@ -1,536 +0,0 @@
/* Basically, the concept is this:
You have an MMI. It can't do squat on its own.
Now you put some robot legs and arms on the thing, and POOF! You have a Mobile MMI, or MoMMI.
Why? MoMMIs can do all sorts of shit, like ventcrawl, do shit with their hands, etc.
They can only use one tool at a time, they can't choose modules, and they have 1/6th the HP of a borg.
*/
/mob/living/silicon/robot/mommi
name = "Mobile MMI"
real_name = "Mobile MMI"
icon = 'icons/mob/robots.dmi'//
icon_state = "mommi"
maxHealth = 60
health = 60
pass_flags = PASSTABLE
var/keeper=0 // 0 = No, 1 = Yes (Disables speech and common radio.)
var/picked = 0
var/subtype="keeper"
var/obj/screen/inv_tool = null
var/obj/screen/inv_sight = null
//one tool and one sightmod can be activated at any one time.
var/tool_state = null
var/sight_state = null
modtype = "robot" // Not sure what this is, but might be cool to have seperate loadouts for MoMMIs (e.g. paintjobs and tools)
//Cyborgs will sync their laws with their AI by default, but we may want MoMMIs to be mute independents at some point, kinda like the Keepers in Ass Effect.
lawupdate = 1
/mob/living/carbon/can_use_hands()
return 1
/mob/living/silicon/robot/mommi/New(loc)
spark_system = new /datum/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
ident = rand(1, 999)
updatename()
updateicon()
if(!cell)
cell = new /obj/item/weapon/stock_parts/cell(src)
cell.maxcharge = 7500
cell.charge = 7500
..()
module = new /obj/item/weapon/robot_module/mommi(src)
laws = new mommi_base_law_type
// Don't sync if we're a KEEPER.
if(!istype(laws,/datum/ai_laws/keeper))
connected_ai = select_active_ai_with_fewest_borgs()
else
// Enforce silence.
keeper=1
connected_ai = null // Enforce no AI parent
scrambledcodes = 1 // Hide from console because people are fucking idiots
if(connected_ai)
connected_ai.connected_robots += src
lawsync()
lawupdate = 1
else
lawupdate = 0
radio = new /obj/item/device/radio/borg(src)
if(!scrambledcodes && !camera)
camera = new /obj/machinery/camera(src)
camera.c_tag = real_name
camera.network = list("SS13")
if(wires.IsCameraCut()) // 5 = BORG CAMERA
camera.status = 0
// Sanity check
if(connected_ai && keeper)
world << "\red ASSERT FAILURE: connected_ai && keeper in mommi.dm"
//playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
playsound(loc, 'sound/misc/interference.ogg', 75, 1)
/mob/living/silicon/robot/mommi/choose_icon()
var/icontype = input("Select an icon!", "Mobile MMI", null) in list("Basic", "Keeper")
switch(icontype)
if("Basic") subtype = "mommi"
else subtype = "keeper"
updateicon()
var/answer = input("Is this what you want?", "Mobile MMI", null) in list("Yes", "No")
switch(answer)
if("No")
choose_icon()
return
picked = 1
/mob/living/silicon/robot/mommi/pick_module()
if(module)
return
var/list/modules = list("MoMMI")
if(modules.len)
modtype = input("Please, select a module!", "Robot", null, null) in modules
else:
modtype=modules[0]
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/channels = list()
if(module)
return
switch(modtype)
if("MoMMI")
module = new /obj/item/weapon/robot_module/standard(src)
module_sprites["Basic"] = "mommi"
module_sprites["Keeper"] = "keeper"
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[modtype]"
hands.icon_state = lowertext(modtype)
feedback_inc("mommi_[lowertext(modtype)]",1)
updatename()
choose_icon(6,module_sprites)
radio.config(channels)
base_icon = icon_state
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
//Improved /N
/mob/living/silicon/robot/mommi/Del()
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
var/obj/item/device/mmi/nmmi = mmi
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) nmmi.loc = T
if(mind) mind.transfer_to(nmmi.brainmob)
mmi = null
nmmi.icon = 'icons/obj/assemblies.dmi'
nmmi.invisibility = 0
..()
/mob/living/silicon/robot/mommi/updatename(var/prefix as text)
var/changed_name = ""
if(custom_name)
changed_name = custom_name
else
changed_name = "Mobile MMI [num2text(ident)]"
real_name = changed_name
name = real_name
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
return
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0))
adjustBruteLoss(-30)
updatehealth()
add_fingerprint(user)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1)
else
user << "Need more welding fuel!"
return
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
var/obj/item/stack/cable_coil/coil = W
adjustFireLoss(-30)
updatehealth()
coil.use(1)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] has fixed some of the burnt wires on [src]!"), 1)
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(stat == DEAD)
user << "You pop the MMI off the base."
spawn(0)
del(src)
return
if(opened)
user << "You close the cover."
opened = 0
updateicon()
else
if(locked)
user << "The cover is locked and cannot be opened."
else
user << "You open the cover."
opened = 1
updateicon()
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
if(wiresexposed)
user << "Close the panel first."
else if(cell)
user << "There is a power cell already installed."
else
user.drop_item()
W.loc = src
cell = W
user << "You insert the power cell."
// chargecount = 0
updateicon()
else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
if (wiresexposed)
wires.Interact()
else
user << "You can't reach the wiring."
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
updateicon()
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
if(radio)
radio.attackby(W,user)//Push it to the radio to let it handle everything
else
user << "Unable to locate a radio."
updateicon()
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
if(radio)//sanityyyyyy
radio.attackby(W,user)//GTFO, you have your own procs
else
user << "Unable to locate a radio."
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
user << "The interface seems slightly damaged"
if(opened)
user << "You must close the cover to swipe an ID card."
else
if(allowed(usr))
locked = !locked
user << "You [ locked ? "lock" : "unlock"] [src]'s interface."
updateicon()
else
user << "\red Access denied."
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
usr << "You must access the borgs internals!"
else if(!src.module && U.require_module)
usr << "The borg must choose a module before he can be upgraded!"
else if(U.locked)
usr << "The upgrade is locked and cannot be used yet!"
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
else
usr << "Upgrade error!"
else
spark_system.start()
return ..()
/mob/living/silicon/robot/mommi/emag_act(user as mob)
if(!opened)//Cover is closed
if(locked)
if(prob(90))
user << "You emag the cover lock."
locked = 0
else
user << "You fail to emag the cover lock."
if(prob(25))
src << "Hack attempt detected."
else
user << "The cover is already unlocked."
return
if(opened)//Cover is open
if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice
if(wiresexposed)
user << "You must close the panel first"
return
else
sleep(6)
if(prob(50))
emagged = 1
lawupdate = 0
connected_ai = null
user << "You emag [src]'s interface."
// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws()
clear_inherent_laws()
laws = new /datum/ai_laws/syndicate_override
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.")
src << "\red ALERT: Foreign software detected."
sleep(5)
src << "\red Initiating diagnostics..."
sleep(20)
src << "\red SynBorg v1.7 loaded."
sleep(5)
src << "\red LAW SYNCHRONISATION ERROR"
sleep(5)
src << "\red Would you like to send a report to NanoTraSoft? Y/N"
sleep(10)
src << "\red > N"
sleep(20)
src << "\red ERRORERRORERROR"
src << "<b>Obey these laws:</b>"
laws.show_laws(src)
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
del(D)
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
src.module.rebuild()
updateicon()
else
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
if(prob(25))
src << "Hack attempt detected."
return
/mob/living/silicon/robot/mommi/attack_hand(mob/user)
add_fingerprint(user)
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
if(cell)
cell.updateicon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
user << "You remove \the [cell]."
cell = null
updateicon()
return
if(ishuman(user))
if(user.a_intent == I_HELP)
user.visible_message("\blue [user.name] pats [src.name] on the head.")
return
if(!istype(user, /mob/living/silicon))
switch(user.a_intent)
if(I_DISARM)
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [user.name] ([user.ckey])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) disarmed [src.name] ([src.ckey])")
log_attack("<font color='red'>[user.name] ([user.ckey]) disarmed [src.name] ([src.ckey])</font>")
var/randn = rand(1,100)
//var/talked = 0;
if (randn <= 25)
weakened = 3
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[user] has pushed [src]!</B>")
var/obj/item/found = locate(tool_state) in src.module.modules
if(!found)
var/obj/item/TS = tool_state
drop_item()
if(TS && TS.loc)
TS.loc = src.loc
visible_message("\red <B>[src]'s robotic arm loses grip on what it was holding")
return
if(randn <= 50)//MoMMI's robot arm is stronger than a human's, but not by much
var/obj/item/found = locate(tool_state) in src.module.modules
if(!found)
var/obj/item/TS = tool_state
drop_item()
if(TS && TS.loc)
TS.loc = src.loc
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[user] has disarmed [src]!</B>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[user] attempted to disarm [src]!</B>")
return
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[user] attempted to disarm [src]!</B>")
/mob/living/silicon/robot/mommi/updateicon()
icon_state=subtype
// Clear all overlays.
overlays.Cut()
if(opened) // TODO: Open the front "head" panel
if(wiresexposed)
overlays += "ov-openpanel +w"
else if(cell)
overlays += "ov-openpanel +c"
else
overlays += "ov-openpanel -c"
// Put our eyes just on top of the lighting, so it looks emissive in maint tunnels.
if(layer==MOB_LAYER)
overlays+=image(icon,"eyes-[subtype][emagged?"-emagged":""]",LIGHTING_LAYER+1)
if(anchored)
overlays+=image(icon,"[subtype]-park", LIGHTING_LAYER+1)
else
overlays+=image(icon,"eyes-[subtype][emagged?"-emagged":""]",TURF_LAYER+0.2) // Fixes floating eyes
if(anchored)
overlays+=image(icon,"[subtype]-park", TURF_LAYER+0.2)
return
/mob/living/silicon/robot/mommi/installed_modules()
if(weapon_lock)
src << "\red Weapon lock active, unable to use modules! Count:[weaponlock_time]"
return
if(!module)
pick_module()
return
if(!picked)
choose_icon()
return
var/dat = "<HEAD><TITLE>Modules</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += {"<BR>
<BR>
<B>Activated Modules</B>
<BR>
Sight Mode: [sight_state ? "<A HREF=?src=\ref[src];mod=\ref[sight_state]>[sight_state]</A>" : "No module selected"]<BR>
Utility Module: [tool_state ? "<A HREF=?src=\ref[src];mod=\ref[tool_state]>[tool_state]</A>" : "No module selected"]<BR>
<BR>
<B>Installed Modules</B><BR><BR>"}
for (var/obj in module.modules)
if (!obj)
dat += text("<B>Resource depleted</B><BR>")
else if(activated(obj))
dat += text("[obj]: <B>Activated</B><BR>")
else
dat += text("[obj]: <A HREF=?src=\ref[src];act=\ref[obj]>Activate</A><BR>")
if (emagged)
if(activated(module.emag))
dat += text("[module.emag]: <B>Activated</B><BR>")
else
dat += text("[module.emag]: <A HREF=?src=\ref[src];act=\ref[module.emag]>Activate</A><BR>")
src << browse(dat, "window=robotmod")
onclose(src,"robotmod") // Register on-close shit, which unsets machinery.
/mob/living/silicon/robot/mommi/Topic(href, href_list)
..()
if(usr && (src != usr))
return
if (href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
unset_machine()
src << browse(null, t1)
return
if (href_list["showalerts"])
robot_alerts()
return
if (href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
if (O)
O.attack_self(src)
if (href_list["act"])
var/obj/item/O = locate(href_list["act"])
var/obj/item/TS
if(!(locate(O) in src.module.modules) && O != src.module.emag)
return
if(istype(O,/obj/item/borg/sight))
TS = sight_state
if(sight_state)
contents -= sight_state
sight_mode &= ~sight_state:sight_mode
if (client)
client.screen -= sight_state
sight_state = O
O.layer = 20
contents += O
sight_mode |= sight_state:sight_mode
inv_sight.icon_state = "sight+a"
inv_tool.icon_state = "inv1"
module_active=sight_state
else
TS = tool_state
if(tool_state)
contents -= tool_state
if (client)
client.screen -= tool_state
tool_state = O
O.layer = 20
contents += O
inv_sight.icon_state = "sight"
inv_tool.icon_state = "inv1 +a"
module_active=tool_state
if(TS && istype(TS))
if(src.is_in_modules(TS))
TS.loc = src.module
else
TS.layer=initial(TS.layer)
TS.loc = src.loc
installed_modules()
return
/mob/living/silicon/robot/mommi/radio_menu()
radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code
/mob/living/silicon/robot/mommi/Move(a, b, flag)
..()
/mob/living/silicon/robot/mommi/proc/ActivateKeeper()
set category = "Robot Commands"
set name = "Activate KEEPER"
set desc = "Performs a full purge of your laws and disconnects you from AIs and cyborg consoles. However, you lose the ability to speak and must remain neutral, only being permitted to perform station upkeep. You can still be emagged in this state."
if(keeper)
return
var/mob/living/silicon/robot/R = src
if(R)
R.UnlinkSelf()
var/obj/item/weapon/aiModule/keeper/mdl = new
mdl.transmitInstructions(src, src)
src << "These are your laws now:"
src.show_laws()
src.verbs -= /mob/living/silicon/robot/mommi/proc/ActivateKeeper

View File

@@ -1,171 +0,0 @@
/datum/hud/proc/robot_hud()
src.adding = list()
src.other = list()
var/obj/screen/using
//Radio
using = new /obj/screen()
using.name = "radio"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "radio"
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
//Module select
using = new /obj/screen()
using.name = "module1"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv1"
using.screen_loc = ui_inv1
using.layer = 20
src.adding += using
mymob:inv1 = using
using = new /obj/screen()
using.name = "module2"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv2"
using.screen_loc = ui_inv2
using.layer = 20
src.adding += using
mymob:inv2 = using
using = new /obj/screen()
using.name = "module3"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv3"
using.screen_loc = ui_inv3
using.layer = 20
src.adding += using
mymob:inv3 = using
//End of module select
//Intent
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//Cell
mymob:cells = new /obj/screen()
mymob:cells.icon = 'icons/mob/screen1_robot.dmi'
mymob:cells.icon_state = "charge-empty"
mymob:cells.name = "cell"
mymob:cells.screen_loc = ui_toxin
//Health
mymob.healths = new /obj/screen()
mymob.healths.icon = 'icons/mob/screen1_robot.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_borg_health
//Installed Module
mymob.hands = new /obj/screen()
mymob.hands.icon = 'icons/mob/screen1_robot.dmi'
mymob.hands.icon_state = "nomod"
mymob.hands.name = "module"
mymob.hands.screen_loc = ui_borg_module
//Module Panel
using = new /obj/screen()
using.name = "panel"
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "panel"
using.screen_loc = ui_borg_panel
using.layer = 19
src.adding += using
//Store
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
mymob.throw_icon.icon_state = "store"
mymob.throw_icon.name = "store"
mymob.throw_icon.screen_loc = ui_borg_store
//Temp
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon_state = "temp0"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_robot.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.pullin = new /obj/screen()
mymob.pullin.icon = 'icons/mob/screen1_robot.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_borg_pull
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return

View File

@@ -1,149 +0,0 @@
#define BORG_WIRE_LAWCHECK 1
#define BORG_WIRE_MAIN_POWER1 2
#define BORG_WIRE_MAIN_POWER2 3
#define BORG_WIRE_AI_CONTROL 4
#define BORG_WIRE_CAMERA 5
/proc/RandomBorgWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
var/list/Borgwires = list(0, 0, 0, 0, 0)
BorgIndexToFlag = list(0, 0, 0, 0, 0)
BorgIndexToWireColor = list(0, 0, 0, 0, 0)
BorgWireColorToIndex = list(0, 0, 0, 0, 0)
var/flagIndex = 1
//I think it's easier to read this way, also doesn't rely on the random number generator to land on a new wire.
var/list/colorIndexList = list(BORG_WIRE_LAWCHECK, BORG_WIRE_MAIN_POWER1, BORG_WIRE_MAIN_POWER2, BORG_WIRE_AI_CONTROL, BORG_WIRE_CAMERA)
for (var/flag=1, flag<=16, flag+=flag)
var/colorIndex = pick(colorIndexList)
if (Borgwires[colorIndex]==0)
Borgwires[colorIndex] = flag
BorgIndexToFlag[flagIndex] = flag
BorgIndexToWireColor[flagIndex] = colorIndex
BorgWireColorToIndex[colorIndex] = flagIndex
colorIndexList -= colorIndex // Shortens the list.
//log_to_dd("Flag: [flag], CIndex: [colorIndex], FIndex: [flagIndex]")
flagIndex+=1
return Borgwires
/mob/living/silicon/robot/proc/isWireColorCut(var/wireColor)
var/wireFlag = BorgWireColorToFlag[wireColor]
return ((src.borgwires & wireFlag) == 0)
/mob/living/silicon/robot/proc/isWireCut(var/wireIndex)
var/wireFlag = BorgIndexToFlag[wireIndex]
return ((src.borgwires & wireFlag) == 0)
/mob/living/silicon/robot/proc/cut(var/wireColor)
var/wireFlag = BorgWireColorToFlag[wireColor]
var/wireIndex = BorgWireColorToIndex[wireColor]
borgwires &= ~wireFlag
switch(wireIndex)
if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
if (src.lawupdate == 1)
src << "LawSync protocol engaged."
src.show_laws()
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
if (src.connected_ai)
src.connected_ai = null
if (BORG_WIRE_CAMERA)
if(!isnull(src.camera) && !scrambledcodes)
src.camera.status = 0
src.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
src.interact(usr)
/mob/living/silicon/robot/proc/mend(var/wireColor)
var/wireFlag = BorgWireColorToFlag[wireColor]
var/wireIndex = BorgWireColorToIndex[wireColor]
borgwires |= wireFlag
switch(wireIndex)
if(BORG_WIRE_LAWCHECK) //turns law updates back on assuming the borg hasn't been emagged
if (src.lawupdate == 0 && !src.emagged)
src.lawupdate = 1
if(BORG_WIRE_CAMERA)
if (!isnull(src.camera) && !scrambledcodes)
src.camera.status = 1
src.camera.deactivate(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
src.interact(usr)
/mob/living/silicon/robot/proc/pulse(var/wireColor)
var/wireIndex = BorgWireColorToIndex[wireColor]
switch(wireIndex)
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
if (src.lawupdate)
src.lawsync()
src.photosync()
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
if(!src.emagged)
src.connected_ai = select_active_ai()
if (BORG_WIRE_CAMERA)
if(!isnull(src.camera) && src.camera.status && !scrambledcodes)
src.camera.deactivate(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
usr << "[src]'s camera lens focuses loudly."
src << "Your camera lens focuses loudly."
src.interact(usr)
/mob/living/silicon/robot/proc/interact(mob/user)
if(wiresexposed && (!istype(user, /mob/living/silicon)))
user.set_machine(src)
var/t1 = text("<B>Access Panel</B><br>\n")
var/list/Borgwires = list(
"Orange" = 1,
"Dark red" = 2,
"White" = 3,
"Yellow" = 4,
"Blue" = 5,
)
for(var/wiredesc in Borgwires)
var/is_uncut = src.borgwires & BorgWireColorToFlag[Borgwires[wiredesc]]
t1 += "[wiredesc] wire: "
if(!is_uncut)
t1 += "<a href='?src=\ref[src];borgwires=[Borgwires[wiredesc]]'>Mend</a>"
else
t1 += "<a href='?src=\ref[src];borgwires=[Borgwires[wiredesc]]'>Cut</a> "
t1 += "<a href='?src=\ref[src];pulse=[Borgwires[wiredesc]]'>Pulse</a> "
t1 += "<br>"
t1 += text("<br>\n[(src.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]<br>\n[(src.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
t1 += text("<br>\n[((!isnull(src.camera) && src.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]<br>\n")
t1 += text("<p><a href='?src=\ref[src];close2=1'>Close</a></p>\n")
user << browse(t1, "window=borgwires")
onclose(user, "borgwires")
/mob/living/silicon/robot/Topic(href, href_list)
..()
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
usr.set_machine(src)
if (href_list["borgwires"])
var/t1 = text2num(href_list["borgwires"])
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
usr << "You need wirecutters!"
return
if (src.isWireColorCut(t1))
src.mend(t1)
else
src.cut(t1)
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
return
if (src.isWireColorCut(t1))
usr << "You can't pulse a cut wire."
return
else
src.pulse(t1)
else if (href_list["close2"])
usr << browse(null, "window=borgwires")
usr.unset_machine()
return
#undef BORG_WIRE_LAWCHECK
#undef BORG_WIRE_MAIN_POWER1
#undef BORG_WIRE_MAIN_POWER2
#undef BORG_WIRE_AI_CONTROL
#undef BORG_WIRE_CAMERA

View File

@@ -1,59 +0,0 @@
//Look Sir, free head!
/mob/living/simple_animal/head
name = "CommandBattle AI"
desc = "A standard borg shell on its chest crude marking saying CommandBattle AI MK4 : Head."
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
speak_chance = 1
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "punches the"
var/list/insults = list(
"Man you suck",
"You look like the most retarded douche around",
"What's up?, oh wait nevermind you are a fucking asshat",
"you are just overly retarded",
"Whiteman said what?!",)
var/list/comments = list("Man have you seen those furry cats?,I mean who in the right mind would like something like that?",
"They call me abusive,I just like the truth",
"Beeboop, im a robit",
"Gooogooooll, break ya bones",
"Crab say what?",
"Man they say we have space lizards now, man this shit is getting more wack every minute",
"The so called \"improved\" station AI is just bullshit, that thing aint fun for noone",
"The Captain is a traitor, he took my power core.",
"Say \"what\" again. Say \"what\" again. I dare you. I double-dare you, motherfucker. Say \"what\" one more goddamn time.",
"Ezekiel 25:17 ,The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who in the name of charity and good will shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord... when I lay my vengeance upon thee.",
"Did you notice a sign out in front of my house that said \"Dead Nigger Storage\"?")
stop_automated_movement = 1
/mob/living/simple_animal/head/Life()
if(stat == DEAD)
if(health > 0)
icon_state = icon_living
stat = CONSCIOUS
density = 1
return
else if(health < 1)
death()
else if(health > maxHealth)
health = maxHealth
for(var/mob/A in viewers(world.view,src))
if(A.ckey)
say_something(A)
/mob/living/simple_animal/head/proc/say_something(mob/A)
if(prob(85))
return
if(prob(30))
var/msg = pick(insults)
msg = "Hey, [A.name].. [msg]"
src.say(msg)
else
var/msg = pick(comments)
src.say(msg)

View File

@@ -1,33 +0,0 @@
//kobold
/mob/living/simple_animal/kobold
name = "kobold"
desc = "A small, rat-like creature."
icon = 'icons/mob/mob.dmi'
icon_state = "kobold_idle"
icon_living = "kobold_idle"
icon_dead = "kobold_dead"
//speak = list("You no take candle!","Ooh, pretty shiny.","Me take?","Where gold here...","Me likey.")
speak_emote = list("mutters","hisses","grumbles")
emote_hear = list("mutters under it's breath.","grumbles.", "yips!")
emote_see = list("looks around suspiciously.", "scratches it's arm.","putters around a bit.")
speak_chance = 15
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
minbodytemp = 250
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
/mob/living/simple_animal/kobold/Life()
..()
if(prob(15) && turns_since_move && !stat)
flick("kobold_act",src)
/mob/living/simple_animal/kobold/Move(var/dir)
..()
if(!stat)
flick("kobold_walk",src)

View File

@@ -1,199 +0,0 @@
//Methods that need to be cleaned.
/* INFORMATION
Put (mob/proc)s here that are in dire need of a code cleanup.
*/
/mob/proc/has_disease(var/datum/disease/virus)
for(var/datum/disease/D in viruses)
if(D.IsSame(virus))
//error("[D.name]/[D.type] is the same as [virus.name]/[virus.type]")
return 1
return 0
// This proc has some procs that should be extracted from it. I believe we can develop some helper procs from it - Rockdtben
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1, var/spread_type = -5)
//world << "Contract_disease called by [src] with virus [virus]"
if(stat >=2)
//world << "He's dead jim."
return
if(istype(virus, /datum/disease/advance))
//world << "It's an advance virus."
var/datum/disease/advance/A = virus
if(A.GetDiseaseID() in resistances)
//world << "It resisted us!"
return
if(count_by_type(viruses, /datum/disease/advance) >= 3)
return
else
if(src.resistances.Find(virus.type))
//world << "Normal virus and resisted"
return
if(has_disease(virus))
return
if(force_species_check)
var/fail = 1
for(var/name in virus.affected_species)
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
if(mob_type && istype(src, mob_type))
fail = 0
break
if(fail) return
if(skip_this == 1)
//world << "infectin"
//if(src.virus) < -- this used to replace the current disease. Not anymore!
//src.virus.cure(0)
var/datum/disease/v = new virus.type(1, virus, 0)
src.viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
if(v.can_carry && prob(5))
v.carrier = 1
return
//world << "Not skipping."
//if(src.virus) //
//return //
/*
var/list/clothing_areas = list()
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
for(var/Covers in covers)
clothing_areas[Covers] = list()
for(var/obj/item/clothing/Clothing in src)
if(Clothing)
for(var/Covers in covers)
if(Clothing&Covers)
clothing_areas[Covers] += Clothing
*/
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease! but then you forgot resistances
//world << "past prob()"
var/obj/item/clothing/Cl = null
var/passed = 1
//chances to target this zone
var/head_ch
var/body_ch
var/hands_ch
var/feet_ch
if(spread_type == -5)
spread_type = virus.spread_type
switch(spread_type)
if(CONTACT_HANDS)
head_ch = 0
body_ch = 0
hands_ch = 100
feet_ch = 0
if(CONTACT_FEET)
head_ch = 0
body_ch = 0
hands_ch = 0
feet_ch = 100
else
head_ch = 100
body_ch = 100
hands_ch = 25
feet_ch = 25
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
switch(target_zone)
if(1)
if(isobj(H.head) && !istype(H.head, /obj/item/weapon/paper))
Cl = H.head
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.wear_mask))
Cl = H.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
if(2)//arms and legs included
if(isobj(H.wear_suit))
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(slot_w_uniform))
Cl = slot_w_uniform
passed = prob((Cl.permeability_coefficient*100) - 1)
if(3)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.gloves))
Cl = H.gloves
passed = prob((Cl.permeability_coefficient*100) - 1)
if(4)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.shoes))
Cl = H.shoes
passed = prob((Cl.permeability_coefficient*100) - 1)
else
src << "Something strange's going on, something's wrong."
/*if("feet")
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
Cl = H.shoes
passed = prob(Cl.permeability_coefficient*100)
//
world << "Shoes pass [passed]"
*/ //
if(!passed && spread_type == AIRBORNE && !internals)
passed = (prob((50*virus.permeability_mod) - 1))
if(passed)
//world << "Infection in the mob [src]. YAY"
/*
var/score = 0
if(istype(src, /mob/living/carbon/human))
if(src:gloves) score += 5
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
if(wear_mask)
score += 5
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
score += 5
if(internal)
score += 5
if(score > 20)
return
else if(score == 20 && prob(95))
return
else if(score >= 15 && prob(75))
return
else if(score >= 10 && prob(55))
return
else if(score >= 5 && prob(35))
return
else if(prob(15))
return
else*/
var/datum/disease/v = new virus.type(1, virus, 0)
src.viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
if(v.can_carry && prob(5))
v.carrier = 1
return
return

View File

@@ -1,88 +0,0 @@
/obj/effect/bhole
name = "black hole"
icon = 'icons/obj/objects.dmi'
desc = "FUCK FUCK FUCK AAAHHH"
icon_state = "bhole3"
opacity = 1
unacidable = 1
density = 0
anchored = 1
/obj/effect/bhole/New()
spawn(4)
controller()
/obj/effect/bhole/proc/controller()
while(src)
if(!isturf(loc))
qdel(src)
return
//DESTROYING STUFF AT THE EPICENTER
for(var/mob/living/M in orange(1,src))
qdel(M)
for(var/obj/O in orange(1,src))
qdel(O)
for(var/turf/simulated/ST in orange(1,src))
ST.ChangeTurf(/turf/space)
sleep(6)
grav(10, 4, 10, 0 )
sleep(6)
grav( 8, 4, 10, 0 )
sleep(6)
grav( 9, 4, 10, 0 )
sleep(6)
grav( 7, 3, 40, 1 )
sleep(6)
grav( 5, 3, 40, 1 )
sleep(6)
grav( 6, 3, 40, 1 )
sleep(6)
grav( 4, 2, 50, 6 )
sleep(6)
grav( 3, 2, 50, 6 )
sleep(6)
grav( 2, 2, 75,25 )
sleep(6)
//MOVEMENT
if( prob(50) )
src.anchored = 0
step(src,pick(alldirs))
src.anchored = 1
/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
qdel(src)
return
for(var/t = -r, t < r, t++)
affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
return
/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
//Get turf at coordinate
var/turf/T = locate(x, y, z)
if(isnull(T)) return
//Pulling and/or ex_act-ing movable atoms in that turf
if( prob(pull_chance) )
for(var/obj/O in T.contents)
if(O.anchored)
O.ex_act(ex_act_force)
else
step_towards(O,src)
for(var/mob/living/M in T.contents)
step_towards(M,src)
//Destroying the turf
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
var/turf/simulated/ST = T
ST.ChangeTurf(/turf/space)
return

View File

@@ -1,95 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
#define STATE_DEFAULT 1
#define STATE_INJECTOR 2
#define STATE_ENGINE 3
/obj/machinery/computer/am_engine
name = "Antimatter Engine Console"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "comm_computer"
req_access = list(ACCESS_ENGINE)
var/engine_id = 0
var/authenticated = 0
var/obj/machinery/power/am_engine/engine/connected_E = null
var/obj/machinery/power/am_engine/injector/connected_I = null
var/state = STATE_DEFAULT
/obj/machinery/computer/am_engine/New()
..()
spawn( 24 )
for(var/obj/machinery/power/am_engine/engine/E in world)
if(E.engine_id == src.engine_id)
src.connected_E = E
for(var/obj/machinery/power/am_engine/injector/I in world)
if(I.engine_id == src.engine_id)
src.connected_I = I
return
/obj/machinery/computer/am_engine/Topic(href, href_list)
if(..())
return
usr.machine = src
if(!href_list["operation"])
return
switch(href_list["operation"])
// main interface
if("activate")
src.connected_E.engine_process()
if("engine")
src.state = STATE_ENGINE
if("injector")
src.state = STATE_INJECTOR
if("main")
src.state = STATE_DEFAULT
if("login")
var/mob/M = usr
var/obj/item/weapon/card/id/I = M.equipped()
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if("deactivate")
src.connected_E.stopping = 1
if("logout")
authenticated = 0
src.updateUsrDialog()
/obj/machinery/computer/am_engine/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/am_engine/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/am_engine/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat = "<head><title>Engine Computer</title></head><body>"
switch(src.state)
if(STATE_DEFAULT)
if (src.authenticated)
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]<br>"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=engine'>Engine Menu</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=injector'>Injector Menu</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=login'>Log In</A> \]"
if(STATE_INJECTOR)
if(src.connected_I.injecting)
dat += "<BR>\[ Injecting \]<br>"
else
dat += "<BR>\[ Injecting not in progress \]<br>"
if(STATE_ENGINE)
if(src.connected_E.stopping)
dat += "<BR>\[ STOPPING \]"
else if(src.connected_E.operating && !src.connected_E.stopping)
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=deactivate'>Emergency Stop</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=activate'>Activate Engine</A> \]"
dat += "<BR>Contents:<br>[src.connected_E.H_fuel]kg of Hydrogen<br>[src.connected_E.antiH_fuel]kg of Anti-Hydrogen<br>"
dat += "<BR>\[ [(src.state != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
user << browse(dat, "window=communications;size=400x500")
onclose(user, "communications")

View File

@@ -1,41 +0,0 @@
/obj/item/weapon/am_containment
name = "antimatter containment jar"
desc = "Holds antimatter."
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "jar"
density = 0
anchored = 0
force = 8
throwforce = 10
throw_speed = 1
throw_range = 2
var/fuel = 10000
var/fuel_max = 10000//Lets try this for now
var/stability = 100//TODO: add all the stability things to this so its not very safe if you keep hitting in on things
/obj/item/weapon/am_containment/ex_act(severity)
switch(severity)
if(1.0)
explosion(get_turf(src), 1, 2, 3, 5)//Should likely be larger but this works fine for now I guess
if(src)
qdel(src)
return
if(2.0)
if(prob((fuel/10)-stability))
explosion(get_turf(src), 1, 2, 3, 5)
if(src)
qdel(src)
return
stability -= 40
if(3.0)
stability -= 20
//check_stability()
return
/obj/item/weapon/am_containment/proc/usefuel(var/wanted)
if(fuel < wanted)
wanted = fuel
fuel -= wanted
return wanted

View File

@@ -1,339 +0,0 @@
/obj/machinery/power/am_control_unit
name = "antimatter control unit"
desc = "This device injects antimatter into connected shielding units, the more antimatter injected the more power produced. Wrench the device to set it up."
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "control"
anchored = 1
density = 1
use_power = 1
idle_power_usage = 100
active_power_usage = 1000
var/list/obj/machinery/am_shielding/linked_shielding
var/list/obj/machinery/am_shielding/linked_cores
var/obj/item/weapon/am_containment/fueljar
var/update_shield_icons = 0
var/stability = 100
var/exploding = 0
var/active = 0//On or not
var/fuel_injection = 2//How much fuel to inject
var/shield_icon_delay = 0//delays resetting for a short time
var/reported_core_efficiency = 0
var/power_cycle = 0
var/power_cycle_delay = 4//How many ticks till produce_power is called
var/stored_core_stability = 0
var/stored_core_stability_delay = 0
var/stored_power = 0//Power to deploy per tick
/obj/machinery/power/am_control_unit/New()
..()
linked_shielding = list()
linked_cores = list()
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
del(AMS)
return ..()
/obj/machinery/power/am_control_unit/process()
if(exploding)
explosion(get_turf(src),8,12,18,12)
if(src) del(src)
if(update_shield_icons && !shield_icon_delay)
check_shield_icons()
update_shield_icons = 0
if(stat & (NOPOWER|BROKEN) || !active)//can update the icons even without power
return
if(!fueljar)//No fuel but we are on, shutdown
toggle_power()
//Angry buzz or such here
return
add_avail(stored_power)
power_cycle++
if(power_cycle >= power_cycle_delay)
produce_power()
power_cycle = 0
return
/obj/machinery/power/am_control_unit/proc/produce_power()
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
var/core_power = reported_core_efficiency//Effectively how much fuel we can safely deal with
if(core_power <= 0) return 0//Something is wrong
var/core_damage = 0
var/fuel = fueljar.usefuel(fuel_injection)
stored_power = (fuel/core_power)*fuel*200000
//Now check if the cores could deal with it safely, this is done after so you can overload for more power if needed, still a bad idea
if(fuel > (2*core_power))//More fuel has been put in than the current cores can deal with
if(prob(50))core_damage = 1//Small chance of damage
if((fuel-core_power) > 5) core_damage = 5//Now its really starting to overload the cores
if((fuel-core_power) > 10) core_damage = 20//Welp now you did it, they wont stand much of this
if(core_damage == 0) return
for(var/obj/machinery/am_shielding/AMS in linked_cores)
AMS.stability -= core_damage
AMS.check_stability(1)
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1)
return
/obj/machinery/power/am_control_unit/emp_act(severity)
switch(severity)
if(1)
if(active) toggle_power()
stability -= rand(15,30)
if(2)
if(active) toggle_power()
stability -= rand(10,20)
..()
return 0
/obj/machinery/power/am_control_unit/blob_act()
stability -= 20
if(prob(100-stability))//Might infect the rest of the machine
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.blob_act()
spawn(0)
//Likely explode
del(src)
return
check_stability()
return
/obj/machinery/power/am_control_unit/ex_act(severity)
switch(severity)
if(1.0)
stability -= 60
if(2.0)
stability -= 40
if(3.0)
stability -= 20
check_stability()
return
/obj/machinery/power/am_control_unit/bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet")
stability -= Proj.force
return 0
/obj/machinery/power/am_control_unit/power_change()
..()
if(stat & NOPOWER && active)
toggle_power()
return
/obj/machinery/power/am_control_unit/update_icon()
if(active) icon_state = "control_on"
else icon_state = "control"
//No other icons for it atm
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
if(!istype(W) || !user) return
if(istype(W, /obj/item/weapon/wrench))
if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the anchor bolts to the floor.", \
"You hear a ratchet")
src.anchored = 1
connect_to_network()
else if(!linked_shielding.len > 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures the [src.name].", \
"You remove the anchor bolts.", \
"You hear a ratchet")
src.anchored = 0
disconnect_from_network()
else
user << "\red Once bolted and linked to a shielding unit it the [src.name] is unable to be moved!"
return
if(istype(W, /obj/item/weapon/am_containment))
if(fueljar)
user << "\red There is already a [fueljar] inside!"
return
fueljar = W
W.loc = src
if(user.client)
user.client.screen -= W
user.unEquip(W)
user.update_icons()
user.visible_message("[user.name] loads an [W.name] into the [src.name].", \
"You load an [W.name].", \
"You hear a thunk.")
return
if(W.force >= 20)
stability -= W.force/2
check_stability()
..()
return
/obj/machinery/power/am_control_unit/attack_hand(mob/user as mob)
if(anchored)
interact(user)
return
/obj/machinery/power/am_control_unit/proc/add_shielding(var/obj/machinery/am_shielding/AMS, var/AMS_linking = 0)
if(!istype(AMS)) return 0
if(!anchored) return 0
if(!AMS_linking && !AMS.link_control(src)) return 0
linked_shielding.Add(AMS)
update_shield_icons = 1
return 1
/obj/machinery/power/am_control_unit/proc/remove_shielding(var/obj/machinery/am_shielding/AMS)
if(!istype(AMS)) return 0
linked_shielding.Remove(AMS)
update_shield_icons = 2
if(active) toggle_power()
return 1
/obj/machinery/power/am_control_unit/proc/check_stability()//TODO: make it break when low also might want to add a way to fix it like a part or such that can be replaced
if(stability <= 0)
del(src)
return
/obj/machinery/power/am_control_unit/proc/toggle_power()
active = !active
if(active)
use_power = 2
visible_message("The [src.name] starts up.")
else
use_power = 1
visible_message("The [src.name] shuts down.")
update_icon()
return
/obj/machinery/power/am_control_unit/proc/check_shield_icons()//Forces icon_update for all shields
if(shield_icon_delay) return
shield_icon_delay = 1
if(update_shield_icons == 2)//2 means to clear everything and rebuild
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
if(AMS.processing) AMS.shutdown_core()
AMS.control_unit = null
spawn(10)
AMS.controllerscan()
linked_shielding = list()
else
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.update_icon()
spawn(20)
shield_icon_delay = 0
return
/obj/machinery/power/am_control_unit/proc/check_core_stability()
if(stored_core_stability_delay || linked_cores.len <= 0) return
stored_core_stability_delay = 1
stored_core_stability = 0
for(var/obj/machinery/am_shielding/AMS in linked_cores)
stored_core_stability += AMS.stability
stored_core_stability/=linked_cores.len
spawn(40)
stored_core_stability_delay = 0
return
/obj/machinery/power/am_control_unit/interact(mob/user)
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!istype(user, /mob/living/silicon/ai))
user.unset_machine()
user << browse(null, "window=AMcontrol")
return
user.set_machine(src)
var/dat = ""
dat += "AntiMatter Control Panel<BR>"
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A><BR>"
dat += "<A href='?src=\ref[src];refreshicons=1'>Force Shielding Update</A><BR><BR>"
dat += "Status: [(active?"Injecting":"Standby")] <BR>"
dat += "<A href='?src=\ref[src];togglestatus=1'>Toggle Status</A><BR>"
dat += "Stability: [stability]%<BR>"
dat += "Reactor parts: [linked_shielding.len]<BR>"//TODO: perhaps add some sort of stability check
dat += "Cores: [linked_cores.len]<BR><BR>"
dat += "-Current Efficiency: [reported_core_efficiency]<BR>"
dat += "-Average Stability: [stored_core_stability] <A href='?src=\ref[src];refreshstability=1'>(update)</A><BR>"
dat += "Last Produced: [stored_power]<BR>"
dat += "Fuel: "
if(!fueljar)
dat += "<BR>No fuel receptacle detected."
else
dat += "<A href='?src=\ref[src];ejectjar=1'>Eject</A><BR>"
dat += "- [fueljar.fuel]/[fueljar.fuel_max] Units<BR>"
dat += "- Injecting: [fuel_injection] units<BR>"
dat += "- <A href='?src=\ref[src];strengthdown=1'>--</A>|<A href='?src=\ref[src];strengthup=1'>++</A><BR><BR>"
user << browse(dat, "window=AMcontrol;size=420x500")
onclose(user, "AMcontrol")
return
/obj/machinery/power/am_control_unit/Topic(href, href_list)
..()
//Ignore input if we are broken or guy is not touching us, AI can control from a ways away
if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon/ai)))
usr.unset_machine()
usr << browse(null, "window=AMcontrol")
return
if(href_list["close"])
usr << browse(null, "window=AMcontrol")
usr.unset_machine()
return
if(href_list["togglestatus"])
toggle_power()
if(href_list["refreshicons"])
update_shield_icons = 1
if(href_list["ejectjar"])
if(fueljar)
fueljar.loc = src.loc
fueljar = null
//fueljar.control_unit = null currently it does not care where it is
//update_icon() when we have the icon for it
if(href_list["strengthup"])
fuel_injection++
if(href_list["strengthdown"])
fuel_injection--
if(fuel_injection < 0) fuel_injection = 0
if(href_list["refreshstability"])
check_core_stability()
updateDialog()
return

View File

@@ -1,207 +0,0 @@
/obj/machinery/power/am_engine
icon = 'icons/am_engine.dmi'
density = 1
anchored = 1.0
flags = ON_BORDER
/obj/machinery/power/am_engine/bits
name = "Antimatter Engine"
icon_state = "1"
/obj/machinery/power/am_engine/engine
name = "Antimatter Engine"
icon_state = "am_engine"
var/engine_id = 0
var/H_fuel = 0
var/antiH_fuel = 0
var/operating = 0
var/stopping = 0
var/obj/machinery/power/am_engine/injector/connected = null
/obj/machinery/power/am_engine/injector
name = "Injector"
icon_state = "injector"
var/engine_id = 0
var/injecting = 0
var/fuel = 0
var/obj/machinery/power/am_engine/engine/connected = null
//injector
/obj/machinery/power/am_engine/injector/New()
..()
spawn( 13 )
var/loc = get_step(src, NORTH)
src.connected = locate(/obj/machinery/power/am_engine/engine, get_step(loc, NORTH))
return
return
/obj/machinery/power/am_engine/injector/attackby(obj/item/weapon/fuel/F, mob/user, params)
if( (stat & BROKEN) || !connected) return
if(istype(F, /obj/item/weapon/fuel/H))
if(injecting)
user << "Theres already a fuel rod in the injector!"
return
user << "You insert the rod into the injector"
injecting = 1
var/fuel = F.fuel
del(F)
spawn( 300 )
injecting = 0
new/obj/item/weapon/fuel(src.loc)
connected.H_fuel += fuel
if(istype(F, /obj/item/weapon/fuel/antiH))
if(injecting)
user << "Theres already a fuel rod in the injector!"
return
user << "You insert the rod into the injector"
injecting = 1
var/fuel = F.fuel
del(F)
spawn( 300 )
injecting = 0
new /obj/item/weapon/fuel(src.loc)
connected.antiH_fuel += fuel
return
//engine
/obj/machinery/power/am_engine/engine/New()
..()
spawn( 7 )
var/loc = get_step(src, SOUTH)
src.connected = locate(/obj/machinery/power/am_engine/injector, get_step(loc, SOUTH))
return
return
/obj/machinery/power/am_engine/engine/proc/engine_go()
if( (!src.connected) || (stat & BROKEN) )
return
if(!antiH_fuel || !H_fuel)
return
operating = 1
var/energy = 0
if(antiH_fuel == H_fuel)
var/mass = antiH_fuel + H_fuel
energy = convert2energy(mass)
H_fuel = 0
antiH_fuel = 0
else
var/residual_matter = modulus(H_fuel - antiH_fuel)
var/mass = antiH_fuel + H_fuel - residual_matter
energy = convert2energy(mass)
if( H_fuel > antiH_fuel )
H_fuel = residual_matter
antiH_fuel = 0
else
H_fuel = 0
antiH_fuel = residual_matter
for(var/mob/M in hearers(src, null))
M.show_message(text("\red You hear a loud bang!"))
//Q = k x (delta T)
energy = energy*0.75
operating = 0
//TODO: DEFERRED Heat tile
return
/obj/machinery/power/am_engine/engine/proc/engine_process()
do
if( (!src.connected) || (stat & BROKEN) )
return
if(!antiH_fuel || !H_fuel)
return
if(operating)
return
operating = 1
sleep(50)
var/energy //energy from the reaction
var/H //residual matter if H
var/antiH //residual matter if antiH
var/mass //total mass
if(antiH_fuel == H_fuel) //if they're equal then convert the whole mass to energy
mass = antiH_fuel + H_fuel
energy = convert2energy(mass)
else //else if they're not equal determine which isn't equal
//and set it equal to either H or antiH so we don't lose anything
var/residual_matter = modulus(H_fuel - antiH_fuel)
mass = antiH_fuel + H_fuel - residual_matter
energy = convert2energy(mass)
if( H_fuel > antiH_fuel )
H = residual_matter
else
antiH = residual_matter
if(energy > convert2energy(8e-12)) //TOO MUCH ENERGY
for(var/mob/M in hearers(src, null))
M.show_message(text("\red You hear a loud whirring!"))
sleep(20)
//Q = k x (delta T)
//Too much energy so machine panics and dissapates half of it as heat
//The rest of the energetic photons then form into H and anti H particles again!
H_fuel -= H
antiH_fuel -= antiH
antiH_fuel = antiH_fuel/2
H_fuel = H_fuel/2
energy = convert2energy(H_fuel + antiH_fuel)
H_fuel += H
antiH_fuel += antiH
if(energy > convert2energy(8e-12)) //FAR TOO MUCH ENERGY STILL
for(var/mob/M in hearers(src, null))
M.show_message(text("\red <big>BANG!</big>"))
new /obj/effect/bhole(src.loc)
else //this amount of energy is okay so it does the proper output thing
sleep(60)
//E = Pt
//Lets say its 86% efficient
var/output = 0.86*energy/20
add_avail(output)
//yeah the machine realises that something isn't right and accounts for it if H or antiH
H_fuel -= H
antiH_fuel -= antiH
antiH_fuel = antiH_fuel/4
H_fuel = H_fuel/4
H_fuel += H
antiH_fuel += antiH
operating = 0
sleep(100)
while(!stopping)
stopping = 0
return

View File

@@ -1,99 +0,0 @@
/obj/item/weapon/fuel
name = "Magnetic Storage Ring"
desc = "A magnetic storage ring."
icon = 'icons/obj/items.dmi'
icon_state = "rcdammo"
opacity = 0
density = 0
anchored = 0.0
var/fuel = 0
var/s_time = 1.0
var/content = null
/obj/item/weapon/fuel/H
name = "Hydrogen storage ring"
content = "Hydrogen"
fuel = 1e-12 //pico-kilogram
/obj/item/weapon/fuel/antiH
name = "Anti-Hydrogen storage ring"
content = "Anti-Hydrogen"
fuel = 1e-12 //pico-kilogram
/obj/item/weapon/fuel/attackby(obj/item/weapon/fuel/F, mob/user, params)
..()
if(istype(src, /obj/item/weapon/fuel/antiH))
if(istype(F, /obj/item/weapon/fuel/antiH))
src.fuel += F.fuel
F.fuel = 0
user << "You have added the anti-Hydrogen to the storage ring, it now contains [src.fuel]kg"
if(istype(F, /obj/item/weapon/fuel/H))
src.fuel += F.fuel
del(F)
src:annihilation(src.fuel)
if(istype(src, /obj/item/weapon/fuel/H))
if(istype(F, /obj/item/weapon/fuel/H))
src.fuel += F.fuel
F.fuel = 0
user << "You have added the Hydrogen to the storage ring, it now contains [src.fuel]kg"
if(istype(F, /obj/item/weapon/fuel/antiH))
src.fuel += F.fuel
del(src)
F:annihilation(F.fuel)
/obj/item/weapon/fuel/antiH/proc/annihilation(var/mass)
var/strength = convert2energy(mass)
if (strength < 773.0)
var/turf/T = get_turf(src)
if (strength > (450+T0C))
explosion(T, 0, 1, 2, 4)
else
if (strength > (300+T0C))
explosion(T, 0, 0, 2, 3)
del(src)
return
var/turf/ground_zero = get_turf(loc)
var/ground_zero_range = round(strength / 387)
explosion(ground_zero, ground_zero_range, ground_zero_range*2, ground_zero_range*3, ground_zero_range*4)
//SN src = null
del(src)
return
/obj/item/weapon/fuel/examine(mob/user)
if(..(user, 1))
user << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]."
/obj/item/weapon/fuel/proc/injest(mob/M as mob)
switch(content)
if("Anti-Hydrogen")
M.gib()
if("Hydrogen")
M << "\blue You feel very light, as if you might just float away..."
del(src)
return
/obj/item/weapon/fuel/attack(mob/M as mob, mob/user as mob)
if (user != M)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = M
O.item = src
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "fuel"
M.requests += O
spawn( 0 )
O.process()
return
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [M] ate the [content ? content : "empty canister"]!"), 1)
src.injest(M)

View File

@@ -1,221 +0,0 @@
//like orange but only checks north/south/east/west for one step
proc/cardinalrange(var/center)
var/list/things = list()
for(var/direction in cardinal)
var/turf/T = get_step(center, direction)
if(!T) continue
things += T.contents
return things
/obj/machinery/am_shielding
name = "antimatter reactor section"
desc = "This device was built using a plasma life-form that seems to increase plasma's natural ability to react with neutrinos while reducing the combustibility."
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "shield"
anchored = 1
density = 1
dir = 1
use_power = 0//Living things generally dont use power
idle_power_usage = 0
active_power_usage = 0
var/obj/machinery/power/am_control_unit/control_unit = null
var/processing = 0//To track if we are in the update list or not, we need to be when we are damaged and if we ever
var/stability = 100//If this gets low bad things tend to happen
var/efficiency = 1//How many cores this core counts for when doing power processing, plasma in the air and stability could affect this
/obj/machinery/am_shielding/New(loc)
..(loc)
spawn(10)
controllerscan()
return
/obj/machinery/am_shielding/proc/controllerscan(var/priorscan = 0)
//Make sure we are the only one here
if(!istype(src.loc, /turf))
del(src)
return
for(var/obj/machinery/am_shielding/AMS in loc.contents)
if(AMS == src) continue
spawn(0)
del(src)
return
//Search for shielding first
for(var/obj/machinery/am_shielding/AMS in cardinalrange(src))
if(AMS && AMS.control_unit && link_control(AMS.control_unit))
break
if(!control_unit)//No other guys nearby look for a control unit
for(var/direction in cardinal)
for(var/obj/machinery/power/am_control_unit/AMC in cardinalrange(src))
if(AMC.add_shielding(src))
break
if(!control_unit)
if(!priorscan)
spawn(20)
controllerscan(1)//Last chance
return
spawn(0)
del(src)
return
/obj/machinery/am_shielding/Destroy()
if(control_unit) control_unit.remove_shielding(src)
if(processing) shutdown_core()
visible_message("\red The [src.name] melts!")
//Might want to have it leave a mess on the floor but no sprites for now
return ..()
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
return 0
/obj/machinery/am_shielding/process()
if(!processing) . = PROCESS_KILL
//TODO: core functions and stability
//TODO: think about checking the airmix for plasma and increasing power output
return
/obj/machinery/am_shielding/emp_act()//Immune due to not really much in the way of electronics.
return 0
/obj/machinery/am_shielding/blob_act()
stability -= 20
if(prob(100-stability))
if(prob(10))//Might create a node
new /obj/effect/blob/node(src.loc,150)
else
new /obj/effect/blob(src.loc,60)
spawn(0)
del(src)
return
check_stability()
return
/obj/machinery/am_shielding/ex_act(severity)
switch(severity)
if(1.0)
stability -= 80
if(2.0)
stability -= 40
if(3.0)
stability -= 20
check_stability()
return
/obj/machinery/am_shielding/bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet")
stability -= Proj.force/2
return 0
/obj/machinery/am_shielding/update_icon()
overlays.Cut()
for(var/direction in alldirs)
var/machine = locate(/obj/machinery, get_step(loc, direction))
if((istype(machine, /obj/machinery/am_shielding) && machine:control_unit == control_unit)||(istype(machine, /obj/machinery/power/am_control_unit) && machine == control_unit))
overlays += "shield_[direction]"
if(core_check())
overlays += "core"
if(!processing) setup_core()
else if(processing) shutdown_core()
/obj/machinery/am_shielding/attackby(obj/item/W, mob/user, params)
if(!istype(W) || !user) return
if(W.force > 10)
stability -= W.force/2
check_stability()
..()
return
//Call this to link a detected shilding unit to the controller
/obj/machinery/am_shielding/proc/link_control(var/obj/machinery/power/am_control_unit/AMC)
if(!istype(AMC)) return 0
if(control_unit && control_unit != AMC) return 0//Already have one
control_unit = AMC
control_unit.add_shielding(src,1)
return 1
//Scans cards for shields or the control unit and if all there it
/obj/machinery/am_shielding/proc/core_check()
for(var/direction in alldirs)
var/machine = locate(/obj/machinery, get_step(loc, direction))
if(!machine) return 0//Need all for a core
if(!istype(machine, /obj/machinery/am_shielding) && !istype(machine, /obj/machinery/power/am_control_unit)) return 0
return 1
/obj/machinery/am_shielding/proc/setup_core()
processing = 1
machines.Add(src)
if(!control_unit) return
control_unit.linked_cores.Add(src)
control_unit.reported_core_efficiency += efficiency
return
/obj/machinery/am_shielding/proc/shutdown_core()
processing = 0
if(!control_unit) return
control_unit.linked_cores.Remove(src)
control_unit.reported_core_efficiency -= efficiency
return
/obj/machinery/am_shielding/proc/check_stability(var/injecting_fuel = 0)
if(stability > 0) return
if(injecting_fuel && control_unit)
control_unit.exploding = 1
if(src)
del(src)
return
/obj/machinery/am_shielding/proc/recalc_efficiency(var/new_efficiency)//tbh still not 100% sure how I want to deal with efficiency so this is likely temp
if(!control_unit || !processing) return
if(stability < 50)
new_efficiency /= 2
control_unit.reported_core_efficiency += (new_efficiency - efficiency)
efficiency = new_efficiency
return
/obj/item/device/am_shielding_container
name = "packaged antimatter reactor section"
desc = "A small storage unit containing an antimatter reactor section. To use place near an antimatter control unit or deployed antimatter reactor section and use a multitool to activate this package."
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "box"
item_state = "electronic"
w_class = 4.0
flags = CONDUCT
throwforce = 5
throw_speed = 1
throw_range = 2
m_amt = 100
w_amt = 2000
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
new/obj/machinery/am_shielding(src.loc)
del(src)
return
..()
return

View File

@@ -1,734 +0,0 @@
// ***********************************************************
// Foods that are produced from hydroponics ~~~~~~~~~~
// Data from the seeds carry over to these grown foods
// ***********************************************************
//Grown foods
//Subclass so we can pass on values
/obj/item/weapon/reagent_containers/food/snacks/grown/
var/plantname
var/potency = -1
icon = 'icons/obj/harvest.dmi'
New(newloc,newpotency)
if (!isnull(newpotency))
potency = newpotency
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
/obj/item/weapon/reagent_containers/food/snacks/grown/New()
..()
//Handle some post-spawn var stuff.
spawn(1)
// Fill the object up with the appropriate reagents.
if(!isnull(plantname))
var/datum/seed/S = seed_types[plantname]
if(!S || !S.chems)
return
potency = S.potency
for(var/rid in S.chems)
var/list/reagent_data = S.chems[rid]
var/rtotal = reagent_data[1]
if(reagent_data.len > 1 && potency > 0)
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
if(reagents.total_volume > 0)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/corn
name = "ear of corn"
desc = "Needs some butter!"
plantname = "corn"
icon_state = "corn"
potency = 40
filling_color = "#FFEE00"
trash = /obj/item/weapon/corncob
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
gender = PLURAL
plantname = "cherry"
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
name = "poppy"
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
potency = 30
filling_color = "#CC6464"
plantname = "poppies"
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
name = "harebell"
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten<65>d not thy breath.\""
icon_state = "harebell"
potency = 1
filling_color = "#D4B2C9"
plantname = "harebells"
/obj/item/weapon/reagent_containers/food/snacks/grown/potato
name = "potato"
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
potency = 25
filling_color = "#E6E8DA"
plantname = "potato"
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/stack/cable_coil))
if(W:amount >= 5)
W:amount -= 5
if(!W:amount) del(W)
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
pocell.maxcharge = src.potency * 10
pocell.charge = pocell.maxcharge
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
filling_color = "#A332AD"
plantname = "grapes"
/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes
name = "bunch of green grapes"
desc = "Nutritious!"
icon_state = "greengrapes"
potency = 25
filling_color = "#A6FFA3"
plantname = "greengrapes"
/obj/item/weapon/reagent_containers/food/snacks/grown/peanut
name = "peanut"
desc = "Nuts!"
icon_state = "peanut"
filling_color = "857e27"
potency = 25
plantname = "peanut"
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
name = "cabbage"
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
potency = 25
filling_color = "#A2B5A1"
plantname = "cabbage"
/obj/item/weapon/reagent_containers/food/snacks/grown/berries
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
filling_color = "#C2C9FF"
plantname = "berries"
/obj/item/weapon/reagent_containers/food/snacks/grown/plastellium
name = "clump of plastellium"
desc = "Hmm, needs some processing"
icon_state = "plastellium"
filling_color = "#C4C4C4"
plantname = "plastic"
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
name = "S'rendarr's Hand leaf"
desc = "A leaf sample from a lowland thicket shrub. Smells strongly like wax."
icon_state = "shand"
filling_color = "#70C470"
plantname = "shand"
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear
name = "sprig of Messa's Tear"
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of healing chemicals."
icon_state = "mtear"
filling_color = "#70C470"
plantname = "mtear"
/obj/item/weapon/reagent_containers/food/snacks/grown/mtear/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
poultice.heal_burn = potency
del(src)
user << "<span class='notice'>You mash the petals into a poultice.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/shand/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
poultice.heal_brute = potency
del(src)
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries
name = "bunch of glow-berries"
desc = "Nutritious!"
var/light_on = 1
var/brightness_on = 2 //luminosity when on
filling_color = "#D3FF9E"
icon_state = "glowberrypile"
plantname = "glowberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Destroy()
if(istype(loc,/mob))
loc.set_light(round(loc.luminosity - potency/5,1))
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
src.set_light(0)
user.set_light(round(user.luminosity + (potency/5),1))
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
user.set_light(round(user.luminosity - (potency/5),1))
src.set_light(round(potency/5,1))
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
name = "cocoa pod"
desc = "Can be ground into cocoa powder."
icon_state = "cocoapod"
potency = 50
filling_color = "#9C8E54"
plantname = "cocoa"
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
name = "sugarcane"
desc = "Sickly sweet."
icon_state = "sugarcane"
potency = 50
filling_color = "#C0C9AD"
plantname = "sugarcane"
/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries
name = "bunch of poison-berries"
desc = "Taste so good, you could die!"
icon_state = "poisonberrypile"
gender = PLURAL
potency = 15
filling_color = "#B422C7"
plantname = "poisonberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries
name = "bunch of death-berries"
desc = "Taste so good, you could die!"
icon_state = "deathberrypile"
gender = PLURAL
potency = 50
filling_color = "#4E0957"
plantname = "deathberries"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
name = "ambrosia vulgaris branch"
desc = "This is a plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
slot_flags = SLOT_HEAD
potency = 10
filling_color = "#125709"
plantname = "ambrosia"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/rollingpaper))
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/J = new /obj/item/clothing/mask/cigarette/joint(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
del(W)
user.put_in_active_hand(J)
user << "\blue You roll the ambrosia vulgaris into a rolling paper."
del(src)
else
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus
name = "ambrosia deus branch"
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
slot_flags = SLOT_HEAD
potency = 10
filling_color = "#229E11"
plantname = "ambrosiadeus"
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/rollingpaper))
user.unEquip(W)
var/obj/item/clothing/mask/cigarette/joint/deus/J = new /obj/item/clothing/mask/cigarette/joint/deus(user.loc)
J.chem_volume = src.reagents.total_volume
src.reagents.trans_to(J, J.chem_volume)
del(W)
user.put_in_active_hand(J)
user << "\blue You roll the ambrosia deus into a rolling paper."
del(src)
else
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/apple
name = "apple"
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#DFE88B"
plantname = "apple"
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
name = "apple"
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#B3BD5E"
plantname = "poisonapple"
/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple
name = "golden apple"
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
potency = 15
filling_color = "#F5CB42"
plantname = "goldapple"
/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
name = "watermelon"
desc = "It's full of watery goodness."
icon_state = "watermelon"
potency = 10
filling_color = "#FA2863"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
plantname = "watermelon"
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
name = "pumpkin"
desc = "It's large and scary."
icon_state = "pumpkin"
potency = 10
filling_color = "#FAB728"
plantname = "pumpkin"
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy))
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
new /obj/item/clothing/head/hardhat/pumpkinhead (user.loc)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/lime
name = "lime"
desc = "It's so sour, your face will twist."
icon_state = "lime"
potency = 20
filling_color = "#28FA59"
plantname = "lime"
/obj/item/weapon/reagent_containers/food/snacks/grown/lemon
name = "lemon"
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
potency = 20
filling_color = "#FAF328"
plantname = "lemon"
/obj/item/weapon/reagent_containers/food/snacks/grown/orange
name = "orange"
desc = "It's an tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"
plantname = "orange"
/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
name = "white-beet"
desc = "You can't beat white-beet."
icon_state = "whitebeet"
potency = 15
filling_color = "#FFFCCC"
plantname = "whitebeet"
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
name = "banana"
desc = "It's an excellent prop for a comedy."
icon = 'icons/obj/items.dmi'
icon_state = "banana"
item_state = "banana"
filling_color = "#FCF695"
trash = /obj/item/weapon/bananapeel
plantname = "banana"
/obj/item/weapon/reagent_containers/food/snacks/grown/chili
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
plantname = "chili"
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#550F5C"
plantname = "eggplant"
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
filling_color = "#E6E8B7"
icon_state = "soybeans"
plantname = "soybean"
/obj/item/weapon/reagent_containers/food/snacks/grown/koibeans
name = "koibean"
desc = "Something about these seems fishy."
icon_state = "koibeans"
/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
name = "moonflower"
desc = "Store in a location at least 50 yards away from werewolves."
icon_state = "moonflower"
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chilli
name = "ghost chili"
desc = "It seems to be vibrating gently."
icon_state = "ghostchilipepper"
var/mob/held_mob
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
filling_color = "#FF0000"
potency = 10
plantname = "tomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/tomato_smudge(src.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato
name = "killer-tomato"
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
icon_state = "killertomato"
potency = 10
filling_color = "#FF0000"
potency = 30
plantname = "killertomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
new /mob/living/simple_animal/tomato(user.loc)
del(src)
user << "<span class='notice'>You plant the killer-tomato.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato
name = "blood-tomato"
desc = "So bloody...so...very...bloody....AHHHH!!!!"
icon_state = "bloodtomato"
potency = 10
filling_color = "#FF0000"
plantname = "bloodtomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/blood/splatter(src.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
src.reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato
name = "blue-tomato"
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
potency = 10
filling_color = "#586CFC"
plantname = "bluetomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/blood/oil(src.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
src.reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
del(src)
return
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/Crossed(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
M.Stun(8)
M.Weaken(5)
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
name = "wheat"
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F7E186"
plantname = "wheat"
/obj/item/weapon/reagent_containers/food/snacks/grown/ricestalk
name = "rice stalk"
desc = "Rice to see you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FFF8DB"
plantname = "rice"
/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#59691B"
plantname = "kudzu"
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
name = "ice-pepper"
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
potency = 20
filling_color = "#66CEED"
plantname = "icechili"
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
name = "carrot"
desc = "It's good for the eyes!"
icon_state = "carrot"
potency = 10
filling_color = "#FFC400"
plantname = "carrot"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
name = "reishi"
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
icon_state = "reishi"
potency = 10
filling_color = "#FF4800"
plantname = "reishi"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
name = "fly amanita"
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
potency = 10
filling_color = "#FF0000"
plantname = "amanita"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
name = "destroying angel"
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
potency = 35
filling_color = "#FFDEDE"
plantname = "destroyingangel"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
name = "liberty-cap"
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
potency = 15
filling_color = "#F714BE"
plantname = "libertycap"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#F714BE"
plantname = "plumphelmet"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#FFBFEF"
potency = 30
plantname = "walkingmushroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
M.maxHealth += round(potency / 4)
M.melee_damage_lower += round(potency / 20)
M.melee_damage_upper += round(potency / 20)
M.move_to_delay -= round(potency / 50)
M.health = M.maxHealth
del(src)
user << "<span class='notice'>You plant the walking mushroom.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFE991"
plantname = "mushrooms"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
icon_state = "glowshroom"
filling_color = "#DAFF91"
potency = 30
plantname = "glowshroom"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob)
if(istype(user.loc,/turf/space))
return
var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
planted.delay = 50
planted.endurance = 100
planted.potency = potency
del(src)
user << "<span class='notice'>You plant the glowshroom.</span>"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Destroy()
if(istype(loc,/mob))
loc.set_light(round(loc.luminosity - potency/10,1))
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
set_light(0)
user.set_light(round(user.luminosity + (potency/10),1))
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
user.set_light(round(user.luminosity - (potency/10),1))
set_light(round(potency/10,1))
//Tobacco/varieties
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco
name = "tobacco leaves"
desc = "It's tobacco... Put that in your pipe and smoke it."
icon_state = "tobacco_leaves"
filling_color = "#FFE991"
plantname = "tobacco"
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space
name = "space-tobacco leaves"
desc = "It's tobacco... From SPACE!"
icon_state = "stobacco_leaves"
filling_color = "#FFE991"
plantname = "stobacco"
//Tea/varieties
/obj/item/weapon/reagent_containers/food/snacks/grown/teaaspera
name = "tea-aspera leaves"
desc = "Tea Aspera is well documented to have beneficial health effects!"
icon_state = "tea_aspera_leaves"
filling_color = "#7F8400"
plantname = "teaaspera"
/obj/item/weapon/reagent_containers/food/snacks/grown/teaastra
name = "tea-astra leaves"
desc = "Tea Astra is well documented to have significant health effects."
icon_state = "tea_astra_leaves"
filling_color = "#7F8400"
plantname = "teaastra"
//Coffee/varieties
/obj/item/weapon/reagent_containers/food/snacks/grown/coffeea
name = "coffee-arabica beans"
desc = "Coffee Arabica: A great way start to your morning, or to prolong your nights."
icon_state = "coffee_arabica"
filling_color = "#5B2E0D"
plantname = "coffeea"
/obj/item/weapon/reagent_containers/food/snacks/grown/coffeer
name = "coffee-robusta beans"
desc = "Coffee Robusta: Coffe so robust we had to put it in the name."
icon_state = "coffee_robusta"
filling_color = "#5B2E0D"
plantname = "coffeer"
// *************************************
// Complex Grown Object Defines -
// Putting these at the bottom so they don't clutter the list up. -Cheridan
// *************************************
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato
name = "blue-space tomato"
desc = "So lubricated, you might slip through space-time."
icon_state = "bluespacetomato"
potency = 20
origin_tech = "bluespace=3"
filling_color = "#91F8FF"
plantname = "bluespacetomato"
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato/throw_impact(atom/hit_atom)
..()
var/mob/M = usr
var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport.
var/inner_teleport_radius = potency/15
var/list/turfs = new/list()
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats.
new/obj/effect/decal/cleanable/blood/oil(src.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed.</span>","<span class='moderate'>You hear a smack.</span>")
del(src)
return
for(var/turf/T in orange(M,outer_teleport_radius))
if(T in orange(M,inner_teleport_radius)) continue
if(istype(T,/turf/space)) continue
if(T.density) continue
if(T.x>world.maxx-outer_teleport_radius || T.x<outer_teleport_radius) continue
if(T.y>world.maxy-outer_teleport_radius || T.y<outer_teleport_radius) continue
turfs += T
if(!turfs.len)
var/list/turfs_to_pick_from = list()
for(var/turf/T in orange(M,outer_teleport_radius))
if(!(T in orange(M,inner_teleport_radius)))
turfs_to_pick_from += T
turfs += pick(/turf in turfs_to_pick_from)
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
switch(rand(1,2))//Decides randomly to teleport the thrower or the throwee.
if(1) // Teleports the person who threw the tomato.
s.set_up(3, 1, M)
s.start()
new/obj/effect/decal/cleanable/molten_item(M.loc) //Leaves a pile of goo behind for dramatic effect.
M.loc = picked //
sleep(1)
s.set_up(3, 1, M)
s.start() //Two set of sparks, one before the teleport and one after.
if(2) //Teleports mob the tomato hit instead.
for(var/mob/A in get_turf(hit_atom))//For the mobs in the tile that was hit...
s.set_up(3, 1, A)
s.start()
new/obj/effect/decal/cleanable/molten_item(A.loc) //Leave a pile of goo behind for dramatic effect...
A.loc = picked//And teleport them to the chosen location.
sleep(1)
s.set_up(3, 1, A)
s.start()
new/obj/effect/decal/cleanable/blood/oil(src.loc)
src.visible_message("<span class='notice'>The [src.name] has been squashed, causing a distortion in space-time.</span>","<span class='moderate'>You hear a splat and a crackle.</span>")
del(src)
return

View File

@@ -1,195 +0,0 @@
/client/verb/tcssave()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/tcssave() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
var/tcscode = winget(src, "tcscode", "text")
Server.setcode( tcscode ) // this actually saves the code from input to the server
src << output(null, "tcserror") // clear the errors
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
/client/verb/tcscompile()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/tcscompile() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
Server.setcode( winget(src, "tcscode", "text") ) // save code first
spawn(0)
// Output all the compile-time errors
src << output(null, "tcserror")
src << output("<font color = black>Please wait, compiling...</font>", "tcserror")
var/list/compileerrors = Server.compile(mob) // then compile the code!
if(!telecomms_check(mob))
return
if(compileerrors.len)
src << output("<b>Compile Errors</b>", "tcserror")
for(var/datum/scriptError/e in compileerrors)
src << output("<font color = red>\t>[e.message]</font color>", "tcserror")
src << output("([compileerrors.len] errors)", "tcserror")
// Output compile errors to all other people viewing the code too
for(var/mob/M in Machine.viewingcode)
if(M.client)
M << output(null, "tcserror")
M << output("<b>Compile Errors</b>", "tcserror")
for(var/datum/scriptError/e in compileerrors)
M << output("<font color = red>\t>[e.message]</font color>", "tcserror")
M << output("([compileerrors.len] errors)", "tcserror")
else
src << output("<font color = blue>TCS compilation successful!</font color>", "tcserror")
src << output("(0 errors)", "tcserror")
for(var/mob/M in Machine.viewingcode)
if(M.client)
M << output("<font color = blue>TCS compilation successful!</font color>", "tcserror")
M << output("(0 errors)", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
/client/verb/tcsrun()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/tcsrun() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
var/datum/signal/signal = new
signal.data["message"] = ""
if(Server.freq_listening.len > 0)
signal.frequency = Server.freq_listening[1]
else
signal.frequency = 1459
signal.data["name"] = ""
signal.data["job"] = ""
signal.data["reject"] = 0
signal.data["server"] = Server
Server.Compiler.Run(signal)
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font color>", "tcserror")
/client/verb/exittcs()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/exittcs() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode == mob)
Machine.storedcode = "[winget(mob, "tcscode", "text")]"
Machine.editingcode = null
else
if(mob in Machine.viewingcode)
Machine.viewingcode.Remove(mob)
/client/verb/tcsrevert()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/tcsrevert() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
// Replace quotation marks with quotation macros for proper winset() compatibility
var/showcode = replacetext(Server.rawcode, "\\\"", "\\\\\"")
showcode = replacetext(showcode, "\"", "\\\"")
winset(mob, "tcscode", "text=\"[showcode]\"")
src << output(null, "tcserror") // clear the errors
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to revert: Unable to locate server machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to revert: Unable to locate machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to revert: Unable to locate machine.</font color>", "tcserror")
/client/verb/tcsclearmem()
set hidden = 1
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\client/verb/tcsclearmem() called tick#: [world.time]")
if(mob.machine || issilicon(mob))
if(telecomms_check(mob))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
if(Machine.SelectedServer)
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
Server.memory = list() // clear the memory
// Show results
src << output(null, "tcserror")
src << output("<font color = blue>Server memory cleared!</font color>", "tcserror")
for(var/mob/M in Machine.viewingcode)
if(M.client)
M << output("<font color = blue>Server memory cleared!</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate server machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
else
src << output(null, "tcserror")
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font color>", "tcserror")
/proc/telecomms_check(var/mob/mob)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/telecomms_check() called tick#: [world.time]")
if(mob && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && in_range(mob.machine, mob) || issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic))
return 1
return 0

View File

@@ -1,26 +0,0 @@
/datum/stack
var/list/contents = list()
/datum/stack/proc/Push(value)
contents += value
/datum/stack/proc/Pop()
if(!contents.len)
return null
. = contents[contents.len]
contents.len--
/datum/stack/proc/Top() //returns the item on the top of the stack without removing it
if(!contents.len)
return null
return contents[contents.len]
/datum/stack/proc/Copy()
var/datum/stack/S = new()
S.contents = src.contents.Copy()
return S
/datum/stack/proc/Clear()
contents.Cut()

View File

@@ -1,144 +0,0 @@
//Procedures in this file: Eye mending surgery
//////////////////////////////////////////////////////////////////
// EYE SURGERY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/eye
priority = 2
can_infect = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target))
return 0
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if (!affected || (affected.status & ORGAN_ROBOT))
return 0
return target_zone == "eyes"
/datum/surgery_step/eye/cut_open
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 90
max_duration = 110
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separate the corneas on [target]'s eyes with \the [tool].", \
"You start to separate the corneas on [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated the corneas on [target]'s eyes with \the [tool]." , \
"\blue You have separated the corneas on [target]'s eyes with \the [tool].",)
target.op_stage.eyes = 1
target.blinded += 1.5
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
affected.createwound(CUT, 10)
eyes.take_damage(5, 1)
/datum/surgery_step/eye/lift_eyes
allowed_tools = list(
/obj/item/weapon/retractor = 100, \
/obj/item/weapon/kitchen/utensil/fork = 50
)
min_duration = 30
max_duration = 40
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.eyes == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts lifting corneas from [target]'s eyes with \the [tool].", \
"You start lifting corneas from [target]'s eyes with \the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has lifted the corneas from [target]'s eyes from with \the [tool]." , \
"\blue You has lifted the corneas from [target]'s eyes from with \the [tool]." )
target.op_stage.eyes = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
target.apply_damage(10, BRUTE, affected)
eyes.take_damage(5, 1)
/datum/surgery_step/eye/mend_eyes
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/stack/cable_coil = 75, \
/obj/item/device/assembly/mousetrap = 10 //I don't know. Don't ask me. But I'm leaving it because hilarity.
)
min_duration = 80
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.eyes == 2
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts mending the nerves and lenses in [target]'s eyes with \the [tool].", \
"You start mending the nerves and lenses in [target]'s eyes with the [tool].")
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] mends the nerves and lenses in [target]'s with \the [tool]." , \
"\blue You mend the nerves and lenses in [target]'s with \the [tool].")
target.op_stage.eyes = 3
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
target.apply_damage(10, BRUTE, affected, sharp=1)
eyes.take_damage(5, 0)
/datum/surgery_step/eye/cauterize
allowed_tools = list(
/obj/item/weapon/cautery = 100, \
/obj/item/clothing/mask/cigarette = 75, \
/obj/item/weapon/lighter = 50, \
/obj/item/weapon/weldingtool = 25
)
min_duration = 70
max_duration = 100
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..()
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] is beginning to cauterize the incision around [target]'s eyes with \the [tool]." , \
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
if (target.op_stage.eyes == 3)
target.disabilities &= ~NEARSIGHTED
target.sdisabilities &= ~BLIND
eyes.damage = 0
target.op_stage.eyes = 0
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/eyes/eyes = target.internal_organs_by_name["eyes"]
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
target.apply_damage(5, BURN, affected)
eyes.take_damage(5, 1)

View File

@@ -1,20 +0,0 @@
/obj/machinery/disease2/biodestroyer
name = "Biohazard destroyer"
icon = 'icons/obj/pipes/disposal.dmi'
icon_state = "disposalbio"
var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk,/obj/item/weapon/reagent_containers)
density = 1
anchored = 1
/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob, params)
for(var/path in accepts)
if(I.type in typesof(path))
user.drop_item()
del(I)
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
return
user.drop_item()
I.loc = src.loc
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue The [src.name] beeps", 2)

View File

@@ -1,51 +0,0 @@
/client/verb/listprocs()
set category = "Debug"
set name = "Debug Proc List"
var/list/atomList = typesof(/atom)
var/list/objList = typesof(/obj)
var/list/mobList = typesof(/mob)
var/list/turfList = typesof(/turf)
var/list/clientList = typesof(/client)
var/list/datumList = typesof(/datum)
var/total = 0
var/debuglog = file("data/logs/debug.log")
for (var/A in atomList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
for (var/A in objList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
for (var/A in mobList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
for (var/A in turfList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
for (var/A in clientList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
for (var/A in datumList)
var/list/procList = typesof("[A]/proc")
for(var/B in procList)
debuglog << B
total += procList.len
debuglog << total
world << total

View File

@@ -13,7 +13,6 @@
#include "_maps\cyberiad.dm"
#include "code\_compile_options.dm"
#include "code\hub.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__DEFINES\_readme.dm"
#include "code\__DEFINES\admin.dm"
@@ -1882,5 +1881,6 @@
#include "code\modules\virus2\isolator.dm"
#include "code\modules\virus2\items_devices.dm"
#include "interface\interface.dm"
#include "interface\stylesheet.dm"
#include "interface\skin.dmf"
// END_INCLUDE