Polaris December Sync

This commit is contained in:
killer653
2016-12-10 09:51:11 -05:00
263 changed files with 5254 additions and 1644 deletions
+5
View File
@@ -11,6 +11,11 @@
if(can_buckle && buckled_mob)
user_unbuckle_mob(user)
/obj/attack_robot(mob/living/user)
if(Adjacent(user) && buckled_mob) //Checks if what we're touching is adjacent to us and has someone buckled to it. This should prevent interacting with anti-robot manual valves among other things.
return attack_hand(user) //Process as if we're a normal person touching the object.
return ..() //Otherwise, treat this as an AI click like usual.
/obj/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(can_buckle && istype(M))
+157
View File
@@ -0,0 +1,157 @@
//The case the paddles are kept in.
/obj/item/device/defib_kit
name = "defibrillator kit"
desc = "This KHI-branded defib kit is a semi-automated model. Remove pads, slap on chest, wait."
icon = 'icons/obj/device.dmi'
icon_state = "defib_kit"
w_class = ITEMSIZE_LARGE
var/state //0 off, 1 open, 2 working, 3 dead
var/uses = 2 //Calculates initial uses based on starting cell size
var/chance = 75 //Percent chance of working
var/charge_cost //Set in New() based on uses
var/obj/item/weapon/cell/cell //The size is mostly irrelevant, see 'uses'
var/mob/living/carbon/human/patient //The person the paddles are on
/obj/item/device/defib_kit/New()
..()
//Create cell and determine uses (futureproofing against cell size changes)
cell = new(src)
charge_cost = cell.maxcharge / uses
statechange(0)
/obj/item/device/defib_kit/attack_self(mob/user as mob)
..()
if(patient)
patient = null
user.visible_message("<span class='notice'>[user] returns the pads to \the [src] and closes it.</span>",
"<span class='notice'>You return the pads to \the [src] and close it.</span>")
statechange(0)
/obj/item/device/defib_kit/MouseDrop(var/mob/living/carbon/human/onto)
if(istype(onto) && Adjacent(usr) && !usr.restrained() && !usr.stat)
var/mob/living/carbon/human/user = usr
//<--Feel free to code clothing checks right here
user.visible_message("<span class='warning'>[user] begins applying defib pads to [onto].</span>",
"<span class='warning'>You begin applying defib pads to [onto].</span>")
if(do_after(user, 100, onto))
patient = onto
statechange(1,patient)
user.visible_message("<span class='warning'>[user] applies defib pads to [onto].</span>",
"<span class='warning'>You finish applying defib pads to [onto].</span>")
/obj/item/device/defib_kit/attackby(var/obj/item/A as obj, mob/living/user as mob)
..()
if(!cell && istype(A,/obj/item/weapon/cell))
if(!user.unEquip(A)) return
to_chat(user,"You jack \the [A] into \the [src]'s battery mount.")
A.forceMove(src)
src.cell = A
else if(istype(A,/obj/item/weapon/screwdriver))
if(cell)
to_chat(user,"<span class='notice'>You remove \the [cell] from \the [src].</span>")
if(user.r_hand && user.l_hand)
cell.forceMove(get_turf(user))
else
cell.forceMove(user.put_in_hands(cell))
cell = null
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
else
to_chat(user,"<span class='warning'>The power source has already been removed!</span>")
/obj/item/device/defib_kit/proc/statechange(var/new_state, var/pat)
if(state == new_state) return //Let's just save ourselves some time
state = new_state
icon_state = "[initial(icon_state)][state]"
var/turf/T = get_turf(src)
var/state_words = ""
switch(state)
if(0)
state_words = "It is currently closed."
processing_objects -= src
if(1)
state_words = "A green light is lit; it has charge."
processing_objects |= src
if(2)
state_words = "A yellow light is flashing: it's in the process of reviving a patient."
T.visible_message("<span class='notice'>A yellow light starts flashing on \the [src].</span>")
playsound(T, 'sound/machines/chime.ogg', 50, 0)
if(3)
state_words = "A red light is flashing: the battery needs to be recharged."
T.visible_message("<span class='warning'>A red light starts flashing on \the [src].</span>")
playsound(T, 'sound/machines/buzz-sigh.ogg', 50, 0)
desc = "[initial(desc)] [state_words][pat ? " The pads are attached to [pat]." : ""]"
update_icon()
/obj/item/device/defib_kit/process()
if(!state) //0 or null
statechange(0)
processing_objects -= src
return
//Patient moved too far
if(patient && !(get_dist(src,patient) <= 1)) //You separated the kit and pads too far
audible_message("<span class='warning'>There's a clatter as the defib pads are yanked off of [patient].</span>")
statechange(0)
patient = null
return
//Battery died
if(!cell || cell.charge < charge_cost)
statechange(3,patient)
return
//A patient isn't being worked on, but we have one, so start
if(patient && patient.stat == DEAD && state != 2)
statechange(2)
if(attempt_shock()) //Try to shock them, has timer and such
patient.visible_message("<span class='warning'>[patient] convulses!</span>")
playsound(src.loc, 'sound/effects/sparks2.ogg', 75, 1)
//Actual rezzing code
if(prob(chance) && ((world.time - patient.timeofdeath) < (10 MINUTES))) //Can only revive within a few minutes
if(!patient.client && patient.mind) //Don't force the dead person to come back if they don't want to.
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == patient.mind)
to_chat(ghost, "<b><font color = #330033><font size = 3>Someone is trying to \
revive you. Return to your body if you want to be revived!</b> \
(Verbs -> Ghost -> Re-enter corpse). You have 15 seconds to do this!</font></font>")
sleep(15 SECONDS)
break
if(patient.client)
patient.adjustOxyLoss(-20) //Look, blood stays oxygenated for quite some time, but I'm not recoding the entire oxy system
patient.stat = CONSCIOUS //Note that if whatever killed them in the first place wasn't fixed, they're likely to die again.
dead_mob_list -= patient
living_mob_list += patient
patient.timeofdeath = null
patient.visible_message("<span class='notice'>[patient]'s eyes open!</span>")
log_and_message_admins("[patient] was revived.")
cell.charge -= charge_cost //Always charge the cost after any attempt, failed or not
sleep(20) //Wait 2 seconds before next attempt
statechange(1,patient) //Back to ready
/obj/item/device/defib_kit/proc/attempt_shock()
if(!patient || cell.charge < charge_cost)
return
var/zap_time = world.time + (7 SECONDS)
var/o_patient_loc = patient.loc
. = 1
while(world.time < zap_time) //This is basically a custom do_after() call
sleep(1)
//Failed: We lost something important
if(!patient || !cell || cell.charge < charge_cost)
. = 0
break
//Failed: The locations aren't right
if((o_patient_loc != patient.loc) || !(get_dist(src,patient) <= 1))
. = 0
break
return
@@ -274,6 +274,8 @@ var/global/list/default_medbay_channels = list(
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return 0
if(speaking && (speaking.flags & (SIGNLANG|NONVERBAL))) return 0
if(istype(M)) M.trigger_aiming(TARGET_CAN_RADIO)
// Uncommenting this. To the above comment:
+1 -1
View File
@@ -69,7 +69,7 @@ REAGENT SCANNER
user.show_message("<span class='notice'>Analyzing Results for [M]:</span>")
user.show_message("<span class='notice'>Overall Status: dead</span>")
else
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[round(M.health/M.maxHealth)*100]% healthy"]</span>")
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[round((M.health/M.maxHealth)*100) ]% healthy"]</span>")
user.show_message("<span class='notice'> Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font></span>", 1)
user.show_message("<span class='notice'> Damage Specifics: <font color='blue'>[OX]</font> - <font color='green'>[TX]</font> - <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font></span>")
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)</span>", 1)
+299 -139
View File
@@ -1,7 +1,7 @@
/obj/item/device/taperecorder
name = "universal recorder"
desc = "A device that can record up to an hour of dialogue and play it back. It automatically translates the content in playback."
icon_state = "taperecorderidle"
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
icon_state = "taperecorder_empty"
item_state = "analyzer"
w_class = ITEMSIZE_SMALL
@@ -10,33 +10,100 @@
var/emagged = 0.0
var/recording = 0.0
var/playing = 0.0
var/timerecorded = 0.0
var/playsleepseconds = 0.0
var/list/storedinfo = new/list()
var/list/timestamp = new/list()
var/obj/item/device/tape/mytape = /obj/item/device/tape/random
var/canprint = 1
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 2
throw_speed = 4
throw_range = 20
show_messages = 1
/obj/item/device/taperecorder/New()
..()
if(ispath(mytape))
mytape = new mytape(src)
update_icon()
listening_objects += src
/obj/item/device/taperecorder/empty
mytape = null
/obj/item/device/taperecorder/Destroy()
listening_objects -= src
if(mytape)
qdel(mytape)
mytape = null
return ..()
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/tape))
if(mytape)
to_chat(user, "<span class='notice'>There's already a tape inside.</span>")
return
if(!user.unEquip(I))
return
I.forceMove(src)
mytape = I
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
update_icon()
return
..()
/obj/item/device/taperecorder/fire_act()
if(mytape)
mytape.ruin() //Fires destroy the tape
return ..()
/obj/item/device/taperecorder/attack_hand(mob/user)
if(user.get_inactive_hand() == src)
if(mytape)
eject()
return
..()
/obj/item/device/taperecorder/verb/eject()
set name = "Eject Tape"
set category = "Object"
if(usr.incapacitated())
return
if(!mytape)
to_chat(usr, "<span class='notice'>There's no tape in \the [src].</span>")
return
if(emagged)
to_chat(usr, "<span class='notice'>The tape seems to be stuck inside.</span>")
return
if(playing || recording)
stop()
to_chat(usr, "<span class='notice'>You remove [mytape] from [src].</span>")
usr.put_in_hands(mytape)
mytape = null
update_icon()
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null)
if(recording)
timestamp += timerecorded
if(mytape && recording)
if(speaking)
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [speaking.format_message_plain(msg, verb)]"
if(!speaking.machine_understands)
msg = speaking.scramble(msg)
mytape.record_speech("[M.name] [speaking.format_message_plain(msg, verb)]")
else
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [verb], \"[msg]\""
mytape.record_speech("[M.name] [verb], \"[msg]\"")
/obj/item/device/taperecorder/see_emote(mob/M as mob, text, var/emote_type)
if(emote_type != 2) //only hearable emotes
return
if(recording)
timestamp += timerecorded
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [strip_html_properly(text)]"
if(mytape && recording)
mytape.record_speech("[strip_html_properly(text)]")
/obj/item/device/taperecorder/show_message(msg, type, alt, alt_type)
var/recordedtext
@@ -46,25 +113,24 @@
recordedtext = alt
else
return
if(recording)
timestamp += timerecorded
storedinfo += "*\[[time2text(timerecorded*10,"mm:ss")]\] *[strip_html_properly(recordedtext)]*" //"*" at front as a marker
if(mytape && recording)
mytape.record_noise("[strip_html_properly(recordedtext)]")
/obj/item/device/taperecorder/emag_act(var/remaining_charges, var/mob/user)
if(emagged == 0)
emagged = 1
recording = 0
user << "<span class='warning'>PZZTTPFFFT</span>"
icon_state = "taperecorderidle"
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
update_icon()
return 1
else
user << "<span class='warning'>It is already emagged!</span>"
to_chat(user, "<span class='warning'>It is already emagged!</span>")
/obj/item/device/taperecorder/proc/explode()
var/turf/T = get_turf(loc)
if(ismob(loc))
var/mob/M = loc
M << "<span class='danger'>\The [src] explodes!</span>"
to_chat(M, "<span class='danger'>\The [src] explodes!</span>")
if(T)
T.hotspot_expose(700,125)
explosion(T, -1, -1, 0, 4)
@@ -75,117 +141,152 @@
set name = "Start Recording"
set category = "Object"
if(usr.stat)
if(usr.incapacitated())
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
if(!mytape)
to_chat(usr, "<span class='notice'>There's no tape!</span>")
return
icon_state = "taperecorderrecording"
if(timerecorded < 3600 && playing == 0)
usr << "<span class='notice'>Recording started.</span>"
if(mytape.ruined)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(recording)
to_chat(usr, "<span class='notice'>You're already recording!</span>")
return
if(playing)
to_chat(usr, "<span class='notice'>You can't record when playing!</span>")
return
if(emagged)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(mytape.used_capacity < mytape.max_capacity)
to_chat(usr, "<span class='notice'>Recording started.</span>")
recording = 1
timestamp+= timerecorded
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
for(timerecorded, timerecorded<3600)
if(recording == 0)
break
timerecorded++
update_icon()
mytape.record_speech("Recording started.")
//count seconds until full, or recording is stopped
while(mytape && recording && mytape.used_capacity < mytape.max_capacity)
sleep(10)
recording = 0
icon_state = "taperecorderidle"
mytape.used_capacity++
if(mytape.used_capacity >= mytape.max_capacity)
if(ismob(loc))
var/mob/M = loc
to_chat(M, "<span class='notice'>The tape is full.</span>")
stop_recording()
update_icon()
return
else
usr << "<span class='notice'>Either your tape recorder's memory is full, or it is currently playing back its memory.</span>"
to_chat(usr, "<span class='notice'>The tape is full.</span>")
/obj/item/device/taperecorder/proc/stop_recording()
//Sanity checks skipped, should not be called unless actually recording
recording = 0
update_icon()
mytape.record_speech("Recording stopped.")
if(ismob(loc))
var/mob/M = loc
to_chat(M, "<span class='notice'>Recording stopped.</span>")
/obj/item/device/taperecorder/verb/stop()
set name = "Stop"
set category = "Object"
if(usr.stat)
if(usr.incapacitated())
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
if(recording)
stop_recording()
return
if(recording == 1)
recording = 0
timestamp+= timerecorded
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
usr << "<span class='notice'>Recording stopped.</span>"
icon_state = "taperecorderidle"
return
else if(playing == 1)
else if(playing)
playing = 0
var/turf/T = get_turf(src)
T.audible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
icon_state = "taperecorderidle"
return
/obj/item/device/taperecorder/verb/clear_memory()
set name = "Clear Memory"
set category = "Object"
if(usr.stat)
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
return
if(recording == 1 || playing == 1)
usr << "<span class='notice'>You can't clear the memory while playing or recording!</span>"
update_icon()
to_chat(usr, "<span class='notice'>Playback stopped.</span>")
return
else
if(storedinfo) storedinfo.Cut()
if(timestamp) timestamp.Cut()
timerecorded = 0
usr << "<span class='notice'>Memory cleared.</span>"
to_chat(usr, "<span class='notice'>Stop what?</span>")
/obj/item/device/taperecorder/verb/wipe_tape()
set name = "Wipe Tape"
set category = "Object"
if(usr.incapacitated())
return
if(emagged)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(mytape.ruined)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(recording || playing)
to_chat(usr, "<span class='notice'>You can't wipe the tape while playing or recording!</span>")
return
else
if(mytape.storedinfo) mytape.storedinfo.Cut()
if(mytape.timestamp) mytape.timestamp.Cut()
mytape.used_capacity = 0
to_chat(usr, "<span class='notice'>You wipe the tape.</span>")
return
/obj/item/device/taperecorder/verb/playback_memory()
set name = "Playback Memory"
set name = "Playback Tape"
set category = "Object"
if(usr.stat)
if(usr.incapacitated())
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
if(!mytape)
to_chat(usr, "<span class='notice'>There's no tape!</span>")
return
if(recording == 1)
usr << "<span class='notice'>You can't playback when recording!</span>"
if(mytape.ruined)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(playing == 1)
usr << "<span class='notice'>You're already playing!</span>"
if(recording)
to_chat(usr, "<span class='notice'>You can't playback when recording!</span>")
return
if(playing)
to_chat(usr, "<span class='notice'>You're already playing!</span>")
return
playing = 1
icon_state = "taperecorderplaying"
usr << "<span class='notice'>Playing started.</span>"
for(var/i=1,timerecorded<3600,sleep(10 * (playsleepseconds) ))
if(playing == 0)
update_icon()
to_chat(usr, "<span class='notice'>Playing started.</span>")
for(var/i=1 , i < mytape.max_capacity , i++)
if(!mytape || !playing)
break
if(storedinfo.len < i)
if(mytape.storedinfo.len < i)
break
var/turf/T = get_turf(src)
var/playedmessage = storedinfo[i]
var/playedmessage = mytape.storedinfo[i]
if (findtextEx(playedmessage,"*",1,2)) //remove marker for action sounds
playedmessage = copytext(playedmessage,2)
T.audible_message("<font color=Maroon><B>Tape Recorder</B>: [playedmessage]</font>")
if(storedinfo.len < i+1)
if(mytape.storedinfo.len < i+1)
playsleepseconds = 1
sleep(10)
T = get_turf(src)
T.audible_message("<font color=Maroon><B>Tape Recorder</B>: End of recording.</font>")
break
else
playsleepseconds = timestamp[i+1] - timestamp[i]
playsleepseconds = mytape.timestamp[i+1] - mytape.timestamp[i]
if(playsleepseconds > 14)
sleep(10)
T = get_turf(src)
T.audible_message("<font color=Maroon><B>Tape Recorder</B>: Skipping [playsleepseconds] seconds of silence</font>")
playsleepseconds = 1
i++
icon_state = "taperecorderidle"
sleep(10 * playsleepseconds)
playing = 0
if(emagged == 1.0)
update_icon()
if(emagged)
var/turf/T = get_turf(src)
T.audible_message("<font color=Maroon><B>Tape Recorder</B>: This tape recorder will self-destruct in... Five.</font>")
sleep(10)
@@ -208,24 +309,31 @@
set name = "Print Transcript"
set category = "Object"
if(usr.stat)
if(usr.incapacitated())
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
if(!mytape)
to_chat(usr, "<span class='notice'>There's no tape!</span>")
return
if(mytape.ruined)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(emagged)
to_chat(usr, "<span class='warning'>The tape recorder makes a scratchy noise.</span>")
return
if(!canprint)
usr << "<span class='notice'>The recorder can't print that fast!</span>"
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
return
if(recording == 1 || playing == 1)
usr << "<span class='notice'>You can't print the transcript while playing or recording!</span>"
if(recording || playing)
to_chat(usr, "<span class='notice'>You can't print the transcript while playing or recording!</span>")
return
usr << "<span class='notice'>Transcript printed.</span>"
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
var/t1 = "<B>Transcript:</B><BR><BR>"
for(var/i=1,storedinfo.len >= i,i++)
var/printedmessage = storedinfo[i]
for(var/i=1,mytape.storedinfo.len >= i,i++)
var/printedmessage = mytape.storedinfo[i]
if (findtextEx(printedmessage,"*",1,2)) //replace action sounds
printedmessage = "\[[time2text(timestamp[i]*10,"mm:ss")]\] (Unrecognized sound)"
printedmessage = "\[[time2text(mytape.timestamp[i]*10,"mm:ss")]\] (Unrecognized sound)"
t1 += "[printedmessage]<BR>"
P.info = t1
P.name = "Transcript"
@@ -235,46 +343,98 @@
/obj/item/device/taperecorder/attack_self(mob/user)
if(recording == 0 && playing == 0)
if(usr.stat)
return
if(emagged == 1)
usr << "<span class='warning'>The tape recorder makes a scratchy noise.</span>"
return
icon_state = "taperecorderrecording"
if(timerecorded < 3600 && playing == 0)
usr << "<span class='notice'>Recording started.</span>"
recording = 1
timestamp+= timerecorded
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording started."
for(timerecorded, timerecorded<3600)
if(recording == 0)
break
timerecorded++
sleep(10)
recording = 0
icon_state = "taperecorderidle"
return
else
usr << "<span class='warning'>Either your tape recorder's memory is full, or it is currently playing back its memory.</span>"
if(recording || playing)
stop()
else
if(usr.stat)
usr << "Not when you're incapacitated."
return
if(recording == 1)
recording = 0
timestamp+= timerecorded
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] Recording stopped."
usr << "<span class='notice'>Recording stopped.</span>"
icon_state = "taperecorderidle"
return
else if(playing == 1)
playing = 0
var/turf/T = get_turf(src)
for(var/mob/O in hearers(world.view-1, T))
O.show_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>",2)
icon_state = "taperecorderidle"
return
else
usr << "<span class='warning'>Stop what?</span>"
return
record()
/obj/item/device/taperecorder/update_icon()
if(!mytape)
icon_state = "taperecorder_empty"
else if(recording)
icon_state = "taperecorder_recording"
else if(playing)
icon_state = "taperecorder_playing"
else
icon_state = "taperecorder_idle"
/obj/item/device/tape
name = "tape"
desc = "A magnetic tape that can hold up to ten minutes of content."
icon_state = "tape_white"
item_state = "analyzer"
w_class = ITEMSIZE_TINY
matter = list(DEFAULT_WALL_MATERIAL=20, "glass"=5)
force = 1
throwforce = 0
var/max_capacity = 600
var/used_capacity = 0
var/list/storedinfo = new/list()
var/list/timestamp = new/list()
var/ruined = 0
/obj/item/device/tape/update_icon()
overlays.Cut()
if(ruined)
overlays += "ribbonoverlay"
/obj/item/device/tape/fire_act()
ruin()
/obj/item/device/tape/attack_self(mob/user)
if(!ruined)
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
ruin()
/obj/item/device/tape/proc/ruin()
ruined = 1
update_icon()
/obj/item/device/tape/proc/fix()
ruined = 0
update_icon()
/obj/item/device/tape/proc/record_speech(text)
timestamp += used_capacity
storedinfo += "\[[time2text(used_capacity*10,"mm:ss")]\] [text]"
//shows up on the printed transcript as (Unrecognized sound)
/obj/item/device/tape/proc/record_noise(text)
timestamp += used_capacity
storedinfo += "*\[[time2text(used_capacity*10,"mm:ss")]\] [text]"
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
if(do_after(user, 120, target = src))
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
fix()
return
else if(istype(I, /obj/item/weapon/pen))
if(loc == user && !user.incapacitated())
var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
if(isnull(new_name)) return
new_name = sanitizeSafe(new_name)
if(new_name)
name = "tape - '[new_name]'"
to_chat(user, "<span class='notice'>You label the tape '[new_name]'.</span>")
else
name = "tape"
to_chat(user, "<span class='notice'>You scratch off the label.</span>")
return
..()
//Random colour tapes
/obj/item/device/tape/random/New()
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
+3 -2
View File
@@ -217,8 +217,9 @@
// Includes normal radio uplink, multitool uplink,
// implant uplink (not the implant tool) and a preset headset uplink.
/obj/item/device/radio/uplink/New()
hidden_uplink = new(src, usr.mind, DEFAULT_TELECRYSTAL_AMOUNT)
/obj/item/device/radio/uplink/New(atom/loc, datum/mind/target_mind, telecrystals)
..(loc)
hidden_uplink = new(src, target_mind, telecrystals)
icon_state = "radio"
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
+1 -1
View File
@@ -160,7 +160,7 @@
P.icon_state = "paper_words"
if(istype(usr,/mob/living/carbon))
usr.put_in_hands(src)
usr.put_in_hands(P)
/obj/item/weapon/autopsy_scanner/do_surgery(mob/living/carbon/human/M, mob/living/user)
if(!istype(M))
@@ -278,3 +278,26 @@
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
/obj/item/weapon/grenade/chem_grenade/teargas
name = "tear gas grenade"
desc = "Concentrated Capsaicin. Contents under pressure. Use with caution."
stage = 2
path = 1
New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("phosphorus", 40)
B1.reagents.add_reagent("potassium", 40)
B1.reagents.add_reagent("condensedcapsaicin", 40)
B2.reagents.add_reagent("sugar", 40)
B2.reagents.add_reagent("condensedcapsaicin", 80)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
@@ -159,3 +159,23 @@
src.imp = new /obj/item/weapon/implant/health( src )
..()
return
/obj/item/weapon/implantcase/language
name = "glass case - 'GalCom'"
desc = "A case containing a GalCom language implant."
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/language/New()
src.imp = new /obj/item/weapon/implant/language( src )
..()
return
/obj/item/weapon/implantcase/language/eal
name = "glass case - 'EAL'"
desc = "A case containing an Encoded Audio Language implant."
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/language/eal/New()
src.imp = new /obj/item/weapon/implant/language/eal( src )
..()
return
@@ -0,0 +1,37 @@
//These allow someone to speak a language they are otherwise physically incapable of speaking or hearing
//They don't, at the moment, grant knowledge of the language
//The can_speak_special checks should check for the presence of the implants.
/obj/item/weapon/implant/language
name = "GalCom language implant"
desc = "An implant allowing someone to speak and hear the range of frequencies used in Galactic Common, as well as produce any phonemes that they usually cannot. Only helps with hearing and producing sounds, not understanding them."
/obj/item/weapon/implant/language/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Vey-Med L-1 Galactic Common Implant<BR>
<b>Life:</b> 5 years<BR>
<b>Important Notes:</b> Affects hearing and speech.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Allows a being otherwise incapable to both hear the frequencies Galactic Common is generally spoken at, as well as to produce the phonemes of the language.<BR>
<b>Special Features:</b> None.<BR>
<b>Integrity:</b> Implant will function for expected life, barring physical damage."}
return dat
/obj/item/weapon/implant/language/eal
name = "EAL language implant"
desc = "An implant allowing an organic to both hear and speak Encoded Audio Language accurately. Only helps with hearing and producing sounds, not understanding them."
/obj/item/weapon/implant/language/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Vey-Med L-2 Encoded Audio Language Implant<BR>
<b>Life:</b> 5 years<BR>
<b>Important Notes:</b> Affects hearing and speech.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Allows an organic to accurately process and speak Encoded Audio Language.<BR>
<b>Special Features:</b> None.<BR>
<b>Integrity:</b> Implant will function for expected life, barring physical damage."}
return dat
+13 -13
View File
@@ -237,10 +237,13 @@ var/list/tape_roll_applications = list()
if (istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T)
P.update_icon()
P.layer = 3.2
user << "<span class='notice'>You finish placing \the [src].</span>"
if(locate(/obj/item/tape, A.loc))
user << "There's already tape over that door!"
else
var/obj/item/tape/P = new tape_type(T)
P.update_icon()
P.layer = 3.2
user << "<span class='notice'>You finish placing \the [src].</span>"
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
@@ -277,7 +280,7 @@ var/list/tape_roll_applications = list()
return ..(mover)
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
breaktape(W, user)
breaktape(user)
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == I_HELP && src.allowed(user))
@@ -285,7 +288,7 @@ var/list/tape_roll_applications = list()
for(var/obj/item/tape/T in gettapeline())
T.lift(100) //~10 seconds
else
breaktape(null, user)
breaktape(user)
/obj/item/tape/proc/lift(time)
lifted = 1
@@ -320,14 +323,11 @@ var/list/tape_roll_applications = list()
cur = get_step(cur, dir)
return tapeline
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break \the [src] with that!"
/obj/item/tape/proc/breaktape(mob/user)
if(user.a_intent == I_HELP)
to_chat(user, "<span class='warning'>You refrain from breaking \the [src].</span>")
return
user.show_viewers("<span class='notice'>\The [user] breaks \the [src]!</span>")
user.visible_message("<span class='notice'>\The [user] breaks \the [src]!</span>","<span class='notice'>You break \the [src].</span>")
for (var/obj/item/tape/T in gettapeline())
if(T == src)
@@ -339,6 +339,16 @@
for(var/i = 1 to 7)
new /obj/item/weapon/grenade/chem_grenade/metalfoam(src)
/obj/item/weapon/storage/box/teargas
name = "box of teargas grenades"
desc = "A box containing 7 teargas grenades."
icon_state = "flashbang"
/obj/item/weapon/storage/box/teargas/New()
..()
for(var/i = 1 to 7)
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
/obj/item/weapon/storage/box/trackimp
name = "boxed tracking implant kit"
desc = "Box full of scum-bag tracking utensils."
@@ -74,7 +74,7 @@
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
+12 -7
View File
@@ -390,16 +390,21 @@
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
var/last_gen = 0
var/nextrefueltick = 0
/obj/item/weapon/weldingtool/experimental/New()
processing_objects |= src
..()
/obj/item/weapon/weldingtool/experimental/Destroy()
processing_objects -= src
..()
/obj/item/weapon/weldingtool/experimental/proc/fuel_gen()//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
var/gen_amount = ((world.time-last_gen)/25)
reagents += (gen_amount)
if(reagents > max_fuel)
reagents = max_fuel
/obj/item/weapon/weldingtool/experimental/process()
..()
if(get_fuel() < max_fuel && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
/*
* Crowbar
*/
+709 -167
View File
@@ -22,7 +22,11 @@
// creates the random item
/obj/random/proc/spawn_item()
var/build_path = item_to_spawn()
return (new build_path(src.loc))
var/atom/A = new build_path(src.loc)
if(pixel_x || pixel_y)
A.pixel_x = pixel_x
A.pixel_y = pixel_y
/obj/random/single
@@ -30,8 +34,9 @@
desc = "This item type is used to randomly spawn a given object at round-start"
icon_state = "x3"
var/spawn_object = null
item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/single/item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/tool
@@ -39,39 +44,40 @@
desc = "This is a random tool"
icon = 'icons/obj/items.dmi'
icon_state = "welder"
item_to_spawn()
return pick(/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/weapon/weldingtool,
/obj/item/weapon/weldingtool/largetank,
/obj/item/weapon/crowbar,
/obj/item/weapon/wrench,
/obj/item/device/flashlight,
/obj/item/device/multitool)
/obj/random/tool/item_to_spawn()
return pick(/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/weapon/weldingtool,
/obj/item/weapon/weldingtool/largetank,
/obj/item/weapon/crowbar,
/obj/item/weapon/wrench,
/obj/item/device/flashlight,
/obj/item/device/multitool)
/obj/random/technology_scanner
name = "random scanner"
desc = "This is a random technology scanner."
icon = 'icons/obj/device.dmi'
icon_state = "atmos"
item_to_spawn()
return pick(prob(5);/obj/item/device/t_scanner,
prob(2);/obj/item/device/radio,
prob(5);/obj/item/device/analyzer)
/obj/random/technology_scanner/item_to_spawn()
return pick(prob(5);/obj/item/device/t_scanner,
prob(2);/obj/item/device/radio,
prob(5);/obj/item/device/analyzer)
/obj/random/powercell
name = "random powercell"
desc = "This is a random powercell."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_to_spawn()
return pick(prob(40);/obj/item/weapon/cell,
prob(25);/obj/item/weapon/cell/device,
prob(25);/obj/item/weapon/cell/high,
prob(9);/obj/item/weapon/cell/super,
prob(1);/obj/item/weapon/cell/hyper)
/obj/random/powercell/item_to_spawn()
return pick(prob(40);/obj/item/weapon/cell,
prob(25);/obj/item/weapon/cell/device,
prob(25);/obj/item/weapon/cell/high,
prob(9);/obj/item/weapon/cell/super,
prob(1);/obj/item/weapon/cell/hyper)
/obj/random/bomb_supply
@@ -79,12 +85,13 @@
desc = "This is a random bomb supply."
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "signaller"
item_to_spawn()
return pick(/obj/item/device/assembly/igniter,
/obj/item/device/assembly/prox_sensor,
/obj/item/device/assembly/signaler,
/obj/item/device/assembly/timer,
/obj/item/device/multitool)
/obj/random/bomb_supply/item_to_spawn()
return pick(/obj/item/device/assembly/igniter,
/obj/item/device/assembly/prox_sensor,
/obj/item/device/assembly/signaler,
/obj/item/device/assembly/timer,
/obj/item/device/multitool)
/obj/random/toolbox
@@ -92,11 +99,12 @@
desc = "This is a random toolbox."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/toolbox/mechanical,
prob(6);/obj/item/weapon/storage/toolbox/electrical,
prob(2);/obj/item/weapon/storage/toolbox/emergency,
prob(1);/obj/item/weapon/storage/toolbox/syndicate)
/obj/random/toolbox/item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/toolbox/mechanical,
prob(6);/obj/item/weapon/storage/toolbox/electrical,
prob(2);/obj/item/weapon/storage/toolbox/emergency,
prob(1);/obj/item/weapon/storage/toolbox/syndicate)
/obj/random/tech_supply
@@ -105,66 +113,78 @@
icon = 'icons/obj/power.dmi'
icon_state = "cell"
spawn_nothing_percentage = 25
item_to_spawn()
return pick(prob(3);/obj/random/powercell,
prob(2);/obj/random/technology_scanner,
prob(1);/obj/item/weapon/packageWrap,
prob(2);/obj/random/bomb_supply,
prob(1);/obj/item/weapon/extinguisher,
prob(1);/obj/item/clothing/gloves/fyellow,
prob(3);/obj/item/stack/cable_coil/random,
prob(2);/obj/random/toolbox,
prob(2);/obj/item/weapon/storage/belt/utility,
prob(1);/obj/item/weapon/storage/belt/utility/full,
prob(5);/obj/random/tool,
prob(2);/obj/item/weapon/tape_roll,
prob(2);/obj/item/taperoll/engineering,
prob(1);/obj/item/taperoll/atmos,
prob(1);/obj/item/device/flashlight/maglight)
/obj/random/tech_supply/item_to_spawn()
return pick(prob(3);/obj/random/powercell,
prob(2);/obj/random/technology_scanner,
prob(1);/obj/item/weapon/packageWrap,
prob(2);/obj/random/bomb_supply,
prob(1);/obj/item/weapon/extinguisher,
prob(1);/obj/item/clothing/gloves/fyellow,
prob(3);/obj/item/stack/cable_coil/random,
prob(2);/obj/random/toolbox,
prob(2);/obj/item/weapon/storage/belt/utility,
prob(1);/obj/item/weapon/storage/belt/utility/full,
prob(5);/obj/random/tool,
prob(2);/obj/item/weapon/tape_roll,
prob(2);/obj/item/taperoll/engineering,
prob(1);/obj/item/taperoll/atmos,
prob(1);/obj/item/device/flashlight/maglight)
/obj/random/medical
name = "Random Medicine"
desc = "This is a random medical item."
icon = 'icons/obj/items.dmi'
icon_state = "brutepack"
spawn_nothing_percentage = 12.5
item_to_spawn()
return pick(prob(8);/obj/item/stack/medical/bruise_pack,
prob(8);/obj/item/stack/medical/ointment,
prob(4);/obj/item/stack/medical/advanced/bruise_pack,
prob(4);/obj/item/stack/medical/advanced/ointment,
prob(2);/obj/item/stack/medical/splint,
prob(4);/obj/item/bodybag,
prob(2);/obj/item/bodybag/cryobag,
prob(4);/obj/item/weapon/storage/pill_bottle/kelotane,
prob(4);/obj/item/weapon/storage/pill_bottle/dylovene,
prob(4);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(1);/obj/item/weapon/storage/pill_bottle/spaceacillin,
prob(1);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(0.2);/obj/item/weapon/storage/pill_bottle/dermaline,
prob(0.2);/obj/item/weapon/storage/pill_bottle/dexalin_plus,
prob(0.2);/obj/item/weapon/storage/pill_bottle/bicaridine,
prob(4);/obj/item/weapon/reagent_containers/syringe/antitoxin,
prob(2);/obj/item/weapon/reagent_containers/syringe/antiviral,
prob(4);/obj/item/weapon/reagent_containers/syringe/inaprovaline,
prob(4);/obj/item/weapon/reagent_containers/hypospray/autoinjector,
prob(0.1);/obj/item/weapon/reagent_containers/hypospray,
prob(1);/obj/item/device/healthanalyzer,
prob(2);/obj/item/stack/nanopaste)
icon_state = "traumakit"
/obj/random/medical/item_to_spawn()
return pick(prob(21);/obj/random/medical/lite,
prob(4);/obj/item/bodybag,
prob(4);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(1);/obj/item/weapon/storage/pill_bottle/spaceacillin,
prob(1);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(1);/obj/item/weapon/storage/pill_bottle/dermaline,
prob(1);/obj/item/weapon/storage/pill_bottle/dexalin_plus,
prob(1);/obj/item/weapon/storage/pill_bottle/bicaridine,
prob(6);/obj/item/weapon/reagent_containers/syringe/antitoxin,
prob(1);/obj/item/weapon/reagent_containers/syringe/antiviral,
prob(6);/obj/item/weapon/reagent_containers/syringe/inaprovaline,
prob(1);/obj/item/weapon/reagent_containers/hypospray,
prob(1);/obj/item/weapon/storage/box/freezer,
prob(2);/obj/item/stack/nanopaste)
/obj/random/medical/lite
name = "Random Medicine"
desc = "This is a random simple medical item."
icon = 'icons/obj/items.dmi'
icon_state = "brutepack"
spawn_nothing_percentage = 25
/obj/random/medical/lite/item_to_spawn()
return pick(prob(4);/obj/item/stack/medical/bruise_pack,
prob(4);/obj/item/stack/medical/ointment,
prob(2);/obj/item/stack/medical/advanced/bruise_pack,
prob(2);/obj/item/stack/medical/advanced/ointment,
prob(1);/obj/item/stack/medical/splint,
prob(4);/obj/item/device/healthanalyzer,
prob(1);/obj/item/bodybag/cryobag,
prob(3);/obj/item/weapon/reagent_containers/hypospray/autoinjector,
prob(2);/obj/item/weapon/storage/pill_bottle/kelotane,
prob(2);/obj/item/weapon/storage/pill_bottle/antitox)
/obj/random/firstaid
name = "Random First Aid Kit"
desc = "This is a random first aid kit."
icon = 'icons/obj/storage.dmi'
icon_state = "firstaid"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/firstaid/regular,
prob(2);/obj/item/weapon/storage/firstaid/toxin,
prob(2);/obj/item/weapon/storage/firstaid/o2,
prob(1);/obj/item/weapon/storage/firstaid/adv,
prob(2);/obj/item/weapon/storage/firstaid/fire)
/obj/random/firstaid/item_to_spawn()
return pick(prob(4);/obj/item/weapon/storage/firstaid/regular,
prob(3);/obj/item/weapon/storage/firstaid/toxin,
prob(3);/obj/item/weapon/storage/firstaid/o2,
prob(2);/obj/item/weapon/storage/firstaid/adv,
prob(3);/obj/item/weapon/storage/firstaid/fire,
prob(1);/obj/item/weapon/storage/firstaid/combat)
/obj/random/contraband
name = "Random Illegal Item"
@@ -172,69 +192,104 @@
icon = 'icons/obj/items.dmi'
icon_state = "purplecomb"
spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(8);/obj/item/weapon/haircomb,
prob(4);/obj/item/weapon/storage/pill_bottle/happy,
prob(4);/obj/item/weapon/storage/pill_bottle/zoom,
prob(10);/obj/item/weapon/contraband/poster,
prob(4);/obj/item/weapon/material/butterfly,
prob(6);/obj/item/weapon/material/butterflyblade,
prob(6);/obj/item/weapon/material/butterflyhandle,
prob(6);/obj/item/weapon/material/wirerod,
prob(2);/obj/item/weapon/material/butterfly/switchblade,
prob(2);/obj/item/weapon/material/knuckledusters,
prob(1);/obj/item/weapon/material/hatchet/tacknife,
prob(0.5);/obj/item/weapon/beartrap,
prob(1);/obj/item/weapon/handcuffs,
prob(1);/obj/item/weapon/legcuffs,
prob(2);/obj/item/weapon/reagent_containers/syringe/drugs)
/obj/random/contraband/item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(8);/obj/item/weapon/haircomb,
prob(4);/obj/item/weapon/storage/pill_bottle/happy,
prob(4);/obj/item/weapon/storage/pill_bottle/zoom,
prob(10);/obj/item/weapon/contraband/poster,
prob(4);/obj/item/weapon/material/butterfly,
prob(6);/obj/item/weapon/material/butterflyblade,
prob(6);/obj/item/weapon/material/butterflyhandle,
prob(6);/obj/item/weapon/material/wirerod,
prob(2);/obj/item/weapon/material/butterfly/switchblade,
prob(2);/obj/item/weapon/material/knuckledusters,
prob(1);/obj/item/weapon/material/hatchet/tacknife,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
prob(1);/obj/item/weapon/beartrap,
prob(1);/obj/item/weapon/handcuffs,
prob(1);/obj/item/weapon/legcuffs,
prob(2);/obj/item/weapon/reagent_containers/syringe/drugs,
prob(1);/obj/item/weapon/reagent_containers/syringe/steroid)
/obj/random/soap
name = "Random Soap"
desc = "This is a random bar of soap."
icon = 'icons/obj/items.dmi'
icon_state = "soap"
/obj/random/soap/item_to_spawn()
return pick(prob(3);/obj/item/weapon/soap,
prob(2);/obj/item/weapon/soap/nanotrasen,
prob(2);/obj/item/weapon/soap/deluxe,
prob(1);/obj/item/weapon/soap/syndie,)
/obj/random/drinkbottle
name = "random drink"
desc = "This is a random drink."
icon = 'icons/obj/drinks.dmi'
icon_state = "whiskeybottle"
/obj/random/drinkbottle/item_to_spawn()
return pick(/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey,
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin,
/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey,
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka,
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla,
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe,
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac,
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum,
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron)
/obj/random/energy
name = "Random Energy Weapon"
name = "Random Security Energy Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
item_to_spawn()
return pick(prob(2);/obj/item/weapon/gun/energy/laser,
prob(2);/obj/item/weapon/gun/energy/gun)
/obj/random/energy/item_to_spawn()
return pick(prob(2);/obj/item/weapon/gun/energy/laser,
prob(2);/obj/item/weapon/gun/energy/gun)
/obj/random/projectile
name = "Random Projectile Weapon"
name = "Random Security Projectile Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
/obj/random/projectile/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
/obj/random/handgun
name = "Random Handgun"
desc = "This is a random security sidearm."
icon = 'icons/obj/gun.dmi'
icon_state = "secgundark"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
/obj/random/handgun/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
/obj/random/ammo
name = "Random Ammunition"
desc = "This is random ammunition."
icon = 'icons/obj/ammo.dmi'
icon_state = "45-10"
item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/box/beanbags,
prob(2);/obj/item/weapon/storage/box/shotgunammo,
prob(4);/obj/item/weapon/storage/box/shotgunshells,
prob(1);/obj/item/weapon/storage/box/stunshells,
prob(2);/obj/item/ammo_magazine/c45m,
prob(4);/obj/item/ammo_magazine/c45m/rubber,
prob(4);/obj/item/ammo_magazine/c45m/flash,
prob(2);/obj/item/ammo_magazine/mc9mmt,
prob(6);/obj/item/ammo_magazine/mc9mmt/rubber)
/obj/random/ammo/item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/box/beanbags,
prob(2);/obj/item/weapon/storage/box/shotgunammo,
prob(4);/obj/item/weapon/storage/box/shotgunshells,
prob(1);/obj/item/weapon/storage/box/stunshells,
prob(2);/obj/item/ammo_magazine/c45m,
prob(4);/obj/item/ammo_magazine/c45m/rubber,
prob(4);/obj/item/ammo_magazine/c45m/flash,
prob(2);/obj/item/ammo_magazine/mc9mmt,
prob(6);/obj/item/ammo_magazine/mc9mmt/rubber)
/obj/random/action_figure
@@ -242,59 +297,546 @@
desc = "This is a random action figure."
icon = 'icons/obj/toy.dmi'
icon_state = "assistant"
item_to_spawn()
return pick(/obj/item/toy/figure/cmo,
/obj/item/toy/figure/assistant,
/obj/item/toy/figure/atmos,
/obj/item/toy/figure/bartender,
/obj/item/toy/figure/borg,
/obj/item/toy/figure/gardener,
/obj/item/toy/figure/captain,
/obj/item/toy/figure/cargotech,
/obj/item/toy/figure/ce,
/obj/item/toy/figure/chaplain,
/obj/item/toy/figure/chef,
/obj/item/toy/figure/chemist,
/obj/item/toy/figure/clown,
/obj/item/toy/figure/corgi,
/obj/item/toy/figure/detective,
/obj/item/toy/figure/dsquad,
/obj/item/toy/figure/engineer,
/obj/item/toy/figure/geneticist,
/obj/item/toy/figure/hop,
/obj/item/toy/figure/hos,
/obj/item/toy/figure/qm,
/obj/item/toy/figure/janitor,
/obj/item/toy/figure/agent,
/obj/item/toy/figure/librarian,
/obj/item/toy/figure/md,
/obj/item/toy/figure/mime,
/obj/item/toy/figure/miner,
/obj/item/toy/figure/ninja,
/obj/item/toy/figure/wizard,
/obj/item/toy/figure/rd,
/obj/item/toy/figure/roboticist,
/obj/item/toy/figure/scientist,
/obj/item/toy/figure/syndie,
/obj/item/toy/figure/secofficer,
/obj/item/toy/figure/warden,
/obj/item/toy/figure/psychologist,
/obj/item/toy/figure/paramedic,
/obj/item/toy/figure/ert)
/obj/random/action_figure/item_to_spawn()
return pick(/obj/item/toy/figure/cmo,
/obj/item/toy/figure/assistant,
/obj/item/toy/figure/atmos,
/obj/item/toy/figure/bartender,
/obj/item/toy/figure/borg,
/obj/item/toy/figure/gardener,
/obj/item/toy/figure/captain,
/obj/item/toy/figure/cargotech,
/obj/item/toy/figure/ce,
/obj/item/toy/figure/chaplain,
/obj/item/toy/figure/chef,
/obj/item/toy/figure/chemist,
/obj/item/toy/figure/clown,
/obj/item/toy/figure/corgi,
/obj/item/toy/figure/detective,
/obj/item/toy/figure/dsquad,
/obj/item/toy/figure/engineer,
/obj/item/toy/figure/geneticist,
/obj/item/toy/figure/hop,
/obj/item/toy/figure/hos,
/obj/item/toy/figure/qm,
/obj/item/toy/figure/janitor,
/obj/item/toy/figure/agent,
/obj/item/toy/figure/librarian,
/obj/item/toy/figure/md,
/obj/item/toy/figure/mime,
/obj/item/toy/figure/miner,
/obj/item/toy/figure/ninja,
/obj/item/toy/figure/wizard,
/obj/item/toy/figure/rd,
/obj/item/toy/figure/roboticist,
/obj/item/toy/figure/scientist,
/obj/item/toy/figure/syndie,
/obj/item/toy/figure/secofficer,
/obj/item/toy/figure/warden,
/obj/item/toy/figure/psychologist,
/obj/item/toy/figure/paramedic,
/obj/item/toy/figure/ert)
/obj/random/plushie
name = "random plushie"
desc = "This is a random plushie."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
item_to_spawn()
return pick(/obj/structure/plushie/ian,
/obj/structure/plushie/drone,
/obj/structure/plushie/carp,
/obj/structure/plushie/beepsky,
/obj/item/toy/plushie/nymph,
/obj/item/toy/plushie/mouse,
/obj/item/toy/plushie/kitten,
/obj/item/toy/plushie/lizard)
/obj/random/plushie/item_to_spawn()
return pick(/obj/structure/plushie/ian,
/obj/structure/plushie/drone,
/obj/structure/plushie/carp,
/obj/structure/plushie/beepsky,
/obj/item/toy/plushie/nymph,
/obj/item/toy/plushie/mouse,
/obj/item/toy/plushie/kitten,
/obj/item/toy/plushie/lizard)
/obj/random/junk //Broken items, or stuff that could be picked up
name = "random junk"
desc = "This is some random junk."
icon = 'icons/obj/trash.dmi'
icon_state = "trashbag3"
/obj/random/junk/item_to_spawn()
return get_random_junk_type()
/obj/random/trash //Mostly remains and cleanable decals. Stuff a janitor could clean up
name = "random trash"
desc = "This is some random trash."
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"
/obj/random/trash/item_to_spawn()
return pick(/obj/effect/decal/remains/lizard,
/obj/effect/decal/cleanable/blood/gibs/robot,
/obj/effect/decal/cleanable/blood/oil,
/obj/effect/decal/cleanable/blood/oil/streak,
/obj/effect/decal/cleanable/spiderling_remains,
/obj/effect/decal/remains/mouse,
/obj/effect/decal/cleanable/vomit,
/obj/effect/decal/cleanable/blood/splatter,
/obj/effect/decal/cleanable/ash,
/obj/effect/decal/cleanable/generic,
/obj/effect/decal/cleanable/flour,
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/remains/robot)
/obj/random/obstruction //Large objects to block things off in maintenance
name = "random obstruction"
desc = "This is a random obstruction."
icon = 'icons/obj/cult.dmi'
icon_state = "cultgirder"
/obj/random/obstruction/item_to_spawn()
return pick(/obj/structure/barricade,
/obj/structure/girder,
/obj/structure/girder/displaced,
/obj/structure/girder/reinforced,
/obj/structure/grille,
/obj/structure/grille/broken,
/obj/structure/foamedmetal,
/obj/structure/inflatable,
/obj/structure/inflatable/door)
/obj/random/material //Random materials for building stuff
name = "random material"
desc = "This is a random material."
icon = 'icons/obj/items.dmi'
icon_state = "sheet-metal"
/obj/random/material/item_to_spawn()
return pick(/obj/item/stack/material/steel{amount = 10},
/obj/item/stack/material/glass{amount = 10},
/obj/item/stack/material/glass/reinforced{amount = 10},
/obj/item/stack/material/plastic{amount = 10},
/obj/item/stack/material/wood{amount = 10},
/obj/item/stack/material/cardboard{amount = 10},
/obj/item/stack/rods{amount = 10},
/obj/item/stack/material/plasteel{amount = 10})
/obj/random/toy
name = "random toy"
desc = "This is a random toy."
icon = 'icons/obj/toy.dmi'
icon_state = "ship"
/obj/random/toy/item_to_spawn()
return pick(/obj/item/toy/bosunwhistle,
/obj/item/toy/therapy_red,
/obj/item/toy/therapy_purple,
/obj/item/toy/therapy_blue,
/obj/item/toy/therapy_yellow,
/obj/item/toy/therapy_orange,
/obj/item/toy/therapy_green,
/obj/item/toy/cultsword,
/obj/item/toy/katana,
/obj/item/toy/snappop,
/obj/item/toy/sword,
/obj/item/toy/balloon,
/obj/item/toy/crossbow,
/obj/item/toy/blink,
/obj/item/toy/waterflower,
/obj/item/toy/prize/ripley,
/obj/item/toy/prize/fireripley,
/obj/item/toy/prize/deathripley,
/obj/item/toy/prize/gygax,
/obj/item/toy/prize/durand,
/obj/item/toy/prize/honk,
/obj/item/toy/prize/marauder,
/obj/item/toy/prize/seraph,
/obj/item/toy/prize/mauler,
/obj/item/toy/prize/odysseus,
/obj/item/toy/prize/phazon)
/obj/random/tank
name = "random tank"
desc = "This is a tank."
icon = 'icons/obj/tank.dmi'
icon_state = "canister"
/obj/random/tank/item_to_spawn()
return pick(prob(5);/obj/item/weapon/tank/oxygen,
prob(4);/obj/item/weapon/tank/oxygen/yellow,
prob(4);/obj/item/weapon/tank/oxygen/red,
prob(3);/obj/item/weapon/tank/air,
prob(4);/obj/item/weapon/tank/emergency_oxygen,
prob(3);/obj/item/weapon/tank/emergency_oxygen/engi,
prob(2);/obj/item/weapon/tank/emergency_oxygen/double,
prob(1);/obj/item/device/suit_cooling_unit)
/obj/random/cigarettes
name = "random cigarettes"
desc = "This is a cigarette."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cigpacket"
/obj/random/cigarettes/item_to_spawn()
return pick(prob(5);/obj/item/weapon/storage/fancy/cigarettes,
prob(4);/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/killthroat,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/luckystars,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/jerichos,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/menthols,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/carcinomas,
prob(3);/obj/item/weapon/storage/fancy/cigarettes/professionals,
prob(1);/obj/item/weapon/storage/fancy/cigar,
prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar,
prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba,
prob(1);/obj/item/clothing/mask/smokable/cigarette/cigar/havana)
/obj/random/maintenance //Clutter and loot for maintenance and away missions
name = "random maintenance item"
desc = "This is a random maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/item_to_spawn()
return pick(prob(300);/obj/random/tech_supply,
prob(200);/obj/random/medical,
prob(100);/obj/random/firstaid,
prob(10);/obj/random/contraband,
prob(50);/obj/random/action_figure,
prob(50);/obj/random/plushie,
prob(200);/obj/random/junk,
prob(200);/obj/random/material,
prob(50);/obj/random/toy,
prob(100);/obj/random/tank,
prob(50);/obj/random/soap,
prob(60);/obj/random/drinkbottle,
prob(500);/obj/random/maintenance/clean)
/obj/random/maintenance/clean
/*Maintenance loot lists without the trash, for use inside things.
Individual items to add to the maintenance list should go here, if you add
something, make sure it's not in one of the other lists.*/
name = "random clean maintenance item"
desc = "This is a random clean maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/clean/item_to_spawn()
return pick(prob(10);/obj/random/contraband,
prob(2);/obj/item/device/flashlight/flare,
prob(2);/obj/item/device/flashlight/glowstick,
prob(2);/obj/item/device/flashlight/glowstick/blue,
prob(1);/obj/item/device/flashlight/glowstick/orange,
prob(1);/obj/item/device/flashlight/glowstick/red,
prob(1);/obj/item/device/flashlight/glowstick/yellow,
prob(1);/obj/item/device/flashlight/pen,
prob(4);/obj/item/weapon/cell,
prob(4);/obj/item/weapon/cell/device,
prob(3);/obj/item/weapon/cell/high,
prob(2);/obj/item/weapon/cell/super,
prob(5);/obj/random/cigarettes,
prob(3);/obj/item/clothing/mask/gas,
prob(2);/obj/item/clothing/mask/gas/half,
prob(4);/obj/item/clothing/mask/breath,
prob(2);/obj/item/weapon/reagent_containers/glass/rag,
prob(4);/obj/item/weapon/reagent_containers/food/snacks/liquidfood,
prob(2);/obj/item/weapon/storage/secure/briefcase,
prob(4);/obj/item/weapon/storage/briefcase,
prob(5);/obj/item/weapon/storage/backpack,
prob(5);/obj/item/weapon/storage/backpack/satchel/norm,
prob(4);/obj/item/weapon/storage/backpack/satchel,
prob(3);/obj/item/weapon/storage/backpack/dufflebag,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie,
prob(5);/obj/item/weapon/storage/box,
prob(3);/obj/item/weapon/storage/box/donkpockets,
prob(2);/obj/item/weapon/storage/box/sinpockets,
prob(1);/obj/item/weapon/storage/box/cups,
prob(3);/obj/item/weapon/storage/box/mousetraps,
prob(3);/obj/item/weapon/storage/box/engineer,
prob(3);/obj/item/weapon/storage/wallet,
prob(1);/obj/item/device/paicard,
prob(2);/obj/item/clothing/shoes/galoshes,
prob(1);/obj/item/clothing/shoes/syndigaloshes,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/laceup,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/leather,
prob(1);/obj/item/clothing/gloves/yellow,
prob(3);/obj/item/clothing/gloves/botanic_leather,
prob(2);/obj/item/clothing/gloves/latex,
prob(5);/obj/item/clothing/gloves/white,
prob(5);/obj/item/clothing/gloves/rainbow,
prob(2);/obj/item/clothing/gloves/fyellow,
prob(1);/obj/item/clothing/glasses/sunglasses,
prob(3);/obj/item/clothing/glasses/meson,
prob(2);/obj/item/clothing/glasses/meson/prescription,
prob(1);/obj/item/clothing/glasses/welding,
prob(1);/obj/item/clothing/head/bio_hood/general,
prob(4);/obj/item/clothing/head/hardhat,
prob(3);/obj/item/clothing/head/hardhat/red,
prob(1);/obj/item/clothing/head/ushanka,
prob(2);/obj/item/clothing/head/welding,
prob(4);/obj/item/clothing/suit/storage/hazardvest,
prob(1);/obj/item/clothing/suit/space/emergency,
prob(3);/obj/item/clothing/suit/storage/toggle/bomber,
prob(1);/obj/item/clothing/suit/bio_suit/general,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/black,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/blue,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/red,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/yellow,
prob(3);/obj/item/clothing/suit/storage/toggle/brown_jacket,
prob(3);/obj/item/clothing/suit/storage/toggle/leather_jacket,
prob(1);/obj/item/clothing/suit/storage/vest/press,
prob(3);/obj/item/clothing/suit/apron,
prob(4);/obj/item/clothing/under/color/grey,
prob(2);/obj/item/clothing/under/syndicate/tacticool,
prob(2);/obj/item/clothing/under/pants/camo,
prob(1);/obj/item/clothing/under/harness,
prob(1);/obj/item/clothing/under/tactical,
prob(3);/obj/item/clothing/accessory/storage/webbing,
prob(4);/obj/item/weapon/spacecash/c1,
prob(3);/obj/item/weapon/spacecash/c10,
prob(3);/obj/item/weapon/spacecash/c20,
prob(1);/obj/item/weapon/spacecash/c50,
prob(1);/obj/item/weapon/spacecash/c100,
prob(3);/obj/item/weapon/camera_assembly,
prob(4);/obj/item/weapon/caution,
prob(3);/obj/item/weapon/caution/cone,
prob(1);/obj/item/weapon/card/emag_broken,
prob(2);/obj/item/device/camera,
prob(3);/obj/item/device/pda,
prob(3);/obj/item/device/radio/headset)
/obj/random/maintenance/security
/*Maintenance loot list. This one is for around security areas*/
name = "random security maintenance item"
desc = "This is a random security maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/security/item_to_spawn()
return pick(prob(320);/obj/random/maintenance/clean,
prob(2);/obj/item/device/flashlight/maglight,
prob(2);/obj/item/device/flash,
prob(1);/obj/item/weapon/cell/device/weapon,
prob(1);/obj/item/clothing/mask/gas/swat,
prob(1);/obj/item/clothing/mask/gas/syndicate,
prob(2);/obj/item/clothing/mask/balaclava,
prob(1);/obj/item/clothing/mask/balaclava/tactical,
prob(3);/obj/item/weapon/storage/backpack/security,
prob(3);/obj/item/weapon/storage/backpack/satchel/sec,
prob(2);/obj/item/weapon/storage/backpack/messenger/sec,
prob(2);/obj/item/weapon/storage/backpack/dufflebag/sec,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/med,
prob(2);/obj/item/weapon/storage/box/swabs,
prob(2);/obj/item/weapon/storage/belt/security,
prob(1);/obj/item/weapon/grenade/flashbang,
prob(1);/obj/item/weapon/melee/baton,
prob(1);/obj/item/weapon/reagent_containers/spray/pepper,
prob(3);/obj/item/clothing/shoes/jackboots,
prob(1);/obj/item/clothing/shoes/swat,
prob(1);/obj/item/clothing/shoes/combat,
prob(1);/obj/item/clothing/gloves/swat,
prob(1);/obj/item/clothing/gloves/combat,
prob(1);/obj/item/clothing/glasses/sunglasses/big,
prob(2);/obj/item/clothing/glasses/hud/security,
prob(1);/obj/item/clothing/glasses/sunglasses/sechud,
prob(1);/obj/item/clothing/glasses/sunglasses/sechud/aviator,
prob(1);/obj/item/clothing/glasses/sunglasses/sechud/tactical,
prob(3);/obj/item/clothing/head/beret/sec,
prob(3);/obj/item/clothing/head/beret/sec/corporate/officer,
prob(3);/obj/item/clothing/head/beret/sec/navy/officer,
prob(2);/obj/item/clothing/head/helmet,
prob(4);/obj/item/clothing/head/soft/sec,
prob(4);/obj/item/clothing/head/soft/sec/corp,
prob(3);/obj/item/clothing/suit/armor/vest,
prob(2);/obj/item/clothing/suit/armor/vest/security,
prob(2);/obj/item/clothing/suit/storage/vest/officer,
prob(1);/obj/item/clothing/suit/storage/vest/detective,
prob(1);/obj/item/clothing/suit/storage/vest/press,
prob(2);/obj/item/clothing/accessory/storage/black_vest,
prob(2);/obj/item/clothing/accessory/storage/black_drop_pouches,
prob(1);/obj/item/clothing/accessory/holster/leg,
prob(1);/obj/item/clothing/accessory/holster/hip,
prob(1);/obj/item/clothing/accessory/holster/waist,
prob(1);/obj/item/clothing/accessory/holster/armpit,
prob(2);/obj/item/clothing/ears/earmuffs,
prob(2);/obj/item/weapon/handcuffs,)
/obj/random/maintenance/medical
/*Maintenance loot list. This one is for around medical areas*/
name = "random medical maintenance item"
desc = "This is a random medical maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/medical/item_to_spawn()
return pick(prob(320);/obj/random/maintenance/clean,
prob(25);/obj/random/medical/lite,
prob(2);/obj/item/clothing/mask/breath/medical,
prob(2);/obj/item/clothing/mask/surgical,
prob(5);/obj/item/weapon/storage/backpack/medic,
prob(5);/obj/item/weapon/storage/backpack/satchel/med,
prob(5);/obj/item/weapon/storage/backpack/messenger/med,
prob(3);/obj/item/weapon/storage/backpack/dufflebag/med,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/med,
prob(2);/obj/item/weapon/storage/box/autoinjectors,
prob(3);/obj/item/weapon/storage/box/beakers,
prob(2);/obj/item/weapon/storage/box/bodybags,
prob(3);/obj/item/weapon/storage/box/syringes,
prob(3);/obj/item/weapon/storage/box/gloves,
prob(2);/obj/item/weapon/storage/belt/medical/emt,
prob(2);/obj/item/weapon/storage/belt/medical,
prob(1);/obj/item/clothing/shoes/combat,
prob(3);/obj/item/clothing/shoes/white,
prob(2);/obj/item/clothing/gloves/latex,
prob(5);/obj/item/clothing/gloves/white,
prob(2);/obj/item/clothing/glasses/hud/health,
prob(1);/obj/item/clothing/glasses/hud/health/prescription,
prob(1);/obj/item/clothing/head/bio_hood/virology,
prob(4);/obj/item/clothing/suit/storage/toggle/labcoat,
prob(1);/obj/item/clothing/suit/bio_suit/general,
prob(2);/obj/item/clothing/under/rank/medical/paramedic,
prob(2);/obj/item/clothing/accessory/storage/black_vest,
prob(2);/obj/item/clothing/accessory/storage/white_vest,
prob(1);/obj/item/clothing/accessory/storage/white_drop_pouches,
prob(1);/obj/item/clothing/accessory/storage/black_drop_pouches,
prob(2);/obj/item/clothing/accessory/stethoscope)
/obj/random/maintenance/engineering
/*Maintenance loot list. This one is for around medical areas*/
name = "random engineering maintenance item"
desc = "This is a random engineering maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/engineering/item_to_spawn()
return pick(prob(320);/obj/random/maintenance/clean,
prob(2);/obj/item/device/flashlight/maglight,
prob(3);/obj/item/clothing/mask/gas/half,
prob(2);/obj/item/clothing/mask/balaclava,
prob(2);/obj/item/weapon/storage/briefcase/inflatable,
prob(5);/obj/item/weapon/storage/backpack/industrial,
prob(5);/obj/item/weapon/storage/backpack/satchel/eng,
prob(5);/obj/item/weapon/storage/backpack/messenger/engi,
prob(3);/obj/item/weapon/storage/backpack/dufflebag/eng,
prob(5);/obj/item/weapon/storage/box,
prob(3);/obj/item/weapon/storage/box/engineer,
prob(2);/obj/item/weapon/storage/belt/utility/full,
prob(3);/obj/item/weapon/storage/belt/utility,
prob(3);/obj/item/clothing/head/beret/engineering,
prob(3);/obj/item/clothing/head/soft/yellow,
prob(2);/obj/item/clothing/head/orangebandana,
prob(2);/obj/item/clothing/head/hardhat/dblue,
prob(2);/obj/item/clothing/head/hardhat/orange,
prob(1);/obj/item/clothing/glasses/welding,
prob(2);/obj/item/clothing/head/welding,
prob(4);/obj/item/clothing/suit/storage/hazardvest,
prob(2);/obj/item/clothing/under/overalls,
prob(3);/obj/item/clothing/shoes/workboots,
prob(1);/obj/item/clothing/shoes/magboots,
prob(2);/obj/item/clothing/accessory/storage/black_vest,
prob(2);/obj/item/clothing/accessory/storage/brown_vest,
prob(1);/obj/item/clothing/accessory/storage/brown_drop_pouches,
prob(3);/obj/item/clothing/ears/earmuffs,
prob(1);/obj/item/weapon/beartrap,
prob(2);/obj/item/weapon/handcuffs)
/obj/random/maintenance/research
/*Maintenance loot list. This one is for around medical areas*/
name = "random research maintenance item"
desc = "This is a random research maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/research/item_to_spawn()
return pick(prob(320);/obj/random/maintenance/clean,
prob(3);/obj/item/device/analyzer/plant_analyzer,
prob(2);/obj/item/device/analyzer/xeno_analyzer,
prob(1);/obj/item/device/flash/synthetic,
prob(2);/obj/item/weapon/bucket_sensor,
prob(1);/obj/item/weapon/cell/device/weapon,
prob(5);/obj/item/weapon/storage/backpack/toxins,
prob(5);/obj/item/weapon/storage/backpack/satchel/tox,
prob(5);/obj/item/weapon/storage/backpack/messenger/tox,
prob(2);/obj/item/weapon/storage/excavation,
prob(1);/obj/item/weapon/storage/backpack/holding,
prob(3);/obj/item/weapon/storage/box/beakers,
prob(3);/obj/item/weapon/storage/box/syringes,
prob(3);/obj/item/weapon/storage/box/gloves,
prob(2);/obj/item/clothing/gloves/latex,
prob(4);/obj/item/clothing/glasses/science,
prob(3);/obj/item/clothing/glasses/material,
prob(1);/obj/item/clothing/head/beret/purple,
prob(1);/obj/item/clothing/head/bio_hood/scientist,
prob(4);/obj/item/clothing/suit/storage/toggle/labcoat,
prob(4);/obj/item/clothing/suit/storage/toggle/labcoat/science,
prob(1);/obj/item/clothing/suit/bio_suit/scientist,
prob(4);/obj/item/clothing/under/rank/scientist,
prob(2);/obj/item/clothing/under/rank/scientist_new)
/obj/random/maintenance/cargo
/*Maintenance loot list. This one is for around cargo areas*/
name = "random cargo maintenance item"
desc = "This is a random cargo maintenance item."
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
/obj/random/maintenance/cargo/item_to_spawn()
return pick(prob(320);/obj/random/maintenance/clean,
prob(3);/obj/item/device/flashlight/lantern,
prob(4);/obj/item/weapon/pickaxe,
prob(5);/obj/item/weapon/storage/backpack/industrial,
prob(5);/obj/item/weapon/storage/backpack/satchel/norm,
prob(3);/obj/item/weapon/storage/backpack/dufflebag,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo,
prob(1);/obj/item/weapon/storage/toolbox/syndicate,
prob(1);/obj/item/weapon/storage/belt/utility/full,
prob(2);/obj/item/weapon/storage/belt/utility,
prob(4);/obj/item/device/toner,
prob(1);/obj/item/device/destTagger,
prob(3);/obj/item/clothing/glasses/material,
prob(3);/obj/item/clothing/head/soft/yellow,
prob(4);/obj/item/clothing/suit/storage/hazardvest,
prob(3);/obj/item/clothing/suit/apron/overalls,
prob(4);/obj/item/clothing/suit/apron,
prob(2);/obj/item/clothing/under/syndicate/tacticool,
prob(1);/obj/item/clothing/under/syndicate/combat,
prob(2);/obj/item/clothing/accessory/storage/black_vest,
prob(2);/obj/item/clothing/accessory/storage/brown_vest,
prob(3);/obj/item/clothing/ears/earmuffs,
prob(1);/obj/item/weapon/beartrap,
prob(2);/obj/item/weapon/handcuffs,)
var/list/random_junk_
var/list/random_useful_
/proc/get_random_useful_type()
if(!random_useful_)
random_useful_ = subtypesof(/obj/item/weapon/pen/crayon)
random_useful_ += /obj/item/weapon/pen
random_useful_ += /obj/item/weapon/pen/blue
random_useful_ += /obj/item/weapon/pen/red
random_useful_ += /obj/item/weapon/pen/multi
random_useful_ += /obj/item/weapon/storage/box/matches
random_useful_ += /obj/item/stack/material/cardboard
return pick(random_useful_)
/proc/get_random_junk_type()
if(prob(20)) // Misc. clutter
return /obj/effect/decal/cleanable/generic
if(prob(70)) // Misc. junk
if(!random_junk_)
random_junk_ = subtypesof(/obj/item/trash)
random_junk_ += typesof(/obj/item/weapon/cigbutt)
random_junk_ += /obj/effect/decal/cleanable/spiderling_remains
random_junk_ += /obj/effect/decal/remains/mouse
random_junk_ += /obj/effect/decal/remains/robot
random_junk_ += /obj/item/weapon/paper/crumpled
random_junk_ += /obj/item/inflatable/torn
random_junk_ += /obj/effect/decal/cleanable/molten_item
random_junk_ += /obj/item/weapon/material/shard
random_junk_ -= /obj/item/trash/plate
random_junk_ -= /obj/item/trash/snack_bowl
random_junk_ -= /obj/item/trash/syndi_cakes
random_junk_ -= /obj/item/trash/tray
return pick(random_junk_)
// Misc. actually useful stuff
return get_random_useful_type()
@@ -288,8 +288,8 @@
src.add_fingerprint(user)
return
/obj/structure/closet/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
/obj/structure/closet/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/closet/relaymove(mob/user as mob)
@@ -317,7 +317,7 @@
if(!usr.canmove || usr.stat || usr.restrained())
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.toggle(usr)
else
@@ -118,4 +118,6 @@
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/clothing/under/lawyer/blue(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
@@ -32,6 +32,7 @@
new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/device/flash(src)
new /obj/item/taperoll/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
@@ -236,6 +236,37 @@
req_access = list(access_chemistry)
New()
..()
new /obj/item/clothing/under/rank/psych(src)
new /obj/item/clothing/under/rank/psych/turtleneck(src)
new /obj/item/clothing/suit/straight_jacket(src)
new /obj/item/weapon/reagent_containers/glass/bottle/stoxin(src)
new /obj/item/weapon/reagent_containers/syringe(src)
new /obj/item/weapon/storage/pill_bottle/citalopram(src)
new /obj/item/weapon/reagent_containers/pill/methylphenidate(src)
new /obj/item/weapon/clipboard(src)
new /obj/item/weapon/folder/white(src)
new /obj/item/device/taperecorder(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/camera(src)
new /obj/item/toy/therapy_blue(src)
return
/obj/structure/closet/secure_closet/psych
name = "psychiatric closet"
desc = "Store psychology tools and medicines in here."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_psychiatrist)
New()
..()
new /obj/item/weapon/storage/box/pillbottles(src)
@@ -134,7 +134,7 @@
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
else
@@ -280,6 +280,10 @@
new /obj/item/device/flashlight/maglight(src)
new /obj/item/weapon/reagent_containers/food/drinks/flask/detflask(src)
new /obj/item/weapon/storage/briefcase/crimekit(src)
new /obj/item/device/taperecorder(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
new /obj/item/device/tape/random(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
@@ -177,7 +177,7 @@
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr))
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
else
+26 -20
View File
@@ -138,14 +138,20 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
/obj/structure/door_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/door_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
@@ -156,7 +162,7 @@
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the [glass] plating off!</span>"
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
var/M = text2path("/obj/item/stack/material/[glass]")
new M(src.loc, 2)
glass = 0
@@ -164,18 +170,18 @@
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the glass panel out!</span>"
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You dissasembled the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
new /obj/item/stack/material/steel(src.loc, 4)
qdel (src)
else
user << "<span class='notice'>You need more welding fuel.</span>"
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
return
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
@@ -187,19 +193,19 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 40) && state == 0 && anchored)
if (C.use(1))
src.state = 1
user << "<span class='notice'>You wire the airlock.</span>"
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -207,7 +213,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the airlock wires.!</span>"
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
@@ -219,14 +225,14 @@
if(!src) return
user.drop_item()
W.loc = src
user << "<span class='notice'>You installed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
src.state = 2
src.electronics = W
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
user << "<span class='notice'>There was nothing to remove.</span>"
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
src.state = 1
return
@@ -235,7 +241,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You removed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
src.state = 1
electronics.loc = src.loc
electronics = null
@@ -250,28 +256,28 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>")
glass = 1
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now finishing the airlock.</span>"
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You finish the airlock!</span>"
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
var/path
if(istext(glass))
path = text2path("/obj/machinery/door/airlock/[glass]")
+26 -17
View File
@@ -4,14 +4,20 @@
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_wall"
w_class = ITEMSIZE_NORMAL
var/deploy_path = /obj/structure/inflatable
attack_self(mob/user)
playsound(loc, 'sound/items/zip.ogg', 75, 1)
user << "<span class='notice'>You inflate [src].</span>"
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
/obj/item/inflatable/attack_self(mob/user)
inflate(user,user.loc)
/obj/item/inflatable/afterattack(var/atom/A, var/mob/user)
..(A, user)
if(!user)
return
if(!user.Adjacent(A))
to_chat(user,"You can't reach!")
return
if(istype(A, /turf))
inflate(user,A)
/obj/structure/inflatable
name = "inflatable wall"
@@ -82,6 +88,17 @@
if(health <= 0)
deflate(1)
/obj/structure/inflatable/CtrlClick()
hand_deflate()
/obj/item/inflatable/proc/inflate(var/mob/user,var/location)
playsound(location, 'sound/items/zip.ogg', 75, 1)
to_chat(user,"<span class='notice'>You inflate [src].</span>")
var/obj/structure/inflatable/R = new deploy_path(location)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
/obj/structure/inflatable/proc/deflate(var/violent=0)
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
if(violent)
@@ -102,7 +119,7 @@
set category = "Object"
set src in oview(1)
if(isobserver(usr)) //to stop ghosts from deflating
if(isobserver(usr) || usr.restrained() || !usr.Adjacent(src))
return
verbs -= /obj/structure/inflatable/verb/hand_deflate
@@ -123,14 +140,7 @@
desc = "A folded membrane which rapidly expands into a simple door on activation."
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_door"
attack_self(mob/user)
playsound(loc, 'sound/items/zip.ogg', 75, 1)
user << "<span class='notice'>You inflate [src].</span>"
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
qdel(src)
deploy_path = /obj/structure/inflatable/door
/obj/structure/inflatable/door //Based on mineral door code
name = "inflatable door"
@@ -165,7 +175,6 @@
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -25,6 +25,7 @@ obj/structure/windoor_assembly
var/facing = "l" //Does the windoor open to the left or right?
var/secure = "" //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed in terms of sprites
var/step = null //How far the door assembly has progressed in terms of steps
obj/structure/windoor_assembly/secure
name = "secure windoor assembly"
@@ -41,6 +42,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
set_dir(start_dir)
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
set_dir(NORTH)
update_state()
update_nearby_tiles(need_rebuild=1)
@@ -69,13 +71,20 @@ obj/structure/windoor_assembly/Destroy()
else
return 1
/obj/structure/windoor_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/windoor_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
switch(state)
@@ -88,14 +97,14 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You disassembled the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
if(secure)
new /obj/item/stack/material/glass/reinforced(get_turf(src), 2)
else
new /obj/item/stack/material/glass(get_turf(src), 2)
qdel(src)
else
user << "<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>"
to_chat(user,"<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>")
return
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
@@ -105,12 +114,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've secured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = 1
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(istype(W, /obj/item/weapon/wrench) && anchored)
@@ -119,12 +125,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've unsecured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = 0
if(src.secure)
src.name = "secure windoor assembly"
else
src.name = "windoor assembly"
step = null
//Adding cable to the assembly. Step 5 complete.
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
@@ -133,12 +136,9 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/stack/cable_coil/CC = W
if(do_after(user, 40))
if (CC.use(1))
user << "<span class='notice'>You wire the windoor!</span>"
to_chat(user,"<span class='notice'>You wire the windoor!</span>")
src.state = "02"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
step = 1
else
..()
@@ -152,16 +152,13 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the windoor wires.!</span>"
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
new/obj/item/stack/cable_coil(get_turf(user), 1)
src.state = "01"
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked")
else if(istype(W, /obj/item/weapon/airlock_electronics))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
@@ -170,8 +167,8 @@ obj/structure/windoor_assembly/Destroy()
user.drop_item()
W.loc = src
user << "<span class='notice'>You've installed the airlock electronics!</span>"
src.name = "near finished windoor assembly"
to_chat(user,"<span class='notice'>You've installed the airlock electronics!</span>")
step = 2
src.electronics = W
else
W.loc = src.loc
@@ -183,11 +180,8 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !src.electronics) return
user << "<span class='notice'>You've removed the airlock electronics!</span>"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
step = 1
var/obj/item/weapon/airlock_electronics/ae = electronics
electronics = null
ae.loc = src.loc
@@ -195,9 +189,12 @@ obj/structure/windoor_assembly/Destroy()
//Crowbar to complete the assembly, Step 7 complete.
else if(istype(W, /obj/item/weapon/crowbar))
if(!src.electronics)
usr << "<span class='warning'>The assembly is missing electronics.</span>"
to_chat(usr,"<span class='warning'>The assembly is missing electronics.</span>")
return
usr << browse(null, "window=windoor_access")
if(src.electronics && istype(src.electronics, /obj/item/weapon/circuitboard/broken))
to_chat(usr,"<span class='warning'>The assembly has broken airlock electronics.</span>")
return
to_chat(usr,browse(null, "window=windoor_access")) //Not sure what this actually does... -Ner
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
@@ -206,7 +203,7 @@ obj/structure/windoor_assembly/Destroy()
if(!src) return
density = 1 //Shouldn't matter but just incase
user << "<span class='notice'>You finish the windoor!</span>"
to_chat(user,"<span class='notice'>You finish the windoor!</span>")
if(secure)
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
@@ -218,7 +215,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "rightsecure"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -239,7 +237,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "right"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -263,7 +262,15 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/proc/update_state()
update_icon()
name += " ([created_name])"
name = ""
switch(step)
if (0)
name = "anchored "
if (1)
name = "wired "
if (2)
name = "near finished "
name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]"
//Rotates the windoor assembly clockwise
/obj/structure/windoor_assembly/verb/revrotate()
@@ -272,7 +279,7 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
@@ -292,11 +299,11 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if(src.facing == "l")
usr << "The windoor will now slide to the right."
to_chat(usr,"The windoor will now slide to the right.")
src.facing = "r"
else
src.facing = "l"
usr << "The windoor will now slide to the left."
to_chat(usr,"The windoor will now slide to the left.")
update_icon()
return