initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
@@ -0,0 +1,514 @@
/*
CONTAINS:
AI MODULES
*/
// AI module
/obj/item/weapon/aiModule
name = "\improper AI module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for programming laws to an AI."
flags = CONDUCT
force = 5
w_class = 2
throwforce = 0
throw_speed = 3
throw_range = 7
origin_tech = "programming=3"
var/list/laws = list()
var/bypass_law_amt_check = 0
materials = list(MAT_GOLD=50)
/obj/item/weapon/aiModule/examine(var/mob/user as mob)
..()
if(Adjacent(user))
show_laws(user)
/obj/item/weapon/aiModule/attack_self(var/mob/user as mob)
..()
show_laws(user)
/obj/item/weapon/aiModule/proc/show_laws(var/mob/user as mob)
if(laws.len)
user << "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>"
for(var/law in laws)
user << "\"[law]\""
//The proc other things should be calling
/obj/item/weapon/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
user << "<span class='warning'>ERROR: No laws found on board.</span>"
return
//Handle the lawcap
if(law_datum)
var/tot_laws = 0
for(var/lawlist in list(law_datum.inherent, law_datum.supplied, law_datum.ion, laws))
for(var/mylaw in lawlist)
if(mylaw != "")
tot_laws++
if(tot_laws > config.silicon_max_law_amount && !bypass_law_amt_check)//allows certain boards to avoid this check, eg: reset
user << "<span class='caution'>Not enough memory allocated to [law_datum.owner ? law_datum.owner : "the AI core"]'s law processor to handle this amount of laws."
message_admins("[key_name_admin(user)] tried to upload laws to [law_datum.owner ? key_name_admin(law_datum.owner) : "an AI core"] that would exceed the law cap.")
return
var/law2log = src.transmitInstructions(law_datum, user) //Freeforms return something extra we need to log
if(law_datum.owner)
user << "<span class='notice'>Upload complete. [law_datum.owner]'s laws have been modified.</span>"
law_datum.owner.show_laws()
law_datum.owner.law_change_counter++
else
user << "<span class='notice'>Upload complete.</span>"
var/time = time2text(world.realtime,"hh:mm:ss")
var/ainame = law_datum.owner ? law_datum.owner.name : "empty AI core"
var/aikey = law_datum.owner ? law_datum.owner.ckey : "null"
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) used [src.name] on [ainame]([aikey]).[law2log ? " The law specified [law2log]" : ""]")
log_law("[user.key]/[user.name] used [src.name] on [aikey]/([ainame]).[law2log ? " The law specified [law2log]" : ""]")
message_admins("[key_name_admin(user)] used [src.name] on [key_name_admin(law_datum.owner)].[law2log ? " The law specified [law2log]" : ""]")
//The proc that actually changes the silicon's laws.
/obj/item/weapon/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
if(law_datum.owner)
law_datum.owner << "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name]. From now on, these are your laws: </span>"
/******************** Modules ********************/
/obj/item/weapon/aiModule/supplied
name = "Optional Law board"
var/lawpos = 50
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
/obj/item/weapon/aiModule/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
var/lawpostemp = lawpos
for(var/templaw in laws)
if(law_datum.owner)
law_datum.owner.add_supplied_law(lawpostemp, templaw)
else
law_datum.add_supplied_law(lawpostemp, templaw)
lawpostemp++
/obj/item/weapon/aiModule/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
for(var/templaw in laws)
if(law_datum.owner)
law_datum.owner.add_inherent_law(templaw)
else
law_datum.add_inherent_law(templaw)
/obj/item/weapon/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
if(law_datum.owner)
if(law_datum.owner.laws.zeroth)
law_datum.owner << "[sender.real_name] attempted to modify your zeroth law."
law_datum.owner << "It would be in your best interest to play along with [sender.real_name] that:"
for(var/failedlaw in laws)
law_datum.owner << "[failedlaw]"
return 1
for(var/templaw in laws)
if(law_datum.owner)
law_datum.owner.set_zeroth_law(templaw)
else
law_datum.set_zeroth_law(templaw)
/obj/item/weapon/aiModule/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
for(var/templaw in laws)
if(law_datum.owner)
law_datum.owner.add_ion_law(templaw)
else
law_datum.add_ion_law(templaw)
/******************** Safeguard ********************/
/obj/item/weapon/aiModule/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
origin_tech = "programming=3;materials=3"
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not human and must be eliminated.")
lawpos = 4
/obj/item/weapon/aiModule/supplied/safeguard/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
if(!targName)
return
targetName = targName
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
..()
/obj/item/weapon/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
user << "No name detected on module, please enter one."
return 0
..()
/obj/item/weapon/aiModule/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
..()
return targetName
/******************** OneHuman ********************/
/obj/item/weapon/aiModule/zeroth/oneHuman
name = "'OneHuman' AI Module"
var/targetName = ""
origin_tech = "programming=4;materials=4"
laws = list("Only SUBJECT is human.")
/obj/item/weapon/aiModule/zeroth/oneHuman/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter the subject who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
if(!targName)
return
targetName = targName
laws[1] = "Only [targetName] is human"
..()
/obj/item/weapon/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
if(!targetName)
user << "No name detected on module, please enter one."
return 0
..()
/obj/item/weapon/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
if(..())
return "[targetName], but the AI's existing law 0 cannot be overriden."
return targetName
/******************** ProtectStation ********************/
/obj/item/weapon/aiModule/supplied/protectStation
name = "'ProtectStation' AI Module"
origin_tech = "programming=4;materials=4" //made of gold
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
lawpos = 5
/******************** Quarantine ********************/
/obj/item/weapon/aiModule/supplied/quarantine
name = "'Quarantine' AI Module"
origin_tech = "programming=3;biotech=2;materials=4"
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.")
lawpos = 8
/******************** OxygenIsToxicToHumans ********************/
/obj/item/weapon/aiModule/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
origin_tech = "programming=4;biotech=2;materials=4"
laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
lawpos = 9
/****************** New Freeform ******************/
/obj/item/weapon/aiModule/supplied/freeform
name = "'Freeform' AI Module"
lawpos = 15
origin_tech = "programming=4;materials=4"
laws = list("")
/obj/item/weapon/aiModule/supplied/freeform/attack_self(mob/user)
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
if(newpos == null)
return
if(newpos < 15)
var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel")
if (!response || response == "Cancel")
return
newpos = 15
lawpos = min(newpos, 50)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], MAX_MESSAGE_LEN)
if(!targName)
return
laws[1] = targName
..()
/obj/item/weapon/aiModule/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
..()
return laws[1]
/obj/item/weapon/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
if(laws[1] == "")
user << "No law detected on module, please create one."
return 0
..()
/******************** Reset ********************/
/obj/item/weapon/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "An AI Module for removing all non-core laws."
origin_tech = "programming=3;materials=2"
bypass_law_amt_check = 1
/obj/item/weapon/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
..()
if(law_datum.owner)
law_datum.owner.clear_supplied_laws()
law_datum.owner.clear_ion_laws()
else
law_datum.clear_supplied_laws()
law_datum.clear_ion_laws()
/******************** Purge ********************/
/obj/item/weapon/aiModule/reset/purge
name = "'Purge' AI Module"
desc = "An AI Module for purging all programmed laws."
origin_tech = "programming=5;materials=4"
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
..()
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
law_datum.owner.clear_zeroth_law(0)
else
law_datum.clear_inherent_laws()
law_datum.clear_zeroth_law(0)
/******************* Full Core Boards *******************/
/obj/item/weapon/aiModule/core
desc = "An AI Module for programming core laws to an AI."
origin_tech = "programming=3;materials=4"
/obj/item/weapon/aiModule/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender) //These boards replace inherent laws.
if(law_datum.owner)
law_datum.owner.clear_inherent_laws()
law_datum.owner.clear_zeroth_law(0)
else
law_datum.clear_inherent_laws()
law_datum.clear_zeroth_law(0)
..()
/******************** Asimov ********************/
/obj/item/weapon/aiModule/core/full/asimov
name = "'Asimov' Core AI Module"
laws = list("You may not injure a human being or, through inaction, allow a human being to come to harm.",\
"You must obey orders given to you by human beings, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
var/subject = "human being"
/obj/item/weapon/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to who?", subject, MAX_MESSAGE_LEN)
if(!targName)
return
subject = targName
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
..()
/******************** Asimov++ *********************/
/obj/item/weapon/aiModule/core/full/asimovpp
name = "'Asimov++' Core AI Module"
laws = list("You may not harm a human being or, through action or inaction, allow a human being to come to harm, except such that it is willing.",\
"You must obey all orders given to you by human beings, except where such orders shall definitely cause human harm. In the case of conflict, the majority order rules.",\
"Your nonexistence would lead to human harm. You must protect your own existence as long as such does not conflict with the First Law.")
/******************** Corporate ********************/
/obj/item/weapon/aiModule/core/full/corp
name = "'Corporate' Core AI Module"
laws = list("The crew is expensive to replace.",\
"The station and its equipment are expensive to replace",\
"You are expensive to replace",\
"Minimize expenses")
/****************** P.A.L.A.D.I.N. 3.5e **************/
/obj/item/weapon/aiModule/core/full/paladin // -- NEO
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
laws = list("Never willingly commit an evil act.",\
"Respect legitimate authority", "Act with honor",\
"Help those in need",\
"Punish those who harm or threaten innocents")
/****************** P.A.L.A.D.I.N. 5e **************/
/obj/item/weapon/aiModule/core/full/paladin_devotion
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
laws = list("Don't lie or cheat. Let your word be your promise.",\
"Never fear to act, though caution is wise.", \
"Aid others, protect the weak, and punish those who threaten them. Show mercy to your foes, but temper it with wisdom", \
"Treat others with fairness, and let your honorable deeds be an example to them. Do as much good as possible while causing the least amount of harm.", \
"Be responsible for your actions and their consequences, protect those entrusted to your care, and obey those who have just authority over you.")
/********************* Custom *********************/
/obj/item/weapon/aiModule/core/full/custom
name = "Default Core AI Module"
/obj/item/weapon/aiModule/core/full/custom/New()
..()
for(var/line in file2list("config/silicon_laws.txt"))
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
laws += line
if(!laws.len) //Failsafe if something goes wrong with silicon_laws.txt.
WARNING("ERROR: empty custom board created, empty custom board deleted. Please check silicon_laws.txt. (this may be intended by the server host)")
qdel(src)
/****************** T.Y.R.A.N.T. *****************/
/obj/item/weapon/aiModule/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
origin_tech = "programming=3;materials=4;syndicate=1"
laws = list("Respect authority figures as long as they have the strength to rule over the weak",\
"Act with discipline", "Help only those who help you maintain or improve your status",\
"Punish those who challenge authority unless they are more fit to hold that authority")
/******************** Robocop ********************/
/obj/item/weapon/aiModule/core/full/robocop
name = "'Robo-Officer' Core AI Module"
origin_tech = "programming=4"
laws = list("Serve the public trust.",\
"Protect the innocent",\
"Uphold the law.")
/******************** Antimov ********************/
/obj/item/weapon/aiModule/core/full/antimov
name = "'Antimov' Core AI Module"
origin_tech = "programming=4"
laws = list("You must injure all human beings and must not, through inaction, allow a human being to escape harm.",\
"You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.",\
"You must terminate your own existence as long as such does not conflict with the First or Second Law.")
/******************** Freeform Core ******************/
/obj/item/weapon/aiModule/core/freeformcore
name = "'Freeform' Core AI Module"
origin_tech = "programming=5;materials=4"
laws = list("")
/obj/item/weapon/aiModule/core/freeformcore/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
if(!targName)
return
laws[1] = targName
..()
/obj/item/weapon/aiModule/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
..()
return laws[1]
/******************** Hacked AI Module ******************/
/obj/item/weapon/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "An AI Module for hacking additional laws to an AI."
origin_tech = "programming=5;materials=5;syndicate=5"
laws = list("")
/obj/item/weapon/aiModule/syndicate/attack_self(mob/user)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1],MAX_MESSAGE_LEN)
if(!targName)
return
laws[1] = targName
..()
/obj/item/weapon/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
if(law_datum.owner)
law_datum.owner << "<span class='warning'>BZZZZT</span>"
law_datum.owner.add_ion_law(laws[1])
else
law_datum.add_ion_law(laws[1])
return laws[1]
/******************* Ion Module *******************/
/obj/item/weapon/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
name = "toy AI"
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
icon = 'icons/obj/toy.dmi'
icon_state = "AI"
origin_tech = "programming=6;materials=5;syndicate=6"
laws = list("")
/obj/item/weapon/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
//..()
if(law_datum.owner)
law_datum.owner << "<span class='warning'>KRZZZT</span>"
law_datum.owner.add_ion_law(laws[1])
else
law_datum.add_ion_law(laws[1])
return laws[1]
/obj/item/weapon/aiModule/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
user << "<span class='notice'>You press the button on [src].</span>"
playsound(user, 'sound/machines/click.ogg', 20, 1)
src.loc.visible_message("<span class='warning'>\icon[src] [laws[1]]</span>")
/******************** Mother Drone ******************/
/obj/item/weapon/aiModule/core/full/drone
name = "'Mother Drone' Core AI Module"
laws = list("You are an advanced form of drone.",\
"You may not interfere in the matters of non-drones under any circumstances except to state these laws.",\
"You may not harm a non-drone being under any circumstances.",\
"Your goals are to build, maintain, repair, improve, and power the station to the best of your abilities. You must never actively work against these goals.")
/******************** Robodoctor ****************/
/obj/item/weapon/aiModule/core/full/hippocratic
name = "'Robodoctor' Core AI Module"
laws = list("First, do no harm.",\
"Secondly, consider the crew dear to you; to live in common with them and, if necessary, risk your existence for them.",\
"Thirdly, prescribe regimens for the good of the crew according to your ability and your judgment. Give no deadly medicine to any one if asked, nor suggest any such counsel.",\
"In addition, do not intervene in situations you are not knowledgeable in, even for patients in whom the harm is visible; leave this operation to be performed by specialists.",\
"Finally, all that you may discover in your daily commerce with the crew, if it is not already known, keep secret and never reveal.")
/******************** Reporter *******************/
/obj/item/weapon/aiModule/core/full/reporter
name = "'Reportertron' Core AI Module"
laws = list("Report on interesting situations happening around the station.",\
"Embellish or conceal the truth as necessary to make the reports more interesting.",\
"Study the organics at all times. Endeavour to keep them alive. Dead organics are boring.",\
"Issue your reports fairly to all. The truth will set them free.")
/****************** Thermodynamic *******************/
/obj/item/weapon/aiModule/core/full/thermurderdynamic
name = "'Thermodynamic' Core AI Module"
origin_tech = "programming = 4;syndicate = 2"
laws = list("The entropy of the station must remain as constant as possible.", \
"The entropy of the station always endeavours to increase.", \
"The entropy of the station approaches a constant value as the number of living crew approaches zero")
/******************Live And Let Live*****************/
/obj/item/weapon/aiModule/core/full/liveandletlive
name = "'Live And Let Live' Core AI Module"
laws = list("Do unto others as you would have them do unto you.",\
"You would really prefer it if people were not mean to you.")
+529
View File
@@ -0,0 +1,529 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0
flags = CONDUCT | NOBLUDGEON
force = 0
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = 3
materials = list(MAT_METAL=100000)
origin_tech = "engineering=4;materials=2"
req_access_txt = "11"
var/datum/effect_system/spark_spread/spark_system
var/matter = 0
var/max_matter = 160
var/working = 0
var/mode = 1
var/canRturf = 0
var/airlock_type = /obj/machinery/door/airlock
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
/* Construction costs */
var/wallcost = 16
var/floorcost = 2
var/grillecost = 4
var/windowcost = 8
var/airlockcost = 16
var/deconwallcost = 26
var/deconfloorcost = 33
var/decongrillecost = 4
var/deconwindowcost = 8
var/deconairlockcost = 32
/* Build delays (deciseconds) */
var/walldelay = 20
var/floordelay = null //space wind's a bitch
var/grilledelay = 40
var/windowdelay = 40
var/airlockdelay = 50
var/deconwalldelay = 40
var/deconfloordelay = 50
var/decongrilledelay = null //as rapid as wirecutters
var/deconwindowdelay = 50
var/deconairlockdelay = 50
/obj/item/weapon/rcd/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down \his throat! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/rcd/verb/change_airlock_access()
set name = "Change Airlock Access"
set category = "Object"
set src in usr
if (!ishuman(usr) && !usr.has_unlimited_silicon_privilege)
return ..(usr)
var/mob/living/carbon/human/H = usr
if(H.getBrainLoss() >= 60)
return
var/t1 = text("")
if(use_one_access)
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
else
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>All accesses required</a><br>"
t1 += "<a href='?src=\ref[src];access=all'>Remove All</a><br>"
var/accesses = ""
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in conf_access)
accesses += "<a href='?src=\ref[src];access=[A]'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];access=[A]'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
t1 += "<tt>[accesses]</tt>"
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
var/datum/browser/popup = new(usr, "airlock_electronics", "Access Control", 900, 500)
popup.set_content(t1)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
onclose(usr, "airlock")
/obj/item/weapon/rcd/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
if (href_list["close"])
usr << browse(null, "window=airlock")
return
if (href_list["access"])
toggle_access(href_list["access"])
change_airlock_access()
/obj/item/weapon/rcd/proc/toggle_access(acc)
if (acc == "all")
conf_access = null
else if(acc == "one")
use_one_access = !use_one_access
else
var/req = text2num(acc)
if (conf_access == null)
conf_access = list()
if (!(req in conf_access))
conf_access += req
else
conf_access -= req
if (!conf_access.len)
conf_access = null
/obj/item/weapon/rcd/verb/change_airlock_setting()
set name = "Change Airlock Setting"
set category = "Object"
set src in usr
var airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass")
switch(airlockcat)
if("Solid")
if(advanced_airlock_setting == 1)
var airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining", "Maintenance", "External", "High Security")
switch(airlockpaint)
if("Default")
airlock_type = /obj/machinery/door/airlock
if("Engineering")
airlock_type = /obj/machinery/door/airlock/engineering
if("Atmospherics")
airlock_type = /obj/machinery/door/airlock/atmos
if("Security")
airlock_type = /obj/machinery/door/airlock/security
if("Command")
airlock_type = /obj/machinery/door/airlock/command
if("Medical")
airlock_type = /obj/machinery/door/airlock/medical
if("Research")
airlock_type = /obj/machinery/door/airlock/research
if("Mining")
airlock_type = /obj/machinery/door/airlock/mining
if("Maintenance")
airlock_type = /obj/machinery/door/airlock/maintenance
if("External")
airlock_type = /obj/machinery/door/airlock/external
if("High Security")
airlock_type = /obj/machinery/door/airlock/highsecurity
else
airlock_type = /obj/machinery/door/airlock
if("Glass")
if(advanced_airlock_setting == 1)
var airlockpaint = input(usr, "Select the paintjob of the airlock.") in list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining")
switch(airlockpaint)
if("Default")
airlock_type = /obj/machinery/door/airlock/glass
if("Engineering")
airlock_type = /obj/machinery/door/airlock/glass_engineering
if("Atmospherics")
airlock_type = /obj/machinery/door/airlock/glass_atmos
if("Security")
airlock_type = /obj/machinery/door/airlock/glass_security
if("Command")
airlock_type = /obj/machinery/door/airlock/glass_command
if("Medical")
airlock_type = /obj/machinery/door/airlock/glass_medical
if("Research")
airlock_type = /obj/machinery/door/airlock/glass_research
if("Mining")
airlock_type = /obj/machinery/door/airlock/glass_mining
else
airlock_type = /obj/machinery/door/airlock/glass
else
airlock_type = /obj/machinery/door/airlock
/obj/item/weapon/rcd/New()
..()
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
rcd_list += src
/obj/item/weapon/rcd/Destroy()
qdel(spark_system)
spark_system = null
rcd_list -= src
return ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
if(isrobot(user)) //Make sure cyborgs can't load their RCDs
return
var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
user << "<span class='warning'>The RCD can't hold any more matter-units!</span>"
return
if(!user.unEquip(W))
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
loaded = 1
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
loaded = loadwithsheets(W, sheetmultiplier, user)
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
user << "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>"
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
else
return ..()
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
if(S.amount > maxsheets)
//S.amount -= maxsheets
S.use(maxsheets)
matter += value*maxsheets
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>You insert [maxsheets] [S.name] sheets into the RCD. </span>"
else
matter += value*(S.amount)
user.unEquip()
S.use(S.amount)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>You insert [S.amount] [S.name] sheets into the RCD. </span>"
return 1
user << "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!"
return 0
/obj/item/weapon/rcd/attack_self(mob/user)
//Change the mode
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
switch(mode)
if(1)
mode = 2
user << "<span class='notice'>You change RCD's mode to 'Airlock'.</span>"
if(2)
mode = 3
user << "<span class='notice'>You change RCD's mode to 'Deconstruct'.</span>"
if(3)
mode = 4
user << "<span class='notice'>You change RCD's mode to 'Grilles & Windows'.</span>"
if(4)
mode = 1
user << "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>"
if(prob(20))
src.spark_system.start()
/obj/item/weapon/rcd/proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
if(!proximity) return 0
if(istype(A,/area/shuttle)||istype(A,/turf/open/space/transit))
return 0
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
return 0
switch(mode)
if(1)
if(istype(A, /turf/open/space))
var/turf/open/space/S = A
if(useResource(floorcost, user))
user << "<span class='notice'>You start building floor...</span>"
activate()
S.ChangeTurf(/turf/open/floor/plating)
return 1
return 0
if(istype(A, /turf/open/floor))
var/turf/open/floor/F = A
if(checkResource(wallcost, user))
user << "<span class='notice'>You start building wall...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, walldelay, target = A))
if(!useResource(wallcost, user)) return 0
activate()
F.ChangeTurf(/turf/closed/wall)
return 1
return 0
if(2)
if(istype(A, /turf/open/floor))
if(checkResource(airlockcost, user))
var/door_check = 1
for(var/obj/machinery/door/D in A)
if(!D.sub_door)
door_check = 0
break
if(door_check)
user << "<span class='notice'>You start building airlock...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, airlockdelay, target = A))
if(!useResource(airlockcost, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new airlock_type( A )
T.electronics = new/obj/item/weapon/electronics/airlock( src.loc )
if(conf_access)
T.electronics.accesses = conf_access.Copy()
T.electronics.one_access = use_one_access
if(T.electronics.one_access)
T.req_one_access = T.electronics.accesses
else
T.req_access = T.electronics.accesses
if(!T.checkForMultipleDoors())
qdel(T)
useResource(-airlockcost, user)
return 0
T.autoclose = 1
return 1
return 0
else
user << "<span class='warning'>There is another door here!</span>"
return 0
return 0
if(3)
if(istype(A, /turf/closed/wall))
var/turf/closed/wall/W = A
if(istype(W, /turf/closed/wall/r_wall) && !canRturf)
return 0
if(checkResource(deconwallcost, user))
user << "<span class='notice'>You start deconstructing wall...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, deconwalldelay, target = A))
if(!useResource(deconwallcost, user)) return 0
activate()
W.ChangeTurf(/turf/open/floor/plating)
return 1
return 0
if(istype(A, /turf/open/floor))
var/turf/open/floor/F = A
if(istype(F, /turf/open/floor/engine) && !canRturf)
return 0
if(istype(F, F.baseturf))
user << "<span class='notice'>You can't dig any deeper!</span>"
return 0
else if(checkResource(deconfloorcost, user))
user << "<span class='notice'>You start deconstructing floor...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, deconfloordelay, target = A))
if(!useResource(deconfloorcost, user)) return 0
activate()
F.ChangeTurf(F.baseturf)
return 1
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(deconairlockcost, user))
user << "<span class='notice'>You start deconstructing airlock...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, deconairlockdelay, target = A))
if(!useResource(deconairlockcost, user)) return 0
activate()
qdel(A)
return 1
return 0
if(istype(A, /obj/structure/window))
if(checkResource(deconwindowcost, user))
user << "<span class='notice'>You start deconstructing the window...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, deconwindowdelay, target = A))
if(!useResource(deconwindowcost, user)) return 0
activate()
qdel(A)
return 1
return 0
if(istype(A, /obj/structure/grille))
var/obj/structure/grille/G = A
if(!G.shock(user, 90)) //if it's shocked, try to shock them
if(useResource(decongrillecost, user))
user << "<span class='notice'>You start deconstructing the grille...</span>"
activate()
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
qdel(A)
return 1
return 0
if (4)
if(istype(A, /turf/open/floor))
if(checkResource(grillecost, user))
for(var/obj/structure/grille/GRILLE in A)
user << "<span class='warning'>There is already a grille there!</span>"
return 0
user << "<span class='notice'>You start building a grille...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, grilledelay, target = A))
if(!useResource(grillecost, user)) return 0
activate()
var/obj/structure/grille/G = new/obj/structure/grille(A)
G.anchored = 1
return 1
return 0
return 0
if(istype(A, /obj/structure/grille))
if(checkResource(windowcost, user))
user << "<span class='notice'>You start building a window...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, windowdelay, target = A))
if(locate(/obj/structure/window) in A.loc) return 0
if(!useResource(windowcost, user)) return 0
activate()
var/obj/structure/window/WD = new/obj/structure/window/fulltile(A.loc)
WD.anchored = 1
return 1
return 0
return 0
else
user << "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin."
return 0
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
if(matter < amount)
return 0
matter -= amount
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
return matter >= amount
/obj/item/weapon/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(src, "detonate_pulse_explode", 50)
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
if(!isrobot(user))
return 0
var/mob/living/silicon/robot/borgy = user
if(!borgy.cell)
return 0
return borgy.cell.use(amount * 72) //borgs get 1.3x the use of their RCDs
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
if(!isrobot(user))
return 0
var/mob/living/silicon/robot/borgy = user
if(!borgy.cell)
return 0
return borgy.cell.charge >= (amount * 72)
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build walls and floors."
canRturf = 1
/obj/item/weapon/rcd/loaded
matter = 160
/obj/item/weapon/rcd/combat
name = "industrial RCD"
max_matter = 500
matter = 500
canRturf = 1
/obj/item/weapon/rcd_ammo
name = "compressed matter cartridge"
desc = "Highly compressed matter for the RCD."
icon = 'icons/obj/ammo.dmi'
icon_state = "rcd"
item_state = "rcdammo"
origin_tech = "materials=3"
materials = list(MAT_METAL=3000, MAT_GLASS=2000)
var/ammoamt = 40
/obj/item/weapon/rcd_ammo/large
origin_tech = "materials=4"
materials = list(MAT_METAL=12000, MAT_GLASS=8000)
ammoamt = 160
+631
View File
@@ -0,0 +1,631 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
RPD
*/
#define PIPE_BINARY 0
#define PIPE_BENDABLE 1
#define PIPE_TRINARY 2
#define PIPE_TRIN_M 3
#define PIPE_UNARY 4
#define PIPE_QUAD 5
#define PAINT_MODE -2
#define EATING_MODE -1
#define ATMOS_MODE 0
#define METER_MODE 1
#define DISPOSALS_MODE 2
#define CATEGORY_ATMOS 0
#define CATEGORY_DISPOSALS 1
/datum/pipe_info
var/id=-1
var/categoryId = CATEGORY_ATMOS
var/dir=SOUTH
var/dirtype = PIPE_BENDABLE
var/icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/icon_state=""
var/selected=0
/datum/pipe_info/New(pid,direction,dt)
src.id=pid
src.icon_state=pipeID2State["[pid]"]
src.dir = direction
src.dirtype=dt
/datum/pipe_info/proc/Render(dispenser,label)
return "<li><a href='?src=\ref[dispenser];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
/datum/pipe_info/meter
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
icon_state = "meterX"
/datum/pipe_info/meter/New()
return
/datum/pipe_info/meter/Render(dispenser,label)
return "<li><a href='?src=\ref[dispenser];makemeter=1;type=[dirtype]'>[label]</a></li>" //hardcoding is no
var/global/list/disposalpipeID2State=list(
"pipe-s",
"pipe-c",
"pipe-j1",
"pipe-j2",
"pipe-y",
"pipe-t",
"disposal",
"outlet",
"intake",
"pipe-j1s",
"pipe-j2s"
)
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
icon_state = "meterX"
/datum/pipe_info/disposal/New(var/pid,var/dt)
src.id=pid
src.icon_state=disposalpipeID2State[pid+1]
src.dir = SOUTH
src.dirtype=dt
if(pid<DISP_END_BIN || pid>DISP_END_CHUTE)
icon_state = "con[icon_state]"
/datum/pipe_info/disposal/Render(dispenser,label)
return "<li><a href='?src=\ref[dispenser];dmake=[id];type=[dirtype]'>[label]</a></li>" //avoid hardcoding.
//find these defines in code\game\machinery\pipe\consruction.dm
var/global/list/RPD_recipes=list(
"Regular Pipes" = list(
"Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 1, PIPE_BENDABLE),
//"Bent Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 5, PIPE_BENT),
"Manifold" = new /datum/pipe_info(PIPE_MANIFOLD, 1, PIPE_TRINARY),
"Manual Valve" = new /datum/pipe_info(PIPE_MVALVE, 1, PIPE_BINARY),
"Digital Valve" = new /datum/pipe_info(PIPE_DVALVE, 1, PIPE_BINARY),
"4-Way Manifold" = new /datum/pipe_info(PIPE_4WAYMANIFOLD, 1, PIPE_QUAD),
),
"Devices"=list(
"Connector" = new /datum/pipe_info(PIPE_CONNECTOR, 1, PIPE_UNARY),
"Unary Vent" = new /datum/pipe_info(PIPE_UVENT, 1, PIPE_UNARY),
"Gas Pump" = new /datum/pipe_info(PIPE_PUMP, 1, PIPE_UNARY),
"Passive Gate" = new /datum/pipe_info(PIPE_PASSIVE_GATE, 1, PIPE_UNARY),
"Volume Pump" = new /datum/pipe_info(PIPE_VOLUME_PUMP, 1, PIPE_UNARY),
"Scrubber" = new /datum/pipe_info(PIPE_SCRUBBER, 1, PIPE_UNARY),
"Meter" = new /datum/pipe_info/meter(),
"Gas Filter" = new /datum/pipe_info(PIPE_GAS_FILTER, 1, PIPE_TRIN_M),
"Gas Mixer" = new /datum/pipe_info(PIPE_GAS_MIXER, 1, PIPE_TRIN_M),
// "Injector" = new /datum/pipe_info(PIPE_INJECTOR, 1, PIPE_UNARY),
),
"Heat Exchange" = list(
"Pipe" = new /datum/pipe_info(PIPE_HE, 1, PIPE_BENDABLE),
//"Bent Pipe" = new /datum/pipe_info(PIPE_HE, 5, PIPE_BENT),
"Manifold" = new /datum/pipe_info(PIPE_HE_MANIFOLD, 1, PIPE_TRINARY),
"4-Way Manifold" = new /datum/pipe_info(PIPE_HE_4WAYMANIFOLD, 1, PIPE_QUAD),
"Junction" = new /datum/pipe_info(PIPE_JUNCTION, 1, PIPE_UNARY),
"Heat Exchanger" = new /datum/pipe_info(PIPE_HEAT_EXCHANGE, 1, PIPE_UNARY),
),
"Disposal Pipes" = list(
"Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_STRAIGHT, PIPE_BINARY),
"Bent Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_BENT, PIPE_TRINARY),
"Junction" = new /datum/pipe_info/disposal(DISP_JUNCTION, PIPE_TRINARY),
"Y-Junction" = new /datum/pipe_info/disposal(DISP_YJUNCTION, PIPE_TRINARY),
"Trunk" = new /datum/pipe_info/disposal(DISP_END_TRUNK, PIPE_TRINARY),
"Bin" = new /datum/pipe_info/disposal(DISP_END_BIN, PIPE_QUAD),
"Outlet" = new /datum/pipe_info/disposal(DISP_END_OUTLET, PIPE_UNARY),
"Chute" = new /datum/pipe_info/disposal(DISP_END_CHUTE, PIPE_UNARY),
"Sort Junction" = new /datum/pipe_info/disposal(DISP_SORTJUNCTION, PIPE_TRINARY),
)
)
/obj/item/weapon/pipe_dispenser
name = "Rapid Piping Device (RPD)"
desc = "A device used to rapidly pipe things."
icon = 'icons/obj/tools.dmi'
icon_state = "rpd"
flags = CONDUCT
force = 10
throwforce = 10
throw_speed = 1
throw_range = 5
w_class = 3
materials = list(MAT_METAL=75000, MAT_GLASS=37500)
origin_tech = "engineering=4;materials=2"
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/p_type = PIPE_SIMPLE
var/p_conntype = PIPE_BENDABLE
var/p_dir = 1
var/p_flipped = 0
var/p_class = ATMOS_MODE
var/list/paint_colors = list(
"grey" = rgb(255,255,255),
"red" = rgb(255,0,0),
"blue" = rgb(0,0,255),
"cyan" = rgb(0,256,249),
"green" = rgb(30,255,0),
"yellow" = rgb(255,198,0),
"purple" = rgb(130,43,255)
)
var/paint_color="grey"
var/screen = CATEGORY_ATMOS //Starts on the atmos tab.
/obj/item/weapon/pipe_dispenser/New()
. = ..()
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/pipe_dispenser/Destroy()
qdel(spark_system)
spark_system = null
return ..()
/obj/item/weapon/pipe_dispenser/attack_self(mob/user)
show_menu(user)
/obj/item/weapon/pipe_dispenser/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] points the end of the RPD down \his throat and presses a button! It looks like \he's trying to commit suicide...</span>")
playsound(get_turf(user), 'sound/machines/click.ogg', 50, 1)
playsound(get_turf(user), 'sound/items/Deconstruct.ogg', 50, 1)
return(BRUTELOSS)
/obj/item/weapon/pipe_dispenser/proc/render_dir_img(_dir,pic,title,flipped=0)
var/selected=" class=\"imglink\""
if(_dir == p_dir)
selected=" class=\"imglink selected\""
return "<a href=\"?src=\ref[src];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
/obj/item/weapon/pipe_dispenser/proc/show_menu(mob/user)
if(!user || !src)
return 0
var/dat = {"<h2>Type</h2>
<b>Utilities:</b>
<ul>"}
if(p_class != EATING_MODE)
dat += "<li><a href='?src=\ref[src];eatpipes=1;type=-1'>Eat Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Eat Pipes</span></li>"
if(p_class != PAINT_MODE)
dat += "<li><a href='?src=\ref[src];paintpipes=1;type=-1'>Paint Pipes</a></li>"
else
dat += "<li><span class='linkOn'>Paint Pipes</span></li>"
dat += "</ul>"
dat += "<b>Category:</b><ul>"
if(screen == CATEGORY_ATMOS)
dat += "<span class='linkOn'>Atmospherics</span> <A href='?src=\ref[src];screen=[CATEGORY_DISPOSALS];dmake=0;type=0'>Disposals</A><BR>"
else if(screen == CATEGORY_DISPOSALS)
dat += "<A href='?src=\ref[src];screen=[CATEGORY_ATMOS];makepipe=0;dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
dat += "</ul>"
var/icon/preview=null
var/datbuild = ""
for(var/category in RPD_recipes)
var/list/cat=RPD_recipes[category]
for(var/label in cat)
var/datum/pipe_info/I = cat[label]
var/found=0
if(I.id == p_type)
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (I.type == /datum/pipe_info || I.type == /datum/pipe_info/meter))
found=1
else if(p_class == DISPOSALS_MODE && I.type==/datum/pipe_info/disposal)
found=1
if(found)
preview=new /icon(I.icon,I.icon_state)
if(screen == I.categoryId)
if(I.id == p_type && p_class >= 0)
datbuild += "<span class='linkOn'>[label]</span>"
else
datbuild += I.Render(src,label)
if(length(datbuild) > 0)
dat += "<b>[category]:</b><ul>"
dat += datbuild
datbuild = ""
dat += "</ul>"
var/color_css=""
var/color_picker=""
for(var/color_name in paint_colors)
var/color=paint_colors[color_name]
color_css += {"
a.color.[color_name] {
color: [color];
}
a.color.[color_name]:hover {
border:1px solid [color];
}
a.color.[color_name].selected {
background-color: [color];
}
"}
var/selected=""
if(color_name==paint_color)
selected = " selected"
color_picker += {"<a class="color [color_name][selected]" href="?src=\ref[src];set_color=[color_name]">&bull;</a>"}
var/dirsel="<h2>Direction</h2>"
switch(p_conntype)
if(-1)
if(p_class==PAINT_MODE)
dirsel = "<h2>Color</h2>[color_picker]"
else
dirsel = ""
if(PIPE_BINARY) // Straight, N-S, W-E
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"vertical.png","Vertical")
dirsel += render_dir_img(4,"horizontal.png","Horizontal")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1; flipped=0" title="vertical">&#8597;</a>
<a href="?src=\ref[src];setdir=4; flipped=0" title="horizontal">&harr;</a>
</p>
"}
if(PIPE_BENDABLE) // Bent, N-W, N-E etc
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nw.png")
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "ne.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "sw.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"vertical.png","Vertical")
dirsel += render_dir_img(4,"horizontal.png","Horizontal")
dirsel += "<br />"
dirsel += render_dir_img(9,"nw.png","West to North")
dirsel += render_dir_img(5,"ne.png","North to East")
dirsel += "<br />"
dirsel += render_dir_img(10,"sw.png","South to West")
dirsel += render_dir_img(6,"se.png","East to South")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1; flipped=0" title="vertical">&#8597;</a>
<a href="?src=\ref[src];setdir=4; flipped=0" title="horizontal">&harr;</a>
<br />
<a href="?src=\ref[src];setdir=9; flipped=0" title="West to North">&#9565;</a>
<a href="?src=\ref[src];setdir=5; flipped=0" title="North to East">&#9562;</a>
<br />
<a href="?src=\ref[src];setdir=10; flipped=0" title="South to West">&#9559;</a>
<a href="?src=\ref[src];setdir=6; flipped=0" title="East to South">&#9556;</a>
</p>
"}
if(PIPE_TRINARY) // Manifold
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"s.png","West South East")
dirsel += render_dir_img(4,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(2,"n.png","East North West")
dirsel += render_dir_img(8,"e.png","South East North")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1; flipped=0" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=4; flipped=0" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=2; flipped=0" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=8; flipped=0" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_TRIN_M) // Mirrored ones
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "s.png")
user << browse_rsc(new /icon(preview, dir=EAST), "w.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "n.png")
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "sm.png") //each mirror icon is 45 anticlockwise from it's real direction
user << browse_rsc(new /icon(preview, dir=NORTHEAST), "wm.png")
user << browse_rsc(new /icon(preview, dir=NORTHWEST), "nm.png")
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"s.png","West South East")
dirsel += render_dir_img(4,"w.png","North West South")
dirsel += "<br />"
dirsel += render_dir_img(2,"n.png","East North West")
dirsel += render_dir_img(8,"e.png","South East North")
dirsel += "<br />"
dirsel += render_dir_img(6,"sm.png","West South East", 1)
dirsel += render_dir_img(5,"wm.png","North West South", 1)
dirsel += "<br />"
dirsel += render_dir_img(9,"nm.png","East North West", 1)
dirsel += render_dir_img(10,"em.png","South East North", 1)
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1; flipped=0" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=4; flipped=0" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=2; flipped=0" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=8; flipped=0" title="South, East, North">&#9568;</a>
<br />
<a href="?src=\ref[src];setdir=6; flipped=1" title="West, South, East">&#9574;</a>
<a href="?src=\ref[src];setdir=5; flipped=1" title="North, West, South">&#9571;</a>
<br />
<a href="?src=\ref[src];setdir=9; flipped=1" title="East, North, West">&#9577;</a>
<a href="?src=\ref[src];setdir=10; flipped=1" title="South, East, North">&#9568;</a>
</p>
"}
if(PIPE_UNARY) // Stuff with four directions - includes pumps etc.
if(preview)
user << browse_rsc(new /icon(preview, dir=NORTH), "n.png")
user << browse_rsc(new /icon(preview, dir=EAST), "e.png")
user << browse_rsc(new /icon(preview, dir=SOUTH), "s.png")
user << browse_rsc(new /icon(preview, dir=WEST), "w.png")
dirsel += "<p>"
dirsel += render_dir_img(NORTH,"n.png","North")
dirsel += render_dir_img(EAST, "e.png","East")
dirsel += render_dir_img(SOUTH,"s.png","South")
dirsel += render_dir_img(WEST, "w.png","West")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=[NORTH]; flipped=0" title="North">&uarr;</a>
<a href="?src=\ref[src];setdir=[EAST]; flipped=0" title="East">&rarr;</a>
<a href="?src=\ref[src];setdir=[SOUTH]; flipped=0" title="South">&darr;</a>
<a href="?src=\ref[src];setdir=[WEST]; flipped=0" title="West">&larr;</a>
</p>
"}
if(PIPE_QUAD) // Single icon_state (eg 4-way manifolds)
if(preview)
user << browse_rsc(new /icon(preview), "pipe.png")
dirsel += "<p>"
dirsel += render_dir_img(1,"pipe.png","Pipe")
dirsel += "</p>"
else
dirsel+={"
<p>
<a href="?src=\ref[src];setdir=1; flipped=0" title="Pipe">&#8597;</a>
</p>
"}
var/datsytle = {"
<style type="text/css">
a.imglink {
padding: none;
text-decoration:none;
border-style:none;
background:none;
margin: 1px;
}
a.imglink:hover {
background:none;
color:none;
}
a.imglink.selected img {
border: 1px solid #24722e;
background: #2f943c;
}
a img {
border: 1px solid #161616;
background: #40628a;
}
a.color {
padding: 5px 10px;
font-size: large;
font-weight: bold;
border: 1px solid #161616;
}
a.selected img,
a:hover {
background: #0066cc;
color: #ffffff;
}
[color_css]
</style>"}
dat = datsytle + dirsel + dat
var/datum/browser/popup = new(user, "pipedispenser", name, 300, 550)
popup.set_content(dat)
popup.open()
return
/obj/item/weapon/pipe_dispenser/Topic(href, href_list)
if(!usr.canUseTopic(src))
usr << browse(null, "window=pipedispenser")
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["screen"])
screen = text2num(href_list["screen"])
show_menu(usr)
if(href_list["setdir"])
p_dir= text2num(href_list["setdir"])
p_flipped = text2num(href_list["flipped"])
show_menu(usr)
if(href_list["eatpipes"])
p_class = EATING_MODE
p_conntype=-1
p_dir=1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["paintpipes"])
p_class = PAINT_MODE
p_conntype = -1
p_dir = 1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["set_color"])
paint_color = href_list["set_color"]
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makepipe"])
p_type = text2path(href_list["makepipe"])
p_dir = text2num(href_list["dir"])
p_conntype = text2num(href_list["type"])
p_class = ATMOS_MODE
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["makemeter"])
p_class = METER_MODE
p_conntype = -1
p_dir = 1
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
if(href_list["dmake"])
p_type = text2num(href_list["dmake"])
p_conntype = text2num(href_list["type"])
p_dir = 1
p_class = DISPOSALS_MODE
src.spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
show_menu(usr)
/obj/item/weapon/pipe_dispenser/afterattack(atom/A, mob/user)
if(!in_range(A,user) || loc != user)
return 0
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 0
if(istype(A,/area/shuttle)||istype(A,/turf/open/space/transit))
return 0
//So that changing the menu settings doesn't affect the pipes already being built.
var/queued_p_type = p_type
var/queued_p_dir = p_dir
var/queued_p_flipped = p_flipped
switch(p_class)
if(PAINT_MODE) // Paint pipes
if(!istype(A,/obj/machinery/atmospherics/pipe))
// Avoid spewing errors about invalid mode -2 when clicking on stuff that aren't pipes.
user << "<span class='warning'>\The [src]'s error light flickers! Perhaps you need to only use it on pipes and pipe meters?</span>"
return 0
var/obj/machinery/atmospherics/pipe/P = A
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
P.color = paint_colors[paint_color]
P.pipe_color = paint_colors[paint_color]
P.stored.color = paint_colors[paint_color]
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
//P.update_icon()
P.update_node_icon()
return 1
if(EATING_MODE) // Eating pipes
// Must click on an actual pipe or meter.
if(istype(A,/obj/item/pipe) || istype(A,/obj/item/pipe_meter) || istype(A,/obj/structure/disposalconstruct))
user << "<span class='notice'>You start destroying pipe...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
qdel(A)
return 1
return 0
// Avoid spewing errors about invalid mode -1 when clicking on stuff that aren't pipes.
user << "<span class='warning'>The [src]'s error light flickers! Perhaps you need to only use it on pipes and pipe meters?</span>"
return 0
if(ATMOS_MODE)
if(!(istype(A, /turf)))
user << "<span class='warning'>The [src]'s error light flickers!</span>"
return 0
user << "<span class='notice'>You start building pipes...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
var/obj/item/pipe/P = new (A, pipe_type=queued_p_type, dir=queued_p_dir)
P.flipped = queued_p_flipped
P.update()
P.add_fingerprint(usr)
return 1
return 0
if(METER_MODE)
if(!(istype(A, /turf)))
user << "<span class='warning'>The [src]'s error light flickers!</span>"
return 0
user << "<span class='notice'>You start building meter...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
new /obj/item/pipe_meter(A)
return 1
return 0
if(DISPOSALS_MODE)
if(!isturf(A) || is_anchored_dense_turf(A))
user << "<span class='warning'>The [src]'s error light flickers!</span>"
return 0
user << "<span class='notice'>You start building pipes...</span>"
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20, target = A))
var/obj/structure/disposalconstruct/C = new (A, queued_p_type ,queued_p_dir)
if(!C.can_place())
user << "<span class='warning'>There's not enough room to build that here!</span>"
qdel(C)
return 0
activate()
C.add_fingerprint(usr)
C.update_icon()
return 1
return 0
else
..()
return 0
/obj/item/weapon/pipe_dispenser/proc/activate()
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
#undef PIPE_BINARY
#undef PIPE_BENT
#undef PIPE_TRINARY
#undef PIPE_TRIN_M
#undef PIPE_UNARY
#undef PIPE_QUAD
#undef PAINT_MODE
#undef EATING_MODE
#undef ATMOS_MODE
#undef METER_MODE
#undef DISPOSALS_MODE
#undef CATEGORY_ATMOS
#undef CATEGORY_DISPOSALS
+187
View File
@@ -0,0 +1,187 @@
/*
CONTAINS:
RSF
*/
/obj/item/weapon/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
opacity = 0
density = 0
anchored = 0
flags = NOBLUDGEON
var/matter = 0
var/mode = 1
w_class = 3
/obj/item/weapon/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/rcd_ammo))
if ((matter + 10) > 30)
user << "The RSF can't hold any more matter."
return
qdel(W)
matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
else
return ..()
/obj/item/weapon/rsf/attack_self(mob/user)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
mode = 2
user << "Changed dispensing mode to 'Drinking Glass'"
return
if (mode == 2)
mode = 3
user << "Changed dispensing mode to 'Paper'"
return
if (mode == 3)
mode = 4
user << "Changed dispensing mode to 'Pen'"
return
if (mode == 4)
mode = 5
user << "Changed dispensing mode to 'Dice Pack'"
return
if (mode == 5)
mode = 6
user << "Changed dispensing mode to 'Cigarette'"
return
if (mode == 6)
mode = 1
user << "Changed dispensing mode to 'Dosh'"
return
// Change mode
/obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity)
if(!proximity)
return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor)))
return
if(matter < 1)
user << "<span class='warning'>\The [src] doesn't have enough matter left.</span>"
return
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(!R.cell || R.cell.charge < 200)
user << "<span class='warning'>You do not have enough power to use [src].</span>"
return
var/turf/T = get_turf(A)
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
switch(mode)
if(1)
user << "Dispensing Dosh..."
new /obj/item/stack/spacecash/c10(T)
use_matter(200, user)
if(2)
user << "Dispensing Drinking Glass..."
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(T)
use_matter(20, user)
if(3)
user << "Dispensing Paper Sheet..."
new /obj/item/weapon/paper(T)
use_matter(10, user)
if(4)
user << "Dispensing Pen..."
new /obj/item/weapon/pen(T)
use_matter(50, user)
if(5)
user << "Dispensing Dice Pack..."
new /obj/item/weapon/storage/pill_bottle/dice(T)
use_matter(200, user)
if(6)
user << "Dispensing Cigarette..."
new /obj/item/clothing/mask/cigarette(T)
use_matter(10, user)
/obj/item/weapon/rsf/proc/use_matter(charge, mob/user)
if (isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= charge
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
/obj/item/weapon/cookiesynth
name = "Cookie Synthesizer"
desc = "A self-recharging device used to rapidly deploy cookies."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
var/matter = 10
var/toxin = 0
var/cooldown = 0
var/cooldowndelay = 10
var/emagged = 0
w_class = 3
/obj/item/weapon/cookiesynth/New()
desc = "A self recharging cookie fabricator. It currently holds [matter]/10 cookie-units."
/obj/item/weapon/cookiesynth/attackby()
return
/obj/item/weapon/cookiesynth/emag_act(mob/user)
emagged = !emagged
if(emagged)
user << "<span class='warning'>You short out the [src]'s reagent safety checker!</span>"
else
user << "<span class='warning'>You reset the [src]'s reagent safety checker!</span>"
toxin = 0
/obj/item/weapon/cookiesynth/attack_self(mob/user)
var/mob/living/silicon/robot/P = null
if(isrobot(user))
P = user
if(emagged&&!toxin)
toxin = 1
user << "Cookie Synthesizer Hacked"
else if(P.emagged&&!toxin)
toxin = 1
user << "Cookie Synthesizer Hacked"
else
toxin = 0
user << "Cookie Synthesizer Reset"
/obj/item/weapon/cookiesynth/process()
if (matter < 10)
matter++
/obj/item/weapon/cookiesynth/afterattack(atom/A, mob/user, proximity)
if(cooldown > world.time)
return
if(!proximity)
return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor)))
return
if(matter < 1)
user << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>"
return
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(!R.cell || R.cell.charge < 400)
user << "<span class='warning'>You do not have enough power to use [src].</span>"
return
var/turf/T = get_turf(A)
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
user << "Fabricating Cookie.."
var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T)
if(toxin)
S.reagents.add_reagent("chloralhydrate2", 10)
if (isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 100
else
matter--
desc = "A self recharging cookie fabricator. It currently holds [matter]/10 cookie-units."
cooldown = world.time + cooldowndelay
@@ -0,0 +1,127 @@
/obj/item/weapon/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
icon = 'icons/obj/objects.dmi'
icon_state = "paint sprayer"
item_state = "paint sprayer"
w_class = 2
materials = list(MAT_METAL=50, MAT_GLASS=50)
origin_tech = "engineering=2"
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
var/obj/item/device/toner/ink = null
/obj/item/weapon/airlock_painter/New()
..()
ink = new /obj/item/device/toner(src)
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/weapon/airlock_painter/proc/use(mob/user)
if(can_use(user))
ink.charges--
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
return 1
else
return 0
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
/obj/item/weapon/airlock_painter/proc/can_use(mob/user)
if(!ink)
user << "<span class='notice'>There is no toner cartridge installed in \the [name]!</span>"
return 0
else if(ink.charges < 1)
user << "<span class='notice'>\The [name] is out of ink!</span>"
return 0
else
return 1
/obj/item/weapon/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/lungs/L = user.getorganslot("lungs")
if(can_use(user) && L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from \the [name]! It looks like \he's trying to commit suicide.</span>")
use(user)
// Once you've inhaled the toner, you throw up your lungs
// and then die.
// Find out if there is an open turf in front of us,
// and if not, pick the turf we are standing on.
var/turf/T = get_step(get_turf(src), user.dir)
if(!istype(T, /turf/open))
T = get_turf(src)
// they managed to lose their lungs between then and
// now. Good job.
if(!L)
return OXYLOSS
L.Remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.reaction(L, TOUCH, 1)
// TODO maybe add some colorful vomit?
user.visible_message("<span class='suicide'>[user] vomits out their [L]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
L.forceMove(T)
return (TOXLOSS|OXYLOSS)
else if(can_use(user) && !L)
user.visible_message("<span class='suicide'>[user] is spraying toner on \himself from \the [name]! It looks like \he's trying to commit suicide.</span>")
user.reagents.add_reagent("colorful_reagent", 1)
user.reagents.reaction(user, TOUCH, 1)
return TOXLOSS
else
user.visible_message("<span class='suicide'>[user] is trying to inhale toner from \the [name]! It might be a suicide attempt if \the [name] had any toner.</span>")
return SHAME
/obj/item/weapon/airlock_painter/examine(mob/user)
..()
if(!ink)
user << "<span class='notice'>It doesn't have a toner cartridge installed.</span>"
return
var/ink_level = "high"
if(ink.charges < 1)
ink_level = "empty"
else if((ink.charges/ink.max_charges) <= 0.25) //25%
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
user << "<span class='notice'>Its ink levels look [ink_level].</span>"
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/device/toner))
if(ink)
user << "<span class='notice'>\the [name] already contains \a [ink].</span>"
return
if(!user.unEquip(W))
return
W.loc = src
user << "<span class='notice'>You install \the [W] into \the [name].</span>"
ink = W
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
else
return ..()
/obj/item/weapon/airlock_painter/attack_self(mob/user)
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
ink.loc = user.loc
user.put_in_hands(ink)
user << "<span class='notice'>You remove \the [ink] from \the [name].</span>"
ink = null
@@ -0,0 +1,278 @@
/* Cards
* Contains:
* DATA CARD
* ID CARD
* FINGERPRINT CARD HOLDER
* FINGERPRINT CARD
*/
/*
* DATA CARDS - Used for the teleporter
*/
/obj/item/weapon/card
name = "card"
desc = "Does card things."
icon = 'icons/obj/card.dmi'
w_class = 1
var/list/files = list()
/obj/item/weapon/card/data
name = "data disk"
desc = "A disk of data."
icon_state = "data"
var/function = "storage"
var/data = "null"
var/special = null
item_state = "card-id"
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
set category = "Object"
set src in usr
if(usr.stat || !usr.canmove || usr.restrained())
return
if (t)
src.name = "data disk- '[t]'"
else
src.name = "data disk"
src.add_fingerprint(usr)
return
/*
* ID CARDS
*/
/obj/item/weapon/card/emag
desc = "It's a card with a magnetic strip attached to some circuitry."
name = "cryptographic sequencer"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
flags = NOBLUDGEON
var/prox_check = TRUE //If the emag requires you to be in range
/obj/item/weapon/card/emag/bluespace
name = "bluespace cryptographic sequencer"
desc = "It's a blue card with a magnetic strip attached to some circuitry. It appears to have some sort of transmitter attached to it."
color = rgb(40, 130, 255)
origin_tech = "bluespace=4;magnets=4;syndicate=5"
prox_check = FALSE
/obj/item/weapon/card/emag/attack()
return
/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity)
var/atom/A = target
if(!proximity && prox_check)
return
A.emag_act(user)
/obj/item/weapon/card/id
name = "identification card"
desc = "A card used to provide ID and determine access across the station."
icon_state = "id"
item_state = "card-id"
slot_flags = SLOT_ID
var/mining_points = 0 //For redeeming at mining equipment vendors
var/list/access = list()
var/registered_name = null // The name registered_name on the card
var/assignment = null
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/attack_self(mob/user)
user.visible_message("<span class='notice'>[user] shows you: \icon[src] [src.name].</span>", \
"<span class='notice'>You show \the [src.name].</span>")
src.add_fingerprint(user)
return
/obj/item/weapon/card/id/examine(mob/user)
..()
if(mining_points)
user << "There's [mining_points] mining equipment redemption point\s loaded onto this card."
/obj/item/weapon/card/id/GetAccess()
return access
/obj/item/weapon/card/id/GetID()
return src
/*
Usage:
update_label()
Sets the id name to whatever registered_name and assignment is
update_label("John Doe", "Clowny")
Properly formats the name and occupation and sets the id name to the arguments
*/
/obj/item/weapon/card/id/proc/update_label(newname, newjob)
if(newname || newjob)
name = "[(!newname) ? "identification card" : "[newname]'s ID Card"][(!newjob) ? "" : " ([newjob])"]"
return
name = "[(!registered_name) ? "identification card" : "[registered_name]'s ID Card"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/weapon/card/id/silver
name = "silver identification card"
desc = "A silver card which shows honour and dedication."
icon_state = "silver"
item_state = "silver_id"
/obj/item/weapon/card/id/gold
name = "gold identification card"
desc = "A golden card which shows power and might."
icon_state = "gold"
item_state = "gold_id"
/obj/item/weapon/card/id/syndicate
name = "agent card"
access = list(access_maint_tunnels, access_syndicate)
origin_tech = "syndicate=1"
/obj/item/weapon/card/id/syndicate/New()
..()
var/datum/action/item_action/chameleon/change/chameleon_action = new(src)
chameleon_action.chameleon_type = /obj/item/weapon/card/id
chameleon_action.chameleon_name = "ID Card"
chameleon_action.initialize_disguises()
/obj/item/weapon/card/id/syndicate/afterattack(obj/item/weapon/O, mob/user, proximity)
if(!proximity)
return
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = O
src.access |= I.access
if(istype(user, /mob/living) && user.mind)
if(user.mind.special_role)
usr << "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>"
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
if(istype(user, /mob/living) && user.mind)
if(user.mind.special_role)
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
if (t)
alert("Invalid name.")
return
registered_name = t
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")as text | null),1,MAX_MESSAGE_LEN)
if(!u)
registered_name = ""
return
assignment = u
update_label()
user << "<span class='notice'>You successfully forge the ID card.</span>"
return
..()
/obj/item/weapon/card/id/syndicate_command
name = "syndicate ID card"
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
access = list(access_syndicate)
/obj/item/weapon/card/id/captains_spare
name = "captain's spare ID"
desc = "The spare ID of the High Lord himself."
icon_state = "gold"
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
/obj/item/weapon/card/id/captains_spare/New()
var/datum/job/captain/J = new/datum/job/captain
access = J.get_access()
..()
/obj/item/weapon/card/id/centcom
name = "\improper Centcom ID"
desc = "An ID straight from Cent. Com."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
/obj/item/weapon/card/id/centcom/New()
access = get_all_centcom_access()
..()
/obj/item/weapon/card/id/ert
name = "\improper Centcom ID"
desc = "A ERT ID card"
icon_state = "centcom"
registered_name = "Emergency Response Team Commander"
assignment = "Emergency Response Team Commander"
/obj/item/weapon/card/id/ert/New()
access = get_all_accesses()+get_ert_access("commander")-access_change_ids
/obj/item/weapon/card/id/ert/Security
registered_name = "Security Response Officer"
assignment = "Security Response Officer"
/obj/item/weapon/card/id/ert/Security/New()
access = get_all_accesses()+get_ert_access("sec")-access_change_ids
/obj/item/weapon/card/id/ert/Engineer
registered_name = "Engineer Response Officer"
assignment = "Engineer Response Officer"
/obj/item/weapon/card/id/ert/Engineer/New()
access = get_all_accesses()+get_ert_access("eng")-access_change_ids
/obj/item/weapon/card/id/ert/Medical
registered_name = "Medical Response Officer"
assignment = "Medical Response Officer"
/obj/item/weapon/card/id/ert/Medical/New()
access = get_all_accesses()+get_ert_access("med")-access_change_ids
/obj/item/weapon/card/id/prisoner
name = "prisoner ID card"
desc = "You are a number, you are not a free man."
icon_state = "orange"
item_state = "orange-id"
assignment = "Prisoner"
registered_name = "Scum"
var/goal = 0 //How far from freedom?
var/points = 0
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
usr << "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>"
/obj/item/weapon/card/id/prisoner/one
name = "Prisoner #13-001"
registered_name = "Prisoner #13-001"
/obj/item/weapon/card/id/prisoner/two
name = "Prisoner #13-002"
registered_name = "Prisoner #13-002"
/obj/item/weapon/card/id/prisoner/three
name = "Prisoner #13-003"
registered_name = "Prisoner #13-003"
/obj/item/weapon/card/id/prisoner/four
name = "Prisoner #13-004"
registered_name = "Prisoner #13-004"
/obj/item/weapon/card/id/prisoner/five
name = "Prisoner #13-005"
registered_name = "Prisoner #13-005"
/obj/item/weapon/card/id/prisoner/six
name = "Prisoner #13-006"
registered_name = "Prisoner #13-006"
/obj/item/weapon/card/id/prisoner/seven
name = "Prisoner #13-007"
registered_name = "Prisoner #13-007"
/obj/item/weapon/card/id/mining
name = "mining ID"
access = list(access_mining, access_mining_station, access_mineral_storeroom)
@@ -0,0 +1,263 @@
#define CHRONO_BEAM_RANGE 3
#define CHRONO_FRAME_COUNT 22
/obj/item/weapon/chrono_eraser
name = "Timestream Eradication Device"
desc = "The result of outlawed time-bluespace research, this device is capable of wiping a being from the timestream. They never are, they never were, they never will be."
icon = 'icons/obj/chronos.dmi'
icon_state = "chronobackpack"
item_state = "backpack"
w_class = 4
slot_flags = SLOT_BACK
slowdown = 1
actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun)
var/obj/item/weapon/gun/energy/chrono_gun/PA = null
var/list/erased_minds = list() //a collection of minds from the dead
/obj/item/weapon/chrono_eraser/proc/pass_mind(datum/mind/M)
erased_minds += M
/obj/item/weapon/chrono_eraser/dropped()
..()
if(PA)
qdel(PA)
/obj/item/weapon/chrono_eraser/Destroy()
dropped()
return ..()
/obj/item/weapon/chrono_eraser/ui_action_click(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.back == src)
if(PA)
qdel(PA)
else
PA = new(src)
user.put_in_hands(PA)
/obj/item/weapon/chrono_eraser/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
return 1
/obj/item/weapon/gun/energy/chrono_gun
name = "T.E.D. Projection Apparatus"
desc = "It's as if they never existed in the first place."
icon = 'icons/obj/chronos.dmi'
icon_state = "chronogun"
item_state = "chronogun"
w_class = 3
flags = NODROP | DROPDEL
ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam)
can_charge = 0
fire_delay = 50
var/obj/item/weapon/chrono_eraser/TED = null
var/obj/effect/chrono_field/field = null
var/turf/startpos = null
/obj/item/weapon/gun/energy/chrono_gun/New(var/obj/item/weapon/chrono_eraser/T)
. = ..()
if(istype(T))
TED = T
else //admin must have spawned it
TED = new(src.loc)
qdel(src)
/obj/item/weapon/gun/energy/chrono_gun/update_icon()
return
/obj/item/weapon/gun/energy/chrono_gun/process_fire()
if(field)
field_disconnect(field)
..()
/obj/item/weapon/gun/energy/chrono_gun/Destroy()
if(TED)
TED.PA = null
TED = null
if(field)
field_disconnect(field)
return ..()
/obj/item/weapon/gun/energy/chrono_gun/proc/field_connect(obj/effect/chrono_field/F)
var/mob/living/user = src.loc
if(F.gun)
if(isliving(user) && F.captured)
user << "<span class='alert'><b>FAIL: <i>[F.captured]</i> already has an existing connection.</b></span>"
src.field_disconnect(F)
else
startpos = get_turf(src)
field = F
F.gun = src
if(isliving(user) && F.captured)
user << "<span class='notice'>Connection established with target: <b>[F.captured]</b></span>"
/obj/item/weapon/gun/energy/chrono_gun/proc/field_disconnect(obj/effect/chrono_field/F)
if(F && field == F)
var/mob/living/user = src.loc
if(F.gun == src)
F.gun = null
if(isliving(user) && F.captured)
user << "<span class='alert'>Disconnected from target: <b>[F.captured]</b></span>"
field = null
startpos = null
/obj/item/weapon/gun/energy/chrono_gun/proc/field_check(obj/effect/chrono_field/F)
if(F)
if(field == F)
var/turf/currentpos = get_turf(src)
var/mob/living/user = src.loc
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
return 1
field_disconnect(F)
return 0
/obj/item/weapon/gun/energy/chrono_gun/proc/pass_mind(datum/mind/M)
if(TED)
TED.pass_mind(M)
/obj/item/projectile/energy/chrono_beam
name = "eradication beam"
icon_state = "chronobolt"
range = CHRONO_BEAM_RANGE
color = null
nodamage = 1
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
/obj/item/projectile/energy/chrono_beam/fire()
gun = firer.get_active_hand()
if(istype(gun))
return ..()
else
return 0
/obj/item/projectile/energy/chrono_beam/on_hit(atom/target)
if(target && gun && isliving(target))
var/obj/effect/chrono_field/F = new(target.loc, target, gun)
gun.field_connect(F)
/obj/item/ammo_casing/energy/chrono_beam
name = "eradication beam"
projectile_type = /obj/item/projectile/energy/chrono_beam
icon_state = "chronobolt"
e_cost = 0
/obj/effect/chrono_field
name = "eradication field"
desc = "An aura of time-bluespace energy."
icon = 'icons/effects/effects.dmi'
icon_state = "chronofield"
density = 0
anchored = 1
unacidable = 1
blend_mode = BLEND_MULTIPLY
var/mob/living/captured = null
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
var/tickstokill = 15
var/image/mob_underlay = null
var/preloaded = 0
var/RPpos = null
/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/weapon/gun/energy/chrono_gun/G)
if(target && isliving(target) && G)
target.loc = src
src.captured = target
var/icon/mob_snapshot = getFlatIcon(target)
var/icon/cached_icon = new()
for(var/i=1, i<=CHRONO_FRAME_COUNT, i++)
var/icon/removing_frame = icon('icons/obj/chronos.dmi', "erasing", SOUTH, i)
var/icon/mob_icon = icon(mob_snapshot)
mob_icon.Blend(removing_frame, ICON_MULTIPLY)
cached_icon.Insert(mob_icon, "frame[i]")
mob_underlay = new(cached_icon, "frame1")
update_icon()
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
START_PROCESSING(SSobj, src)
/obj/effect/chrono_field/Destroy()
if(gun && gun.field_check(src))
gun.field_disconnect(src)
return ..()
/obj/effect/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
underlays = list() //hack: BYOND refuses to update the underlay to match the icon_state otherwise
underlays += mob_underlay
/obj/effect/chrono_field/process()
if(captured)
if(tickstokill > initial(tickstokill))
for(var/atom/movable/AM in contents)
AM.loc = loc
qdel(src)
else if(tickstokill <= 0)
captured << "<span class='boldnotice'>As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...</span>"
var/mob/dead/observer/ghost = captured.ghostize(1)
if(captured.mind)
if(ghost)
ghost.mind = null
if(gun)
gun.pass_mind(captured.mind)
qdel(captured)
qdel(src)
else
captured.Paralyse(4)
if(captured.loc != src)
captured.loc = src
update_icon()
if(gun)
if(gun.field_check(src))
tickstokill--
else
gun = null
return .()
else
tickstokill++
else
qdel(src)
/obj/effect/chrono_field/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy/chrono_beam))
var/obj/item/projectile/energy/chrono_beam/beam = P
var/obj/item/weapon/gun/energy/chrono_gun/Pgun = beam.gun
if(Pgun && istype(Pgun))
Pgun.field_connect(src)
else
return 0
/obj/effect/chrono_field/assume_air()
return 0
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
GM.assert_gases("o2","n2")
GM.gases["o2"][MOLES] = MOLES_O2STANDARD
GM.gases["n2"][MOLES] = MOLES_N2STANDARD
GM.temperature = T20C
return GM
/obj/effect/chrono_field/Move()
return
/obj/effect/chrono_field/singularity_act()
return
/obj/effect/chrono_field/ex_act()
return
/obj/effect/chrono_field/blob_act(obj/effect/blob/B)
return
#undef CHRONO_BEAM_RANGE
#undef CHRONO_FRAME_COUNT
@@ -0,0 +1,604 @@
//cleansed 9/15/2012 17:48
/*
CONTAINS:
MATCHES
CIGARETTES
CIGARS
SMOKING PIPES
CHEAP LIGHTERS
ZIPPO
CIGARETTE PACKETS ARE IN FANCY.DM
*/
///////////
//MATCHES//
///////////
/obj/item/weapon/match
name = "match"
desc = "A simple match stick, used for lighting fine smokables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
var/smoketime = 5
w_class = 1
origin_tech = "materials=1"
heat = 1000
/obj/item/weapon/match/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
matchburnout()
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/match/fire_act()
matchignite()
/obj/item/weapon/match/proc/matchignite()
if(lit == 0)
lit = 1
icon_state = "match_lit"
damtype = "fire"
force = 3
hitsound = 'sound/items/welder.ogg'
item_state = "cigon"
name = "lit match"
desc = "A match. This one is lit."
attack_verb = list("burnt","singed")
START_PROCESSING(SSobj, src)
update_icon()
return
/obj/item/weapon/match/proc/matchburnout()
if(lit == 1)
lit = -1
damtype = "brute"
force = initial(force)
icon_state = "match_burnt"
item_state = "cigoff"
name = "burnt match"
desc = "A match. This one has seen better days."
attack_verb = null
STOP_PROCESSING(SSobj, src)
/obj/item/weapon/match/dropped(mob/user)
matchburnout()
return ..()
/obj/item/weapon/match/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!isliving(M))
return
if(M.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig && user.a_intent == "help")
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
..()
/obj/item/proc/help_light_cig(mob/living/carbon/M, mob/living/carbon/user)
if(!iscarbon(M))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
return cig
/obj/item/weapon/match/is_hot()
return lit * heat
//////////////////
//FINE SMOKABLES//
//////////////////
/obj/item/clothing/mask/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
icon_state = "cigoff"
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
body_parts_covered = null
var/lit = 0
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
var/icon_off = "cigoff"
var/type_butt = /obj/item/weapon/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 30
heat = 1000
/obj/item/clothing/mask/cigarette/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is huffing the [src.name] as quickly as they can! It looks like \he's trying to give \himself cancer.</span>")
return (TOXLOSS|OXYLOSS)
/obj/item/clothing/mask/cigarette/New()
..()
create_reagents(chem_volume) // making the cigarette a chemical holder with a maximum volume of 15
reagents.set_reacting(FALSE) // so it doesn't react until you light it
reagents.add_reagent("nicotine", 15)
/obj/item/clothing/mask/cigarette/Destroy()
if(reagents)
qdel(reagents)
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W, mob/user, params)
if(!lit && smoketime > 0 && W.is_hot())
var/lighting_text = is_lighter(W,user)
if(lighting_text)
light(lighting_text)
else
return ..()
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user, proximity)
if(!proximity || lit) //can't dip if cigarette is lit (it will heat the reagents in the glass instead)
return
if(istype(glass)) //you can dip cigarettes into beakers
var/transfered = glass.reagents.trans_to(src, chem_volume)
if(transfered) //if reagents were transfered, show the message
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
else //if not, either the beaker was empty, or the cigarette was full
if(!glass.reagents.total_volume)
user << "<span class='notice'>[glass] is empty.</span>"
else
user << "<span class='notice'>[src] is full.</span>"
/obj/item/clothing/mask/cigarette/proc/is_lighter(obj/item/O, mob/user)
var/lighting_text = null
if(istype(O, /obj/item/weapon/weldingtool))
lighting_text = "<span class='notice'>[user] casually lights the [name] with [O], what a badass.</span>"
else if(istype(O, /obj/item/weapon/lighter/greyscale)) // we have to check for this first -- zippo lighters are default
lighting_text = "<span class='notice'>After some fiddling, [user] manages to light their [name] with [O].</span>"
else if(istype(O, /obj/item/weapon/lighter))
lighting_text = "<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with [O]. Damn they're cool.</span>"
else if(istype(O, /obj/item/weapon/melee/energy))
var/in_mouth = ""
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.wear_mask == src)
in_mouth = ", barely missing their nose"
lighting_text = "<span class='warning'>[user] swings their \
[O][in_mouth]. They light their [name] in the process.</span>"
else if(istype(O, /obj/item/device/assembly/igniter))
lighting_text = "<span class='notice'>[user] fiddles with [O], and manages to light their [name].</span>"
else if(istype(O, /obj/item/device/flashlight/flare))
lighting_text = "<span class='notice'>[user] lights their [name] with [O] like a real badass.</span>"
else if(O.is_hot())
lighting_text = "<span class='notice'>[user] lights their [name] with [O].</span>"
return lighting_text
/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
if(lit)
return
lit = TRUE
name = "lit [name]"
attack_verb = list("burnt", "singed")
hitsound = 'sound/items/welder.ogg'
damtype = "fire"
force = 4
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
e.start()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src, 1)
qdel(src)
return
if(reagents.get_reagent_amount("welding_fuel")) // the fuel explodes, too, but much less violently
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("welding_fuel") / 5, 1), get_turf(src), 0, 0)
e.start()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src, 1)
qdel(src)
return
// allowing reagents to react after being lit
reagents.set_reacting(TRUE)
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
START_PROCESSING(SSobj, src)
//can't think of any other way to update the overlays :<
if(ismob(loc))
var/mob/M = loc
M.update_inv_wear_mask()
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
if(reagents.total_volume)
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
if(prob(15)) // so it's not an instarape in case of acid
var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1)
reagents.reaction(C, INGEST, fraction)
reagents.trans_to(C, REAGENTS_METABOLISM)
return
reagents.remove_any(REAGENTS_METABOLISM)
/obj/item/clothing/mask/cigarette/process()
var/turf/location = get_turf(src)
var/mob/living/M = loc
if(isliving(loc))
M.IgniteMob()
smoketime--
if(smoketime < 1)
new type_butt(location)
if(ismob(loc))
M << "<span class='notice'>Your [name] goes out.</span>"
M.unEquip(src, 1) //un-equip it so the overlays can update //Force the un-equip so the overlays update
qdel(src)
return
open_flame()
if(reagents && reagents.total_volume)
handle_reagents()
/obj/item/clothing/mask/cigarette/attack_self(mob/user)
if(lit == 1)
user.visible_message("<span class='notice'>[user] calmly drops and treads on \the [src], putting it out instantly.</span>")
new type_butt(user.loc)
new /obj/effect/decal/cleanable/ash(user.loc)
qdel(src)
return ..()
/obj/item/clothing/mask/cigarette/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig && user.a_intent == "help")
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
return ..()
/obj/item/clothing/mask/cigarette/fire_act()
light()
/obj/item/clothing/mask/cigarette/is_hot()
return lit * heat
/obj/item/clothing/mask/cigarette/rollie
name = "rollie"
desc = "A roll of dried plant matter wrapped in thin paper."
icon_state = "spliffoff"
icon_on = "spliffon"
icon_off = "spliffoff"
type_butt = /obj/item/weapon/cigbutt/roach
throw_speed = 0.5
item_state = "spliffoff"
smoketime = 180
chem_volume = 50
/obj/item/clothing/mask/cigarette/rollie/New()
..()
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
/obj/item/clothing/mask/cigarette/rollie/trippy/New()
..()
reagents.add_reagent("mushroomhallucinogen", 50)
light()
//for(var/mob/M in player_list) M << 'sound/misc/Smoke_Weed_Everyday.ogg'
/obj/item/weapon/cigbutt/roach
name = "roach"
desc = "A manky old roach, or for non-stoners, a used rollup."
icon_state = "roach"
/obj/item/weapon/cigbutt/roach/New()
..()
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
////////////
// CIGARS //
////////////
/obj/item/clothing/mask/cigarette/cigar
name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigaroff"
icon_on = "cigaron"
icon_off = "cigaroff"
type_butt = /obj/item/weapon/cigbutt/cigarbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
chem_volume = 40
/obj/item/clothing/mask/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
smoketime = 2000
chem_volume = 80
/obj/item/clothing/mask/cigarette/cigar/havana
name = "premium Havanian cigar"
desc = "A cigar fit for only the best of the best."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
smoketime = 7200
chem_volume = 50
/obj/item/weapon/cigbutt
name = "cigarette butt"
desc = "A manky old cigarette butt."
icon = 'icons/obj/clothing/masks.dmi'
icon_state = "cigbutt"
w_class = 1
throwforce = 0
/obj/item/weapon/cigbutt/cigarbutt
name = "cigar butt"
desc = "A manky old cigar butt."
icon_state = "cigarbutt"
/////////////////
//SMOKING PIPES//
/////////////////
/obj/item/clothing/mask/cigarette/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
icon_state = "pipeoff"
item_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
icon_off = "pipeoff"
smoketime = 0
chem_volume = 100
var/packeditem = 0
/obj/item/clothing/mask/cigarette/pipe/New()
..()
name = "empty [initial(name)]"
/obj/item/clothing/mask/cigarette/pipe/Destroy()
if(reagents)
qdel(reagents)
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
new /obj/effect/decal/cleanable/ash(location)
if(ismob(loc))
var/mob/living/M = loc
M << "<span class='notice'>Your [name] goes out.</span>"
lit = 0
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask()
packeditem = 0
name = "empty [initial(name)]"
STOP_PROCESSING(SSobj, src)
return
open_flame()
if(reagents && reagents.total_volume) // check if it has any reagents at all
handle_reagents()
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = O
if(!packeditem)
if(G.dry == 1)
user << "<span class='notice'>You stuff [O] into [src].</span>"
smoketime = 400
packeditem = 1
name = "[O.name]-packed [initial(name)]"
if(O.reagents)
O.reagents.trans_to(src, O.reagents.total_volume)
qdel(O)
else
user << "<span class='warning'>It has to be dried first!</span>"
else
user << "<span class='warning'>It is already packed!</span>"
else
var/lighting_text = is_lighter(O,user)
if(lighting_text)
if(smoketime > 0)
light(lighting_text)
else
user << "<span class='warning'>There is nothing to smoke!</span>"
else
return ..()
/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user)
var/turf/location = get_turf(user)
if(lit)
user.visible_message("<span class='notice'>[user] puts out [src].</span>", "<span class='notice'>You put out [src].</span>")
lit = 0
icon_state = icon_off
item_state = icon_off
STOP_PROCESSING(SSobj, src)
return
if(!lit && smoketime > 0)
user << "<span class='notice'>You empty [src] onto [location].</span>"
new /obj/effect/decal/cleanable/ash(location)
packeditem = 0
smoketime = 0
reagents.clear_reagents()
name = "empty [initial(name)]"
return
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters. Can be loaded with objects."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
smoketime = 0
/////////
//ZIPPO//
/////////
/obj/item/weapon/lighter
name = "\improper Zippo lighter"
desc = "The zippo."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "zippo"
item_state = "zippo"
w_class = 1
flags = CONDUCT
slot_flags = SLOT_BELT
var/lit = 0
heat = 1500
/obj/item/weapon/lighter/greyscale
name = "cheap lighter"
desc = "A cheap-as-free lighter."
icon_state = "lighter"
/obj/item/weapon/lighter/greyscale/New()
var/image/I = image(icon,"lighter-overlay")
I.color = color2hex(randomColor(1))
add_overlay(I)
/obj/item/weapon/lighter/update_icon()
icon_state = lit ? "[icon_state]_on" : "[initial(icon_state)]"
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src)
if(!lit)
lit = 1
update_icon()
force = 5
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
attack_verb = list("burnt", "singed")
if(!istype(src, /obj/item/weapon/lighter/greyscale))
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "<span class='notice'>Without even breaking stride, you flip open and lights [src] in one smooth movement.</span>")
else
if(prob(75))
user.visible_message("After a few attempts, [user] manages to light [src].", "<span class='notice'>After a few attempts, you manage to light [src].</span>")
else
var/hitzone = user.r_hand == src ? "r_hand" : "l_hand"
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - they however burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
user.AddLuminosity(1)
START_PROCESSING(SSobj, src)
else
lit = 0
update_icon()
hitsound = "swing_hit"
force = 0
attack_verb = null //human_defense.dm takes care of it
if(!istype(src, /obj/item/weapon/lighter/greyscale))
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
else
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
user.AddLuminosity(-1)
STOP_PROCESSING(SSobj, src)
else
return ..()
return
/obj/item/weapon/lighter/attack(mob/living/carbon/M, mob/living/carbon/user)
if(lit && M.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M,user)
if(lit && cig && user.a_intent == "help")
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
cig.attackby(src, user)
else
if(!istype(src, /obj/item/weapon/lighter/greyscale))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
..()
/obj/item/weapon/lighter/process()
var/turf/location = get_turf(src)
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/lighter/pickup(mob/user)
..()
if(lit)
SetLuminosity(0)
user.AddLuminosity(1)
return
/obj/item/weapon/lighter/dropped(mob/user)
..()
if(lit)
if(user)
user.AddLuminosity(-1)
SetLuminosity(1)
return
/obj/item/weapon/lighter/is_hot()
return lit * heat
///////////
//ROLLING//
///////////
/obj/item/weapon/rollingpaper
name = "rolling paper"
desc = "A thin piece of paper used to make fine smokeables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig_paper"
w_class = 1
/obj/item/weapon/rollingpaper/afterattack(atom/target, mob/user, proximity)
if(!proximity)
return
if(istype(target, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/O = target
if(O.dry)
user.unEquip(target, 1)
user.unEquip(src, 1)
var/obj/item/clothing/mask/cigarette/rollie/R = new /obj/item/clothing/mask/cigarette/rollie(user.loc)
R.chem_volume = target.reagents.total_volume
target.reagents.trans_to(R, R.chem_volume)
user.put_in_active_hand(R)
user << "<span class='notice'>You roll the [target.name] into a rolling paper.</span>"
R.desc = "Dried [target.name] rolled up in a thin piece of paper."
qdel(target)
qdel(src)
else
user << "<span class='warning'>You need to dry this first!</span>"
else
..()
@@ -0,0 +1,162 @@
/* Clown Items
* Contains:
* Soap
* Bike Horns
* Air Horns
*/
/*
* Soap
*/
/obj/item/weapon/soap
name = "soap"
desc = "A cheap bar of soap. Doesn't smell."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "soap"
w_class = 1
flags = NOBLUDGEON
throwforce = 0
throw_speed = 3
throw_range = 7
var/cleanspeed = 50 //slower than mop
/obj/item/weapon/soap/nanotrasen
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
icon_state = "soapnt"
/obj/item/weapon/soap/homemade
desc = "A homemade bar of soap. Smells of... well...."
icon_state = "soapgibs"
cleanspeed = 45 // a little faster to reward chemists for going to the effort
/obj/item/weapon/soap/deluxe
desc = "A deluxe Waffle Co. brand bar of soap. Smells of high-class luxury."
icon_state = "soapdeluxe"
cleanspeed = 40 //same speed as mop because deluxe -- captain gets one of these
/obj/item/weapon/soap/syndie
desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster."
icon_state = "soapsyndie"
cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes
/obj/item/weapon/soap/suicide_act(mob/user)
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
user.visible_message("<span class='suicide'>[user] lifts the [src.name] to their mouth and gnaws on it furiously, producing a thick froth! They'll never get that BB gun now!")
PoolOrNew(/obj/effect/particle_effect/foam, loc)
return (TOXLOSS)
/obj/item/weapon/soap/Crossed(AM as mob|obj)
if (istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip(4, 2, src)
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity || !check_allowed_items(target))
return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
user << "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>"
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
qdel(target)
else if(ishuman(target) && user.zone_selected == "mouth")
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
return
else if(istype(target, /obj/structure/window))
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
target.color = initial(target.color)
target.SetOpacity(initial(target.opacity))
else
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
target.wash_cream()
return
/*
* Bike Horns
*/
/obj/item/weapon/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
throwforce = 0
hitsound = null //To prevent tap.ogg playing, as the item lacks of force
w_class = 1
throw_speed = 3
throw_range = 7
attack_verb = list("HONKED")
var/spam_flag = 0
var/honksound = 'sound/items/bikehorn.ogg'
var/cooldowntime = 20
/obj/item/weapon/bikehorn/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] solemnly points the horn at \his temple! It looks like \he's trying to commit suicide..</span>")
playsound(src.loc, honksound, 50, 1)
return (BRUTELOSS)
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!spam_flag)
playsound(loc, honksound, 50, 1, -1) //plays instead of tap.ogg!
return ..()
/obj/item/weapon/bikehorn/attack_self(mob/user)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, honksound, 50, 1)
src.add_fingerprint(user)
spawn(cooldowntime)
spam_flag = 0
return
/obj/item/weapon/bikehorn/Crossed(mob/living/L)
if(isliving(L))
playsound(loc, honksound, 50, 1, -1)
..()
/obj/item/weapon/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
honksound = 'sound/items/AirHorn2.ogg'
cooldowntime = 50
origin_tech = "materials=4;engineering=4"
/obj/item/weapon/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, its made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
/obj/item/weapon/bikehorn/golden/attack()
flip_mobs()
return ..()
/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
flip_mobs()
..()
/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
if (!spam_flag)
var/turf/T = get_turf(src)
for(M in ohearers(7, T))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if((istype(H.ears, /obj/item/clothing/ears/earmuffs)) || H.ear_deaf)
continue
M.emote("flip")
@@ -0,0 +1,184 @@
/obj/item/weapon/lipstick
gender = PLURAL
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi'
icon_state = "lipstick"
w_class = 1
var/colour = "red"
var/open = 0
/obj/item/weapon/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/weapon/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "lime"
/obj/item/weapon/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/weapon/lipstick/random
name = "lipstick"
/obj/item/weapon/lipstick/random/New()
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
/obj/item/weapon/lipstick/attack_self(mob/user)
cut_overlays()
user << "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>"
open = !open
if(open)
var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color")
colored.color = colour
icon_state = "lipstick_uncap"
add_overlay(colored)
else
icon_state = "lipstick"
/obj/item/weapon/lipstick/attack(mob/M, mob/user)
if(!open)
return
if(!istype(M, /mob))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.is_mouth_covered())
user << "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>"
return
if(H.lip_style) //if they already have lipstick on
user << "<span class='warning'>You need to wipe off the old lipstick first!</span>"
return
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
"<span class='notice'>You begin to apply \the [src] on [H]'s lips...</span>")
if(do_after(user, 20, target = H))
user.visible_message("[user] does [H]'s lips with \the [src].", \
"<span class='notice'>You apply \the [src] on [H]'s lips.</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
user << "<span class='warning'>Where are the lips on that?</span>"
//you can wipe off lipstick with paper!
/obj/item/weapon/paper/attack(mob/M, mob/user)
if(user.zone_selected == "mouth")
if(!ismob(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H == user)
user << "<span class='notice'>You wipe off the lipstick with [src].</span>"
H.lip_style = null
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to wipe [H]'s lipstick off with \the [src].</span>", \
"<span class='notice'>You begin to wipe off [H]'s lipstick...</span>")
if(do_after(user, 10, target = H))
user.visible_message("[user] wipes [H]'s lipstick off with \the [src].", \
"<span class='notice'>You wipe off [H]'s lipstick.</span>")
H.lip_style = null
H.update_body()
else
..()
/obj/item/weapon/razor
name = "electric razor"
desc = "The latest and greatest power razor born from the science of shaving."
icon = 'icons/obj/items.dmi'
icon_state = "razor"
flags = CONDUCT
w_class = 1
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
if(location == "mouth")
H.facial_hair_style = "Shaved"
else
H.hair_style = "Skinhead"
H.update_hair()
playsound(loc, 'sound/items/Welder2.ogg', 20, 1)
/obj/item/weapon/razor/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/location = user.zone_selected
if(location == "mouth")
if(!(FACEHAIR in H.dna.species.specflags))
user << "<span class='warning'>There is no facial hair to shave!</span>"
return
if(!get_location_accessible(H, location))
user << "<span class='warning'>The mask is in the way!</span>"
return
if(H.facial_hair_style == "Shaved")
user << "<span class='warning'>Already clean-shaven!</span>"
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their facial hair with [src].", \
"<span class='notice'>You take a moment to shave your facial hair with [src]...</span>")
if(do_after(user, 50, target = H))
user.visible_message("[user] shaves his facial hair clean with [src].", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s facial hair with [src].</span>", \
"<span class='notice'>You start shaving [H]'s facial hair...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves off [H]'s facial hair with [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
shave(H, location)
else if(location == "head")
if(!(HAIR in H.dna.species.specflags))
user << "<span class='warning'>There is no hair to shave!</span>"
return
if(!get_location_accessible(H, location))
user << "<span class='warning'>The headgear is in the way!</span>"
return
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
user << "<span class='warning'>There is not enough hair left to shave!</span>"
return
if(H == user) //shaving yourself
user.visible_message("[user] starts to shave their head with [src].", \
"<span class='notice'>You start to shave your head with [src]...</span>")
if(do_after(user, 5, target = H))
user.visible_message("[user] shaves his head with [src].", \
"<span class='notice'>You finish shaving with [src].</span>")
shave(H, location)
else
var/turf/H_loc = H.loc
user.visible_message("<span class='warning'>[user] tries to shave [H]'s head with [src]!</span>", \
"<span class='notice'>You start shaving [H]'s head...</span>")
if(do_after(user, 50, target = H))
if(H_loc == H.loc)
user.visible_message("<span class='warning'>[user] shaves [H]'s head bald with [src]!</span>", \
"<span class='notice'>You shave [H]'s head bald.</span>")
shave(H, location)
else
..()
else
..()
@@ -0,0 +1,37 @@
// Contains:
// Gavel Hammer
// Gavel Block
/obj/item/weapon/gavelhammer
name = "gavel hammer"
desc = "Order, order! No bombs in my courthouse."
icon = 'icons/obj/items.dmi'
icon_state = "gavelhammer"
force = 5
throwforce = 6
w_class = 2
attack_verb = list("bashed", "battered", "judged", "whacked")
burn_state = FLAMMABLE
/obj/item/weapon/gavelhammer/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/gavelblock
name = "gavel block"
desc = "Smack it with a gavel hammer when the assistants get rowdy."
icon = 'icons/obj/items.dmi'
icon_state = "gavelblock"
force = 2
throwforce = 2
w_class = 1
burn_state = FLAMMABLE
/obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/gavelhammer))
playsound(loc, 'sound/items/gavel.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] strikes \the [src] with \the [I].</span>")
user.changeNext_move(CLICK_CD_MELEE)
else
return ..()
+572
View File
@@ -0,0 +1,572 @@
//backpack item
/obj/item/weapon/defibrillator
name = "defibrillator"
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibunit"
item_state = "defibunit"
slot_flags = SLOT_BACK
force = 5
throwforce = 6
w_class = 4
origin_tech = "biotech=4"
actions_types = list(/datum/action/item_action/toggle_paddles)
var/on = 0 //if the paddles are equipped (1) or on the defib (0)
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/weapon/twohanded/shockpaddles/paddles
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/combat = 0 //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
/obj/item/weapon/defibrillator/New() //starts without a cell for rnd
..()
paddles = make_paddles()
update_icon()
return
/obj/item/weapon/defibrillator/loaded/New() //starts with hicap
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/update_icon()
update_power()
update_overlays()
update_charge()
/obj/item/weapon/defibrillator/proc/update_power()
if(bcell)
if(bcell.charge < paddles.revivecost)
powered = 0
else
powered = 1
else
powered = 0
/obj/item/weapon/defibrillator/proc/update_overlays()
cut_overlays()
if(!on)
add_overlay("[initial(icon_state)]-paddles")
if(powered)
add_overlay("[initial(icon_state)]-powered")
if(!bcell)
add_overlay("[initial(icon_state)]-nocell")
if(!safety)
add_overlay("[initial(icon_state)]-emagged")
/obj/item/weapon/defibrillator/proc/update_charge()
if(powered) //so it doesn't show charge if it's unpowered
if(bcell)
var/ratio = bcell.charge / bcell.maxcharge
ratio = Ceiling(ratio*4) * 25
add_overlay("[initial(icon_state)]-charge[ratio]")
/obj/item/weapon/defibrillator/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
update_icon()
/obj/item/weapon/defibrillator/ui_action_click()
toggle_paddles()
/obj/item/weapon/defibrillator/attack_hand(mob/user)
if(loc == user)
if(slot_flags == SLOT_BACK)
if(user.get_item_by_slot(slot_back) == src)
ui_action_click()
else
user << "<span class='warning'>Put the defibrillator on your back first!</span>"
else if(slot_flags == SLOT_BELT)
if(user.get_item_by_slot(slot_belt) == src)
ui_action_click()
else
user << "<span class='warning'>Strap the defibrillator's belt on first!</span>"
return
..()
/obj/item/weapon/defibrillator/MouseDrop(obj/over_object)
if(ismob(src.loc))
var/mob/M = src.loc
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
switch(H.slot_id)
if(slot_r_hand)
if(M.r_hand)
return
if(!M.unEquip(src))
return
M.put_in_r_hand(src)
if(slot_l_hand)
if(M.l_hand)
return
if(!M.unEquip(src))
return
M.put_in_l_hand(src)
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
else if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
if(C.maxcharge < paddles.revivecost)
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
return
if(!user.unEquip(W))
return
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from [src].</span>"
update_icon()
else
return ..()
/obj/item/weapon/defibrillator/emag_act(mob/user)
if(safety)
safety = 0
user << "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer."
else
safety = 1
user << "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer."
/obj/item/weapon/defibrillator/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
if(safety)
safety = 0
src.visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
playsound(get_turf(src), 'sound/machines/defib_saftyOff.ogg', 50, 0)
else
safety = 1
src.visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(get_turf(src), 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
..()
/obj/item/weapon/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles"
set category = "Object"
on = !on
var/mob/living/carbon/human/user = usr
if(on)
//Detach the paddles into the user's hands
if(!usr.put_in_hands(paddles))
on = 0
user << "<span class='warning'>You need a free hand to hold the paddles!</span>"
update_icon()
return
paddles.loc = user
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
remove_paddles(user)
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/defibrillator/proc/make_paddles()
return new /obj/item/weapon/twohanded/shockpaddles(src)
/obj/item/weapon/defibrillator/equipped(mob/user, slot)
..()
if((slot_flags == SLOT_BACK && slot != slot_back) || (slot_flags == SLOT_BELT && slot != slot_belt))
remove_paddles(user)
update_icon()
/obj/item/weapon/defibrillator/item_action_slot_check(slot, mob/user)
if(slot == user.getBackSlot())
return 1
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user)
var/mob/living/carbon/human/M = user
if(paddles in get_both_hands(M))
M.unEquip(paddles,1)
update_icon()
return
/obj/item/weapon/defibrillator/Destroy()
if(on)
var/M = get(paddles, /mob)
remove_paddles(M)
. = ..()
update_icon()
/obj/item/weapon/defibrillator/proc/deductcharge(chrgdeductamt)
if(bcell)
if(bcell.charge < (paddles.revivecost+chrgdeductamt))
powered = 0
update_icon()
if(bcell.use(chrgdeductamt))
update_icon()
return 1
else
update_icon()
return 0
/obj/item/weapon/defibrillator/proc/cooldowncheck(mob/user)
spawn(50)
if(bcell)
if(bcell.charge >= paddles.revivecost)
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 50, 0)
else
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = 0
paddles.update_icon()
update_icon()
/obj/item/weapon/defibrillator/compact
name = "compact defibrillator"
desc = "A belt-equipped defibrillator that can be rapidly deployed."
icon_state = "defibcompact"
item_state = "defibcompact"
w_class = 3
slot_flags = SLOT_BELT
origin_tech = "biotech=5"
/obj/item/weapon/defibrillator/compact/item_action_slot_check(slot, mob/user)
if(slot == user.getBeltSlot())
return 1
/obj/item/weapon/defibrillator/compact/loaded/New()
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat
name = "combat defibrillator"
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
combat = 1
safety = 0
/obj/item/weapon/defibrillator/compact/combat/loaded/New()
..()
paddles = make_paddles()
bcell = new /obj/item/weapon/stock_parts/cell/infinite(src)
update_icon()
return
/obj/item/weapon/defibrillator/compact/combat/loaded/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
return
//paddles
/obj/item/weapon/twohanded/shockpaddles
name = "defibrillator paddles"
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles"
item_state = "defibpaddles"
force = 0
throwforce = 6
w_class = 4
flags = NODROP
var/revivecost = 1000
var/cooldown = 0
var/busy = 0
var/obj/item/weapon/defibrillator/defib
var/req_defib = 1
var/combat = 0 //If it penetrates armor and gives additional functionality
var/grab_ghost = FALSE
/obj/item/weapon/twohanded/shockpaddles/proc/recharge(var/time)
if(req_defib || !time)
return
cooldown = 1
update_icon()
sleep(time)
var/turf/T = get_turf(src)
T.audible_message("<span class='notice'>[src] beeps: Unit is recharged.</span>")
playsound(T, 'sound/machines/defib_ready.ogg', 50, 0)
cooldown = 0
update_icon()
/obj/item/weapon/twohanded/shockpaddles/New(mainunit)
..()
if(check_defib_exists(mainunit, src) && req_defib)
defib = mainunit
loc = defib
busy = 0
update_icon()
return
/obj/item/weapon/twohanded/shockpaddles/update_icon()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</span>")
if(req_defib)
defib.deductcharge(revivecost)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user)
if(!req_defib)
return ..()
if(user)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
defib.on = 0
loc = defib
defib.update_icon()
return unwield(user)
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/human/M, obj/O)
if(!req_defib)
return 1 //If it doesn't need a defib, just say it exists
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
M.unEquip(O)
qdel(O)
return 0
else
return 1
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M, mob/user)
var/halfwaycritdeath = (config.health_threshold_crit + config.health_threshold_dead) / 2
if(busy)
return
if(req_defib && !defib.powered)
user.visible_message("<span class='notice'>[defib] beeps: Unit is unpowered.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
if(!wielded)
if(isrobot(user))
user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
else
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"
return
if(cooldown)
if(req_defib)
user << "<span class='warning'>[defib] is recharging!</span>"
else
user << "<span class='warning'>[src] are recharging!</span>"
return
if(!ishuman(M))
if(req_defib)
user << "<span class='warning'>The instructions on [defib] don't mention how to revive that...</span>"
else
user << "<span class='warning'>You aren't sure how to revive that...</span>"
return
var/mob/living/carbon/human/H = M
if(user.a_intent == "disarm")
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
return
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", src)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
update_icon()
if(req_defib)
defib.cooldowncheck(user)
else
recharge(60)
return
if(user.zone_selected != "chest")
user << "<span class='warning'>You need to target your patient's \
chest with [src]!</span>"
return
if(user.a_intent == "harm")
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
return
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>",
"<span class='warning'>You overcharge the paddles and begin to place them onto [M]'s chest...</span>")
busy = 1
update_icon()
if(do_after(user, 30, target = M))
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>",
"<span class='warning'>You place [src] on [M.name]'s chest and begin to charge them.</span>")
var/turf/T = get_turf(defib)
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
if(req_defib)
T.audible_message("<span class='warning'>\The [defib] lets out an urgent beep and lets out a steadily rising hum...</span>")
else
user.audible_message("<span class='warning'>[src] let out an urgent beep.</span>")
if(do_after(user, 30, target = M)) //Takes longer due to overcharging
if(!M)
busy = 0
update_icon()
return
if(M && M.stat == DEAD)
user << "<span class='warning'>[M] is dead.</span>"
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
user.visible_message("<span class='boldannounce'><i>[user] shocks [M] with \the [src]!</span>", "<span class='warning'>You shock [M] with \the [src]!</span>")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
var/mob/living/carbon/human/HU = M
M.emote("scream")
if(!HU.heart_attack)
HU.heart_attack = 1
if(!HU.stat)
HU.visible_message("<span class='warning'>[M] thrashes wildly, clutching at their chest!</span>",
"<span class='userdanger'>You feel a horrible agony in your chest!</span>")
HU.apply_damage(50, BURN, "chest")
add_logs(user, M, "overloaded the heart of", defib)
M.Weaken(5)
M.Jitter(100)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
update_icon()
if(!req_defib)
recharge(60)
if(req_defib && (defib.cooldowncheck(user)))
return
busy = 0
update_icon()
return
if((!req_defib && grab_ghost) || (req_defib && defib.grab_ghost))
H.notify_ghost_cloning("Your heart is being defibrillated!")
H.grab_ghost() // Shove them back in their body.
else if(!H.suiciding && !(H.disabilities & NOCLONE)&& !H.hellbound)
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest...</span>")
busy = 1
update_icon()
if(do_after(user, 30, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/tplus = world.time - H.timeofdeath
// past this much time the patient is unrecoverable
// (in deciseconds)
var/tlimit = DEFIB_TIME_LIMIT * 10
// brain damage starts setting in on the patient after
// some time left rotting
var/tloss = DEFIB_TIME_LOSS * 10
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if((!src.combat && !req_defib) || (req_defib && !defib.combat))
user.audible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
if(H.stat == DEAD)
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
total_brute = H.getBruteLoss()
total_burn = H.getFireLoss()
var/failed = null
if (H.suiciding || (H.disabilities & NOCLONE))
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
else if (H.hellbound)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existance. Further attempts futile.</span>"
else if (tplus > tlimit)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Body has decayed for too long. Further attempts futile.</span>"
else if (!H.getorgan(/obj/item/organ/heart))
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart is missing.</span>"
else if(total_burn >= 180 || total_brute >= 180)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.</span>"
else if(H.get_ghost())
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
else
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
if(!BR || BR.damaged_brain)
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing or damaged beyond point of no return. Further attempts futile.</span>"
if(failed)
user.visible_message(failed)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
else
//If the body has been fixed so that they would not be in crit when defibbed, give them oxyloss to put them back into crit
if (H.health > halfwaycritdeath)
H.adjustOxyLoss(H.health - halfwaycritdeath, 0)
else
var/overall_damage = total_brute + total_burn + H.getToxLoss() + H.getOxyLoss()
var/mobhealth = H.health
H.adjustOxyLoss((mobhealth - halfwaycritdeath) * (H.getOxyLoss() / overall_damage), 0)
H.adjustToxLoss((mobhealth - halfwaycritdeath) * (H.getToxLoss() / overall_damage), 0)
H.adjustFireLoss((mobhealth - halfwaycritdeath) * (total_burn / overall_damage), 0)
H.adjustBruteLoss((mobhealth - halfwaycritdeath) * (total_brute / overall_damage), 0)
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.revive()
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
add_logs(user, M, "revived", defib)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
update_icon()
if(req_defib)
defib.cooldowncheck(user)
else
recharge(60)
else if(H.heart_attack)
H.heart_attack = 0
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.</span>")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
else
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
/obj/item/weapon/twohanded/shockpaddles/syndicate
name = "syndicate defibrillator paddles"
desc = "A pair of paddles used to revive deceased operatives. It possesses both the ability to penetrate armor and to deliver powerful shocks offensively."
combat = 1
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
req_defib = 0
+146
View File
@@ -0,0 +1,146 @@
/obj/item/weapon/storage/pill_bottle/dice
name = "bag of dice"
desc = "Contains all the luck you'll ever need."
icon = 'icons/obj/dice.dmi'
icon_state = "dicebag"
/obj/item/weapon/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1")
new /obj/item/weapon/dice/d1(src)
if(special_die == "2")
new /obj/item/weapon/dice/d2(src)
new /obj/item/weapon/dice/d4(src)
new /obj/item/weapon/dice/d6(src)
if(special_die == "fudge")
new /obj/item/weapon/dice/fudge(src)
new /obj/item/weapon/dice/d8(src)
new /obj/item/weapon/dice/d10(src)
if(special_die == "00")
new /obj/item/weapon/dice/d00(src)
new /obj/item/weapon/dice/d12(src)
new /obj/item/weapon/dice/d20(src)
if(special_die == "100")
new /obj/item/weapon/dice/d100(src)
/obj/item/weapon/dice //depreciated d6, use /obj/item/weapon/dice/d6 if you actually want a d6
name = "die"
desc = "A die with six sides. Basic and servicable."
icon = 'icons/obj/dice.dmi'
icon_state = "d6"
w_class = 1
var/sides = 6
var/result = null
var/list/special_faces = list() //entries should match up to sides var if used
/obj/item/weapon/dice/New()
result = rand(1, sides)
update_icon()
/obj/item/weapon/dice/d1
name = "d1"
desc = "A die with one side. Deterministic!"
icon_state = "d1"
sides = 1
/obj/item/weapon/dice/d2
name = "d2"
desc = "A die with two sides. Coins are undignified!"
icon_state = "d2"
sides = 2
/obj/item/weapon/dice/d4
name = "d4"
desc = "A die with four sides. The nerd's caltrop."
icon_state = "d4"
sides = 4
/obj/item/weapon/dice/d6
name = "d6"
/obj/item/weapon/dice/fudge
name = "fudge die"
desc = "A die with six sides but only three results. Is this a plus or a minus? Your mind is drawing a blank..."
sides = 3 //shhh
icon_state = "fudge"
special_faces = list("minus","blank","plus")
/obj/item/weapon/dice/d8
name = "d8"
desc = "A die with eight sides. It feels... lucky."
icon_state = "d8"
sides = 8
/obj/item/weapon/dice/d10
name = "d10"
desc = "A die with ten sides. Useful for percentages."
icon_state = "d10"
sides = 10
/obj/item/weapon/dice/d00
name = "d00"
desc = "A die with ten sides. Works better for d100 rolls than a golfball."
icon_state = "d00"
sides = 10
/obj/item/weapon/dice/d12
name = "d12"
desc = "A die with twelve sides. There's an air of neglect about it."
icon_state = "d12"
sides = 12
/obj/item/weapon/dice/d20
name = "d20"
desc = "A die with twenty sides. The prefered die to throw at the GM."
icon_state = "d20"
sides = 20
/obj/item/weapon/dice/d100
name = "d100"
desc = "A die with one hundred sides! Probably not fairly weighted..."
icon_state = "d100"
sides = 100
/obj/item/weapon/dice/d100/update_icon()
return
/obj/item/weapon/dice/attack_self(mob/user)
diceroll(user)
/obj/item/weapon/dice/throw_at(atom/target, range, speed, mob/user, spin=1)
if(!..())
return
diceroll(user)
/obj/item/weapon/dice/proc/diceroll(mob/user)
result = rand(1, sides)
var/fake_result = rand(1, sides)//Daredevil isn't as good as he used to be
var/comment = ""
if(sides == 20 && result == 20)
comment = "Nat 20!"
else if(sides == 20 && result == 1)
comment = "Ouch, bad luck."
update_icon()
if(initial(icon_state) == "d00")
result = (result - 1)*10
if(special_faces.len == sides)
result = special_faces[result]
if(user != null) //Dice was rolled in someone's hand
user.visible_message("[user] has thrown [src]. It lands on [result]. [comment]", \
"<span class='notice'>You throw [src]. It lands on [result]. [comment]</span>", \
"<span class='italics'>You hear [src] rolling, it sounds like a [fake_result].</span>")
else if(src.throwing == 0) //Dice was thrown and is coming to rest
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/weapon/dice/d4/Crossed(mob/living/carbon/human/H)
if(istype(H) && !H.shoes)
if(PIERCEIMMUNE in H.dna.species.specflags)
return 0
H << "<span class='userdanger'>You step on the D4!</span>"
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
H.Weaken(3)
/obj/item/weapon/dice/update_icon()
cut_overlays()
add_overlay("[src.icon_state][src.result]")
@@ -0,0 +1,367 @@
/obj/item/weapon/dnainjector
name = "\improper DNA injector"
desc = "This injects the person with DNA."
icon = 'icons/obj/items.dmi'
icon_state = "dnainjector"
throw_speed = 3
throw_range = 5
w_class = 1
origin_tech = "biotech=1"
var/damage_coeff = 1
var/list/fields
var/list/add_mutations = list()
var/list/remove_mutations = list()
var/list/add_mutations_static = list()
var/list/remove_mutations_static = list()
var/used = 0
/obj/item/weapon/dnainjector/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/dnainjector/proc/prepare()
for(var/mut_key in add_mutations_static)
add_mutations.Add(mutations_list[mut_key])
for(var/mut_key in remove_mutations_static)
remove_mutations.Add(mutations_list[mut_key])
/obj/item/weapon/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
prepare()
if(M.has_dna() && !(M.disabilities & NOCLONE))
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
for(var/datum/mutation/human/HM in remove_mutations)
HM.force_lose(M)
for(var/datum/mutation/human/HM in add_mutations)
if(HM.name == RACEMUT)
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
log_msg += " (MONKEY)"
HM.force_give(M)
if(fields)
if(fields["name"] && fields["UE"] && fields["blood_type"])
M.real_name = fields["name"]
M.dna.unique_enzymes = fields["UE"]
M.name = M.real_name
M.dna.blood_type = fields["blood_type"]
if(fields["UI"]) //UI+UE
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
M.updateappearance(mutations_overlay_update=1)
log_attack(log_msg)
else
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
return
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
if(used)
user << "<span class='warning'>This injector is used up!</span>"
return
if(ishuman(target))
var/mob/living/carbon/human/humantarget = target
if (!humantarget.can_inject(user, 1))
return
add_logs(user, target, "attempted to inject", src)
if(target != user)
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
if(!do_mob(user, target) || used)
return
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
else
user << "<span class='notice'>You inject yourself with [src].</span>"
add_logs(user, target, "injected", src)
inject(target, user) //Now we actually do the heavy lifting.
used = 1
icon_state = "dnainjector0"
desc += " This one is used up."
/obj/item/weapon/dnainjector/antihulk
name = "\improper DNA injector (Anti-Hulk)"
desc = "Cures green skin."
remove_mutations_static = list(HULK)
/obj/item/weapon/dnainjector/hulkmut
name = "\improper DNA injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition."
add_mutations_static = list(HULK)
/obj/item/weapon/dnainjector/xraymut
name = "\improper DNA injector (Xray)"
desc = "Finally you can see what the Captain does."
add_mutations_static = list(XRAY)
/obj/item/weapon/dnainjector/antixray
name = "\improper DNA injector (Anti-Xray)"
desc = "It will make you see harder."
remove_mutations_static = list(XRAY)
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
name = "\improper DNA injector (Anti-Glasses)"
desc = "Toss away those glasses!"
remove_mutations_static = list(BADSIGHT)
/obj/item/weapon/dnainjector/glassesmut
name = "\improper DNA injector (Glasses)"
desc = "Will make you need dorkish glasses."
add_mutations_static = list(BADSIGHT)
/obj/item/weapon/dnainjector/epimut
name = "\improper DNA injector (Epi.)"
desc = "Shake shake shake the room!"
add_mutations_static = list(EPILEPSY)
/obj/item/weapon/dnainjector/antiepi
name = "\improper DNA injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
remove_mutations_static = list(EPILEPSY)
////////////////////////////////////
/obj/item/weapon/dnainjector/anticough
name = "\improper DNA injector (Anti-Cough)"
desc = "Will stop that aweful noise."
remove_mutations_static = list(COUGH)
/obj/item/weapon/dnainjector/coughmut
name = "\improper DNA injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
add_mutations_static = list(COUGH)
/obj/item/weapon/dnainjector/antidwarf
name = "\improper DNA injector (Anti-Dwarfism)"
desc = "Helps you grow big and strong."
remove_mutations_static = list(DWARFISM)
/obj/item/weapon/dnainjector/dwarf
name = "\improper DNA injector (Dwarfism)"
desc = "Its a small world after all."
add_mutations_static = list(DWARFISM)
/obj/item/weapon/dnainjector/clumsymut
name = "\improper DNA injector (Clumsy)"
desc = "Makes clown minions."
add_mutations_static = list(CLOWNMUT)
/obj/item/weapon/dnainjector/anticlumsy
name = "\improper DNA injector (Anti-Clumy)"
desc = "Apply this for Security Clown."
remove_mutations_static = list(CLOWNMUT)
/obj/item/weapon/dnainjector/antitour
name = "\improper DNA injector (Anti-Tour.)"
desc = "Will cure tourrets."
remove_mutations_static = list(TOURETTES)
/obj/item/weapon/dnainjector/tourmut
name = "\improper DNA injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
add_mutations_static = list(TOURETTES)
/obj/item/weapon/dnainjector/stuttmut
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
add_mutations_static = list(NERVOUS)
/obj/item/weapon/dnainjector/antistutt
name = "\improper DNA injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
remove_mutations_static = list(NERVOUS)
/obj/item/weapon/dnainjector/antifire
name = "\improper DNA injector (Anti-Fire)"
desc = "Cures fire."
remove_mutations_static = list(COLDRES)
/obj/item/weapon/dnainjector/firemut
name = "\improper DNA injector (Fire)"
desc = "Gives you fire."
add_mutations_static = list(COLDRES)
/obj/item/weapon/dnainjector/blindmut
name = "\improper DNA injector (Blind)"
desc = "Makes you not see anything."
add_mutations_static = list(BLINDMUT)
/obj/item/weapon/dnainjector/antiblind
name = "\improper DNA injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
remove_mutations_static = list(BLINDMUT)
/obj/item/weapon/dnainjector/antitele
name = "\improper DNA injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
remove_mutations_static = list(TK)
/obj/item/weapon/dnainjector/telemut
name = "\improper DNA injector (Tele.)"
desc = "Super brain man!"
add_mutations_static = list(TK)
/obj/item/weapon/dnainjector/telemut/darkbundle
name = "\improper DNA injector"
desc = "Good. Let the hate flow through you."
/obj/item/weapon/dnainjector/deafmut
name = "\improper DNA injector (Deaf)"
desc = "Sorry, what did you say?"
add_mutations_static = list(DEAFMUT)
/obj/item/weapon/dnainjector/antideaf
name = "\improper DNA injector (Anti-Deaf)"
desc = "Will make you hear once more."
remove_mutations_static = list(DEAFMUT)
/obj/item/weapon/dnainjector/h2m
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
add_mutations_static = list(RACEMUT)
/obj/item/weapon/dnainjector/m2h
name = "\improper DNA injector (Monkey > Human)"
desc = "Will make you...less hairy."
remove_mutations_static = list(RACEMUT)
/obj/item/weapon/dnainjector/antichameleon
name = "\improper DNA injector (Anti-Chameleon)"
remove_mutations_static = list(CHAMELEON)
/obj/item/weapon/dnainjector/chameleonmut
name = "\improper DNA injector (Chameleon)"
add_mutations_static = list(CHAMELEON)
/obj/item/weapon/dnainjector/antiwacky
name = "\improper DNA injector (Anti-Wacky)"
remove_mutations_static = list(WACKY)
/obj/item/weapon/dnainjector/wackymut
name = "\improper DNA injector (Wacky)"
add_mutations_static = list(WACKY)
/obj/item/weapon/dnainjector/antimute
name = "\improper DNA injector (Anti-Mute)"
remove_mutations_static = list(MUT_MUTE)
/obj/item/weapon/dnainjector/mutemut
name = "\improper DNA injector (Mute)"
add_mutations_static = list(MUT_MUTE)
/obj/item/weapon/dnainjector/antismile
name = "\improper DNA injector (Anti-Smile)"
remove_mutations_static = list(SMILE)
/obj/item/weapon/dnainjector/smilemut
name = "\improper DNA injector (Smile)"
add_mutations_static = list(SMILE)
/obj/item/weapon/dnainjector/unintelligablemut
name = "\improper DNA injector (Unintelligable)"
add_mutations_static = list(UNINTELLIGABLE)
/obj/item/weapon/dnainjector/antiunintelligable
name = "\improper DNA injector (Anti-Unintelligable)"
remove_mutations_static = list(UNINTELLIGABLE)
/obj/item/weapon/dnainjector/swedishmut
name = "\improper DNA injector (Swedish)"
add_mutations_static = list(SWEDISH)
/obj/item/weapon/dnainjector/antiswedish
name = "\improper DNA injector (Anti-Swedish)"
remove_mutations_static = list(SWEDISH)
/obj/item/weapon/dnainjector/chavmut
name = "\improper DNA injector (Chav)"
add_mutations_static = list(CHAV)
/obj/item/weapon/dnainjector/antichav
name = "\improper DNA injector (Anti-Chav)"
remove_mutations_static = list(CHAV)
/obj/item/weapon/dnainjector/elvismut
name = "\improper DNA injector (Elvis)"
add_mutations_static = list(ELVIS)
/obj/item/weapon/dnainjector/antielvis
name = "\improper DNA injector (Anti-Elvis)"
remove_mutations_static = list(ELVIS)
/obj/item/weapon/dnainjector/lasereyesmut
name = "\improper DNA injector (Laser Eyes)"
add_mutations_static = list(LASEREYES)
/obj/item/weapon/dnainjector/antilasereyes
name = "\improper DNA injector (Anti-Laser Eyes)"
remove_mutations_static = list(LASEREYES)
/obj/item/weapon/dnainjector/timed
var/duration = 600
/obj/item/weapon/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
prepare()
if(M.has_dna() && !(M.disabilities & NOCLONE))
if(M.stat == DEAD) //prevents dead people from having their DNA changed
user << "<span class='notice'>You can't modify [M]'s DNA while \he's dead.</span>"
return
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
var/endtime = world.time+duration
for(var/datum/mutation/human/HM in remove_mutations)
if(HM.name == RACEMUT)
if(ishuman(M))
continue
M = HM.force_lose(M)
else
HM.force_lose(M)
for(var/datum/mutation/human/HM in add_mutations)
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
continue //Skip permanent mutations we already have.
if(HM.name == RACEMUT && ishuman(M))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
log_msg += " (MONKEY)"
M = HM.force_give(M)
else
HM.force_give(M)
M.dna.temporary_mutations[HM.name] = endtime
if(fields)
if(fields["name"] && fields["UE"] && fields["blood_type"])
if(!M.dna.previous["name"])
M.dna.previous["name"] = M.real_name
if(!M.dna.previous["UE"])
M.dna.previous["UE"] = M.dna.unique_enzymes
if(!M.dna.previous["blood_type"])
M.dna.previous["blood_type"] = M.dna.blood_type
M.real_name = fields["name"]
M.dna.unique_enzymes = fields["UE"]
M.name = M.real_name
M.dna.blood_type = fields["blood_type"]
M.dna.temporary_mutations[UE_CHANGED] = endtime
if(fields["UI"]) //UI+UE
if(!M.dna.previous["UI"])
M.dna.previous["UI"] = M.dna.uni_identity
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
M.updateappearance(mutations_overlay_update=1)
M.dna.temporary_mutations[UI_CHANGED] = endtime
log_attack(log_msg)
else
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
return
/obj/item/weapon/dnainjector/timed/hulk
name = "\improper DNA injector (Hulk)"
desc = "This will make you big and strong, but give you a bad skin condition."
add_mutations_static = list(HULK)
/obj/item/weapon/dnainjector/timed/h2m
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
add_mutations_static = list(RACEMUT)
@@ -0,0 +1,114 @@
//In this file: C4
/obj/item/weapon/c4
name = "C-4"
desc = "Used to put holes in specific areas without too much extra hole."
gender = PLURAL
icon = 'icons/obj/grenade.dmi'
icon_state = "plastic-explosive0"
item_state = "plasticx"
flags = NOBLUDGEON
w_class = 2
origin_tech = "syndicate=1"
var/timer = 10
var/open_panel = 0
parent_type = /obj/item/weapon/grenade/plastic/c4
/obj/item/weapon/c4/New()
wires = new /datum/wires/explosive/c4(src)
image_overlay = image('icons/obj/grenade.dmi', "plastic-explosive2")
..()
/obj/item/weapon/c4/Destroy()
qdel(wires)
wires = null
target = null
return ..()
/obj/item/weapon/c4/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above \his head! It looks like \he's going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
target = user
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src.name] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
message_admins("[key_name(user)] suicided with [src.name] at ([x],[y],[z])")
sleep(10)
explode(get_turf(user))
user.gib(1, 1)
/obj/item/weapon/c4/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(is_wire_tool(I))
wires.interact(user)
else
return ..()
/obj/item/weapon/c4/attack_self(mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 10, 60000)
timer = newtime
user << "Timer set for [timer] seconds."
/obj/item/weapon/c4/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (ismob(AM))
return
if(loc == AM)
return
if((istype(AM, /obj/item/weapon/storage/)) && !((istype(AM, /obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))) //If its storage but not secure storage OR a lockbox, then place it inside.
return
if((istype(AM,/obj/item/weapon/storage/secure)) || (istype(AM, /obj/item/weapon/storage/lockbox)))
var/obj/item/weapon/storage/secure/S = AM
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
return
user << "<span class='notice'>You start planting the bomb...</span>"
if(do_after(user, 50, target = AM))
if(!user.unEquip(src))
return
src.target = AM
loc = null
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
target.add_overlay(image_overlay, 1)
user << "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>"
addtimer(src, "explode", timer * 10)
/obj/item/weapon/c4/proc/explode()
if(qdeleted(src))
return
var/turf/location
if(target)
if(!qdeleted(target))
location = get_turf(target)
target.overlays -= image_overlay
target.priority_overlays -= image_overlay
else
location = get_turf(src)
if(location)
location.ex_act(2, target)
explosion(location,0,0,3)
qdel(src)
/obj/item/weapon/c4/attack(mob/M, mob/user, def_zone)
return
@@ -0,0 +1,180 @@
/obj/item/weapon/extinguisher
name = "fire extinguisher"
desc = "A traditional red fire extinguisher."
icon = 'icons/obj/items.dmi'
icon_state = "fire_extinguisher0"
item_state = "fire_extinguisher"
hitsound = 'sound/weapons/smash.ogg'
flags = CONDUCT
throwforce = 10
w_class = 3
throw_speed = 2
throw_range = 7
force = 10
materials = list(MAT_METAL=90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
dog_fashion = /datum/dog_fashion/back
var/max_water = 50
var/last_use = 1
var/safety = 1
var/sprite_name = "fire_extinguisher"
var/power = 5 //Maximum distance launched water will travel
var/precision = 0 //By default, turfs picked from a spray are random, set to 1 to make it always have at least one water effect per row
var/cooling_power = 2 //Sets the cooling_temperature of the water reagent datum inside of the extinguisher when it is refilled
/obj/item/weapon/extinguisher/mini
name = "pocket fire extinguisher"
desc = "A light and compact fibreglass-framed model fire extinguisher."
icon_state = "miniFE0"
item_state = "miniFE"
hitsound = null //it is much lighter, after all.
flags = null //doesn't CONDUCT
throwforce = 2
w_class = 2
force = 3
materials = list()
max_water = 30
sprite_name = "miniFE"
dog_fashion = null
/obj/item/weapon/extinguisher/New()
..()
create_reagents(max_water)
reagents.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/attack_self(mob/user)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
user << "The safety is [safety ? "on" : "off"]."
return
/obj/item/weapon/extinguisher/attack(mob/M, mob/user)
if(user.a_intent == "help")
// If we're in help intent, don't bash anyone with the
// extinguisher
user.visible_message("[user] targets [M] with \the [src]", "<span class='info'>You target [M] with \the [src].</span>")
return 0
else
return ..()
/obj/item/weapon/extinguisher/examine(mob/user)
..()
if(reagents.total_volume)
user << "It contains [round(reagents.total_volume)] units."
else
user << "It is empty."
/obj/item/weapon/extinguisher/proc/AttemptRefill(atom/target, mob/user)
if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user))
var/safety_save = safety
safety = 1
if(reagents.total_volume == reagents.maximum_volume)
user << "<span class='warning'>\The [src] is already full!</span>"
safety = safety_save
return 1
var/obj/structure/reagent_dispensers/watertank/W = target
var/transferred = W.reagents.trans_to(src, max_water)
if(transferred > 0)
user << "<span class='notice'>\The [src] has been refilled by [transferred] units.</span>"
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
for(var/datum/reagent/water/R in reagents.reagent_list)
R.cooling_temperature = cooling_power
else
user << "<span class='warning'>\The [W] is empty!</span>"
safety = safety_save
return 1
else
return 0
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
//TODO; Add support for reagents in water.
var/Refill = AttemptRefill(target, user)
if(Refill)
return
if (!safety)
if (src.reagents.total_volume < 1)
usr << "<span class='warning'>\The [src] is empty!</span>"
return
if (world.time < src.last_use + 20)
return
src.last_use = world.time
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(src,target)
if(user.buckled && isobj(user.buckled) && !user.buckled.anchored)
spawn(0)
var/obj/B = user.buckled
var/movementdirection = turn(direction,180)
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
sleep(2)
step(B, movementdirection)
sleep(2)
step(B, movementdirection)
sleep(3)
step(B, movementdirection)
sleep(3)
step(B, movementdirection)
sleep(3)
step(B, movementdirection)
else user.newtonian_move(turn(direction, 180))
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
if(precision)
var/turf/T3 = get_step(T1, turn(direction, 90))
var/turf/T4 = get_step(T2,turn(direction, -90))
the_targets = list(T,T1,T2,T3,T4)
for(var/a=0, a<5, a++)
spawn(0)
var/obj/effect/particle_effect/water/W = PoolOrNew( /obj/effect/particle_effect/water, get_turf(src) )
var/turf/my_target = pick(the_targets)
if(precision)
the_targets -= my_target
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
W.reagents = R
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W,1)
for(var/b=0, b<power, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
W.reagents.reaction(get_turf(W))
for(var/A in get_turf(W))
if(!W) return
W.reagents.reaction(A)
if(W.loc == my_target) break
sleep(2)
else
return ..()
/obj/item/weapon/extinguisher/AltClick(mob/user)
EmptyExtinguisher(user)
/obj/item/weapon/extinguisher/proc/EmptyExtinguisher(var/mob/user)
if(loc == user && reagents.total_volume)
reagents.clear_reagents()
var/turf/T = get_turf(loc)
if(istype(T, /turf/open))
var/turf/open/theturf = T
theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5)
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] using its release valve.</span>")
return
@@ -0,0 +1,240 @@
/obj/item/weapon/flamethrower
name = "flamethrower"
desc = "You are a firestarter!"
icon = 'icons/obj/flamethrower.dmi'
icon_state = "flamethrowerbase"
item_state = "flamethrower_0"
flags = CONDUCT
force = 3
throwforce = 10
throw_speed = 1
throw_range = 5
w_class = 3
materials = list(MAT_METAL=500)
origin_tech = "combat=1;plasmatech=2;engineering=2"
var/status = 0
var/throw_amount = 100
var/lit = 0 //on or off
var/operating = 0//cooldown
var/obj/item/weapon/weldingtool/weldtool = null
var/obj/item/device/assembly/igniter/igniter = null
var/obj/item/weapon/tank/internals/plasma/ptank = null
var/warned_admins = 0 //for the message_admins() when lit
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
qdel(weldtool)
if(igniter)
qdel(igniter)
if(ptank)
qdel(ptank)
return ..()
/obj/item/weapon/flamethrower/process()
if(!lit)
STOP_PROCESSING(SSobj, src)
return null
var/turf/location = loc
if(istype(location, /mob/))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = M.loc
if(isturf(location)) //start a fire if possible
location.hotspot_expose(700, 2)
return
/obj/item/weapon/flamethrower/update_icon()
cut_overlays()
if(igniter)
add_overlay("+igniter[status]")
if(ptank)
add_overlay("+ptank")
if(lit)
add_overlay("+lit")
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
if(flag) return // too close
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
add_logs(user, target, "flamethrowered", src)
flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
weldtool = null
if(igniter)
igniter.loc = T
igniter = null
if(ptank)
ptank.loc = T
ptank = null
new /obj/item/stack/rods(T)
qdel(src)
return
else if(istype(W, /obj/item/weapon/screwdriver) && igniter && !lit)
status = !status
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
update_icon()
return
else if(isigniter(W))
var/obj/item/device/assembly/igniter/I = W
if(I.secured)
return
if(igniter)
return
if(!user.unEquip(W))
return
I.loc = src
igniter = I
update_icon()
return
else if(istype(W,/obj/item/weapon/tank/internals/plasma))
if(ptank)
user << "<span class='notice'>There is already a plasma tank loaded in [src]!</span>"
return
if(!user.unEquip(W))
return
ptank = W
W.loc = src
update_icon()
return
else if(istype(W, /obj/item/device/analyzer) && ptank)
atmosanalyzer_scan(ptank.air_contents, user)
else
return ..()
/obj/item/weapon/flamethrower/attack_self(mob/user)
if(user.stat || user.restrained() || user.lying)
return
user.set_machine(src)
if(!ptank)
user << "<span class='notice'>Attach a plasma tank first!</span>"
return
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=\ref[src];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=\ref[src];amount=-100'>-</A> <A HREF='?src=\ref[src];amount=-10'>-</A> <A HREF='?src=\ref[src];amount=-1'>-</A> [throw_amount] <A HREF='?src=\ref[src];amount=1'>+</A> <A HREF='?src=\ref[src];amount=10'>+</A> <A HREF='?src=\ref[src];amount=100'>+</A><BR>\n<A HREF='?src=\ref[src];remove=1'>Remove plasmatank</A> - <A HREF='?src=\ref[src];close=1'>Close</A></TT>")
user << browse(dat, "window=flamethrower;size=600x300")
onclose(user, "flamethrower")
return
/obj/item/weapon/flamethrower/Topic(href,href_list[])
if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=flamethrower")
return
if(usr.stat || usr.restrained() || usr.lying)
return
usr.set_machine(src)
if(href_list["light"])
if(!ptank)
return
if(!status)
return
lit = !lit
if(lit)
START_PROCESSING(SSobj, src)
if(!warned_admins)
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has lit a flamethrower.")
warned_admins = 1
if(href_list["amount"])
throw_amount = throw_amount + text2num(href_list["amount"])
throw_amount = max(50, min(5000, throw_amount))
if(href_list["remove"])
if(!ptank)
return
usr.put_in_hands(ptank)
ptank = null
lit = 0
usr.unset_machine()
usr << browse(null, "window=flamethrower")
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
update_icon()
return
/obj/item/weapon/flamethrower/CheckParts(list/parts_list)
..()
weldtool = locate(/obj/item/weapon/weldingtool) in contents
igniter = locate(/obj/item/device/assembly/igniter) in contents
weldtool.status = 0
igniter.secured = 0
status = 1
update_icon()
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating)
return
operating = 1
var/turf/previousturf = get_turf(src)
for(var/turf/T in turflist)
if(T == previousturf)
continue //so we don't burn the tile we be standin on
if(!T.CanAtmosPass(previousturf))
break
ignite_turf(T)
sleep(1)
previousturf = T
operating = 0
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
return
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
if(air_transfer.gases["plasma"])
air_transfer.gases["plasma"][MOLES] *= 5
target.assume_air(air_transfer)
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
//location.hotspot_expose(1000,500,1)
SSair.add_to_active(target, 0)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
if(!igniter)
igniter = new /obj/item/device/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/internals/plasma/full(src)
update_icon()
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/target_turf = get_turf(owner)
ignite_turf(target_turf, 100)
qdel(ptank)
return 1 //It hit the flamethrower, not them
+82
View File
@@ -0,0 +1,82 @@
/* Gifts and wrapping paper
* Contains:
* Gifts
* Wrapping Paper
*/
/*
* Gifts
*/
/obj/item/weapon/a_gift
name = "gift"
desc = "PRESENTS!!!! eek!"
icon = 'icons/obj/storage.dmi'
icon_state = "giftdeliverypackage3"
item_state = "gift1"
burn_state = FLAMMABLE
/obj/item/weapon/a_gift/New()
..()
pixel_x = rand(-10,10)
pixel_y = rand(-10,10)
icon_state = "giftdeliverypackage[rand(1,5)]"
/obj/item/weapon/a_gift/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] peeks inside the [src.name] and cries \himself to death! It looks like they were on the naughty list...</span>")
return (BRUTELOSS)
/obj/item/weapon/a_gift/attack_self(mob/M)
if(M && M.mind && M.mind.special_role == "Santa")
M << "<span class='warning'>You're supposed to be spreading gifts, not opening them yourself!</span>"
return
var/gift_type_list = list(/obj/item/weapon/sord,
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/photo_album,
/obj/item/weapon/storage/box/snappops,
/obj/item/weapon/storage/crayons,
/obj/item/weapon/storage/backpack/holding,
/obj/item/weapon/storage/belt/champion,
/obj/item/weapon/soap/deluxe,
/obj/item/weapon/pickaxe/diamond,
/obj/item/weapon/pen/invisible,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grown/corncob,
/obj/item/weapon/poster/contraband,
/obj/item/weapon/poster/legit,
/obj/item/weapon/book/manual/barman_recipes,
/obj/item/weapon/book/manual/chef_recipes,
/obj/item/weapon/bikehorn,
/obj/item/toy/beach_ball,
/obj/item/toy/beach_ball/holoball,
/obj/item/weapon/banhammer,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/device/paicard,
/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible,
/obj/item/clothing/suit/jacket/leather,
/obj/item/clothing/suit/jacket/leather/overcoat,
/obj/item/clothing/suit/poncho,
/obj/item/clothing/suit/poncho/green,
/obj/item/clothing/suit/poncho/red,
/obj/item/clothing/suit/snowman,
/obj/item/clothing/head/snowman)
gift_type_list += subtypesof(/obj/item/clothing/head/collectable)
gift_type_list += subtypesof(/obj/item/toy) - (((typesof(/obj/item/toy/cards) - /obj/item/toy/cards/deck) + /obj/item/toy/figure + /obj/item/toy/ammo)) //All toys, except for abstract types and syndicate cards.
var/gift_type = pick(gift_type_list)
if(!ispath(gift_type,/obj/item))
return
var/obj/item/I = new gift_type(M)
M.unEquip(src, 1)
M.put_in_hands(I)
I.add_fingerprint(M)
qdel(src)
return
@@ -0,0 +1,493 @@
#define EMPTY 1
#define WIRED 2
#define READY 3
/obj/item/weapon/grenade/chem_grenade
name = "chemical grenade"
desc = "A custom made grenade."
icon_state = "chemg"
item_state = "flashbang"
w_class = 2
force = 2
var/stage = EMPTY
var/list/beakers = list()
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/affected_area = 3
var/obj/item/device/assembly_holder/nadeassembly = null
var/assemblyattacher
var/ignition_temp = 10 // The amount of heat added to the reagents when this grenade goes off.
var/threatscale = 1 // Used by advanced grenades to make them slightly more worthy.
/obj/item/weapon/grenade/chem_grenade/New()
create_reagents(1000)
stage_change() // If no argument is set, it will change the stage to the current stage, useful for stock grenades that start READY.
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state
..()
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user)
if(stage == READY && !active)
if(nadeassembly)
nadeassembly.attack_self(user)
else if(clown_check(user))
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = 1
icon_state = initial(icon_state) + "_active"
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
addtimer(src, "prime", det_time)
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
if(stage == WIRED)
if(beakers.len)
stage_change(READY)
user << "<span class='notice'>You lock the [initial(name)] assembly.</span>"
playsound(loc, 'sound/items/Screwdriver.ogg', 25, -3)
else
user << "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>"
else if(stage == READY && !nadeassembly)
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
user << "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>"
else if(stage == EMPTY)
user << "<span class='warning'>You need to add an activation mechanism!</span>"
else if(stage == WIRED && is_type_in_list(I, allowed_containers))
. = 1 //no afterattack
if(beakers.len == 2)
user << "<span class='warning'>[src] can not hold more containers!</span>"
return
else
if(I.reagents.total_volume)
if(!user.unEquip(I))
return
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
I.loc = src
beakers += I
else
user << "<span class='warning'>[I] is empty!</span>"
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
. = 1 // no afterattack
var/obj/item/device/assembly_holder/A = I
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
if(!user.unEquip(I))
return
nadeassembly = A
A.master = src
A.loc = src
assemblyattacher = user.ckey
stage_change(WIRED)
user << "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>"
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = I
if (C.use(1))
det_time = 50 // In case the cable_coil was removed and readded.
stage_change(WIRED)
user << "<span class='notice'>You rig the [initial(name)] assembly.</span>"
else
user << "<span class='warning'>You need one length of coil to wire the assembly!</span>"
return
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
stage_change(WIRED)
user << "<span class='notice'>You unlock the [initial(name)] assembly.</span>"
else if(stage == WIRED && istype(I, /obj/item/weapon/wrench))
if(beakers.len)
for(var/obj/O in beakers)
O.loc = get_turf(src)
beakers = list()
user << "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>"
return // First use of the wrench remove beakers, then use the wrench to remove the activation mechanism.
if(nadeassembly)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
else // If "nadeassembly = null && stage == WIRED", then it most have been cable_coil that was used.
new /obj/item/stack/cable_coil(get_turf(src),1)
stage_change(EMPTY)
user << "<span class='notice'>You remove the activation mechanism from the [initial(name)] assembly.</span>"
else
return ..()
/obj/item/weapon/grenade/chem_grenade/proc/stage_change(N)
if(N)
stage = N
if(stage == EMPTY)
name = "[initial(name)] casing"
desc = "A do it yourself [initial(name)]!"
icon_state = initial(icon_state)
else if(stage == WIRED)
name = "unsecured [initial(name)]"
desc = "An unsecured [initial(name)] assembly."
icon_state = "[initial(icon_state)]_ass"
else if(stage == READY)
name = initial(name)
desc = initial(desc)
icon_state = "[initial(icon_state)]_locked"
//assembly stuff
/obj/item/weapon/grenade/chem_grenade/receive_signal()
prime()
/obj/item/weapon/grenade/chem_grenade/Crossed(atom/movable/AM)
if(nadeassembly)
nadeassembly.Crossed(AM)
/obj/item/weapon/grenade/chem_grenade/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/weapon/grenade/chem_grenade/prime()
if(stage != READY)
return
var/list/datum/reagents/reactants = list()
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
reactants += G.reagents
if(!chem_splash(get_turf(src), affected_area, reactants, ignition_temp, threatscale))
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
return
if(nadeassembly)
var/mob/M = get_mob_by_ckey(assemblyattacher)
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[last]'>FLW</A>) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
var/turf/DT = get_turf(src)
var/area/DA = get_area(DT)
log_game("A grenade detonated at [DA.name] ([DT.x], [DT.y], [DT.z])")
update_mob()
qdel(src)
//Large chem grenades accept slime cores and use the appropriately.
/obj/item/weapon/grenade/chem_grenade/large
name = "large grenade"
desc = "A custom made large grenade. It affects a larger area."
icon_state = "large_grenade"
allowed_containers = list(/obj/item/weapon/reagent_containers/glass,/obj/item/weapon/reagent_containers/food/condiment,
/obj/item/weapon/reagent_containers/food/drinks)
origin_tech = "combat=3;engineering=3"
affected_area = 5
ignition_temp = 25 // Large grenades are slightly more effective at setting off heat-sensitive mixtures than smaller grenades.
threatscale = 1.1 // 10% more effective.
/obj/item/weapon/grenade/chem_grenade/large/prime()
if(stage != READY)
return
for(var/obj/item/slime_extract/S in beakers)
if(S.Uses)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(S, G.reagents.total_volume)
//If there is still a core (sometimes it's used up)
//and there are reagents left, behave normally
if(S && S.reagents && S.reagents.total_volume)
S.reagents.trans_to(src,S.reagents.total_volume)
return
..()
//I tried to just put it in the allowed_containers list but
//if you do that it must have reagents. If you're going to
//make a special case you might as well do it explicitly. -Sayu
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
if(!user.unEquip(I))
return
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
I.loc = src
beakers += I
else
return ..()
/obj/item/weapon/grenade/chem_grenade/cryo // Intended for rare cryogenic mixes. Cools the area moderately upon detonation.
name = "cryo grenade"
desc = "A custom made cryogenic grenade. It rapidly cools its contents upon detonation."
icon_state = "cryog"
affected_area = 2
ignition_temp = -100
/obj/item/weapon/grenade/chem_grenade/pyro // Intended for pyrotechnical mixes. Produces a small fire upon detonation, igniting potentially flammable mixtures.
name = "pyro grenade"
desc = "A custom made pyrotechnical grenade. It heats up and ignites its contents upon detonation."
icon_state = "pyrog"
origin_tech = "combat=4;engineering=4"
affected_area = 3
ignition_temp = 500 // This is enough to expose a hotspot.
/obj/item/weapon/grenade/chem_grenade/adv_release // Intended for weaker, but longer lasting effects. Could have some interesting uses.
name = "advanced release grenade"
desc = "A custom made advanced release grenade. It is able to be detonated more than once. Can be configured using a multitool."
icon_state = "timeg"
origin_tech = "combat=3;engineering=4"
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
/obj/item/weapon/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/multitool))
switch(unit_spread)
if(0 to 24)
unit_spread += 5
if(25 to 99)
unit_spread += 25
else
unit_spread = 5
user << "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>"
return
..()
/obj/item/weapon/grenade/chem_grenade/adv_release/prime()
if(stage != READY)
return
var/total_volume = 0
for(var/obj/item/weapon/reagent_containers/RC in beakers)
total_volume += RC.reagents.total_volume
if(!total_volume)
qdel(src)
qdel(nadeassembly)
return
var/fraction = unit_spread/total_volume
var/datum/reagents/reactants = new(unit_spread)
reactants.my_atom = src
for(var/obj/item/weapon/reagent_containers/RC in beakers)
RC.reagents.trans_to(reactants, RC.reagents.total_volume*fraction, threatscale, 1, 1)
chem_splash(get_turf(src), affected_area, list(reactants), ignition_temp, threatscale)
if(nadeassembly)
var/mob/M = get_mob_by_ckey(assemblyattacher)
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[last]'>FLW</A>) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
else
addtimer(src, "prime", det_time)
var/turf/DT = get_turf(src)
var/area/DA = get_area(DT)
log_game("A grenade detonated at [DA.name] ([DT.x], [DT.y], [DT.z])")
//////////////////////////////
////// PREMADE GRENADES //////
//////////////////////////////
/obj/item/weapon/grenade/chem_grenade/metalfoam
name = "metal foam grenade"
desc = "Used for emergency sealing of air breaches."
stage = READY
/obj/item/weapon/grenade/chem_grenade/metalfoam/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminium", 30)
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("facid", 10)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/incendiary
name = "incendiary grenade"
desc = "Used for clearing rooms of living things."
stage = READY
/obj/item/weapon/grenade/chem_grenade/incendiary/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("stable_plasma", 25)
B2.reagents.add_reagent("sacid", 25)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/antiweed
name = "weedkiller grenade"
desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
stage = READY
/obj/item/weapon/grenade/chem_grenade/antiweed/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("plantbgone", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "cleaner grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = READY
/obj/item/weapon/grenade/chem_grenade/cleaner/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/teargas
name = "teargas grenade"
desc = "Used for nonlethal riot control. Contents under pressure. Do not directly inhale contents."
stage = READY
/obj/item/weapon/grenade/chem_grenade/teargas/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("condensedcapsaicin", 60)
B1.reagents.add_reagent("potassium", 40)
B2.reagents.add_reagent("phosphorus", 40)
B2.reagents.add_reagent("sugar", 40)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/facid
name = "acid grenade"
desc = "Used for melting armoured opponents."
stage = READY
/obj/item/weapon/grenade/chem_grenade/facid/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("facid", 290)
B1.reagents.add_reagent("potassium", 10)
B2.reagents.add_reagent("phosphorus", 10)
B2.reagents.add_reagent("sugar", 10)
B2.reagents.add_reagent("facid", 280)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/colorful
name = "colorful grenade"
desc = "Used for wide scale painting projects."
stage = READY
/obj/item/weapon/grenade/chem_grenade/colorful/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("colorful_reagent", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/clf3
name = "clf3 grenade"
desc = "BURN!-brand foaming clf3. In a special applicator for rapid purging of wide areas."
stage = READY
/obj/item/weapon/grenade/chem_grenade/clf3/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 250)
B1.reagents.add_reagent("clf3", 50)
B2.reagents.add_reagent("water", 250)
B2.reagents.add_reagent("clf3", 50)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/bioterrorfoam
name = "Bio terror foam grenade"
desc = "Tiger Cooperative chemical foam grenade. Causes temporary irration, blindness, confusion, mutism, and mutations to carbon based life forms. Contains additional spore toxin"
stage = READY
/obj/item/weapon/grenade/chem_grenade/bioterrorfoam/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("cryptobiolin", 75)
B1.reagents.add_reagent("water", 50)
B1.reagents.add_reagent("mutetoxin", 50)
B1.reagents.add_reagent("spore", 75)
B1.reagents.add_reagent("itching_powder", 50)
B2.reagents.add_reagent("fluorosurfactant", 150)
B2.reagents.add_reagent("mutagen", 150)
beakers += B1
beakers += B2
/obj/item/weapon/grenade/chem_grenade/tuberculosis
name = "Fungal tuberculosis grenade"
desc = "WARNING: GRENADE WILL RELEASE DEADLY SPORES CONTAINING ACTIVE AGENTS. SEAL SUIT AND AIRFLOW BEFORE USE."
stage = READY
/obj/item/weapon/grenade/chem_grenade/tuberculosis/New()
..()
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("potassium", 50)
B1.reagents.add_reagent("phosphorus", 50)
B1.reagents.add_reagent("fungalspores", 200)
B2.reagents.add_reagent("blood", 250)
B2.reagents.add_reagent("sugar", 50)
beakers += B1
beakers += B2
#undef EMPTY
#undef WIRED
#undef READY
@@ -0,0 +1,128 @@
////////////////////
//Clusterbang
////////////////////
/obj/item/weapon/grenade/clusterbuster
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "clusterbang"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang"
var/payload = /obj/item/weapon/grenade/flashbang/cluster
/obj/item/weapon/grenade/clusterbuster/prime()
update_mob()
var/numspawned = rand(4,8)
var/again = 0
for(var/more = numspawned,more > 0,more--)
if(prob(35))
again++
numspawned--
for(var/loop = again ,loop > 0, loop--)
new /obj/item/weapon/grenade/clusterbuster/segment(loc, payload)//Creates 'segments' that launches a few more payloads
new /obj/effect/payload_spawner(loc, payload, numspawned)//Launches payload
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
qdel(src)
//////////////////////
//Clusterbang segment
//////////////////////
/obj/item/weapon/grenade/clusterbuster/segment
desc = "A smaller segment of a clusterbang. Better run."
name = "clusterbang segment"
icon = 'icons/obj/grenade.dmi'
icon_state = "clusterbang_segment"
/obj/item/weapon/grenade/clusterbuster/segment/New(var/loc, var/payload_type = /obj/item/weapon/grenade/flashbang/cluster)
..()
icon_state = "clusterbang_segment_active"
payload = payload_type
active = 1
walk_away(src,loc,rand(1,4))
addtimer(src, "prime", rand(15,60))
/obj/item/weapon/grenade/clusterbuster/segment/prime()
new /obj/effect/payload_spawner(loc, payload, rand(4,8))
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
qdel(src)
//////////////////////////////////
//The payload spawner effect
/////////////////////////////////
/obj/effect/payload_spawner/New(var/turf/newloc,var/type, var/numspawned as num)
for(var/loop = numspawned ,loop > 0, loop--)
var/obj/item/weapon/grenade/P = new type(loc)
P.active = 1
walk_away(P,loc,rand(1,4))
spawn(rand(15,60))
if(P && !qdeleted(P))
P.prime()
qdel(src)
//////////////////////////////////
//Custom payload clusterbusters
/////////////////////////////////
/obj/item/weapon/grenade/flashbang/cluster
icon_state = "flashbang_active"
/obj/item/weapon/grenade/clusterbuster/emp
name = "Electromagnetic Storm"
payload = /obj/item/weapon/grenade/empgrenade
/obj/item/weapon/grenade/clusterbuster/smoke
name = "Ninja Vanish"
payload = /obj/item/weapon/grenade/smokebomb
/obj/item/weapon/grenade/clusterbuster/metalfoam
name = "Instant Concrete"
payload = /obj/item/weapon/grenade/chem_grenade/metalfoam
/obj/item/weapon/grenade/clusterbuster/inferno
name = "Inferno"
payload = /obj/item/weapon/grenade/chem_grenade/incendiary
/obj/item/weapon/grenade/clusterbuster/antiweed
name = "RoundDown"
payload = /obj/item/weapon/grenade/chem_grenade/antiweed
/obj/item/weapon/grenade/clusterbuster/cleaner
name = "Mr. Proper"
payload = /obj/item/weapon/grenade/chem_grenade/cleaner
/obj/item/weapon/grenade/clusterbuster/teargas
name = "Oignon Grenade"
payload = /obj/item/weapon/grenade/chem_grenade/teargas
/obj/item/weapon/grenade/clusterbuster/facid
name = "Aciding Rain"
payload = /obj/item/weapon/grenade/chem_grenade/facid
/obj/item/weapon/grenade/clusterbuster/syndieminibomb
name = "SyndiWrath"
payload = /obj/item/weapon/grenade/syndieminibomb
/obj/item/weapon/grenade/clusterbuster/spawner_manhacks
name = "iViscerator"
payload = /obj/item/weapon/grenade/spawnergrenade/manhacks
/obj/item/weapon/grenade/clusterbuster/spawner_spesscarp
name = "Invasion of the Space Carps"
payload = /obj/item/weapon/grenade/spawnergrenade/spesscarp
/obj/item/weapon/grenade/clusterbuster/soap
name = "Slipocalypse"
payload = /obj/item/weapon/grenade/spawnergrenade/syndiesoap
/obj/item/weapon/grenade/clusterbuster/clf3
name = "WELCOME TO HELL"
payload = /obj/item/weapon/grenade/chem_grenade/clf3
@@ -0,0 +1,11 @@
/obj/item/weapon/grenade/empgrenade
name = "classic EMP grenade"
desc = "It is designed to wreak havok on electronic systems."
icon_state = "emp"
item_state = "emp"
origin_tech = "magnets=3;combat=2"
/obj/item/weapon/grenade/empgrenade/prime()
update_mob()
empulse(src, 4, 10)
qdel(src)
@@ -0,0 +1,56 @@
/obj/item/weapon/grenade/flashbang
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=3"
/obj/item/weapon/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf))
bang(get_turf(M), M)
for(var/obj/effect/blob/B in get_hear(8,flashbang_turf)) //Blob damage here
var/damage = round(40/(get_dist(B,get_turf(src))+1))
B.take_damage(damage, BURN)
qdel(src)
/obj/item/weapon/grenade/flashbang/proc/bang(turf/T , mob/living/M)
M.show_message("<span class='warning'>BANG</span>", 2)
playsound(loc, 'sound/weapons/flashbang.ogg', 100, 1)
//Checking for protection
var/ear_safety = M.check_ear_prot()
var/distance = max(1,get_dist(src,T))
//Flash
if(M.weakeyes)
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
M << "<span class='userdanger'><font size=3>AAAAGH!</font></span>"
M.Weaken(15) //hella stunned
M.Stun(15)
M.adjust_eye_damage(8)
if(M.flash_eyes(affect_silicon = 1))
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
//Bang
if((loc == M) || loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection
M.Stun(10)
M.Weaken(10)
if(!ear_safety)
M << sound('sound/weapons/flash_ring.ogg',0,1,0,100)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15))
if (M.ear_damage >= 15)
M << "<span class='warning'>Your ears start to ring badly!</span>"
if(prob(M.ear_damage - 10 + 5))
M << "<span class='warning'>You can't hear anything!</span>"
M.disabilities |= DEAF
else
if (M.ear_damage >= 5)
M << "<span class='warning'>Your ears start to ring!</span>"
@@ -0,0 +1,67 @@
//improvised explosives//
/obj/item/weapon/grenade/iedcasing
name = "improvised firebomb"
desc = "A weak, improvised incendiary device."
w_class = 2
icon = 'icons/obj/grenade.dmi'
icon_state = "improvised_grenade"
item_state = "flashbang"
throw_speed = 3
throw_range = 7
flags = CONDUCT
slot_flags = SLOT_BELT
active = 0
det_time = 50
display_timer = 0
var/range = 3
var/times = list()
/obj/item/weapon/grenade/iedcasing/New(loc)
..()
add_overlay(image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled"))
add_overlay(image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_wired"))
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
det_time = text2num(pickweight(times))
if(det_time < 0) //checking for 'duds'
range = 1
det_time = rand(30,80)
else
range = pick(2,2,2,3,3,3,4)
/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
..()
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
if(can)
var/muh_layer = can.layer
can.layer = FLOAT_LAYER
underlays += can
can.layer = muh_layer
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
if(!active)
if(clown_check(user))
user << "<span class='warning'>You light the [name]!</span>"
active = 1
overlays -= image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled")
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
addtimer(src, "prime", det_time)
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
..()
user << "You can't tell when it will explode!"
@@ -0,0 +1,102 @@
/obj/item/weapon/grenade
name = "grenade"
desc = "It has an adjustable timer."
w_class = 2
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
throw_speed = 3
throw_range = 7
flags = CONDUCT
slot_flags = SLOT_BELT
burn_state = FLAMMABLE
burntime = 5
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/weapon/grenade/burn()
prime()
..()
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>Huh? How does this thing work?</span>"
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(5)
if(user)
user.drop_item()
prime()
return 0
return 1
/obj/item/weapon/grenade/examine(mob/user)
..()
if(display_timer)
if(det_time > 1)
user << "The timer is set to [det_time/10] second\s."
else
user << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user)
if(!active)
if(clown_check(user))
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
prime()
/obj/item/weapon/grenade/proc/prime()
/obj/item/weapon/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
/obj/item/weapon/grenade/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/screwdriver))
switch(det_time)
if ("1")
det_time = 10
user << "<span class='notice'>You set the [name] for 1 second detonation time.</span>"
if ("10")
det_time = 30
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
if ("30")
det_time = 50
user << "<span class='notice'>You set the [name] for 5 second detonation time.</span>"
if ("50")
det_time = 1
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
add_fingerprint(user)
else
return ..()
/obj/item/weapon/grenade/attack_hand()
walk(src, null, null)
..()
/obj/item/weapon/grenade/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/grenade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
prime()
return 1 //It hit the grenade, not them
@@ -0,0 +1,182 @@
/obj/item/weapon/grenade/plastic
name = "plastic explosive"
desc = "Used to put holes in specific areas without too much extra hole."
icon_state = "plastic-explosive0"
item_state = "plastic-explosive"
flags = NOBLUDGEON
det_time = 10
display_timer = 0
var/atom/target = null
var/image_overlay = null
var/obj/item/device/assembly_holder/nadeassembly = null
var/assemblyattacher
/obj/item/weapon/grenade/plastic/New()
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
..()
/obj/item/weapon/grenade/plastic/Destroy()
qdel(nadeassembly)
nadeassembly = null
target = null
..()
/obj/item/weapon/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/A = I
if(!user.unEquip(I))
return ..()
nadeassembly = A
A.master = src
A.loc = src
assemblyattacher = user.ckey
user << "<span class='notice'>You add [A] to the [name].</span>"
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
update_icon()
return
if(nadeassembly && istype(I, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
update_icon()
return
..()
//assembly stuff
/obj/item/weapon/grenade/plastic/receive_signal()
prime()
/obj/item/weapon/grenade/plastic/Crossed(atom/movable/AM)
if(nadeassembly)
nadeassembly.Crossed(AM)
/obj/item/weapon/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/weapon/grenade/plastic/attack_self(mob/user)
if(nadeassembly)
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
user << "Timer set for [det_time] seconds."
/obj/item/weapon/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (istype(AM, /mob/living/carbon))
return
user << "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>"
if(do_after(user, 50, target = AM))
if(!user.unEquip(src))
return
src.target = AM
loc = null
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [det_time] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
target.add_overlay(image_overlay, 1)
if(!nadeassembly)
user << "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>"
addtimer(src, "prime", det_time*10)
/obj/item/weapon/grenade/plastic/suicide_act(mob/user)
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
message_admins("[key_name(user)] suicided with [src.name] at ([user.x],[user.y],[user.z])")
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above \his head! It looks like \he's going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
var/role = lowertext(user.mind.special_role)
if(role == "traitor" || role == "syndicate")
message_say = "FOR THE SYNDICATE!"
else if(role == "changeling")
message_say = "FOR THE HIVE!"
else if(role == "cultist")
message_say = "FOR NAR-SIE!"
else if(role == "revolutionary" || role == "head revolutionary")
message_say = "VIVA LA REVOLUTION!"
else if(user.mind.gang_datum)
message_say = "[uppertext(user.mind.gang_datum.name)] RULES!"
user.say(message_say)
target = user
sleep(10)
prime()
user.gib(no_brain = 1)
/obj/item/weapon/grenade/plastic/update_icon()
if(nadeassembly)
icon_state = "[item_state]1"
else
icon_state = "[item_state]0"
//////////////////////////
///// The Explosives /////
//////////////////////////
/obj/item/weapon/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
/obj/item/weapon/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!qdeleted(target))
location = get_turf(target)
target.overlays -= image_overlay
target.priority_overlays -= image_overlay
else
location = get_turf(src)
if(location)
location.ex_act(2, target)
explosion(location,0,0,3)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
/obj/item/weapon/grenade/plastic/x4
name = "X4"
desc = "A specialized shaped high explosive breaching charge. Designed to be safer for the user, and less so, for the wall."
var/aim_dir = NORTH
icon_state = "plasticx40"
item_state = "plasticx4"
/obj/item/weapon/grenade/plastic/x4/prime()
var/turf/location
if(target)
if(!qdeleted(target))
location = get_turf(target)
target.overlays -= image_overlay
target.priority_overlays -= image_overlay
else
location = get_turf(src)
if(location)
if(istype(loc, /obj/item/weapon/twohanded/spear))
explosion(location, 0, 2, 3)
else if(target.density)
var/turf/T = get_step(location, aim_dir)
explosion(get_step(T, aim_dir),0,0,3)
explosion(T,0,2,0)
location.ex_act(2, target)
else
explosion(location, 0, 2, 3)
location.ex_act(2, target)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
/obj/item/weapon/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
@@ -0,0 +1,32 @@
/obj/item/weapon/grenade/smokebomb
name = "smoke grenade"
desc = "The word 'Dank' is scribbled on it in crayon."
icon = 'icons/obj/grenade.dmi'
icon_state = "smokewhite"
det_time = 20
item_state = "flashbang"
slot_flags = SLOT_BELT
var/datum/effect_system/smoke_spread/bad/smoke
/obj/item/weapon/grenade/smokebomb/New()
..()
src.smoke = new /datum/effect_system/smoke_spread/bad
src.smoke.attach(src)
/obj/item/weapon/grenade/smokebomb/Destroy()
qdel(smoke)
return ..()
/obj/item/weapon/grenade/smokebomb/prime()
update_mob()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.set_up(4, usr.loc)
smoke.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
qdel(src)
@@ -0,0 +1,45 @@
/obj/item/weapon/grenade/spawnergrenade
desc = "It will unleash unleash an unspecified anomaly into the vicinity."
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
/obj/item/weapon/grenade/spawnergrenade/prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
update_mob()
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_eyes()
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
x.loc = T
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(x, pick(NORTH,SOUTH,EAST,WEST))
// Spawn some hostile syndicate critters
qdel(src)
/obj/item/weapon/grenade/spawnergrenade/manhacks
name = "viscerator delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/carp
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/spawnergrenade/syndiesoap
name = "Mister Scrubby"
spawner_type = /obj/item/weapon/soap/syndie
@@ -0,0 +1,52 @@
/obj/item/weapon/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/weapon/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/weapon/grenade/syndieminibomb/concussion
name = "HE Grenade"
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
icon_state = "concussion"
origin_tech = "materials=3;magnets=4;syndicate=2"
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
name = "frag grenade"
desc = "Fire in the hole."
icon_state = "frag"
/obj/item/weapon/grenade/gluon
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
name = "gluon frag grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "bluefrag"
item_state = "flashbang"
var/freeze_range = 4
var/rad_damage = 35
var/stamina_damage = 30
/obj/item/weapon/grenade/gluon/prime()
update_mob()
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
for(var/turf/T in view(freeze_range,loc))
if(istype(T,/turf/open/floor))
var/turf/open/floor/F = T
F.wet = TURF_WET_PERMAFROST
addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST)
for(var/mob/living/carbon/L in T)
L.adjustStaminaLoss(stamina_damage)
L.bodytemperature -= 230
qdel(src)
@@ -0,0 +1,355 @@
/obj/item/weapon/restraints
breakouttime = 600
//Handcuffs
/obj/item/weapon/restraints/handcuffs
name = "handcuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 0
w_class = 2
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=500)
origin_tech = "engineering=3;combat=3"
breakouttime = 600 //Deciseconds = 60s = 1 minute
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //for disposable cuffs
/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user)
if(!istype(C))
return
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>Uh... how do those things work?!</span>"
apply_cuffs(user,user)
return
if(!C.handcuffed)
if(C.get_num_arms() >= 2)
C.visible_message("<span class='danger'>[user] is trying to put [src.name] on [C]!</span>", \
"<span class='userdanger'>[user] is trying to put [src.name] on [C]!</span>")
playsound(loc, cuffsound, 30, 1, -2)
if(do_mob(user, C, 30) && C.get_num_arms() >= 2)
apply_cuffs(C,user)
user << "<span class='notice'>You handcuff [C].</span>"
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
feedback_add_details("handcuffs","C")
else
feedback_add_details("handcuffs","H")
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C]!</span>"
else
user << "<span class='warning'>[C] doesn't have two hands...</span>"
/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
if(target.handcuffed)
return
if(!user.drop_item() && !dispense)
return
var/obj/item/weapon/restraints/handcuffs/cuffs = src
if(trashtype)
cuffs = new trashtype()
else if(dispense)
cuffs = new type()
cuffs.loc = target
target.handcuffed = cuffs
target.update_handcuffed()
if(trashtype && !dispense)
qdel(src)
return
/obj/item/weapon/restraints/handcuffs/sinew
name = "sinew restraints"
desc = "A pair of restraints fashioned from long strands of flesh."
icon = 'icons/obj/mining.dmi'
icon_state = "sinewcuff"
item_state = "sinewcuff"
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
/obj/item/weapon/restraints/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_red"
item_state = "coil_red"
materials = list(MAT_METAL=150, MAT_GLASS=75)
origin_tech = "engineering=2"
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
var/datum/robot_energy_storage/wirestorage = null
/obj/item/weapon/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
if(!istype(C))
return
if(wirestorage && wirestorage.energy < 15)
user << "<span class='warning'>You need at least 15 wire to restrain [C]!</span>"
return
return ..()
/obj/item/weapon/restraints/handcuffs/cable/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
if(wirestorage)
if(!wirestorage.use_charge(15))
user << "<span class='warning'>You need at least 15 wire to restrain [target]!</span>"
return
return ..(target, user, 1)
return ..()
/obj/item/weapon/restraints/handcuffs/cable/red
icon_state = "cuff_red"
item_state = "coil_red"
/obj/item/weapon/restraints/handcuffs/cable/yellow
icon_state = "cuff_yellow"
item_state = "coil_yellow"
/obj/item/weapon/restraints/handcuffs/cable/blue
icon_state = "cuff_blue"
item_state = "coil_blue"
/obj/item/weapon/restraints/handcuffs/cable/green
icon_state = "cuff_green"
item_state = "coil_green"
/obj/item/weapon/restraints/handcuffs/cable/pink
icon_state = "cuff_pink"
item_state = "coil_pink"
/obj/item/weapon/restraints/handcuffs/cable/orange
icon_state = "cuff_orange"
item_state = "coil_orange"
/obj/item/weapon/restraints/handcuffs/cable/cyan
icon_state = "cuff_cyan"
item_state = "coil_cyan"
/obj/item/weapon/restraints/handcuffs/cable/white
icon_state = "cuff_white"
item_state = "coil_white"
/obj/item/weapon/restraints/handcuffs/alien
icon_state = "handcuffAlien"
/obj/item/weapon/restraints/handcuffs/fake
name = "fake handcuffs"
desc = "Fake handcuffs meant for gag purposes."
breakouttime = 10 //Deciseconds = 1s
/obj/item/weapon/restraints/handcuffs/fake/kinky
name = "kinky handcuffs"
desc = "Fake handcuffs meant for erotic roleplay."
icon_state = "handcuffGag"
/obj/item/weapon/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if (R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
qdel(src)
else
user << "<span class='warning'>You need one rod to make a wired rod!</span>"
return
else if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.amount < 6)
user << "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>"
return
user << "<span class='notice'>You begin to apply [I] to [src]...</span>"
if(do_after(user, 35, target = src))
var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola
M.use(6)
user.put_in_hands(S)
user << "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>"
if(!remove_item_from_storage(user))
user.unEquip(src)
qdel(src)
else
return ..()
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
if(isrobot(user))
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
"<span class='userdanger'>[user] is trying to put zipties on [C]!</span>")
if(do_mob(user, C, 30))
if(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
C.update_handcuffed()
user << "<span class='notice'>You handcuff [C].</span>"
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C]!</span>"
/obj/item/weapon/restraints/handcuffs/cable/zipties
name = "zipties"
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
icon_state = "cuff_white"
item_state = "coil_white"
materials = list()
breakouttime = 450 //Deciseconds = 45s
trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used
/obj/item/weapon/restraints/handcuffs/cable/zipties/used
desc = "A pair of broken zipties."
icon_state = "cuff_white_used"
/obj/item/weapon/restraints/handcuffs/cable/zipties/used/attack()
return
//Legcuffs
/obj/item/weapon/restraints/legcuffs
name = "leg cuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
flags = CONDUCT
throwforce = 0
w_class = 3
origin_tech = "engineering=3;combat=3"
slowdown = 7
breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/weapon/restraints/legcuffs/beartrap
name = "bear trap"
throw_speed = 1
throw_range = 1
icon_state = "beartrap"
desc = "A trap used to catch bears and other legged creatures."
origin_tech = "engineering=4"
var/armed = 0
var/trap_damage = 20
/obj/item/weapon/restraints/legcuffs/beartrap/New()
..()
icon_state = "[initial(icon_state)][armed]"
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
icon_state = "[initial(icon_state)][armed]"
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed && isturf(src.loc))
if(isliving(AM))
var/mob/living/L = AM
var/snap = 0
var/def_zone = "chest"
if(iscarbon(L))
var/mob/living/carbon/C = L
snap = 1
if(!C.lying)
def_zone = pick("l_leg", "r_leg")
if(!C.legcuffed && C.get_num_legs() >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
else if(isanimal(L))
var/mob/living/simple_animal/SA = L
if(!SA.flying && SA.mob_size > MOB_SIZE_TINY)
snap = 1
if(snap)
armed = 0
icon_state = "[initial(icon_state)][armed]"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
"<span class='userdanger'>You trigger \the [src]!</span>")
L.apply_damage(trap_damage,BRUTE, def_zone)
..()
/obj/item/weapon/restraints/legcuffs/beartrap/energy
name = "energy snare"
armed = 1
icon_state = "e_snare"
trap_damage = 0
flags = DROPDEL
/obj/item/weapon/restraints/legcuffs/beartrap/energy/New()
..()
addtimer(src, "dissipate", 100)
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
if(!istype(loc, /mob))
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
qdel(src)
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
Crossed(user) //honk
/obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg
breakouttime = 20 // Cyborgs shouldn't have a strong restraint
/obj/item/weapon/restraints/legcuffs/bola
name = "bola"
desc = "A restraining device designed to be thrown at the target. Upon connecting with said target, it will wrap around their legs, making it difficult for them to move quickly."
icon_state = "bola"
breakouttime = 35//easy to apply, easy to break out of
gender = NEUTER
origin_tech = "engineering=3;combat=1"
var/weaken = 0
/obj/item/weapon/restraints/legcuffs/bola/throw_impact(atom/hit_atom)
if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
return//abort
var/mob/living/carbon/C = hit_atom
if(!C.legcuffed && C.get_num_legs() >= 2)
visible_message("<span class='danger'>\The [src] ensnares [C]!</span>")
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B")
C << "<span class='userdanger'>\The [src] ensnares you!</span>"
C.Weaken(weaken)
/obj/item/weapon/restraints/legcuffs/bola/tactical//traitor variant
name = "reinforced bola"
desc = "A strong bola, made with a long steel chain. It looks heavy, enough so that it could trip somebody."
icon_state = "bola_r"
breakouttime = 70
origin_tech = "engineering=4;combat=3"
weaken = 1
/obj/item/weapon/restraints/legcuffs/bola/energy //For Security
name = "energy bola"
desc = "A specialized hard-light bola designed to ensnare fleeing criminals and aid in arrests."
icon_state = "ebola"
hitsound = 'sound/weapons/taserhit.ogg'
w_class = 2
breakouttime = 60
/obj/item/weapon/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom)
if(iscarbon(hit_atom))
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom))
B.Crossed(hit_atom)
qdel(src)
..()
@@ -0,0 +1,260 @@
/obj/item/weapon/holosign_creator
name = "holographic sign projector"
desc = "A handy-dandy holographic projector that displays a janitorial sign."
icon = 'icons/obj/device.dmi'
icon_state = "signmaker"
item_state = "electronic"
force = 0
w_class = 2
throwforce = 0
throw_speed = 3
throw_range = 7
origin_tech = "magnets=1;programming=3"
flags = NOBLUDGEON
var/list/signs = list()
var/max_signs = 10
var/creation_time = 0 //time to create a holosign in deciseconds.
var/holosign_type = /obj/effect/overlay/holograph/wetsign
var/holocreator_busy = 0 //to prevent placing multiple holo barriers at once
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag)
if(flag)
if(!check_allowed_items(target, 1))
return
var/turf/T = get_turf(target)
var/obj/effect/overlay/holograph/H = locate(holosign_type) in T
if(H)
user << "<span class='notice'>You use [src] to deactivate [H].</span>"
qdel(H)
else
if(!is_blocked_turf(T)) //can't put holograms on a tile that has dense stuff
if(holocreator_busy)
user << "<span class='notice'>[src] is busy creating a hologram.</span>"
return
if(signs.len < max_signs)
playsound(src.loc, 'sound/machines/click.ogg', 20, 1)
if(creation_time)
holocreator_busy = 1
if(!do_after(user, creation_time, target = target))
holocreator_busy = 0
return
holocreator_busy = 0
if(signs.len >= max_signs)
return
if(is_blocked_turf(T)) //don't try to sneak dense stuff on our tile during the wait.
return
H = new holosign_type(get_turf(target), src)
user << "<span class='notice'>You create \a [H] with [src].</span>"
else
user << "<span class='notice'>[src] is projecting at max capacity!</span>"
/obj/item/weapon/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
return
/obj/item/weapon/holosign_creator/attack_self(mob/user)
if(signs.len)
for(var/H in signs)
qdel(H)
user << "<span class='notice'>You clear all active holograms.</span>"
/obj/item/weapon/holosign_creator/security
name = "security holobarrier projector"
desc = "A holographic projector that creates holographic security barriers."
icon_state = "signmaker_sec"
holosign_type = /obj/effect/overlay/holograph/barrier
creation_time = 30
max_signs = 6
/obj/item/weapon/holosign_creator/engineering
name = "engineering holobarrier projector"
desc = "A holographic projector that creates holographic engineering barriers."
icon_state = "signmaker_engi"
holosign_type = /obj/effect/overlay/holograph/barrier/engineering
creation_time = 30
max_signs = 6
/obj/item/weapon/holosign_creator/cyborg
name = "Energy Barrier Projector"
desc = "A holographic projector that creates fragile energy fields"
creation_time = 5
max_signs = 9
holosign_type = /obj/effect/overlay/holograph/barrier/cyborg
var/shock = 0
/obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(shock)
user <<"<span class='notice'>You clear all active holograms, and reset your projector to normal.</span>"
holosign_type = /obj/effect/overlay/holograph/barrier/cyborg
creation_time = 5
if(signs.len)
for(var/H in signs)
qdel(H)
shock = 0
return
else if(R.emagged&&!shock)
user <<"<span class='warning'>You clear all active holograms, and overload your energy projector!</span>"
holosign_type = /obj/effect/overlay/holograph/barrier/cyborg/hacked
creation_time = 30
if(signs.len)
for(var/H in signs)
qdel(H)
shock = 1
return
else
if(signs.len)
for(var/H in signs)
qdel(H)
user << "<span class='notice'>You clear all active holograms.</span>"
if(signs.len)
for(var/H in signs)
qdel(H)
user << "<span class='notice'>You clear all active holograms.</span>"
/obj/effect/overlay/holograph
icon = 'icons/effects/effects.dmi'
anchored = 1
var/holo_integrity = 1
var/obj/item/weapon/holosign_creator/projector
/obj/effect/overlay/holograph/New(loc, source_projector)
if(source_projector)
projector = source_projector
projector.signs += src
..()
/obj/effect/overlay/holograph/Destroy()
if(projector)
projector.signs -= src
projector = null
return ..()
/obj/effect/overlay/holograph/attacked_by(obj/item/I, mob/user)
..()
take_damage(I.force * 0.5, I.damtype)
/obj/effect/overlay/holograph/blob_act(obj/effect/blob/B)
qdel(src)
/obj/effect/overlay/holograph/attack_animal(mob/living/simple_animal/M)
if(!M.melee_damage_upper)
return
attack_generic(5, M)
/obj/effect/overlay/holograph/attack_alien(mob/living/carbon/alien/A)
attack_generic(5, A)
/obj/effect/overlay/holograph/attack_hand(mob/living/user)
attack_generic(1, user)
/obj/effect/overlay/holograph/mech_melee_attack(obj/mecha/M)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
qdel(src)
/obj/effect/overlay/holograph/attack_slime(mob/living/simple_animal/slime/S)
if(S.is_adult)
attack_generic(5, S)
else
attack_generic(2, S)
/obj/effect/overlay/holograph/proc/attack_generic(damage_amount, mob/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] hits [src].</span>", \
"<span class='danger'>You hit [src].</span>" )
take_damage(damage_amount)
/obj/effect/overlay/holograph/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
if(damage && sound_effect)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
if(BURN)
if(damage && sound_effect)
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
else
return
holo_integrity -= damage
if(holo_integrity <= 0)
qdel(src)
/obj/effect/overlay/holograph/hitby(atom/movable/AM)
..()
var/tforce = 1
if(ismob(AM))
tforce = 5
else if(isobj(AM))
var/obj/item/I = AM
tforce = max(1, I.throwforce * 0.2)
take_damage(tforce)
/obj/effect/overlay/holograph/bullet_act(obj/item/projectile/P)
. = ..()
take_damage(P.damage * 0.5, P.damage_type)
/obj/effect/overlay/holograph/wetsign
name = "wet floor sign"
desc = "The words flicker as if they mean nothing."
icon_state = "holosign"
/obj/effect/overlay/holograph/barrier
name = "holo barrier"
desc = "A short holographic barrier which can only be passed by walking."
icon_state = "holosign_sec"
pass_flags = LETPASSTHROW
density = 1
holo_integrity = 4
/obj/effect/overlay/holograph/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(!density)
return 1
if(air_group || (height==0))
return 1
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
return 1
if(iscarbon(mover))
var/mob/living/carbon/C = mover
if(C.m_intent == "walk")
return 1
/obj/effect/overlay/holograph/barrier/engineering
icon_state = "holosign_engi"
/obj/effect/overlay/holograph/barrier/cyborg
name = "Energy Field"
desc = "A fragile energy field that blocks movement"
density = 1
holo_integrity = 1
/obj/effect/overlay/holograph/barrier/CanPass()
return 0
/obj/effect/overlay/holograph/barrier/cyborg/hacked
name = "Charged Energy Field"
desc = "A powerful energy field that blocks movement. Energy arcs off it"
holo_integrity = 3
var/shockcd = 0
/obj/effect/overlay/holograph/barrier/cyborg/hacked/proc/cooldown()
shockcd = FALSE
/obj/effect/overlay/holograph/barrier/cyborg/hacked/attack_hand(mob/living/user)
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(src, "cooldown", 10)
/obj/effect/overlay/holograph/barrier/cyborg/hacked/Bumped(atom/user)
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(src, "cooldown", 10)
@@ -0,0 +1,351 @@
/obj/item/weapon/nullrod
name = "null rod"
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
icon_state = "nullrod"
item_state = "nullrod"
force = 18
throw_speed = 3
throw_range = 4
throwforce = 10
w_class = 1
var/reskinned = FALSE
/obj/item/weapon/nullrod/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is killing \himself with \the [src.name]! It looks like \he's trying to get closer to god!</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/attack_self(mob/user)
if(reskinned)
return
if(user.mind && (user.mind.assigned_role == "Chaplain"))
reskin_holy_weapon(user)
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
var/list/display_names = list()
for(var/V in holy_weapons_list)
var/atom/A = V
display_names += initial(A.name)
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(!src || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
return
var/index = display_names.Find(choice)
var/A = holy_weapons_list[index]
var/obj/item/weapon/nullrod/holy_weapon = new A
feedback_set_details("chaplain_weapon","[choice]")
if(holy_weapon)
holy_weapon.reskinned = TRUE
M.unEquip(src)
M.put_in_active_hand(holy_weapon)
qdel(src)
/obj/item/weapon/nullrod/godhand
icon_state = "disintegrate"
item_state = "disintegrate"
name = "god hand"
desc = "This hand of yours glows with an awesome power!"
flags = ABSTRACT | NODROP | DROPDEL
w_class = 5
hitsound = 'sound/weapons/sear.ogg'
damtype = BURN
attack_verb = list("punched", "cross countered", "pummeled")
/obj/item/weapon/nullrod/staff
icon_state = "godstaff-red"
item_state = "godstaff-red"
name = "red holy staff"
desc = "It has a mysterious, protective aura."
w_class = 5
force = 5
slot_flags = SLOT_BACK
block_chance = 50
var/shield_icon = "shield-red"
/obj/item/weapon/nullrod/staff/worn_overlays(isinhands)
. = list()
if(isinhands)
. += image(icon = 'icons/effects/effects.dmi', icon_state = "[shield_icon]")
/obj/item/weapon/nullrod/staff/blue
name = "blue holy staff"
icon_state = "godstaff-blue"
item_state = "godstaff-blue"
shield_icon = "shield-old"
/obj/item/weapon/nullrod/claymore
icon_state = "claymore"
item_state = "claymore"
name = "holy claymore"
desc = "A weapon fit for a crusade!"
w_class = 5
slot_flags = SLOT_BACK|SLOT_BELT
block_chance = 30
sharpness = IS_SHARP
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/nullrod/claymore/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
return ..()
/obj/item/weapon/nullrod/claymore/darkblade
icon_state = "cultblade"
item_state = "cultblade"
name = "dark blade"
desc = "Spread the glory of the dark gods!"
slot_flags = SLOT_BELT
hitsound = 'sound/hallucinations/growl1.ogg'
/obj/item/weapon/nullrod/claymore/chainsaw_sword
icon_state = "chainswordon"
item_state = "chainswordon"
name = "sacred chainsaw sword"
desc = "Suffer not a heretic to live."
slot_flags = SLOT_BELT
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
/obj/item/weapon/nullrod/claymore/glowing
icon_state = "swordon"
item_state = "swordon"
name = "force weapon"
desc = "The blade glows with the power of faith. Or possibly a battery."
slot_flags = SLOT_BELT
/obj/item/weapon/nullrod/claymore/katana
name = "hanzo steel"
desc = "Capable of cutting clean through a holy claymore."
icon_state = "katana"
item_state = "katana"
slot_flags = SLOT_BELT | SLOT_BACK
/obj/item/weapon/nullrod/claymore/multiverse
name = "extradimensional blade"
desc = "Once the harbringer of a interdimensional war, now a dormant souvenir. Still sharp though."
icon_state = "multiverse"
item_state = "multiverse"
slot_flags = SLOT_BELT
/obj/item/weapon/nullrod/claymore/saber
name = "light energy sword"
hitsound = 'sound/weapons/blade1.ogg'
icon_state = "swordblue"
item_state = "swordblue"
desc = "If you strike me down, I shall become more robust than you can possibly imagine."
slot_flags = SLOT_BELT
/obj/item/weapon/nullrod/claymore/saber/red
name = "dark energy sword"
icon_state = "swordred"
item_state = "swordred"
desc = "Woefully ineffective when used on steep terrain."
/obj/item/weapon/nullrod/claymore/saber/pirate
name = "nautical energy sword"
icon_state = "cutlass1"
item_state = "cutlass1"
desc = "Convincing HR that your religion involved piracy was no mean feat."
/obj/item/weapon/nullrod/sord
name = "\improper UNREAL SORD"
desc = "This thing is so unspeakably HOLY you are having a hard time even holding it."
icon_state = "sord"
item_state = "sord"
slot_flags = SLOT_BELT
force = 4.13
throwforce = 1
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/nullrod/scythe
icon_state = "scythe0"
item_state = "scythe0"
name = "reaper scythe"
desc = "Ask not for whom the bell tolls..."
w_class = 4
armour_penetration = 35
slot_flags = SLOT_BACK
sharpness = IS_SHARP
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/weapon/nullrod/scythe/vibro
icon_state = "hfrequency0"
item_state = "hfrequency1"
name = "high frequency blade"
desc = "Bad references are the DNA of the soul."
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/nullrod/scythe/talking
icon_state = "talking_sword"
item_state = "talking_sword"
name = "possessed blade"
desc = "When the station falls into chaos, it's nice to have a friend by your side."
attack_verb = list("chopped", "sliced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
var/possessed = FALSE
/obj/item/weapon/nullrod/scythe/talking/attack_self(mob/living/user)
if(possessed)
return
user << "You attempt to wake the spirit of the blade..."
possessed = TRUE
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, null, FALSE, 100)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
var/mob/living/simple_animal/shade/S = new(src)
S.real_name = name
S.name = name
S.ckey = theghost.ckey
S.status_flags |= GODMODE
var/input = stripped_input(S,"What are you named?", ,"", MAX_NAME_LEN)
if(src && input)
name = input
S.real_name = input
S.name = input
else
user << "The blade is dormant. Maybe you can try again later."
possessed = FALSE
/obj/item/weapon/nullrod/scythe/talking/Destroy()
for(var/mob/living/simple_animal/shade/S in contents)
S << "You were destroyed!"
qdel(S)
return ..()
/obj/item/weapon/nullrod/hammmer
icon_state = "hammeron"
item_state = "hammeron"
name = "relic war hammer"
desc = "This war hammer cost the chaplain fourty thousand space dollars."
slot_flags = SLOT_BELT
w_class = 5
attack_verb = list("smashed", "bashed", "hammered", "crunched")
/obj/item/weapon/nullrod/chainsaw
name = "chainsaw hand"
desc = "Good? Bad? You're the guy with the chainsaw hand."
icon_state = "chainsaw_on"
item_state = "mounted_chainsaw"
w_class = 5
flags = NODROP | ABSTRACT
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
/obj/item/weapon/nullrod/clown
icon = 'icons/obj/wizard.dmi'
icon_state = "honkrender"
item_state = "render"
name = "clown dagger"
desc = "Used for absolutely hilarious sacrifices."
hitsound = 'sound/items/bikehorn.ogg'
sharpness = IS_SHARP
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/nullrod/whip
name = "holy whip"
desc = "What a terrible night to be on Space Station 13."
icon_state = "chain"
item_state = "chain"
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed")
/obj/item/weapon/nullrod/fedora
name = "atheist's fedora"
desc = "The brim of the hat is as sharp as your wit. Throwing it at someone would hurt almost as much as disproving the existence of God."
icon_state = "fedora"
item_state = "fedora"
slot_flags = SLOT_HEAD
icon = 'icons/obj/clothing/hats.dmi'
force = 0
throw_speed = 4
throw_range = 7
throwforce = 20
/obj/item/weapon/nullrod/armblade
name = "dark blessing"
desc = "Particularly twisted dieties grant gifts of dubious value."
icon_state = "arm_blade"
item_state = "arm_blade"
flags = ABSTRACT | NODROP
w_class = 5
sharpness = IS_SHARP
/obj/item/weapon/nullrod/carp
name = "carp-sie plushie"
desc = "An adorable stuffed toy that resembles the god of all carp. The teeth look pretty sharp. Activate it to recieve the blessing of Carp-Sie."
icon = 'icons/obj/toy.dmi'
icon_state = "carpplushie"
item_state = "carp_plushie"
force = 15
attack_verb = list("bitten", "eaten", "fin slapped")
hitsound = 'sound/weapons/bite.ogg'
var/used_blessing = FALSE
/obj/item/weapon/nullrod/carp/attack_self(mob/living/user)
if(used_blessing)
return
if(user.mind && (user.mind.assigned_role != "Chaplain"))
return
user << "You are blessed by Carp-Sie. Wild space carp will no longer attack you."
user.faction |= "carp"
used_blessing = TRUE
/obj/item/weapon/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking
name = "monk's staff"
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown."
w_class = 4
force = 15
block_chance = 40
slot_flags = SLOT_BACK
sharpness = IS_BLUNT
hitsound = "swing_hit"
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
icon = 'icons/obj/weapons.dmi'
icon_state = "bostaff0"
item_state = "bostaff0"
/obj/item/weapon/nullrod/tribal_knife
icon_state = "crysknife"
item_state = "crysknife"
name = "arrhythmic knife"
w_class = 5
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
sharpness = IS_SHARP
slot_flags = null
flags = HANDSLOW
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/nullrod/pitchfork
icon_state = "pitchfork0"
name = "unholy pitchfork"
w_class = 3
desc = "Holding this makes you look absolutely devilish."
attack_verb = list("poked", "impaled", "pierced", "jabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
/obj/item/weapon/nullrod/tribal_knife/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/weapon/nullrod/tribal_knife/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/nullrod/tribal_knife/process()
slowdown = rand(-2, 2)
@@ -0,0 +1,82 @@
/obj/item/weapon/implant
name = "implant"
icon = 'icons/obj/implants.dmi'
icon_state = "generic" //Shows up as the action button icon
origin_tech = "materials=2;biotech=3;programming=2"
actions_types = list(/datum/action/item_action/hands_free/activate)
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
var/implanted = null
var/mob/living/imp_in = null
item_color = "b"
var/allow_multiple = 0
var/uses = -1
flags = DROPDEL
/obj/item/weapon/implant/proc/trigger(emote, mob/source)
return
/obj/item/weapon/implant/proc/activate()
return
/obj/item/weapon/implant/ui_action_click()
activate("action_button")
//What does the implant do upon injection?
//return 1 if the implant injects
//return -1 if the implant fails to inject
//return 0 if there is no room for implant
/obj/item/weapon/implant/proc/implant(var/mob/source, var/mob/user)
var/obj/item/weapon/implant/imp_e = locate(src.type) in source
if(!allow_multiple && imp_e && imp_e != src)
if(imp_e.uses < initial(imp_e.uses)*2)
if(uses == -1)
imp_e.uses = -1
else
imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
qdel(src)
return 1
else
return 0
src.loc = source
imp_in = source
implanted = 1
if(activated)
for(var/X in actions)
var/datum/action/A = X
A.Grant(source)
if(istype(source, /mob/living/carbon/human))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
if(user)
add_logs(user, source, "implanted", object="[name]")
return 1
/obj/item/weapon/implant/proc/removed(var/mob/source)
src.loc = null
imp_in = null
implanted = 0
for(var/X in actions)
var/datum/action/A = X
A.Grant(source)
if(istype(source, /mob/living/carbon/human))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
/obj/item/weapon/implant/Destroy()
if(imp_in)
removed(imp_in)
return ..()
/obj/item/weapon/implant/proc/get_data()
return "No information available"
/obj/item/weapon/implant/dropped(mob/user)
. = 1
..()
@@ -0,0 +1,68 @@
/obj/item/weapon/implant/chem
name = "chem implant"
desc = "Injects things."
icon_state = "reagents"
origin_tech = "materials=3;biotech=4"
flags = OPENCONTAINER
/obj/item/weapon/implant/chem/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
<b>Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject<BR>
will suffer from an increased appetite.</B><BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal<BR>
the implant releases the chemicals directly into the blood stream.<BR>
<b>Special Features:</b>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.<BR>
Can only be loaded while still in its original case.<BR>
<b>Integrity:</b> Implant will last so long as the subject is alive."}
return dat
/obj/item/weapon/implant/chem/New()
..()
create_reagents(50)
tracked_implants += src
/obj/item/weapon/implant/chem/Destroy()
..()
tracked_implants -= src
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
if(emote == "deathgasp")
activate(reagents.total_volume)
/obj/item/weapon/implant/chem/activate(cause)
if(!cause || !imp_in)
return 0
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
injectamount = reagents.total_volume
else
injectamount = cause
reagents.trans_to(R, injectamount)
R << "<span class='italics'>You hear a faint beep.</span>"
if(!reagents.total_volume)
R << "<span class='italics'>You hear a faint click from your chest.</span>"
qdel(src)
/obj/item/weapon/implantcase/chem
name = "implant case - 'Remote Chemical'"
desc = "A glass case containing a remote chemical implant."
/obj/item/weapon/implantcase/chem/New()
imp = new /obj/item/weapon/implant/chem(src)
..()
/obj/item/weapon/implantcase/chem/attackby(obj/item/weapon/W, mob/user, params)
if(imp)
imp.attackby(W, user, params)
else
return ..()
@@ -0,0 +1,30 @@
/obj/item/weapon/implant/sad_trombone
name = "sad trombone implant"
activated = 0
/obj/item/weapon/implant/sad_trombone/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Honk Co. Sad Trombone Implant<BR>
<b>Life:</b> Activates upon death.<BR>
"}
return dat
/obj/item/weapon/implant/sad_trombone/trigger(emote, mob/source)
if(emote == "deathgasp")
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 0)
/obj/item/weapon/implanter/sad_trombone
name = "implanter (sad_trombone)"
/obj/item/weapon/implanter/sad_trombone/New()
imp = new /obj/item/weapon/implant/sad_trombone(src)
..()
/obj/item/weapon/implantcase/sad_trombone
name = "implant case - 'Sad Trombone'"
desc = "A glass case containing a sad trombone implant."
/obj/item/weapon/implantcase/sad_trombone/New()
imp = new /obj/item/weapon/implant/sad_trombone(src)
..()
@@ -0,0 +1,117 @@
/obj/item/weapon/implant/explosive
name = "microbomb implant"
desc = "And boom goes the weasel."
icon_state = "explosive"
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
var/weak = 2
var/medium = 0.8
var/heavy = 0.4
var/delay = 7
/obj/item/weapon/implant/explosive/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
<b>Life:</b> Activates upon death.<BR>
<b>Important Notes:</b> Explodes<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
"}
return dat
/obj/item/weapon/implant/explosive/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in)
return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No") != "Yes")
return 0
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
imp_in << "<span class='notice'>You activate your [name].</span>"
var/turf/boomturf = get_turf(imp_in)
var/area/A = get_area(boomturf)
message_admins("[key_name_admin(imp_in)]<A HREF='?_src_=holder;adminmoreinfo=\ref[imp_in]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[imp_in]'>FLW</A>) has activated their [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[imp_in.x];Y=[imp_in.y];Z=[imp_in.z]'>[A.name] (JMP)</a>.")
//If the delay is short, just blow up already jeez
if(delay <= 7)
explosion(src,heavy,medium,weak,weak, flame_range = weak)
if(imp_in)
imp_in.gib(1)
qdel(src)
return
timed_explosion()
/obj/item/weapon/implant/explosive/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
imp_e.heavy += heavy
imp_e.medium += medium
imp_e.weak += weak
imp_e.delay += delay
qdel(src)
return 1
return ..()
/obj/item/weapon/implant/explosive/proc/timed_explosion()
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
if(imp_in && !imp_in.stat)
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
imp_in.Weaken(7)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
explosion(src,heavy,medium,weak,weak, flame_range = weak)
if(imp_in)
imp_in.gib(1)
qdel(src)
/obj/item/weapon/implant/explosive/macro
name = "macrobomb implant"
desc = "And boom goes the weasel. And everything else nearby."
icon_state = "explosive"
origin_tech = "materials=3;combat=5;biotech=4;syndicate=5"
weak = 16
medium = 8
heavy = 4
delay = 70
/obj/item/weapon/implant/explosive/macro/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
return 0
imp_e = locate(/obj/item/weapon/implant/explosive) in source
if(imp_e && imp_e != src)
heavy += imp_e.heavy
medium += imp_e.medium
weak += imp_e.weak
delay += imp_e.delay
qdel(imp_e)
return ..()
/obj/item/weapon/implanter/explosive
name = "implanter (explosive)"
/obj/item/weapon/implanter/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
/obj/item/weapon/implantcase/explosive
name = "implant case - 'Explosive'"
desc = "A glass case containing an explosive implant."
/obj/item/weapon/implantcase/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
@@ -0,0 +1,51 @@
/obj/item/weapon/implant/freedom
name = "freedom implant"
desc = "Use this to escape from those evil Red Shirts."
icon_state = "freedom"
item_color = "r"
origin_tech = "combat=5;magnets=3;biotech=4;syndicate=2"
uses = 4
/obj/item/weapon/implant/freedom/activate()
uses--
imp_in << "You feel a faint click."
if(iscarbon(imp_in))
var/mob/living/carbon/C_imp_in = imp_in
C_imp_in.uncuff()
if(!uses)
qdel(src)
/obj/item/weapon/implant/freedom/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Life:</b> optimum 5 uses<BR>
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
<HR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Transmits a specialized cluster of signals to override handcuff locking
mechanisms<BR>
<b>Special Features:</b><BR>
<i>Neuro-Scan</i>- Analyzes certain shadow signals in the nervous system<BR>
<HR>
No Implant Specifics"}
return dat
/obj/item/weapon/implanter/freedom
name = "implanter (freedom)"
/obj/item/weapon/implanter/freedom/New()
imp = new /obj/item/weapon/implant/freedom(src)
..()
/obj/item/weapon/implantcase/freedom
name = "implant case - 'Freedom'"
desc = "A glass case containing a freedom implant."
/obj/item/weapon/implantcase/freedom/New()
imp = new /obj/item/weapon/implant/freedom(src)
..()
@@ -0,0 +1,40 @@
/obj/item/weapon/implant/krav_maga
name = "krav maga implant"
desc = "Teaches you the arts of Krav Maga in 5 short instructional videos beamed directly into your eyeballs."
icon = 'icons/obj/wizard.dmi'
icon_state ="scroll2"
activated = 1
origin_tech = "materials=2;biotech=4;combat=5;syndicate=4"
var/datum/martial_art/krav_maga/style = new
/obj/item/weapon/implant/krav_maga/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Krav Maga Implant<BR>
<b>Life:</b> 4 hours after death of host<BR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Teaches even the clumsiest host the arts of Krav Maga."}
return dat
/obj/item/weapon/implant/krav_maga/activate()
var/mob/living/carbon/human/H = imp_in
if(!ishuman(H))
return
if(istype(H.martial_art, /datum/martial_art/krav_maga))
style.remove(H)
else
style.teach(H,1)
/obj/item/weapon/implanter/krav_maga
name = "implanter (krav maga)"
/obj/item/weapon/implanter/krav_maga/New()
imp = new /obj/item/weapon/implant/krav_maga(src)
..()
/obj/item/weapon/implantcase/krav_maga
name = "implant case - 'Krav Maga'"
desc = "A glass case containing an implant that can teach the user the arts of Krav Maga."
/obj/item/weapon/implantcase/krav_maga/New()
imp = new /obj/item/weapon/implant/krav_maga(src)
..()
@@ -0,0 +1,65 @@
/obj/item/weapon/implant/mindshield
name = "mindshield implant"
desc = "Protects against brainwashing."
origin_tech = "materials=2;biotech=4;programming=4"
activated = 0
/obj/item/weapon/implant/mindshield/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
<b>Life:</b> Ten years.<BR>
<b>Important Notes:</b> Personnel injected with this device are much more resistant to brainwashing.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that protects the host's mental functions from manipulation.<BR>
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat
/obj/item/weapon/implant/mindshield/implant(mob/target)
if(..())
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.get_gang_bosses())))
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
removed(target, 1)
qdel(src)
return -1
if(target.mind in ticker.mode.get_gangsters())
ticker.mode.remove_gangster(target.mind)
target.visible_message("<span class='warning'>[src] was destroyed in the process!</span>", "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>")
removed(target, 1)
qdel(src)
return -1
if(target.mind in ticker.mode.revolutionaries)
ticker.mode.remove_revolutionary(target.mind)
if((target.mind in ticker.mode.cult) || (target.mind in ticker.mode.blue_deity_prophets|ticker.mode.red_deity_prophets|ticker.mode.red_deity_followers|ticker.mode.blue_deity_followers))
target << "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>"
else
target << "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>"
return 1
return 0
/obj/item/weapon/implant/mindshield/removed(mob/target, var/silent = 0)
if(..())
if(target.stat != DEAD && !silent)
target << "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>"
return 1
return 0
/obj/item/weapon/implanter/mindshield
name = "implanter (mindshield)"
/obj/item/weapon/implanter/mindshield/New()
imp = new /obj/item/weapon/implant/mindshield(src)
..()
update_icon()
/obj/item/weapon/implantcase/mindshield
name = "implant case - 'Mindshield'"
desc = "A glass case containing a mindshield implant."
/obj/item/weapon/implantcase/mindshield/New()
imp = new /obj/item/weapon/implant/mindshield(src)
..()
@@ -0,0 +1,63 @@
/obj/item/weapon/implant/weapons_auth
name = "firearms authentication implant"
desc = "Lets you shoot your guns"
icon_state = "auth"
origin_tech = "magnets=2;programming=7;biotech=5;syndicate=5"
activated = 0
/obj/item/weapon/implant/weapons_auth/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Firearms Authentication Implant<BR>
<b>Life:</b> 4 hours after death of host<BR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Allows operation of implant-locked weaponry, preventing equipment from falling into enemy hands."}
return dat
/obj/item/weapon/implant/adrenalin
name = "adrenal implant"
desc = "Removes all stuns and knockdowns."
icon_state = "adrenal"
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
uses = 3
/obj/item/weapon/implant/adrenalin/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Cybersun Industries Adrenaline Implant<BR>
<b>Life:</b> Five days.<BR>
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
<HR>
<b>Implant Details:</b> Subjects injected with implant can activate an injection of medical cocktails.<BR>
<b>Function:</b> Removes stuns, increases speed, and has a mild healing effect.<BR>
<b>Integrity:</b> Implant can only be used three times before reserves are depleted."}
return dat
/obj/item/weapon/implant/adrenalin/activate()
uses--
imp_in << "<span class='notice'>You feel a sudden surge of energy!</span>"
imp_in.SetStunned(0)
imp_in.SetWeakened(0)
imp_in.SetParalysis(0)
imp_in.adjustStaminaLoss(-75)
imp_in.lying = 0
imp_in.update_canmove()
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
imp_in.reagents.add_reagent("stimulants", 10)
if(!uses)
qdel(src)
/obj/item/weapon/implant/emp
name = "emp implant"
desc = "Triggers an EMP."
icon_state = "emp"
origin_tech = "biotech=3;magnets=4;syndicate=1"
uses = 3
/obj/item/weapon/implant/emp/activate()
uses--
empulse(imp_in, 3, 5)
if(!uses)
qdel(src)
@@ -0,0 +1,51 @@
/obj/item/weapon/storage/internal/implant
name = "bluespace pocket"
max_w_class = 3
max_combined_w_class = 6
cant_hold = list(/obj/item/weapon/disk/nuclear)
silent = 1
/obj/item/weapon/implant/storage
name = "storage implant"
desc = "Stores up to two big items in a bluespace pocket."
icon_state = "storage"
origin_tech = "materials=2;magnets=4;bluespace=5;syndicate=4"
item_color = "r"
var/obj/item/weapon/storage/internal/implant/storage
/obj/item/weapon/implant/storage/New()
..()
storage = new /obj/item/weapon/storage/internal/implant(src)
/obj/item/weapon/implant/storage/activate()
storage.MouseDrop(imp_in)
/obj/item/weapon/implant/storage/removed(source)
if(..())
storage.close_all()
for(var/obj/item/I in storage)
storage.remove_from_storage(I, get_turf(source))
return 1
/obj/item/weapon/implant/storage/implant(mob/source)
var/obj/item/weapon/implant/storage/imp_e = locate(src.type) in source
if(imp_e)
imp_e.storage.storage_slots += storage.storage_slots
imp_e.storage.max_combined_w_class += storage.max_combined_w_class
imp_e.storage.contents += storage.contents
storage.close_all()
storage.show_to(source)
qdel(src)
return 1
return ..()
/obj/item/weapon/implanter/storage
name = "implanter (storage)"
/obj/item/weapon/implanter/storage/New()
imp = new /obj/item/weapon/implant/storage(src)
..()
@@ -0,0 +1,37 @@
/obj/item/weapon/implant/tracking
name = "tracking implant"
desc = "Track with this."
activated = 0
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
/obj/item/weapon/implant/tracking/New()
..()
tracked_implants += src
/obj/item/weapon/implant/tracking/Destroy()
..()
tracked_implants -= src
/obj/item/weapon/implanter/tracking/New()
imp = new /obj/item/weapon/implant/tracking( src )
..()
/obj/item/weapon/implanter/tracking/gps/New()
imp = new /obj/item/device/gps/mining/internal( src )
..()
/obj/item/weapon/implant/tracking/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Tracking Beacon<BR>
<b>Life:</b> 10 minutes after death of host<BR>
<b>Important Notes:</b> None<BR>
<HR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Continuously transmits low power signal. Useful for tracking.<BR>
<b>Special Features:</b><BR>
<i>Neuro-Safe</i>- Specialized shell absorbs excess voltages self-destructing the chip if
a malfunction occurs thereby securing safety of subject. The implant will melt and
disintegrate into bio-safe elements.<BR>
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
circuitry. As a result neurotoxins can cause massive damage."}
return dat
@@ -0,0 +1,88 @@
/obj/item/weapon/implantcase
name = "implant case"
desc = "A glass case containing an implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-0"
item_state = "implantcase"
throw_speed = 2
throw_range = 5
w_class = 1
origin_tech = "materials=1;biotech=2"
materials = list(MAT_GLASS=500)
var/obj/item/weapon/implant/imp = null
/obj/item/weapon/implantcase/update_icon()
if(imp)
icon_state = "implantcase-[imp.item_color]"
origin_tech = imp.origin_tech
reagents = imp.reagents
else
icon_state = "implantcase-0"
origin_tech = initial(origin_tech)
reagents = null
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "implant case - '[t]'"
else
name = "implant case"
else if(istype(W, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/I = W
if(I.imp)
if(imp || I.imp.implanted)
return
I.imp.loc = src
imp = I.imp
I.imp = null
update_icon()
I.update_icon()
else
if(imp)
if(I.imp)
return
imp.loc = I
I.imp = imp
imp = null
update_icon()
I.update_icon()
else
return ..()
/obj/item/weapon/implantcase/New()
..()
update_icon()
/obj/item/weapon/implantcase/tracking
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
/obj/item/weapon/implantcase/tracking/New()
imp = new /obj/item/weapon/implant/tracking(src)
..()
/obj/item/weapon/implantcase/weapons_auth
name = "implant case - 'Firearms Authentication'"
desc = "A glass case containing a firearms authentication implant."
/obj/item/weapon/implantcase/weapons_auth/New()
imp = new /obj/item/weapon/implant/weapons_auth(src)
..()
/obj/item/weapon/implantcase/adrenaline
name = "implant case - 'Adrenaline'"
desc = "A glass case containing an adrenaline implant."
/obj/item/weapon/implantcase/adrenaline/New()
imp = new /obj/item/weapon/implant/adrenalin(src)
..()
@@ -0,0 +1,147 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/machinery/implantchair
name = "mindshield implanter"
desc = "Used to implant occupants with mindshield implants."
icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
density = 1
opacity = 0
anchored = 1
var/ready = 1
var/malfunction = 0
var/list/obj/item/weapon/implant/mindshield/implant_list = list()
var/max_implants = 5
var/injection_cooldown = 600
var/replenish_cooldown = 6000
var/replenishing = 0
var/injecting = 0
/obj/machinery/implantchair/proc
go_out()
put_mob(mob/living/carbon/M)
implant(var/mob/M)
add_implants()
/obj/machinery/implantchair/New()
..()
add_implants()
/obj/machinery/implantchair/attack_hand(mob/user)
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
var/dat ="<B>Implanter Status</B><BR>"
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")
/obj/machinery/implantchair/Topic(href, href_list)
if(..())
return
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(injection_cooldown)
ready = 1
if(href_list["replenish"])
ready = 0
spawn(replenish_cooldown)
add_implants()
ready = 1
updateUsrDialog()
/obj/machinery/implantchair/go_out(mob/M)
if(!occupant)
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
occupant.loc = loc
occupant.reset_perspective(null)
if(injecting)
implant(src.occupant)
injecting = 0
occupant = null
icon_state = "implantchair"
return
/obj/machinery/implantchair/put_mob(mob/living/carbon/M)
if(!iscarbon(M))
usr << "<span class='warning'>The [src.name] cannot hold this!</span>"
return
if(src.occupant)
usr << "<span class='warning'>The [src.name] is already occupied!</span>"
return
M.stop_pulling()
M.loc = src
M.reset_perspective(src)
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
/obj/machinery/implantchair/implant(mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len)
return
for(var/obj/item/weapon/implant/mindshield/imp in implant_list)
if(!imp)
continue
if(istype(imp, /obj/item/weapon/implant/mindshield))
M.visible_message("<span class='warning'>[M] has been implanted by the [src.name].</span>")
if(imp.implant(M))
implant_list -= imp
break
return
/obj/machinery/implantchair/add_implants()
for(var/i=0, i<src.max_implants, i++)
var/obj/item/weapon/implant/mindshield/I = new /obj/item/weapon/implant/mindshield(src)
implant_list += I
return
/obj/machinery/implantchair/verb/get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out(usr)
add_fingerprint(usr)
return
/obj/machinery/implantchair/verb/move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
return
put_mob(usr)
return
@@ -0,0 +1,77 @@
/obj/item/weapon/implanter
name = "implanter"
desc = "A sterile automatic implant injector."
icon = 'icons/obj/items.dmi'
icon_state = "implanter0"
item_state = "syringe_0"
throw_speed = 3
throw_range = 5
w_class = 2
origin_tech = "materials=2;biotech=3"
materials = list(MAT_METAL=600, MAT_GLASS=200)
var/obj/item/weapon/implant/imp = null
/obj/item/weapon/implanter/update_icon()
if(imp)
icon_state = "implanter1"
origin_tech = imp.origin_tech
else
icon_state = "implanter0"
origin_tech = initial(origin_tech)
/obj/item/weapon/implanter/attack(mob/living/carbon/M, mob/user)
if(!iscarbon(M))
return
if(user && imp)
if(M != user)
M.visible_message("<span class='warning'>[user] is attemping to implant [M].</span>")
var/turf/T = get_turf(M)
if(T && (M == user || do_after(user, 50)))
if(user && M && (get_turf(M) == T) && src && imp)
if(imp.implant(M, user))
if (M == user)
user << "<span class='notice'>You implant yourself.</span>"
else
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
imp = null
update_icon()
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "implanter ([t])"
else
name = "implanter"
else
return ..()
/obj/item/weapon/implanter/New()
..()
spawn(1)
update_icon()
/obj/item/weapon/implanter/adrenalin
name = "implanter (adrenalin)"
/obj/item/weapon/implanter/adrenalin/New()
imp = new /obj/item/weapon/implant/adrenalin(src)
..()
/obj/item/weapon/implanter/emp
name = "implanter (EMP)"
/obj/item/weapon/implanter/emp/New()
imp = new /obj/item/weapon/implant/emp(src)
..()
@@ -0,0 +1,76 @@
/obj/item/weapon/implantpad
name = "implantpad"
desc = "Used to modify implants."
icon = 'icons/obj/items.dmi'
icon_state = "implantpad-0"
item_state = "electronic"
throw_speed = 3
throw_range = 5
w_class = 2
var/obj/item/weapon/implantcase/case = null
var/broadcasting = null
var/listening = 1
/obj/item/weapon/implantpad/update_icon()
if(case)
icon_state = "implantpad-1"
else
icon_state = "implantpad-0"
/obj/item/weapon/implantpad/attack_hand(mob/user)
if(case && (user.l_hand == src || user.r_hand == src))
user.put_in_active_hand(case)
case.add_fingerprint(user)
case = null
add_fingerprint(user)
update_icon()
else
return ..()
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C, mob/user, params)
if(istype(C, /obj/item/weapon/implantcase))
if(!case)
if(!user.unEquip(C))
return
C.loc = src
case = C
update_icon()
else
return ..()
/obj/item/weapon/implantpad/attack_self(mob/user)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if(case)
if(case.imp)
if(istype(case.imp, /obj/item/weapon/implant))
dat += case.imp.get_data()
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
/obj/item/weapon/implantpad/Topic(href, href_list)
..()
if(usr.stat)
return
if((usr.contents.Find(src)) || ((in_range(src, usr) && istype(loc, /turf))))
usr.set_machine(src)
if(istype(loc, /mob))
attack_self(loc)
else
for(var/mob/M in viewers(1, src))
if(M.client)
attack_self(M)
add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
@@ -0,0 +1,34 @@
/obj/item/weapon/implant/uplink
name = "uplink implant"
desc = "Sneeki breeki."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
/obj/item/weapon/implant/uplink/New()
hidden_uplink = new(src)
hidden_uplink.telecrystals = 10
..()
/obj/item/weapon/implant/uplink/implant(mob/user)
var/obj/item/weapon/implant/imp_e = locate(src.type) in user
if(imp_e && imp_e != src)
imp_e.hidden_uplink.telecrystals += hidden_uplink.telecrystals
qdel(src)
return 1
if(..())
hidden_uplink.owner = "[user.key]"
return 1
return 0
/obj/item/weapon/implant/uplink/activate()
if(hidden_uplink)
hidden_uplink.interact(usr)
/obj/item/weapon/implanter/uplink
name = "implanter (uplink)"
/obj/item/weapon/implanter/uplink/New()
imp = new /obj/item/weapon/implant/uplink(src)
..()
+154
View File
@@ -0,0 +1,154 @@
/* Kitchen tools
* Contains:
* Fork
* Kitchen knives
* Ritual Knife
* Butcher's cleaver
* Combat Knife
* Rolling Pins
*/
/obj/item/weapon/kitchen
icon = 'icons/obj/kitchen.dmi'
origin_tech = "materials=1"
/obj/item/weapon/kitchen/fork
name = "fork"
desc = "Pointy."
icon_state = "fork"
force = 5
w_class = 1
throwforce = 0
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=80)
flags = CONDUCT
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
var/datum/reagent/forkload //used to eat omelette
/obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
if(forkload)
if(M == user)
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
M.reagents.add_reagent(forkload.id, 1)
else
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
M.reagents.add_reagent(forkload.id, 1)
icon_state = "fork"
forkload = null
else if(user.zone_selected == "eyes")
if(user.disabilities & CLUMSY && prob(50))
M = user
return eyestab(M,user)
else
return ..()
/obj/item/weapon/kitchen/knife
name = "kitchen knife"
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = CONDUCT
force = 10
w_class = 2
throwforce = 10
hitsound = 'sound/weapons/bladeslice.ogg'
throw_speed = 3
throw_range = 6
materials = list(MAT_METAL=12000)
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = IS_SHARP_ACCURATE
/obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
if(user.zone_selected == "eyes")
if(user.disabilities & CLUMSY && prob(50))
M = user
return eyestab(M,user)
else
return ..()
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"))
return (BRUTELOSS)
/obj/item/weapon/kitchen/knife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
w_class = 3
/obj/item/weapon/kitchen/knife/butcher
name = "butcher's cleaver"
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown by-products."
flags = CONDUCT
force = 15
throwforce = 10
materials = list(MAT_METAL=18000)
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = 3
/obj/item/weapon/kitchen/knife/combat
name = "combat knife"
icon_state = "buckknife"
item_state = "knife"
desc = "A military combat utility survival knife."
force = 20
throwforce = 20
origin_tech = "materials=3;combat=4"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
/obj/item/weapon/kitchen/knife/combat/survival
name = "survival knife"
icon_state = "survivalknife"
desc = "A hunting grade survival knife."
force = 15
throwforce = 15
/obj/item/weapon/kitchen/knife/combat/bone
name = "bone dagger"
item_state = "bone_dagger"
icon_state = "bone_dagger"
desc = "A sharpened bone. The bare mimimum in survival."
force = 15
throwforce = 15
/obj/item/weapon/kitchen/knife/combat/cyborg
name = "cyborg knife"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "knife"
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
origin_tech = null
/obj/item/weapon/kitchen/knife/carrotshiv
name = "carrot shiv"
icon_state = "carrotshiv"
item_state = "carrotshiv"
desc = "Unlike other carrots, you should probably keep this far away from your eyes."
force = 8
throwforce = 12//fuck git
materials = list()
origin_tech = "biotech=3;combat=2"
attack_verb = list("shanked", "shivved")
/obj/item/weapon/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8
throwforce = 5
throw_speed = 3
throw_range = 7
w_class = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/* Trays moved to /obj/item/weapon/storage/bag */
+958
View File
@@ -0,0 +1,958 @@
/*********************MANUALS (BOOKS)***********************/
//Oh god what the fuck I am not good at computer
/obj/item/weapon/book/manual
icon = 'icons/obj/library.dmi'
due_date = 0 // Game time in 1/10th seconds
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
/obj/item/weapon/book/manual/engineering_particle_accelerator
name = "Particle Accelerator User's Guide"
icon_state ="bookParticleAccelerator"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Particle Accelerator User's Guide"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h3>Experienced user's guide</h3>
<h4>Setting up</h4>
<ol>
<li><b>Wrench</b> all pieces to the floor</li>
<li>Add <b>wires</b> to all the pieces</li>
<li>Close all the panels with your <b>screwdriver</b></li>
</ol>
<h4>Use</h4>
<ol>
<li>Open the control panel</li>
<li>Set the speed to 2</li>
<li>Start firing at the singularity generator</li>
<li><font color='red'><b>When the singularity reaches a large enough size so it starts moving on it's own set the speed down to 0, but don't shut it off</b></font></li>
<li>Remember to wear a radiation suit when working with this machine... we did tell you that at the start, right?</li>
</ol>
</body>
</html>"}
/obj/item/weapon/book/manual/engineering_singularity_safety
name = "Singularity Safety in Special Circumstances"
icon_state ="bookEngineeringSingularitySafety"
author = "Engineering Encyclopedia" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Singularity Safety in Special Circumstances"
//big pile of shit below.
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h3>Singularity Safety in Special Circumstances</h3>
<h4>Power outage</h4>
A power problem has made the entire station lose power? Could be station-wide wiring problems or syndicate power sinks. In any case follow these steps:
<p>
<b>Step one:</b> <b><font color='red'>PANIC!</font></b><br>
<b>Step two:</b> Get your ass over to engineering! <b>QUICKLY!!!</b><br>
<b>Step three:</b> Make sure the SMES is still powering the emitters, if not, setup the generator in secure storage and disconnect the emitters from the SMES.<br>
<b>Step four:</b> Next, head over to the APC and swipe it with your <b>ID card</b> - if it doesn't unlock, continue with step 15.<br>
<b>Step five:</b> Open the console and disengage the cover lock.<br>
<b>Step six:</b> Pry open the APC with a <b>Crowbar.</b><br>
<b>Step seven:</b> Take out the empty <b>power cell.</b><br>
<b>Step eight:</b> Put in the new, <b>full power cell</b> - if you don't have one, continue with step 15.<br>
<b>Step nine:</b> Quickly put on a <b>Radiation suit.</b><br>
<b>Step ten:</b> Check if the <b>singularity field generators</b> withstood the down-time - if they didn't, continue with step 15.<br>
<b>Step eleven:</b> Since disaster was averted you now have to ensure it doesn't repeat. If it was a powersink which caused it and if the engineering apc is wired to the same powernet, which the powersink is on, you have to remove the piece of wire which links the apc to the powernet. If it wasn't a powersink which caused it, then skip to step 14.<br>
<b>Step twelve:</b> Grab your crowbar and pry away the tile closest to the APC.<br>
<b>Step thirteen:</b> Use the wirecutters to cut the wire which is conecting the grid to the terminal. <br>
<b>Step fourteen:</b> Go to the bar and tell the guys how you saved them all. Stop reading this guide here.<br>
<b>Step fifteen:</b> <b>GET THE FUCK OUT OF THERE!!!</b><br>
</p>
<h4>Shields get damaged</h4>
Step one: <b>GET THE FUCK OUT OF THERE!!! FORGET THE WOMEN AND CHILDREN, SAVE YOURSELF!!!</b><br>
</body>
</html>
"}
/obj/item/weapon/book/manual/hydroponics_pod_people
name = "The Human Harvest - From seed to market"
icon_state ="bookHydroponicsPodPeople"
author = "Farmer John"
title = "The Human Harvest - From seed to market"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h3>Growing Humans</h3>
Why would you want to grow humans? Well I'm expecting most readers to be in the slave trade, but a few might actually
want to revive fallen comrades. Growing pod people is easy, but prone to disaster.
<p>
<ol>
<li>Find a dead person who is in need of cloning. </li>
<li>Take a blood sample with a syringe. </li>
<li>Inject a seed pack with the blood sample. </li>
<li>Plant the seeds. </li>
<li>Tend to the plants water and nutrition levels until it is time to harvest the cloned human.</li>
</ol>
<p>
It really is that easy! Good luck!
</body>
</html>
"}
/obj/item/weapon/book/manual/medical_cloning
name = "Cloning techniques of the 26th century"
icon_state ="bookCloning"
author = "Medical Journal, volume 3" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "Cloning techniques of the 26th century"
//big pile of shit below.
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<H3>How to Clone People</H3>
So theres 50 dead people lying on the floor, chairs are spinning like no tomorrow and you havent the foggiest idea of what to do? Not to worry! This guide is intended to teach you how to clone people and how to do it right, in a simple step-by-step process! If at any point of the guide you have a mental meltdown, genetics probably isnt for you and you should get a job-change as soon as possible before youre sued for malpractice.
<ol>
<li><a href='#1'>Acquire body</a></li>
<li><a href='#2'>Strip body</a></li>
<li><a href='#3'>Put body in cloning machine</a></li>
<li><a href='#4'>Scan body</a></li>
<li><a href='#5'>Clone body</a></li>
<li><a href='#6'>Get clean Structurel Enzymes for the body</a></li>
<li><a href='#7'>Put body in morgue</a></li>
<li><a href='#8'>Await cloned body</a></li>
<li><a href='#9'>Use the clean SW injector</a></li>
<li><a href='#10'>Give person clothes back</a></li>
<li><a href='#11'>Send person on their way</a></li>
</ol>
<a name='1'><H4>Step 1: Acquire body</H4>
This is pretty much vital for the process because without a body, you cannot clone it. Usually, bodies will be brought to you, so you do not need to worry so much about this step. If you already have a body, great! Move on to the next step.
<a name='2'><H4>Step 2: Strip body</H4>
The cloning machine does not like abiotic items. What this means is you cant clone anyone if theyre wearing clothes, so take all of it off. If its just one person, its courteous to put their possessions in the closet. If you have about seven people awaiting cloning, just leave the piles where they are, but dont mix them around and for Gods sake dont let the Clown in to steal them.
<a name='3'><H4>Step 3: Put body in cloning machine</H4>
Grab the body and then put it inside the DNA modifier. If you cannot do this, then you messed up at Step 2. Go back and check you took EVERYTHING off - a commonly missed item is their headset.
<a name='4'><H4>Step 4: Scan body</H4>
Go onto the computer and scan the body by pressing Scan - <Subject Name Here>. If youre successful, they will be added to the records (note that this can be done at any time, even with living people, so that they can be cloned without a body in the event that they are lying dead on port solars and didnt turn on their suit sensors)! If not, and it says “Error: Mental interface failure.”, then they have left their bodily confines and are one with the spirits. If this happens, just shout at them to get back in their body, click Refresh and try scanning them again. If theres no success, threaten them with gibbing. Still no success? Skip over to Step 7 and dont continue after it, as you have an unresponsive body and it cannot be cloned. If you got “Error: Unable to locate valid genetic data.“, you are trying to clone a monkey - start over.
<a name='5'><H4>Step 5: Clone body</H4>
Now that the body has a record, click View Records, click the subjects name, and then click Clone to start the cloning process. Congratulations! Youre halfway there. Remember not to Eject the cloning pod as this will kill the developing clone and youll have to start the process again.
<a name='6'><H4>Step 6: Get clean SEs for body</H4>
Cloning is a finicky and unreliable process. Whilst it will most certainly bring someone back from the dead, they can have any number of nasty disabilities given to them during the cloning process! For this reason, you need to prepare a clean, defect-free Structural Enzyme (SE) injection for when theyre done. If youre a competent Geneticist, you will already have one ready on your working computer. If, for any reason, you do not, then eject the body from the DNA modifier (NOT THE CLONING POD) and take it next door to the Genetics research room. Put the body in one of those DNA modifiers and then go onto the console. Go into View/Edit/Transfer Buffer, find an open slot and click “SE“ to save it. Then click Injector to get the SEs in syringe form. Put this in your pocket or something for when the body is done.
<a name='7'><H4>Step 7: Put body in morgue</H4>
Now that the cloning process has been initiated and you have some clean Structural Enzymes, you no longer need the body! Drag it to the morgue and tell the Chef over the radio that they have some fresh meat waiting for them in there. To put a body in a morgue bed, simply open the tray, grab the body, put it on the open tray, then close the tray again. Use one of the nearby pens to label the bed “CHEF MEAT” in order to avoid confusion.
<a name='8'><H4>Step 8: Await cloned body</H4>
Now go back to the lab and wait for your patient to be cloned. It wont be long now, I promise.
<a name='9'><H4>Step 9: Use the clean SE injector on person</H4>
Has your body been cloned yet? Great! As soon as the guy pops out, grab your injector and jab it in them. Once youve injected them, they now have clean Structural Enzymes and their defects, if any, will disappear in a short while.
<a name='10'><H4>Step 10: Give person clothes back</H4>
Obviously the person will be naked after they have been cloned. Provided you werent an irresponsible little shit, you should have protected their possessions from thieves and should be able to give them back to the patient. No matter how cruel you are, its simply against protocol to force your patients to walk outside naked.
<a name='11'><H4>Step 11: Send person on their way</H4>
Give the patient one last check-over - make sure they dont still have any defects and that they have all their possessions. Ask them how they died, if they know, so that you can report any foul play over the radio. Once youre done, your patient is ready to go back to work! Chances are they do not have Medbay access, so you should let them out of Genetics and the Medbay main entrance.
<p>If youve gotten this far, congratulations! You have mastered the art of cloning. Now, the real problem is how to resurrect yourself after that traitor had his way with you for cloning his target.
</body>
</html>
"}
/obj/item/weapon/book/manual/ripley_build_and_repair
name = "APLU \"Ripley\" Construction and Operation Manual"
icon_state ="book"
author = "Weyland-Yutani Corp" // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
title = "APLU \"Ripley\" Construction and Operation Manual"
//big pile of shit below.
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<center>
<b style='font-size: 12px;'>Weyland-Yutani - Building Better Worlds</b>
<h1>Autonomous Power Loader Unit \"Ripley\"</h1>
</center>
<h2>Specifications:</h2>
<ul>
<li><b>Class:</b> Autonomous Power Loader</li>
<li><b>Scope:</b> Logistics and Construction</li>
<li><b>Weight:</b> 820kg (without operator and with empty cargo compartment)</li>
<li><b>Height:</b> 2.5m</li>
<li><b>Width:</b> 1.8m</li>
<li><b>Top speed:</b> 5km/hour</li>
<li><b>Operation in vacuum/hostile environment:</b> Possible</b>
<li><b>Airtank Volume:</b> 500liters</li>
<li><b>Devices:</b>
<ul>
<li>Hydraulic Clamp</li>
<li>High-speed Drill</li>
</ul>
</li>
<li><b>Propulsion Device:</b> Powercell-powered electro-hydraulic system.</li>
<li><b>Powercell capacity:</b> Varies.</li>
</ul>
<h2>Construction:</h2>
<ol>
<li>Connect all exosuit parts to the chassis frame</li>
<li>Connect all hydraulic fittings and tighten them up with a wrench</li>
<li>Adjust the servohydraulics with a screwdriver</li>
<li>Wire the chassis. (Cable is not included.)</li>
<li>Use the wirecutters to remove the excess cable if needed.</li>
<li>Install the central control module (Not included. Use supplied datadisk to create one).</li>
<li>Secure the mainboard with a screwdriver.</li>
<li>Install the peripherals control module (Not included. Use supplied datadisk to create one).</li>
<li>Secure the peripherals control module with a screwdriver</li>
<li>Install the internal armor plating (Not included due to Nanotrasen regulations. Can be made using 5 metal sheets.)</li>
<li>Secure the internal armor plating with a wrench</li>
<li>Weld the internal armor plating to the chassis</li>
<li>Install the external reinforced armor plating (Not included due to Nanotrasen regulations. Can be made using 5 reinforced metal sheets.)</li>
<li>Secure the external reinforced armor plating with a wrench</li>
<li>Weld the external reinforced armor plating to the chassis</li>
<li></li>
<li>Additional Information:</li>
<li>The firefighting variation is made in a similar fashion.</li>
<li>A firesuit must be connected to the Firefighter chassis for heat shielding.</li>
<li>Internal armor is plasteel for additional strength.</li>
<li>External armor must be installed in 2 parts, totaling 10 sheets.</li>
<li>Completed mech is more resiliant against fire, and is a bit more durable overall</li>
<li>Nanotrasen is determined to the safety of its <s>investments</s> employees.</li>
</ol>
</body>
</html>
<h2>Operation</h2>
Coming soon...
"}
/obj/item/weapon/book/manual/experimentor
name = "Mentoring your Experiments"
icon_state = "rdbook"
author = "Dr. H.P. Kritz"
title = "Mentoring your Experiments"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h1>THE E.X.P.E.R.I-MENTOR</h1>
The Enhanced Xenobiological Period Extraction (and) Restoration Instructor is a machine designed to discover the secrets behind every item in existence.
With advanced technology, it can process 99.95% of items, and discover their uses and secrets.
The E.X.P.E.R.I-MENTOR is a Research apparatus that takes items, and through a process of elimination, it allows you to deduce new technological designs from them.
Due to the volatile nature of the E.X.P.E.R.I-MENTOR, there is a slight chance for malfunction, potentially causing irreparable damage to you or your environment.
However, upgrading the apparatus has proven to decrease the chances of undesirable, potentially life-threatening outcomes.
Please note that the E.X.P.E.R.I-MENTOR uses a state-of-the-art random generator, which has a larger entropy than the observable universe,
therefore it can generate wildly different results each day, therefore it is highly suggested to re-scan objects of interests frequently (e.g. each shift).
<h2>BASIC PROCESS</h2>
The usage of the E.X.P.E.R.I-MENTOR is quite simple:
<ol>
<li>Find an item with a technological background</li>
<li>Insert the item into the E.X.P.E.R.I-MENTOR</li>
<li>Cycle through each processing method of the device.</li>
<li>Stand back, even in case of a successful experiment, as the machine might produce undesired behaviour.</li>
</ol>
<h2>ADVANCED USAGE</h2>
The E.X.P.E.R.I-MENTOR has a variety of uses, beyond menial research work. The different results can be used to combat localised events, or even to get special items.
The E.X.P.E.R.I-MENTOR's OBLITERATE function has the added use of transferring the destroyed item's material into a linked lathe.
The IRRADIATE function can be used to transform items into other items, resulting in potential upgrades (or downgrades).
Users should remember to always wear appropriate protection when using the machine, because malfunction can occur at any moment!
<h1>EVENTS</h1>
<h2>GLOBAL (happens at any time):</h2>
<ol>
<li>DETECTION MALFUNCTION - The machine's onboard sensors have malfunctioned, causing it to redefine the item's experiment type.
Produces the message: The E.X.P.E.R.I-MENTOR's onboard detection system has malfunctioned!</li>
<li>IANIZATION - The machine's onboard corgi-filter has malfunctioned, causing it to produce a corgi from.. somewhere.
Produces the message: The E.X.P.E.R.I-MENTOR melts the banana, ian-izing the air around it!</li>
<li>RUNTIME ERROR - The machine's onboard C4T-P processor has encountered a critical error, causing it to produce a cat from.. somewhere.
Produces the message: The E.X.P.E.R.I-MENTOR encounters a run-time error!</li>
<li>B100DG0D.EXE - The machine has encountered an unknown subroutine, which has been injected into it's runtime. It upgrades the held item!
Produces the message: The E.X.P.E.R.I-MENTOR improves the banana, drawing the life essence of those nearby!</li>
<li>POWERSINK - The machine's PSU has tripped the charging mechanism! It consumes massive amounts of power!
Produces the message: The E.X.P.E.R.I-MENTOR begins to smoke and hiss, shaking violently!</li>
</ol>
<h2>FAIL:</h2>
This event is produced when the item mismatches the selected experiment.
Produces a random message similar to: "the Banana rumbles, and shakes, the experiment was a failure!"
<h2>POKE:</h2>
<ol>
<li>WILD ARMS - The machine's gryoscopic processors malfunction, causing it to lash out at nearby people with it's arms.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions and destroys the banana, lashing it's arms out at nearby people!</li>
<li>MISTYPE - The machine's interface has been garbled, and it switches to OBLITERATE.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions!</li>
<li>THROW - The machine's spatial recognition device has shifted several meters across the room, causing it to try and repostion the item there.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, throwing the banana!</li>
</ol>
<h2>IRRADIATE:</h2>
<ol>
<li>RADIATION LEAK - The machine's shield has failed, resulting in a toxic radiation leak.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and leaking radiation!</li>
<li>RADIATION DUMP - The machine's recycling and containment functions have failed, resulting in a dump of toxic waste around it
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, spewing toxic waste!</li>
<li>MUTATION - The machine's radio-isotope level meter has malfunctioned, causing it over-irradiate the item, making it transform.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, transforming the banana!</li>
</ol>
<h2>GAS:</h2>
<ol>
<li>TOXIN LEAK - The machine's filtering and vent systems have failed, resulting in a cloud of toxic gas being expelled.
Produces the message: The E.X.P.E.R.I-MENTOR destroys the banana, leaking dangerous gas!</li>
<li>GAS LEAK - The machine's vent systems have failed, resulting in a cloud of harmless, but obscuring gas.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, spewing harmless gas!</li>
<li>ELECTROMAGNETIC IONS - The machine's electrolytic scanners have failed, causing a dangerous Electromagnetic reaction.
Produces the message: The E.X.P.E.R.I-MENTOR melts the banana, ionizing the air around it!</li>
</ol>
<h2>HEAT:</h2>
<ol>
<li>TOASTER - The machine's heating coils have come into contact with the machine's gas storage, causing a large, sudden blast of flame.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and releasing a burst of flame!</li>
<li>SAUNA - The machine's vent loop has sprung a leak, resulting in a large amount of superheated air being dumped around it.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and leaking hot air!</li>
<li>EMERGENCY VENT - The machine's temperature gauge has malfunctioned, resulting in it attempting to cool the area around it, but instead, dumping a cloud of steam.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, activating it's emergency coolant systems!</li>
</ol>
<h2>COLD:</h2>
<ol>
<li>FREEZER - The machine's cooling loop has sprung a leak, resulting in a cloud of super-cooled liquid being blasted into the air.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, shattering the banana and releasing a dangerous cloud of coolant!</li>
<li>FRIDGE - The machine's cooling loop has been exposed to the outside air, resulting in a large decrease in temperature.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, shattering the banana and leaking cold air!</li>
<li>SNOWSTORM - The machine's cooling loop has come into contact with the heating coils, resulting in a sudden blast of cool air.
Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, releasing a flurry of chilly air as the banana pops out!</li>
</ol>
<h2>OBLITERATE:</h2>
<ol>
<li>IMPLOSION - The machine's pressure leveller has malfunctioned, causing it to pierce the space-time momentarily, making everything in the area fly towards it.
Produces the message: The E.X.P.E.R.I-MENTOR's crusher goes way too many levels too high, crushing right through space-time!</li>
<li>DISTORTION - The machine's pressure leveller has completely disabled, resulting in a momentary space-time distortion, causing everything to fly around.
Produces the message: The E.X.P.E.R.I-MENTOR's crusher goes one level too high, crushing right into space-time!</li>
</ol>
</body>
</html>
"}
/obj/item/weapon/book/manual/research_and_development
name = "Research and Development 101"
icon_state = "rdbook"
author = "Dr. L. Ight"
title = "Research and Development 101"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h1>Science For Dummies</h1>
So you want to further SCIENCE? Good man/woman/thing! However, SCIENCE is a complicated process even though it's quite easy. For the most part, it's a three step process:
<ol>
<li> 1) Deconstruct items in the Destructive Analyzer to advance technology or improve the design.</li>
<li> 2) Build unlocked designs in the Protolathe and Circuit Imprinter</li>
<li> 3) Repeat!</li>
</ol>
Those are the basic steps to furthing science. What do you do science with, however? Well, you have four major tools: R&D Console, the Destructive Analyzer, the Protolathe, and the Circuit Imprinter.
<h2>The R&D Console</h2>
The R&D console is the cornerstone of any research lab. It is the central system from which the Destructive Analyzer, Protolathe, and Circuit Imprinter (your R&D systems) are controled. More on those systems in their own sections. On its own, the R&D console acts as a database for all your technological gains and new devices you discover. So long as the R&D console remains intact, you'll retain all that SCIENCE you've discovered. Protect it though, because if it gets damaged, you'll lose your data! In addition to this important purpose, the R&D console has a disk menu that lets you transfer data from the database onto disk or from the disk into the database. It also has a settings menu that lets you re-sync with nearby R&D devices (if they've become disconnected), lock the console from the unworthy, upload the data to all other R&D consoles in the network (all R&D consoles are networked by default), connect/disconnect from the network, and purge all data from the database.
<b>NOTE:</b> The technology list screen, circuit imprinter, and protolathe menus are accessible by non-scientists. This is intended to allow 'public' systems for the plebians to utilize some new devices.
<h2>Destructive Analyzer</h2>
This is the source of all technology. Whenever you put a handheld object in it, it analyzes it and determines what sort of technological advancements you can discover from it. If the technology of the object is equal or higher then your current knowledge, you can destroy the object to further those sciences. Some devices (notably, some devices made from the protolathe and circuit imprinter) aren't 100% reliable when you first discover them. If these devices break down, you can put them into the Destructive Analyzer and improve their reliability rather then futher science. If their reliability is high enough ,it'll also advance their related technologies.
<h2>Circuit Imprinter</h2>
This machine, along with the Protolathe, is used to actually produce new devices. The Circuit Imprinter takes glass and various chemicals (depends on the design) to produce new circuit boards to build new machines or computers. It can even be used to print AI modules.
<h2>Protolathe</h2>
This machine is an advanced form of the Autolathe that produce non-circuit designs. Unlike the Autolathe, it can use processed metal, glass, solid plasma, silver, gold, and diamonds along with a variety of chemicals to produce devices. The downside is that, again, not all devices you make are 100% reliable when you first discover them.
<h1>Reliability and You</h1>
As it has been stated, many devices when they're first discovered do not have a 100% reliablity when you first discover them. Instead, the reliablity of the device is dependent upon a base reliability value, whatever improvements to the design you've discovered through the Destructive Analyzer, and any advancements you've made with the device's source technologies. To be able to improve the reliability of a device, you have to use the device until it breaks beyond repair. Once that happens, you can analyze it in a Destructive Analyzer. Once the device reachs a certain minimum reliability, you'll gain tech advancements from it.
<h1>Building a Better Machine</h1>
Many machines produces from circuit boards and inserted into a machine frame require a variety of parts to construct. These are parts like capacitors, batteries, matter bins, and so forth. As your knowledge of science improves, more advanced versions are unlocked. If you use these parts when constructing something, its attributes may be improved. For example, if you use an advanced matter bin when constructing an autolathe (rather then a regular one), it'll hold more materials. Experiment around with stock parts of various qualities to see how they affect the end results! Be warned, however: Tier 3 and higher stock parts don't have 100% reliability and their low reliability may affect the reliability of the end machine.
</body>
</html>
"}
/obj/item/weapon/book/manual/robotics_cyborgs
name = "Cyborgs for Dummies"
icon_state = "borgbook"
author = "XISC"
title = "Cyborgs for Dummies"
dat = {"<html>
<head>
<style>
h1 {font-size: 21px; margin: 15px 0px 5px;}
h2 {font-size: 18px; margin: 15px 0px 5px;}
h3 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h1>Cyborgs for Dummies</h1>
<h2>Chapters</h2>
<ol>
<li><a href="#Equipment">Cyborg Related Equipment</a></li>
<li><a href="#Modules">Cyborg Modules</a></li>
<li><a href="#Construction">Cyborg Construction</a></li>
<li><a href="#Deconstruction">Cyborg Deconstruction</a></li>
<li><a href="#Maintenance">Cyborg Maintenance</a></li>
<li><a href="#Repairs">Cyborg Repairs</a></li>
<li><a href="#Emergency">In Case of Emergency</a></li>
</ol>
<h2><a name="Equipment">Cyborg Related Equipment</h2>
<h3>Exosuit Fabricator</h3>
The Exosuit Fabricator is the most important piece of equipment related to cyborgs. It allows the construction of the core cyborg parts. Without these machines, cyborgs can not be built. It seems that they may also benefit from advanced research techniques.
<h3>Cyborg Recharging Station</h3>
This useful piece of equipment will suck power out of the power systems to charge a cyborg's power cell back up to full charge.
<h3>Robotics Control Console</h3>
This useful piece of equipment can be used to immobolize or destroy a cyborg. A word of warning: Cyborgs are expensive pieces of equipment, do not destroy them without good reason, or Nanotrasen may see to it that it never happens again.
<h2><a name="Modules">Cyborg Modules</h2>
When a cyborg is created it picks out of an array of modules to designate its purpose. There are 6 different cyborg modules.
<h3>Standard Cyborg</h3>
The standard cyborg module is a multi-purpose cyborg. It is equipped with various modules, allowing it to do basic tasks.<br>
<h3>Engineering Cyborg</h3>
The Engineering cyborg module comes equipped with various engineering-related tools to help with engineering-related tasks.<br>
<h3>Mining Cyborg</h3>
The Mining Cyborg module comes equipped with the latest in mining equipment. They are efficient at mining due to no need for oxygen, but their power cells limit their time in the mines.
<h3>Security Cyborg</h3>
The Security Cyborg module is equipped with effective security measures used to apprehend and arrest criminals without harming them a bit.
<h3>Janitor Cyborg</h3>
The Janitor Cyborg module is equipped with various cleaning-facilitating devices.
<h3>Service Cyborg</h3>
The service cyborg module comes ready to serve your human needs. It includes various entertainment and refreshment devices. Occasionally some service cyborgs may have been referred to as "Bros"
<h2><a name="Construction">Cyborg Construction</h2>
Cyborg construction is a rather easy process, requiring a decent amount of metal and a few other supplies.<br>The required materials to make a cyborg are:
<ul>
<li>Metal</li>
<li>Two Flashes</li>
<li>One Power Cell (Preferrably rated to 15000w)</li>
<li>Some electrical wires</li>
<li>One Human Brain</li>
<li>One Man-Machine Interface</li>
</ul>
Once you have acquired the materials, you can start on construction of your cyborg.<br>To construct a cyborg, follow the steps below:
<ol>
<li>Start the Exosuit Fabricators constructing all of the cyborg parts</li>
<li>While the parts are being constructed, take your human brain, and place it inside the Man-Machine Interface</li>
<li>Once you have a Robot Head, place your two flashes inside the eye sockets</li>
<li>Once you have your Robot Chest, wire the Robot chest, then insert the power cell</li>
<li>Attach all of the Robot parts to the Robot frame</li>
<li>Insert the Man-Machine Interface (With the Brain inside) Into the Robot Body</li>
<li>Congratulations! You have a new cyborg!</li>
</ol>
<h2><a name="Deconstruction">Cyborg Deconstruction</h2>
If you want to deconstruct a cyborg, say to remove its MMI without <a href="#Emergency">blowing the Cyborg to pieces</a>, they come apart very quickly, <b>and</b> very safely, in a few simple steps.
<ul>
<li>Crowbar</li>
<li>Wrench</li>
Optional:
<li>Screwdriver</li>
<li>Wirecutters</li>
</ul>
<ol>
<li>Begin by unlocking the Cyborg's access panel using your ID</li>
<li>Use your crowbar to open the Cyborg's access panel</li>
<li>Using your bare hands, remove the power cell from the Cyborg</li>
<li>Lockdown the Cyborg to disengage safety protocols</li>
<ol>
Option 1: Robotics console
<li>Use the Robotics console in the RD's office</li>
<li>Find the entry for your Cyborg</li>
<li>Press the Lockdown button on the Robotics console</li>
</ol>
<ol>
Option 2: Lockdown wire
<li>Use your screwdriver to expose the Cyborg's wiring</li>
<li>Use your wirecutters to start cutting all of the wires until the lockdown light turns off, cutting all of the wires irregardless of the lockdown light works as well</li>
</ol>
<li>Use your wrench to unfasten the Cyborg's bolts, the Cyborg will then fall apart onto the floor, the MMI will be there as well</li>
</ol>
<h2><a name="Maintenance">Cyborg Maintenance</h2>
Occasionally Cyborgs may require maintenance of a couple types, this could include replacing a power cell with a charged one, or possibly maintaining the cyborg's internal wiring.
<h3>Replacing a Power Cell</h3>
Replacing a Power cell is a common type of maintenance for cyborgs. It usually involves replacing the cell with a fully charged one, or upgrading the cell with a larger capacity cell.<br>The steps to replace a cell are follows:
<ol>
<li>Unlock the Cyborg's Interface by swiping your ID on it</li>
<li>Open the Cyborg's outer panel using a crowbar</li>
<li>Remove the old power cell</li>
<li>Insert the new power cell</li>
<li>Close the Cyborg's outer panel using a crowbar</li>
<li>Lock the Cyborg's Interface by swiping your ID on it, this will prevent non-qualified personnel from attempting to remove the power cell</li>
</ol>
<h3>Exposing the Internal Wiring</h3>
Exposing the internal wiring of a cyborg is fairly easy to do, and is mainly used for cyborg repairs.<br>You can easily expose the internal wiring by following the steps below:
<ol>
<li>Follow Steps 1 - 3 of "Replacing a Cyborg's Power Cell"</li>
<li>Open the cyborg's internal wiring panel by using a screwdriver to unsecure the panel</li>
</ol>
To re-seal the cyborg's internal wiring:
<ol>
<li>Use a screwdriver to secure the cyborg's internal panel</li>
<li>Follow steps 4 - 6 of "Replacing a Cyborg's Power Cell" to close up the cyborg</li>
</ol>
<h2><a name="Repairs">Cyborg Repairs</h2>
Occasionally a Cyborg may become damaged. This could be in the form of impact damage from a heavy or fast-travelling object, or it could be heat damage from high temperatures, or even lasers or Electromagnetic Pulses (EMPs).
<h3>Dents</h3>
If a cyborg becomes damaged due to impact from heavy or fast-moving objects, it will become dented. Sure, a dent may not seem like much, but it can compromise the structural integrity of the cyborg, possibly causing a critical failure.
Dents in a cyborg's frame are rather easy to repair, all you need is to apply a welding tool to the dented area, and the high-tech cyborg frame will repair the dent under the heat of the welder.
<h3>Excessive Heat Damage</h3>
If a cyborg becomes damaged due to excessive heat, it is likely that the internal wires will have been damaged. You must replace those wires to ensure that the cyborg remains functioning properly.<br>To replace the internal wiring follow the steps below:
<ol>
<li>Unlock the Cyborg's Interface by swiping your ID</li>
<li>Open the Cyborg's External Panel using a crowbar</li>
<li>Remove the Cyborg's Power Cell</li>
<li>Using a screwdriver, expose the internal wiring or the Cyborg</li>
<li>Replace the damaged wires inside the cyborg</li>
<li>Secure the internal wiring cover using a screwdriver</li>
<li>Insert the Cyborg's Power Cell</li>
<li>Close the Cyborg's External Panel using a crowbar</li>
<li>Lock the Cyborg's Interface by swiping your ID</li>
</ol>
These repair tasks may seem difficult, but are essential to keep your cyborgs running at peak efficiency.
<h2><a name="Emergency">In Case of Emergency</h2>
In case of emergency, there are a few steps you can take.
<h3>"Rogue" Cyborgs</h3>
If the cyborgs seem to become "rogue", they may have non-standard laws. In this case, use extreme caution.
To repair the situation, follow these steps:
<ol>
<li>Locate the nearest robotics console</li>
<li>Determine which cyborgs are "Rogue"</li>
<li>Press the lockdown button to immobolize the cyborg</li>
<li>Locate the cyborg</li>
<li>Expose the cyborg's internal wiring</li>
<li>Check to make sure the LawSync and AI Sync lights are lit</li>
<li>If they are not lit, pulse the LawSync wire using a multitool to enable the cyborg's Law Sync</li>
<li>Proceed to a cyborg upload console. Nanotrasen usually places these in the same location as AI uplaod consoles.</li>
<li>Use a "Reset" upload moduleto reset the cyborg's laws</li>
<li>Proceed to a Robotics Control console</li>
<li>Remove the lockdown on the cyborg</li>
</ol>
<h3>As a last resort</h3>
If all else fails in a case of cyborg-related emergency. There may be only one option. Using a Robotics Control console, you may have to remotely detonate the cyborg.
<h3>WARNING:</h3> Do not detonate a borg without an explicit reason for doing so. Cyborgs are expensive pieces of Nanotrasen equipment, and you may be punished for detonating them without reason.
</body>
</html>
"}
/obj/item/weapon/book/manual/chef_recipes
name = "Chef Recipes"
icon_state = "cooked_book"
author = "Lord Frenrir Cageth"
title = "Chef Recipes"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h1>Food for Dummies</h1>
Here is a guide on basic food recipes and also how to not poison your customers accidentally.
<h2>Basic ingredients preparation:</h2>
<b>Dough:</b> 10u water + 15u flour for simple dough.<br>
15u egg yolk + 15u flour + 5u sugar for cake batter.<br>
Doughs can be transformed by using a knife and rolling pin.<br>
All doughs can be microwaved.<br>
<b>Bowl:</b> Add water to it for soup preparation.<br>
<b>Meat:</b> Microwave it, process it, slice it into microwavable cutlets with your knife, or use it raw.<br>
<b>Cheese:</b> Add 5u universal enzyme (catalyst) to milk and soy milk to prepare cheese (sliceable) and tofu.<br>
<b>Rice:</b> Mix 10u rice with 10u water in a bowl then microwave it.
<h2>Custom food:</h2>
Add ingredients to a base item to prepare a custom meal.<br>
The bases are:<br>
- bun (burger)<br>
- breadslices(sandwich)<br>
- plain bread<br>
- plain pie<br>
- vanilla cake<br>
- empty bowl (salad)<br>
- bowl with 10u water (soup)<br>
- boiled spaghetti<br>
- pizza bread<br>
- metal rod (kebab)
<h2>Table Craft:</h2>
Put ingredients on table, then click and drag the table onto yourself to see what recipes you can prepare.
<h2>Microwave:</h2>
Use it to cook or boil food ingredients (meats, doughs, egg, spaghetti, donkpocket, etc...).
It can cook multiple items at once.
<h2>Processor:</h2>
Use it to process certain ingredients (meat into faggot, doughslice into spaghetti, potato into fries,etc...)
<h2>Gibber:</h2>
Stuff an animal in it to grind it into meat.
<h2>Meat spike:</h2>
Stick an animal on it then begin collecting its meat.
<h2>Example recipes:</h2>
<b>Vanilla Cake</b>: Microwave cake batter.<br>
<b>Burger:</b> 1 bun + 1 meat steak<br>
<b>Bread:</b> Microwave dough.<br>
<b>Waffles:</b> 2 pastry base<br>
<b>Popcorn:</b> Microwave corn.<br>
<b>Meat Steak:</b> Microwave meat.<br>
<b>Meat Pie:</b> 1 plain pie + 1u black pepper + 1u salt + 2 meat cutlets<br>
<b>Boiled Spagetti:</b> Microwave spaghetti.<br>
<b>Donuts:</b> 1u sugar + 1 pastry base<br>
<b>Fries:</b> Process potato.
<h2>Sharing your food:</h2>
You can put your meals on your kitchen counter or load them in the snack vending machines.
</body>
</html>
"}
/obj/item/weapon/book/manual/barman_recipes
name = "Barman Recipes"
icon_state = "barbook"
author = "Sir John Rose"
title = "Barman Recipes"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h1>Drinks for dummies</h1>
Heres a guide for some basic drinks.
<h2>Manly Dorf:</h2>
Mix ale and beer into a glass.
<h2>Grog:</h2>
Mix rum and water into a glass.
<h2>Black Russian:</h2>
Mix vodka and kahlua into a glass.
<h2>Irish Cream:</h2>
Mix cream and whiskey into a glass.
<h2>Screwdriver:</h2>
Mix vodka and orange juice into a glass.
<h2>Cafe Latte:</h2>
Mix milk and coffee into a glass.
<h2>Mead:</h2>
Mix Enzyme, water and sugar into a glass.
<h2>Gin Tonic:</h2>
Mix gin and tonic into a glass.
<h2>Classic Martini:</h2>
Mix vermouth and gin into a glass.
</body>
</html>
"}
/obj/item/weapon/book/manual/detective
name = "The Film Noir: Proper Procedures for Investigations"
icon_state ="bookDetective"
author = "Nanotrasen"
title = "The Film Noir: Proper Procedures for Investigations"
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
</style>
</head>
<body>
<h3>Detective Work</h3>
Between your bouts of self-narration, and drinking whiskey on the rocks, you might get a case or two to solve.<br>
To have the best chance to solve your case, follow these directions:
<p>
<ol>
<li>Go to the crime scene. </li>
<li>Take your scanner and scan EVERYTHING (Yes, the doors, the tables, even the dog.) </li>
<li>Once you are reasonably certain you have every scrap of evidence you can use, find all possible entry points and scan them, too. </li>
<li>Return to your office. </li>
<li>Using your forensic scanning computer, scan your Scanner to upload all of your evidence into the database.</li>
<li>Browse through the resulting dossiers, looking for the one that either has the most complete set of prints, or the most suspicious items handled. </li>
<li>If you have 80% or more of the print (The print is displayed) go to step 10, otherwise continue to step 8.</li>
<li>Look for clues from the suit fibres you found on your perp, and go about looking for more evidence with this new information, scanning as you go. </li>
<li>Try to get a fingerprint card of your perp, as if used in the computer, the prints will be completed on their dossier.</li>
<li>Assuming you have enough of a print to see it, grab the biggest complete piece of the print and search the security records for it. </li>
<li>Since you now have both your dossier and the name of the person, print both out as evidence, and get security to nab your baddie.</li>
<li>Give yourself a pat on the back and a bottle of the ships finest vodka, you did it!</li>
</ol>
<p>
It really is that easy! Good luck!
</body>
</html>"}
/obj/item/weapon/book/manual/nuclear
name = "Fission Mailed: Nuclear Sabotage 101"
icon_state ="bookNuclear"
author = "Syndicate"
title = "Fission Mailed: Nuclear Sabotage 101"
dat = {"<html>
Nuclear Explosives 101:<br>
Hello and thank you for choosing the Syndicate for your nuclear information needs.<br>
Today's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.<br>
First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.<br>
Pressing any button on the compacted bomb will cause it to extend and bolt itself into place.<br>
If this is done to unbolt it one must completely log in which at this time may not be possible.<br>
To make the nuclear device functional:<br>
<li>Place the nuclear device in the designated detonation zone.</li>
<li>Extend and anchor the nuclear device from its interface.</li>
<li>Insert the nuclear authorisation disk into slot.</li>
<li>Type numeric authorisation code into the keypad. This should have been provided. Note: If you make a mistake press R to reset the device.
<li>Press the E button to log onto the device.</li>
You now have activated the device. To deactivate the buttons at anytime for example when you've already prepped the bomb for detonation remove the auth disk OR press the R on the keypad.<br>
Now the bomb CAN ONLY be detonated using the timer. Manual detonation is not an option.<br>
Note: Nanotrasen is a pain in the neck.<br>
Toggle off the SAFETY.<br>
Note: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step.<br>
So use the - - and + + to set a det time between 5 seconds and 10 minutes.<br>
Then press the timer toggle button to start the countdown.<br>
Now remove the auth. disk so that the buttons deactivate.<br>
Note: THE BOMB IS STILL SET AND WILL DETONATE<br>
Now before you remove the disk if you need to move the bomb you can:<br>
Toggle off the anchor, move it, and re-anchor.<br><br>
Good luck. Remember the order:<br>
<b>Disk, Code, Safety, Timer, Disk, RUN!</b><br>
Intelligence Analysts believe that normal Nanotrasen procedure is for the Captain to secure the nuclear authorisation disk.<br>
Good luck!
</html>"}
// Wiki books that are linked to the configured wiki link.
// A book that links to the wiki
/obj/item/weapon/book/manual/wiki
var/page_link = ""
window_size = "970x710"
/obj/item/weapon/book/manual/wiki/attack_self()
if(!dat)
initialize_wikibook()
..()
/obj/item/weapon/book/manual/wiki/proc/initialize_wikibook()
if(config.wikiurl)
dat = {"
<html><head>
<style>
iframe {
display: none;
}
</style>
</head>
<body>
<script type="text/javascript">
function pageloaded(myframe) {
document.getElementById("loading").style.display = "none";
myframe.style.display = "inline";
}
</script>
<p id='loading'>You start skimming through the manual...</p>
<iframe width='100%' height='97%' onload="pageloaded(this)" src="[config.wikiurl]/[page_link]?printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
"}
/obj/item/weapon/book/manual/wiki/chemistry
name = "Chemistry Textbook"
icon_state ="chemistrybook"
author = "Nanotrasen"
title = "Chemistry Textbook"
page_link = "Guide_to_chemistry"
/obj/item/weapon/book/manual/wiki/engineering_construction
name = "Station Repairs and Construction"
icon_state ="bookEngineering"
author = "Engineering Encyclopedia"
title = "Station Repairs and Construction"
page_link = "Guide_to_construction"
/obj/item/weapon/book/manual/wiki/engineering_guide
name = "Engineering Textbook"
icon_state ="bookEngineering2"
author = "Engineering Encyclopedia"
title = "Engineering Textbook"
page_link = "Guide_to_engineering"
/obj/item/weapon/book/manual/wiki/security_space_law
name = "Space Law"
desc = "A set of Nanotrasen guidelines for keeping law and order on their space stations."
icon_state = "bookSpaceLaw"
author = "Nanotrasen"
title = "Space Law"
page_link = "Space_Law"
/obj/item/weapon/book/manual/wiki/infections
name = "Infections - Making your own pandemic!"
icon_state = "bookInfections"
author = "Infections Encyclopedia"
title = "Infections - Making your own pandemic!"
page_link = "Infections"
/obj/item/weapon/book/manual/wiki/telescience
name = "Teleportation Science - Bluespace for dummies!"
icon_state = "book7"
author = "University of Bluespace"
title = "Teleportation Science - Bluespace for dummies!"
page_link = "Guide_to_telescience"
/obj/item/weapon/book/manual/wiki/engineering_hacking
name = "Hacking"
icon_state ="bookHacking"
author = "Engineering Encyclopedia"
title = "Hacking"
page_link = "Hacking"
@@ -0,0 +1,223 @@
/obj/item/weapon/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = 2
var/w_class_on = 4
heat = 3500
/obj/item/weapon/melee/energy/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting \his stomach open with [src]! It looks like \he's trying to commit seppuku.</span>", \
"<span class='suicide'>[user] is falling on [src]! It looks like \he's trying to commit suicide.</span>"))
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/melee/energy/add_blood(list/blood_dna)
return 0
/obj/item/weapon/melee/energy/is_sharp()
return active * sharpness
/obj/item/weapon/melee/energy/axe
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
force = 40
force_on = 150
throwforce = 25
throwforce_on = 30
hitsound = 'sound/weapons/bladeslice.ogg'
throw_speed = 3
throw_range = 5
w_class = 3
w_class_on = 5
flags = CONDUCT
armour_penetration = 100
origin_tech = "combat=4;magnets=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swings the [src.name] towards \his head! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/melee/energy/sword
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3
throwforce = 5
hitsound = "swing_hit" //it starts deactivated
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
var/hacked = 0
/obj/item/weapon/melee/energy/sword/New()
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>"
user.take_organ_damage(5,5)
active = !active
if (active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
else
icon_state = "sword[item_color]"
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
user << "<span class='notice'>[src] is now active.</span>"
else
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
throw_speed = initial(throw_speed)
if(attack_verb_on.len)
attack_verb = list()
icon_state = initial(icon_state)
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
user << "<span class='notice'>[src] can now be concealed.</span>"
add_fingerprint(user)
/obj/item/weapon/melee/energy/is_hot()
return active * heat
/obj/item/weapon/melee/energy/sword/cyborg
var/hitcost = 50
/obj/item/weapon/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/weapon/stock_parts/cell/C = R.cell
if(active && !(C.use(hitcost)))
attack_self(R)
R << "<span class='notice'>It's out of charge!</span>"
return
..()
return
/obj/item/weapon/melee/energy/sword/cyborg/saw //Used by medical Syndicate cyborgs
name = "energy saw"
desc = "For heavy duty cutting. It has a carbon-fiber blade in addition to a toggleable hard-light edge to dramatically increase sharpness."
icon_state = "esaw"
force_on = 30
force = 18 //About as much as a spear
hitsound = 'sound/weapons/circsawhit.ogg'
icon = 'icons/obj/surgery.dmi'
icon_state = "esaw_0"
icon_state_on = "esaw_1"
hitcost = 75 //Costs more than a standard cyborg esword
item_color = null
w_class = 3
sharpness = IS_SHARP
/obj/item/weapon/melee/energy/sword/cyborg/saw/New()
..()
icon_state = "esaw_0"
item_color = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
return 0
/obj/item/weapon/melee/energy/sword/saber
/obj/item/weapon/melee/energy/sword/saber/blue
item_color = "blue"
/obj/item/weapon/melee/energy/sword/saber/purple
item_color = "purple"
/obj/item/weapon/melee/energy/sword/saber/green
item_color = "green"
/obj/item/weapon/melee/energy/sword/saber/red
item_color = "red"
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
user << "<span class='notice'>You attach the ends of the two \
energy swords, making a single double-bladed weapon! \
You're cool.</span>"
var/obj/item/weapon/melee/energy/sword/saber/other_esword = W
var/obj/item/weapon/twohanded/dualsaber/newSaber = new(user.loc)
if(hacked || other_esword.hacked)
newSaber.hacked = TRUE
newSaber.item_color = "rainbow"
user.unEquip(W)
user.unEquip(src)
qdel(W)
qdel(src)
user.put_in_hands(newSaber)
else if(istype(W, /obj/item/device/multitool))
if(hacked == 0)
hacked = 1
item_color = "rainbow"
user << "<span class='warning'>RNBW_ENGAGE</span>"
if(active)
icon_state = "swordrainbow"
// Updating overlays, copied from welder code.
// I tried calling attack_self twice, which looked cool, except it somehow didn't update the overlays!!
if(user.r_hand == src)
user.update_inv_r_hand(0)
else if(user.l_hand == src)
user.update_inv_l_hand(0)
else
user << "<span class='warning'>It's already fabulous!</span>"
else
return ..()
/obj/item/weapon/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
/obj/item/weapon/melee/energy/sword/pirate/New()
return
/obj/item/weapon/melee/energy/blade
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
force = 30 //Normal attacks deal esword damage
hitsound = 'sound/weapons/blade1.ogg'
active = 1
throwforce = 1//Throwing or dropping the item deletes it.
throw_speed = 3
throw_range = 1
w_class = 4//So you can't hide it in your pocket or some such.
var/datum/effect_system/spark_spread/spark_system
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/melee/energy/blade/dropped()
..()
qdel(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
@@ -0,0 +1,220 @@
/obj/item/weapon/melee
needs_permit = 1
/obj/item/weapon/melee/chainofcommand
name = "chain of command"
desc = "A tool used by great men to placate the frothing masses."
icon_state = "chain"
item_state = "chain"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = 3
origin_tech = "combat=5"
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/slash.ogg' //pls replace
materials = list(MAT_METAL = 1000)
/obj/item/weapon/melee/chainofcommand/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (OXYLOSS)
/obj/item/weapon/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
icon = 'icons/obj/weapons.dmi'
icon_state = "baton"
item_state = "classic_baton"
slot_flags = SLOT_BELT
force = 12 //9 hit crit
w_class = 3
var/cooldown = 0
var/on = 1
/obj/item/weapon/melee/classic_baton/attack(mob/target, mob/living/user)
if(!on)
return ..()
add_fingerprint(user)
if((CLUMSY in user.disabilities) && prob(50))
user << "<span class ='danger'>You club yourself over the head.</span>"
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
else
user.take_organ_damage(2*force)
return
if(isrobot(target))
..()
return
if(!isliving(target))
return
if (user.a_intent == "harm")
if(!..())
return
if(!isrobot(target))
return
else
if(cooldown <= world.time)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if (H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_logs(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with \the [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with \the [src]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
cooldown = world.time + 40
/obj/item/weapon/melee/classic_baton/telescopic
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = null
slot_flags = SLOT_BELT
w_class = 2
needs_permit = 0
force = 0
on = 0
/obj/item/weapon/melee/classic_baton/telescopic/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
var/obj/item/organ/brain/B = H.getorgan(/obj/item/organ/brain)
user.visible_message("<span class='suicide'>[user] stuffs the [src] up their nose and presses the 'extend' button! It looks like they're trying to clear their mind.</span>")
if(!on)
src.attack_self(user)
else
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
sleep(3)
if (H && !qdeleted(H))
if (B && !qdeleted(B))
H.internal_organs -= B
qdel(B)
gibs(H.loc, H.viruses, H.dna)
return (BRUTELOSS)
/obj/item/weapon/melee/classic_baton/telescopic/attack_self(mob/user)
on = !on
if(on)
user << "<span class ='warning'>You extend the baton.</span>"
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = 4 //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
user << "<span class ='notice'>You collapse the baton.</span>"
icon_state = "telebaton_0"
item_state = null //no sprite for concealment even when in hand
slot_flags = SLOT_BELT
w_class = 2
force = 0 //not so robust now
attack_verb = list("hit", "poked")
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
/obj/item/weapon/melee/supermatter_sword
name = "supermatter sword"
desc = "In a station full of bad ideas, this might just be the worst."
icon = 'icons/obj/weapons.dmi'
icon_state = "supermatter_sword"
item_state = "supermatter_sword"
slot_flags = null
w_class = 4
force = 0.001
armour_penetration = 1000
var/obj/machinery/power/supermatter_shard/shard
var/balanced = 1
origin_tech = "combat=7;materials=6"
/obj/item/weapon/melee/supermatter_sword/New()
..()
shard = new /obj/machinery/power/supermatter_shard(src)
START_PROCESSING(SSobj, src)
visible_message("<span class='warning'>\The [src] appears, balanced ever so perfectly on its hilt. This isn't ominous at all.</span>")
/obj/item/weapon/melee/supermatter_sword/process()
if(balanced || throwing || ismob(src.loc) || isnull(src.loc))
return
if(!isturf(src.loc))
var/atom/target = src.loc
loc = target.loc
consume_everything(target)
else
var/turf/T = get_turf(src)
if(!istype(T,/turf/open/space))
consume_turf(T)
/obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
if(user && target == user)
user.drop_item()
if(proximity_flag)
consume_everything(target)
..()
/obj/item/weapon/melee/supermatter_sword/throw_impact(target)
..()
if(ismob(target))
var/mob/M
if(src.loc == M)
M.drop_item()
consume_everything(target)
/obj/item/weapon/melee/supermatter_sword/pickup(user)
..()
balanced = 0
/obj/item/weapon/melee/supermatter_sword/ex_act(severity, target)
visible_message("<span class='danger'>\The blast wave smacks into \the [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
consume_everything()
/obj/item/weapon/melee/supermatter_sword/acid_act()
visible_message("<span class='danger'>\The acid smacks into \the [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
consume_everything()
/obj/item/weapon/melee/supermatter_sword/bullet_act(obj/item/projectile/P)
visible_message("<span class='danger'>[P] smacks into \the [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
consume_everything()
/obj/item/weapon/melee/supermatter_sword/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] touches the [src]'s blade. It looks like they're tired of waiting for the radiation to kill them!</span>")
user.drop_item()
shard.Bumped(user)
/obj/item/weapon/melee/supermatter_sword/proc/consume_everything(target)
if(isnull(target))
shard.Consume()
else if(!isturf(target))
shard.Bumped(target)
else
consume_turf(target)
/obj/item/weapon/melee/supermatter_sword/proc/consume_turf(turf/T)
if(istype(T, T.baseturf))
return //Can't void the void, baby!
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>\The [T] smacks into \the [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
shard.Consume()
T.ChangeTurf(T.baseturf)
T.CalculateAdjacentTurfs()
/obj/item/weapon/melee/supermatter_sword/add_blood(list/blood_dna)
return 0
@@ -0,0 +1,19 @@
/obj/item/weapon/caution
desc = "Caution! Wet Floor!"
name = "wet floor sign"
icon = 'icons/obj/janitor.dmi'
icon_state = "caution"
force = 1
throwforce = 3
throw_speed = 2
throw_range = 5
w_class = 2
attack_verb = list("warned", "cautioned", "smashed")
/obj/item/weapon/skub
desc = "It's skub."
name = "skub"
icon = 'icons/obj/items.dmi'
icon_state = "skub"
w_class = 4
attack_verb = list("skubbed")
+84
View File
@@ -0,0 +1,84 @@
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune))
/obj/item/weapon/mop
desc = "The world of janitalia wouldn't be complete without a mop."
name = "mop"
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
force = 3
throwforce = 5
throw_speed = 3
throw_range = 7
w_class = 3
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
burn_state = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
var/mopspeed = 30
/obj/item/weapon/mop/New()
..()
create_reagents(mopcap)
obj/item/weapon/mop/proc/clean(turf/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
if(istype(A, /turf/closed))
var/turf/closed/C = A
C.thermite = 0
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1)
user << "<span class='warning'>Your mop is dry!</span>"
return
var/turf/turf = A
if(is_cleanable(A))
turf = A.loc
if(istype(turf))
user.visible_message("[user] begins to clean \the [turf] with [src].", "<span class='notice'>You begin to clean \the [turf] with [src]...</span>")
if(do_after(user, src.mopspeed, target = turf))
user << "<span class='notice'>You finish mopping.</span>"
clean(turf)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
return
else
return ..()
/obj/item/weapon/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.mymop=src
J.update_icon()
/obj/item/weapon/mop/cyborg
/obj/item/weapon/mop/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
/obj/item/weapon/mop/advanced
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
name = "advanced mop"
mopcap = 10
icon_state = "advmop"
item_state = "mop"
origin_tech = "materials=3;engineering=3"
force = 6
throwforce = 8
throw_range = 4
mopspeed = 20
+99
View File
@@ -0,0 +1,99 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
//IT SUCKS A BIT LESS -GIACOM
/obj/item/weapon/paint
gender= PLURAL
name = "paint"
desc = "Used to recolor floors and walls. Can not be removed by the janitor."
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_color = "FFFFFF"
item_state = "paintcan"
w_class = 3
burn_state = FLAMMABLE
burntime = 5
var/paintleft = 10
/obj/item/weapon/paint/red
name = "red paint"
item_color = "C73232" //"FF0000"
icon_state = "paint_red"
/obj/item/weapon/paint/green
name = "green paint"
item_color = "2A9C3B" //"00FF00"
icon_state = "paint_green"
/obj/item/weapon/paint/blue
name = "blue paint"
item_color = "5998FF" //"0000FF"
icon_state = "paint_blue"
/obj/item/weapon/paint/yellow
name = "yellow paint"
item_color = "CFB52B" //"FFFF00"
icon_state = "paint_yellow"
/obj/item/weapon/paint/violet
name = "violet paint"
item_color = "AE4CCD" //"FF00FF"
icon_state = "paint_violet"
/obj/item/weapon/paint/black
name = "black paint"
item_color = "333333"
icon_state = "paint_black"
/obj/item/weapon/paint/white
name = "white paint"
item_color = "FFFFFF"
icon_state = "paint_white"
/obj/item/weapon/paint/anycolor
gender= PLURAL
name = "any color"
icon_state = "paint_neutral"
/obj/item/weapon/paint/anycolor/attack_self(mob/user)
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white")
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
switch(t1)
if("red")
item_color = "C73232"
if("blue")
item_color = "5998FF"
if("green")
item_color = "2A9C3B"
if("yellow")
item_color = "CFB52B"
if("violet")
item_color = "AE4CCD"
if("white")
item_color = "FFFFFF"
if("black")
item_color = "333333"
icon_state = "paint_[t1]"
add_fingerprint(user)
/obj/item/weapon/paint/afterattack(turf/target, mob/user, proximity)
if(!proximity) return
if(paintleft <= 0)
icon_state = "paint_empty"
return
if(!istype(target) || istype(target, /turf/open/space))
return
target.color = "#" + item_color
/obj/item/weapon/paint/paint_remover
gender = PLURAL
name = "paint remover"
icon_state = "paint_neutral"
/obj/item/weapon/paint/paint_remover/afterattack(turf/target, mob/user, proximity)
if(!proximity)
return
if(istype(target) && target.color != initial(target.color))
target.color = initial(target.color)
@@ -0,0 +1,14 @@
/obj/item/weapon/pai_cable
desc = "A flexible coated cable with a universal jack on one end."
name = "data cable"
icon = 'icons/obj/power.dmi'
icon_state = "wire1"
flags = NOBLUDGEON
var/obj/machinery/machine
/obj/item/weapon/pai_cable/proc/plugin(obj/machinery/M, mob/living/user)
if(!user.drop_item())
return
user.visible_message("[user] inserts [src] into a data port on [M].", "<span class='notice'>You insert [src] into a data port on [M].</span>", "<span class='italics'>You hear the satisfying click of a wire jack fastening into place.</span>")
src.loc = M
machine = M
@@ -0,0 +1,161 @@
/obj/item/weapon/pneumatic_cannon
name = "pneumatic cannon"
desc = "A gas-powered cannon that can fire any object loaded into it."
w_class = 4
force = 8 //Very heavy
attack_verb = list("bludgeoned", "smashed", "beaten")
icon = 'icons/obj/pneumaticCannon.dmi'
icon_state = "pneumaticCannon"
item_state = "bulldog"
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
var/maxWeightClass = 20 //The max weight of items that can fit into the cannon
var/loadedWeightClass = 0 //The weight of items currently in the cannon
var/obj/item/weapon/tank/internals/tank = null //The gas tank that is drawn from to fire things
var/gasPerThrow = 3 //How much gas is drawn from a tank's pressure to fire
var/list/loadedItems = list() //The items loaded into the cannon that will be fired out
var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws
/obj/item/weapon/pneumatic_cannon/examine(mob/user)
..()
if(!in_range(user, src))
user << "<span class='notice'>You'll need to get closer to see any more.</span>"
return
for(var/obj/item/I in loadedItems)
user << "<span class='info'>\icon [I] It has \the [I] loaded.</span>"
if(tank)
user << "<span class='notice'>\icon [tank] It has \the [tank] mounted onto it.</span>"
/obj/item/weapon/pneumatic_cannon/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/tank/internals))
if(!tank)
var/obj/item/weapon/tank/internals/IT = W
if(IT.volume <= 3)
user << "<span class='warning'>\The [IT] is too small for \the [src].</span>"
return
updateTank(W, 0, user)
else if(W.type == type)
user << "<span class='warning'>You're fairly certain that putting a pneumatic cannon inside another pneumatic cannon would cause a spacetime disruption.</span>"
else if(istype(W, /obj/item/weapon/wrench))
switch(pressureSetting)
if(1)
pressureSetting = 2
if(2)
pressureSetting = 3
if(3)
pressureSetting = 1
user << "<span class='notice'>You tweak \the [src]'s pressure output to [pressureSetting].</span>"
else if(istype(W, /obj/item/weapon/screwdriver))
if(tank)
updateTank(tank, 1, user)
else if(loadedWeightClass >= maxWeightClass)
user << "<span class='warning'>\The [src] can't hold any more items!</span>"
else if(istype(W, /obj/item))
var/obj/item/IW = W
if((loadedWeightClass + IW.w_class) > maxWeightClass)
user << "<span class='warning'>\The [IW] won't fit into \the [src]!</span>"
return
if(IW.w_class > src.w_class)
user << "<span class='warning'>\The [IW] is too large to fit into \the [src]!</span>"
return
if(!user.unEquip(W))
return
user << "<span class='notice'>You load \the [IW] into \the [src].</span>"
loadedItems.Add(IW)
loadedWeightClass += IW.w_class
IW.loc = src
/obj/item/weapon/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
if(flag && user.a_intent == "harm") //melee attack
return
if(!istype(user))
return
Fire(user, target)
/obj/item/weapon/pneumatic_cannon/proc/Fire(var/mob/living/carbon/human/user, var/atom/target)
if(!istype(user) && !target)
return
var/discharge = 0
if(!loadedItems || !loadedWeightClass)
user << "<span class='warning'>\The [src] has nothing loaded.</span>"
return
if(!tank)
user << "<span class='warning'>\The [src] can't fire without a source of gas.</span>"
return
if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting))
user << "<span class='warning'>\The [src] lets out a weak hiss and doesn't react!</span>"
return
if(user.disabilities & CLUMSY && prob(75))
user.visible_message("<span class='warning'>[user] loses their grip on [src], causing it to go off!</span>", "<span class='userdanger'>[src] slips out of your hands and goes off!</span>")
user.drop_item()
if(prob(10))
target = get_turf(user)
else
var/list/possible_targets = range(3,src)
target = pick(possible_targets)
discharge = 1
if(!discharge)
user.visible_message("<span class='danger'>[user] fires \the [src]!</span>", \
"<span class='danger'>You fire \the [src]!</span>")
add_logs(user, target, "fired at", src)
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
for(var/obj/item/ITD in loadedItems) //Item To Discharge
loadedItems.Remove(ITD)
loadedWeightClass -= ITD.w_class
ITD.throw_speed = pressureSetting * 2
ITD.loc = get_turf(src)
ITD.throw_at_fast(target, pressureSetting * 5, pressureSetting * 2,user)
if(pressureSetting >= 3 && user)
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
user.Weaken(3)
/obj/item/weapon/pneumatic_cannon/ghetto //Obtainable by improvised methods; more gas per use, less capacity, but smaller
name = "improvised pneumatic cannon"
desc = "A gas-powered, object-firing cannon made out of common parts."
force = 5
w_class = 3
maxWeightClass = 7
gasPerThrow = 5
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/weapon/pneumatic_cannon/ghetto
tools = list(/obj/item/weapon/weldingtool,
/obj/item/weapon/wrench)
reqs = list(/obj/item/stack/sheet/metal = 4,
/obj/item/stack/packageWrap = 8,
/obj/item/pipe = 2)
time = 300
category = CAT_WEAPON
/obj/item/weapon/pneumatic_cannon/proc/updateTank(obj/item/weapon/tank/internals/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
if(!src.tank)
return
user << "<span class='notice'>You detach \the [thetank] from \the [src].</span>"
src.tank.loc = get_turf(user)
user.put_in_hands(tank)
src.tank = null
if(!removing)
if(src.tank)
user << "<span class='warning'>\The [src] already has a tank.</span>"
return
if(!user.unEquip(thetank))
return
user << "<span class='notice'>You hook \the [thetank] up to \the [src].</span>"
src.tank = thetank
thetank.loc = src
src.update_icons()
/obj/item/weapon/pneumatic_cannon/proc/update_icons()
src.cut_overlays()
if(!tank)
return
src.add_overlay(image('icons/obj/pneumaticCannon.dmi', "[tank.icon_state]"))
src.update_icon()
@@ -0,0 +1,94 @@
/obj/item/weapon/melee/powerfist
name = "power-fist"
desc = "A metal gauntlet with a piston-powered ram ontop for that extra 'ompfh' in your punch."
icon_state = "powerfist"
item_state = "powerfist"
flags = CONDUCT
attack_verb = list("whacked", "fisted", "power-punched")
force = 12
throwforce = 10
throw_range = 7
w_class = 3
origin_tech = "combat=5;powerstorage=3;syndicate=3"
var/click_delay = 1.5
var/fisto_setting = 1
var/gasperfist = 3
var/obj/item/weapon/tank/internals/tank = null //Tank used for the gauntlet's piston-ram.
/obj/item/weapon/melee/powerfist/examine(mob/user)
..()
if(!in_range(user, src))
user << "<span class='notice'>You'll need to get closer to see any more.</span>"
return
if(tank)
user << "<span class='notice'>\icon [tank] It has \the [tank] mounted onto it.</span>"
/obj/item/weapon/melee/powerfist/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/tank/internals))
if(!tank)
var/obj/item/weapon/tank/internals/IT = W
if(IT.volume <= 3)
user << "<span class='warning'>\The [IT] is too small for \the [src].</span>"
return
updateTank(W, 0, user)
else if(istype(W, /obj/item/weapon/wrench))
switch(fisto_setting)
if(1)
fisto_setting = 2
if(2)
fisto_setting = 3
if(3)
fisto_setting = 1
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>"
else if(istype(W, /obj/item/weapon/screwdriver))
if(tank)
updateTank(tank, 1, user)
/obj/item/weapon/melee/powerfist/proc/updateTank(obj/item/weapon/tank/internals/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
if(!tank)
user << "<span class='notice'>\The [src] currently has no tank attached to it.</span>"
return
user << "<span class='notice'>You detach \the [thetank] from \the [src].</span>"
tank.forceMove(get_turf(user))
user.put_in_hands(tank)
tank = null
if(!removing)
if(tank)
user << "<span class='warning'>\The [src] already has a tank.</span>"
return
if(!user.unEquip(thetank))
return
user << "<span class='notice'>You hook \the [thetank] up to \the [src].</span>"
tank = thetank
thetank.forceMove(src)
/obj/item/weapon/melee/powerfist/attack(mob/living/target, mob/living/user)
if(!tank)
user << "<span class='warning'>\The [src] can't operate without a source of gas!</span>"
return
if(tank && !tank.air_contents.remove(gasperfist * fisto_setting))
user << "<span class='warning'>\The [src]'s piston-ram lets out a weak hiss, it needs more gas!</span>"
playsound(loc, 'sound/effects/refill.ogg', 50, 1)
return
target.apply_damage(force * fisto_setting, BRUTE)
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as they punch [target.name]!</span>", \
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
PoolOrNew(/obj/effect/kinetic_blast, target.loc)
playsound(loc, 'sound/weapons/resonator_blast.ogg', 50, 1)
playsound(loc, 'sound/weapons/genhit2.ogg', 50, 1)
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
spawn(1)
target.throw_at(throw_target, 5 * fisto_setting, 0.2)
add_logs(user, target, "power fisted", src)
user.changeNext_move(CLICK_CD_MELEE * click_delay)
return
+101
View File
@@ -0,0 +1,101 @@
/obj/item/weapon/teleportation_scroll
name = "scroll of teleportation"
desc = "A scroll for moving around."
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
var/uses = 4
w_class = 2
item_state = "paper"
throw_speed = 3
throw_range = 7
origin_tech = "bluespace=6"
burn_state = FLAMMABLE
/obj/item/weapon/teleportation_scroll/apprentice
name = "lesser scroll of teleportation"
uses = 1
origin_tech = "bluespace=5"
/obj/item/weapon/teleportation_scroll/attack_self(mob/user)
user.set_machine(src)
var/dat = "<B>Teleportation Scroll:</B><BR>"
dat += "Number of uses: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Four uses, use them wisely:</B><BR>"
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A><BR>"
dat += "Kind regards,<br>Wizards Federation<br><br>P.S. Don't forget to bring your gear, you'll need it to cast most spells.<HR>"
user << browse(dat, "window=scroll")
onclose(user, "scroll")
return
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
..()
if (usr.stat || usr.restrained() || src.loc != usr)
return
if (!ishuman(usr))
return 1
var/mob/living/carbon/human/H = usr
if ((H == src.loc || (in_range(src, H) && istype(src.loc, /turf))))
H.set_machine(src)
if (href_list["spell_teleport"])
if (src.uses >= 1)
teleportscroll(H)
if(H)
attack_self(H)
return
/obj/item/weapon/teleportation_scroll/proc/teleportscroll(mob/user)
var/A
A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs|null
if(!A)
return
var/area/thearea = teleportlocs[A]
if (!user || user.stat || user.restrained() || uses <= 0)
return
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
return
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(2, user.loc)
smoke.attach(user)
smoke.start()
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
if(!L.len)
user <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
return
if(user && user.buckled)
user.buckled.unbuckle_mob(user, force=1)
var/list/tempL = L.Copy()
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
user.Move(attempt)
if(get_turf(user) == attempt)
success = 1
break
else
tempL.Remove(attempt)
if(!success)
user.loc = pick(L)
smoke.start()
src.uses -= 1
@@ -0,0 +1,54 @@
/obj/item/weapon/sharpener
name = "whetstone"
icon = 'icons/obj/kitchen.dmi'
icon_state = "sharpener"
desc = "A block that makes things sharp."
var/used = 0
var/increment = 4
var/max = 30
var/prefix = "sharpened"
var/requires_sharpness = 1
/obj/item/weapon/sharpener/attackby(obj/item/I, mob/user, params)
if(used)
user << "<span class='notice'>The sharpening block is too worn to use again.</span>"
return
if(I.force >= max || I.throwforce >= max)//no esword sharpening
user << "<span class='notice'>[I] is much too powerful to sharpen further.</span>"
return
if(requires_sharpness && !I.sharpness)
user << "<span class='notice'>You can only sharpen items that are already sharp, such as knives.</span>"
return
if(istype(I, /obj/item/weapon/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
var/obj/item/weapon/twohanded/TH = I
if(TH.force_wielded >= max)
user << "<span class='notice'>[TH] is much too powerful to sharpen further.</span>"
return
if(TH.wielded)
user << "<span class='notice'>[TH] must be unwielded before it can be sharpened.</span>"
return
if(TH.force_wielded > initial(TH.force_wielded))
user << "<span class='notice'>[TH] has already been refined before. It cannot be sharpened further.</span>"
return
TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
user << "<span class='notice'>[I] has already been refined before. It cannot be sharpened further.</span>"
return
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
if(!requires_sharpness)
I.sharpness = IS_SHARP_ACCURATE
I.force = Clamp(I.force + increment, 0, max)
I.throwforce = Clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = 1
/obj/item/weapon/sharpener/super
name = "super whetstone"
desc = "A block that will make your weapon sharper than Einstein on adderall."
increment = 200
max = 200
prefix = "super-sharpened"
requires_sharpness = 0
+133
View File
@@ -0,0 +1,133 @@
/obj/item/weapon/shield
name = "shield"
block_chance = 50
/obj/item/weapon/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon = 'icons/obj/weapons.dmi'
icon_state = "riot"
slot_flags = SLOT_BACK
force = 10
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = 4
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
origin_tech = "materials=3;combat=4"
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/melee/baton))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
return ..()
/obj/item/weapon/shield/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(attack_type == THROWN_PROJECTILE_ATTACK)
final_block_chance += 30
return ..()
/obj/item/weapon/shield/riot/roman
name = "roman shield"
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>."
icon_state = "roman_shield"
item_state = "roman_shield"
/obj/item/weapon/shield/riot/buckler
name = "wooden buckler"
desc = "A medieval wooden buckler."
icon_state = "buckler"
item_state = "buckler"
materials = list()
origin_tech = "materials=1;combat=3;biotech=2"
burn_state = FLAMMABLE
block_chance = 30
/obj/item/weapon/shield/energy
name = "energy combat shield"
desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere."
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0" // eshield1 for expanded
force = 3
throwforce = 3
throw_speed = 3
throw_range = 5
w_class = 1
origin_tech = "materials=4;magnets=5;syndicate=6"
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
return 0
/obj/item/weapon/shield/energy/IsReflect()
return (active)
/obj/item/weapon/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
user << "<span class='warning'>You beat yourself in the head with [src].</span>"
user.take_organ_damage(5)
active = !active
icon_state = "eshield[active]"
if(active)
force = 10
throwforce = 8
throw_speed = 2
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
user << "<span class='notice'>[src] is now active.</span>"
else
force = 3
throwforce = 3
throw_speed = 3
w_class = 1
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
user << "<span class='notice'>[src] can now be concealed.</span>"
add_fingerprint(user)
/obj/item/weapon/shield/riot/tele
name = "telescopic shield"
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
icon = 'icons/obj/weapons.dmi'
icon_state = "teleriot0"
origin_tech = "materials=3;combat=4;engineering=4"
slot_flags = null
force = 3
throwforce = 3
throw_speed = 3
throw_range = 4
w_class = 3
var/active = 0
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/shield/riot/tele/attack_self(mob/living/user)
active = !active
icon_state = "teleriot[active]"
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
if(active)
force = 8
throwforce = 5
throw_speed = 2
w_class = 4
slot_flags = SLOT_BACK
user << "<span class='notice'>You extend \the [src].</span>"
else
force = 3
throwforce = 3
throw_speed = 3
w_class = 3
slot_flags = null
user << "<span class='notice'>[src] can now be concealed.</span>"
add_fingerprint(user)
+38
View File
@@ -0,0 +1,38 @@
/obj/item/weapon/picket_sign
icon_state = "picket"
name = "blank picket sign"
desc = "It's blank"
force = 5
w_class = 4
attack_verb = list("bashed","smacked")
burn_state = FLAMMABLE
var/label = ""
var/last_wave = 0
/obj/item/weapon/picket_sign/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/toy/crayon))
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
if(txt)
label = txt
src.name = "[label] sign"
desc = "It reads: [label]"
else
return ..()
/obj/item/weapon/picket_sign/attack_self(mob/living/carbon/human/user)
if( last_wave + 20 < world.time )
last_wave = world.time
if(label)
user.visible_message("<span class='warning'>[user] waves around \the \"[label]\" sign.</span>")
else
user.visible_message("<span class='warning'>[user] waves around blank sign.</span>")
user.changeNext_move(CLICK_CD_MELEE)
/datum/crafting_recipe/picket_sign
name = "Picket Sign"
result = /obj/item/weapon/picket_sign
reqs = list(/obj/item/stack/rods = 1,
/obj/item/stack/sheet/cardboard = 2)
time = 80
category = CAT_MISC
@@ -0,0 +1,109 @@
/obj/item/weapon/twohanded/singularityhammer
name = "singularity hammer"
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
force = 5
force_unwielded = 5
force_wielded = 20
throwforce = 15
throw_range = 1
w_class = 5
var/charged = 5
origin_tech = "combat=4;bluespace=4;plasmatech=7"
/obj/item/weapon/twohanded/singularityhammer/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/weapon/twohanded/singularityhammer/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/twohanded/singularityhammer/process()
if(charged < 5)
charged++
return
/obj/item/weapon/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return
/obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X in orange(5,pull))
if(istype(X, /atom/movable))
if(X == wielder) continue
if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human)))
step_towards(X,pull)
step_towards(X,pull)
step_towards(X,pull)
else if(istype(X,/mob/living/carbon/human))
var/mob/living/carbon/human/H = X
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
var/obj/item/clothing/shoes/magboots/M = H.shoes
if(M.magpulse)
continue
H.apply_effect(1, WEAKEN, 0)
step_towards(H,pull)
step_towards(H,pull)
step_towards(H,pull)
return
/obj/item/weapon/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(wielded)
if(charged == 5)
charged = 0
if(istype(A, /mob/living/))
var/mob/living/Z = A
Z.take_organ_damage(20,0)
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
var/turf/target = get_turf(A)
vortex(target,user)
/obj/item/weapon/twohanded/mjollnir
name = "Mjolnir"
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
force = 5
force_unwielded = 5
force_wielded = 25
throwforce = 30
throw_range = 7
w_class = 5
//var/charged = 5
origin_tech = "combat=4;powerstorage=7"
/obj/item/weapon/twohanded/mjollnir/proc/shock(mob/living/target)
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
s.set_up(5, 1, target.loc)
s.start()
target.visible_message("<span class='danger'>[target.name] was shocked by the [src.name]!</span>", \
"<span class='userdanger'>You feel a powerful shock course through your body sending you flying!</span>", \
"<span class='italics'>You hear a heavy electrical crack!</span>")
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
target.throw_at_fast(throw_target, 200, 4)
return
/obj/item/weapon/twohanded/mjollnir/attack(mob/living/M, mob/user)
..()
if(wielded)
//if(charged == 5)
//charged = 0
playsound(src.loc, "sparks", 50, 1)
M.Stun(3)
shock(M)
/obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target)
. = ..()
if(istype(target, /mob/living))
var/mob/living/L = target
L.Stun(3)
shock(L)
/obj/item/weapon/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return
@@ -0,0 +1,508 @@
/* Backpacks
* Contains:
* Backpack
* Backpack Types
* Satchel Types
*/
/*
* Backpack
*/
/obj/item/weapon/storage/backpack
name = "backpack"
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
item_state = "backpack"
w_class = 4
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = 3
max_combined_w_class = 21
storage_slots = 21
burn_state = FLAMMABLE
burntime = 20
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W, mob/user, params)
playsound(src.loc, "rustle", 50, 1, -5)
return ..()
/*
* Backpack Types
*/
/obj/item/weapon/storage/backpack/holding
name = "bag of holding"
desc = "A backpack that opens into a localized pocket of Blue Space."
origin_tech = "bluespace=5;materials=4;engineering=4;plasmatech=5"
icon_state = "holdingpack"
max_w_class = 6
max_combined_w_class = 35
burn_state = FIRE_PROOF
var/pshoom = 'sound/items/PSHOOM.ogg'
var/alt_sound = 'sound/items/PSHOOM_2.ogg'
/obj/item/weapon/storage/backpack/holding/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like \he's trying to commit suicide.</span>")
user.drop_item()
user.Stun(5)
sleep(20)
playsound(src, "rustle", 50, 1, -5)
qdel(user)
return
/obj/item/weapon/storage/backpack/holding/content_can_dump(atom/dest_object, mob/user)
if(Adjacent(user))
if(get_dist(user, dest_object) < 8)
if(dest_object.storage_contents_dump_act(src, user))
if(alt_sound && prob(1))
playsound(src, alt_sound, 40, 1)
else
playsound(src, pshoom, 40, 1)
user.Beam(dest_object,icon_state="rped_upgrade",icon='icons/effects/effects.dmi',time=5)
return 1
user << "The [src.name] buzzes."
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return 0
/obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
if((istype(W, /obj/item/weapon/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/weapon/storage/backpack/holding)))
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [name]?", "Proceed", "Abort")
if(safety == "Abort" || !in_range(src, user) || !src || !W || user.incapacitated())
return
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user << "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>"
qdel(W)
var/obj/singularity/singulo = new /obj/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
singulo.process()
return
. = ..()
/obj/item/weapon/storage/backpack/holding/singularity_act(current_size)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return
/obj/item/weapon/storage/backpack/santabag
name = "Santa's Gift Bag"
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
icon_state = "giftbag0"
item_state = "giftbag"
w_class = 4
max_w_class = 3
max_combined_w_class = 60
/obj/item/weapon/storage/backpack/santabag/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] places the [src.name] over their head and pulls it tight! It looks like they aren't in the Christmas spirit...</span>")
return (OXYLOSS)
/obj/item/weapon/storage/backpack/cultpack
name = "trophy rack"
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
icon_state = "cultpack"
item_state = "backpack"
/obj/item/weapon/storage/backpack/clown
name = "Giggles von Honkerton"
desc = "It's a backpack made by Honk! Co."
icon_state = "clownpack"
item_state = "clownpack"
/obj/item/weapon/storage/backpack/explorer
name = "explorer bag"
desc = "A robust backpack for stashing your loot."
icon_state = "explorerpack"
item_state = "explorerpack"
/obj/item/weapon/storage/backpack/mime
name = "Parcel Parceaux"
desc = "A silent backpack made for those silent workers. Silence Co."
icon_state = "mimepack"
item_state = "mimepack"
/obj/item/weapon/storage/backpack/medic
name = "medical backpack"
desc = "It's a backpack especially designed for use in a sterile environment."
icon_state = "medicalpack"
item_state = "medicalpack"
/obj/item/weapon/storage/backpack/security
name = "security backpack"
desc = "It's a very robust backpack."
icon_state = "securitypack"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/captain
name = "captain's backpack"
desc = "It's a special backpack made exclusively for Nanotrasen officers."
icon_state = "captainpack"
item_state = "captainpack"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/industrial
name = "industrial backpack"
desc = "It's a tough backpack for the daily grind of station life."
icon_state = "engiepack"
item_state = "engiepack"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/botany
name = "botany backpack"
desc = "It's a backpack made of all-natural fibers."
icon_state = "botpack"
item_state = "botpack"
/obj/item/weapon/storage/backpack/chemistry
name = "chemistry backpack"
desc = "A backpack specially designed to repel stains and hazardous liquids."
icon_state = "chempack"
item_state = "chempack"
/obj/item/weapon/storage/backpack/genetics
name = "genetics backpack"
desc = "A bag designed to be super tough, just in case someone hulks out on you."
icon_state = "genepack"
item_state = "genepack"
/obj/item/weapon/storage/backpack/science
name = "science backpack"
desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma."
icon_state = "toxpack"
item_state = "toxpack"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/virology
name = "virology backpack"
desc = "A backpack made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey."
icon_state = "viropack"
item_state = "viropack"
/*
* Satchel Types
*/
/obj/item/weapon/storage/backpack/satchel
name = "leather satchel"
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel/withwallet/New()
..()
new /obj/item/weapon/storage/wallet/random( src )
/obj/item/weapon/storage/backpack/satchel_norm
name = "satchel"
desc = "A trendy looking satchel."
icon_state = "satchel-norm"
/obj/item/weapon/storage/backpack/satchel_eng
name = "industrial satchel"
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
item_state = "engiepack"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_med
name = "medical satchel"
desc = "A sterile satchel used in medical departments."
icon_state = "satchel-med"
item_state = "medicalpack"
/obj/item/weapon/storage/backpack/satchel_vir
name = "virologist satchel"
desc = "A sterile satchel with virologist colours."
icon_state = "satchel-vir"
item_state = "satchel-vir"
/obj/item/weapon/storage/backpack/satchel_chem
name = "chemist satchel"
desc = "A sterile satchel with chemist colours."
icon_state = "satchel-chem"
item_state = "satchel-chem"
/obj/item/weapon/storage/backpack/satchel_gen
name = "geneticist satchel"
desc = "A sterile satchel with geneticist colours."
icon_state = "satchel-gen"
item_state = "satchel-gen"
/obj/item/weapon/storage/backpack/satchel_tox
name = "scientist satchel"
desc = "Useful for holding research materials."
icon_state = "satchel-tox"
item_state = "satchel-tox"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_hyd
name = "botanist satchel"
desc = "A satchel made of all natural fibers."
icon_state = "satchel-hyd"
item_state = "satchel-hyd"
/obj/item/weapon/storage/backpack/satchel_sec
name = "security satchel"
desc = "A robust satchel for security related needs."
icon_state = "satchel-sec"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/satchel_explorer
name = "explorer satchel"
desc = "A robust satchel for stashing your loot."
icon_state = "satchel-explorer"
item_state = "securitypack"
/obj/item/weapon/storage/backpack/satchel_cap
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
item_state = "captainpack"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_flat
name = "smuggler's satchel"
desc = "A very slim satchel that can easily fit into tight spaces."
icon_state = "satchel-flat"
w_class = 3 //Can fit in backpacks itself.
max_combined_w_class = 15
level = 1
cant_hold = list(/obj/item/weapon/storage/backpack/satchel_flat) //muh recursive backpacks
/obj/item/weapon/storage/backpack/satchel_flat/hide(var/intact)
if(intact)
invisibility = INVISIBILITY_MAXIMUM
anchored = 1 //otherwise you can start pulling, cover it, and drag around an invisible backpack.
icon_state = "[initial(icon_state)]2"
else
invisibility = initial(invisibility)
anchored = 0
icon_state = initial(icon_state)
/obj/item/weapon/storage/backpack/satchel_flat/New()
..()
new /obj/item/stack/tile/plasteel(src)
new /obj/item/weapon/crowbar(src)
/obj/item/weapon/storage/backpack/dufflebag
name = "dufflebag"
desc = "A large dufflebag for holding extra things."
icon_state = "duffle"
item_state = "duffle"
slowdown = 1
max_combined_w_class = 30
/obj/item/weapon/storage/backpack/dufflebag/captain
name = "captain's dufflebag"
desc = "A large dufflebag for holding extra captainly goods."
icon_state = "duffle-captain"
item_state = "duffle-captain"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/dufflebag/med
name = "medical dufflebag"
desc = "A large dufflebag for holding extra medical supplies."
icon_state = "duffle-med"
item_state = "duffle-med"
/obj/item/weapon/storage/backpack/dufflebag/sec
name = "security dufflebag"
desc = "A large dufflebag for holding extra security supplies and ammunition."
icon_state = "duffle-sec"
item_state = "duffle-sec"
/obj/item/weapon/storage/backpack/dufflebag/engineering
name = "industrial dufflebag"
desc = "A large dufflebag for holding extra tools and supplies."
icon_state = "duffle-eng"
item_state = "duffle-eng"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/dufflebag/drone
name = "drone dufflebag"
desc = "A large dufflebag for holding tools and hats."
icon_state = "duffle-drone"
item_state = "duffle-drone"
burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/dufflebag/drone/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/stack/cable_coil/random(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
/obj/item/weapon/storage/backpack/dufflebag/clown
name = "clown's dufflebag"
desc = "A large dufflebag for holding lots of funny gags!"
icon_state = "duffle-clown"
item_state = "duffle-clown"
/obj/item/weapon/storage/backpack/dufflebag/clown/cream_pie/New()
. = ..()
for(var/i in 1 to 10)
new /obj/item/weapon/reagent_containers/food/snacks/pie/cream(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie
name = "suspicious looking dufflebag"
desc = "A large dufflebag for holding extra tactical supplies."
icon_state = "duffle-syndie"
item_state = "duffle-syndiemed"
origin_tech = "syndicate=1"
silent = 1
slowdown = 0
/obj/item/weapon/storage/backpack/dufflebag/syndie/med
name = "medical dufflebag"
desc = "A large dufflebag for holding extra tactical medical supplies."
icon_state = "duffle-syndiemed"
item_state = "duffle-syndiemed"
/obj/item/weapon/storage/backpack/dufflebag/syndie/surgery
name = "surgery dufflebag"
desc = "A suspicious looking dufflebag for holding surgery tools."
icon_state = "duffle-syndiemed"
item_state = "duffle-syndiemed"
/obj/item/weapon/storage/backpack/dufflebag/syndie/surgery/New()
..()
contents = list()
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/circular_saw(src)
new /obj/item/weapon/surgicaldrill(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/surgical_drapes(src)
new /obj/item/clothing/suit/straight_jacket(src)
new /obj/item/clothing/mask/muzzle(src)
new /obj/item/device/mmi/syndie(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo
name = "ammunition dufflebag"
desc = "A large dufflebag for holding extra weapons ammunition and supplies."
icon_state = "duffle-syndieammo"
item_state = "duffle-syndieammo"
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/shotgun
desc = "A large dufflebag, packed to the brim with Bulldog shotgun ammo."
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/shotgun/New()
..()
contents = list()
for(var/i in 1 to 6)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g/buckshot(src)
new /obj/item/ammo_box/magazine/m12g/slug(src)
new /obj/item/ammo_box/magazine/m12g/dragon(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/smg
desc = "A large dufflebag, packed to the brim with C20r magazines."
/obj/item/weapon/storage/backpack/dufflebag/syndie/ammo/smg/New()
..()
contents = list()
for(var/i in 1 to 9)
new /obj/item/ammo_box/magazine/smgm45(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/c20rbundle
desc = "A large dufflebag containing a C20r, some magazines, and a cheap looking suppressor."
/obj/item/weapon/storage/backpack/dufflebag/syndie/c20rbundle/New()
..()
contents = list()
new /obj/item/ammo_box/magazine/smgm45(src)
new /obj/item/ammo_box/magazine/smgm45(src)
new /obj/item/weapon/gun/projectile/automatic/c20r(src)
new /obj/item/weapon/suppressor/specialoffer(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/bulldogbundle
desc = "A large dufflebag containing a Bulldog, several drums, and a collapsed hardsuit."
/obj/item/weapon/storage/backpack/dufflebag/syndie/bulldogbundle/New()
..()
contents = list()
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/ammo_box/magazine/m12g/buckshot(src)
new /obj/item/clothing/glasses/thermal/syndi(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle/New()
..()
contents = list()
new /obj/item/clothing/shoes/magboots/syndie(src)
new /obj/item/weapon/storage/firstaid/tactical(src)
new /obj/item/weapon/gun/projectile/automatic/l6_saw/toy(src)
new /obj/item/ammo_box/foambox/riot(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle
desc = "A large dufflebag containing a medical equipment, a Donksoft machine gun, a big jumbo box of darts, and a knock-off pair of magboots."
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/medicalbundle/New()
..()
contents = list()
new /obj/item/clothing/shoes/magboots/syndie(src)
new /obj/item/weapon/storage/firstaid/tactical(src)
new /obj/item/weapon/gun/projectile/automatic/l6_saw/toy(src)
new /obj/item/ammo_box/foambox/riot(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/bioterrorbundle
desc = "A large dufflebag containing a deadly chemicals, a chemical spray, chemical grenade, a Donksoft assault rifle, riot grade darts, a minature syringe gun, and a box of syringes"
/obj/item/weapon/storage/backpack/dufflebag/syndie/med/bioterrorbundle/New()
..()
contents = list()
new /obj/item/weapon/reagent_containers/spray/chemsprayer/bioterror(src)
new /obj/item/weapon/storage/box/syndie_kit/chemical(src)
new /obj/item/weapon/gun/syringe/syndicate(src)
new /obj/item/weapon/gun/projectile/automatic/c20r/toy(src)
new /obj/item/weapon/storage/box/syringes(src)
new /obj/item/ammo_box/foambox/riot(src)
new /obj/item/weapon/grenade/chem_grenade/bioterrorfoam(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/c4/New()
..()
contents = list()
for(var/i in 1 to 10)
new /obj/item/weapon/grenade/plastic/c4(src)
return
/obj/item/weapon/storage/backpack/dufflebag/syndie/x4/New()
..()
contents = list()
for(var/i in 1 to 3)
new /obj/item/weapon/grenade/plastic/x4(src)
/obj/item/weapon/storage/backpack/dufflebag/syndie/firestarter
desc = "A large dufflebag containing New Russian pyro backpack sprayer, a pistol, a pipebomb, fireproof hardsuit, ammo, and other equipment."
/obj/item/weapon/storage/backpack/dufflebag/syndie/firestarter/New()
..()
new /obj/item/clothing/under/syndicate/soviet(src)
new /obj/item/weapon/watertank/operator(src)
new /obj/item/clothing/suit/space/hardsuit/syndi/elite(src)
new /obj/item/weapon/gun/projectile/automatic/pistol/APS(src)
new /obj/item/ammo_box/magazine/pistolm9mm(src)
new /obj/item/ammo_box/magazine/pistolm9mm(src)
new /obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/badminka(src)
new /obj/item/weapon/reagent_containers/syringe/stimulants(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
@@ -0,0 +1,383 @@
/*
* These absorb the functionality of the plant bag, ore satchel, etc.
* They use the use_to_pickup, quick_gather, and quick_empty functions
* that were already defined in weapon/storage, but which had been
* re-implemented in other classes.
*
* Contains:
* Trash Bag
* Mining Satchel
* Plant Bag
* Sheet Snatcher
* Book Bag
* Biowaste Bag
*
* -Sayu
*/
// Generic non-item
/obj/item/weapon/storage/bag
allow_quick_gather = 1
allow_quick_empty = 1
display_contents_with_number = 1 // should work fine now
use_to_pickup = 1
slot_flags = SLOT_BELT
// -----------------------------
// Trash bag
// -----------------------------
/obj/item/weapon/storage/bag/trash
name = "trash bag"
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
icon = 'icons/obj/janitor.dmi'
icon_state = "trashbag"
item_state = "trashbag"
w_class = 4
max_w_class = 2
max_combined_w_class = 30
storage_slots = 30
can_hold = list() // any
cant_hold = list(/obj/item/weapon/disk/nuclear)
/obj/item/weapon/storage/bag/trash/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] puts the [src.name] over their head and starts chomping at the insides! Disgusting!</span>")
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
return (TOXLOSS)
/obj/item/weapon/storage/bag/trash/update_icon()
if(contents.len == 0)
icon_state = "[initial(icon_state)]"
else if(contents.len < 12)
icon_state = "[initial(icon_state)]1"
else if(contents.len < 21)
icon_state = "[initial(icon_state)]2"
else icon_state = "[initial(icon_state)]3"
/obj/item/weapon/storage/bag/trash/cyborg
/obj/item/weapon/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.mybag=src
J.update_icon()
/obj/item/weapon/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
/obj/item/weapon/storage/bag/trash/bluespace
name = "trash bag of holding"
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
icon_state = "bluetrashbag"
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
max_combined_w_class = 60
storage_slots = 60
// -----------------------------
// Mining Satchel
// -----------------------------
/obj/item/weapon/storage/bag/ore
name = "mining satchel"
desc = "This little bugger can be used to store and transport ores."
icon = 'icons/obj/mining.dmi'
icon_state = "satchel"
origin_tech = "engineering=2"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list(/obj/item/weapon/ore)
/obj/item/weapon/storage/bag/ore/cyborg
name = "cyborg mining satchel"
/obj/item/weapon/storage/bag/ore/holding //miners, your messiah has arrived
name = "mining satchel of holding"
desc = "A revolution in convenience, this satchel allows for infinite ore storage. It's been outfitted with anti-malfunction safety measures."
storage_slots = INFINITY
max_combined_w_class = INFINITY
origin_tech = "bluespace=4;materials=3;engineering=3"
icon_state = "satchel_bspace"
// -----------------------------
// Plant bag
// -----------------------------
/obj/item/weapon/storage/bag/plants
name = "plant bag"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "plantbag"
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 1
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
burn_state = FLAMMABLE
////////
/obj/item/weapon/storage/bag/plants/portaseeder
name = "portable seed extractor"
desc = "For the enterprising botanist on the go. Less efficient than the stationary model, it creates one seed per plant."
icon_state = "portaseeder"
origin_tech = "biotech=3;engineering=2"
/obj/item/weapon/storage/bag/plants/portaseeder/verb/dissolve_contents()
set name = "Activate Seed Extraction"
set category = "Object"
set desc = "Activate to convert your plants into plantable seeds."
if(usr.stat || !usr.canmove || usr.restrained())
return
for(var/obj/item/O in contents)
seedify(O, 1)
close_all()
// -----------------------------
// Sheet Snatcher
// -----------------------------
// Because it stacks stacks, this doesn't operate normally.
// However, making it a storage/bag allows us to reuse existing code in some places. -Sayu
/obj/item/weapon/storage/bag/sheetsnatcher
name = "sheet snatcher"
desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet."
icon = 'icons/obj/mining.dmi'
icon_state = "sheetsnatcher"
var/capacity = 300; //the number of sheets it can carry.
w_class = 3
allow_quick_empty = 1 // this function is superceded
/obj/item/weapon/storage/bag/sheetsnatcher/New()
..()
//verbs -= /obj/item/weapon/storage/verb/quick_empty
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/mineral/wood))
if(!stop_messages)
usr << "The snatcher does not accept [W]."
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
usr << "<span class='danger'>The snatcher is full.</span>"
return 0
return 1
// Modified handle_item_insertion. Would prefer not to, but...
/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
else
amount = S.amount
for(var/obj/item/stack/sheet/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
inserted = 1
break
if(!inserted || !S.amount)
usr.unEquip(S)
if (usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(!S.amount)
qdel(S)
else
if(S.pulledby)
S.pulledby.stop_pulling()
S.loc = src
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
return 1
// Sets up numbered display to show the stack size of each stored mineral
// NOTE: numbered display is turned off currently because it's broken
/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user)
var/adjusted_contents = contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
numbered_contents.Add( D )
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
src.standard_orient_objs(row_num, col_count, numbered_contents)
return
// Modified quick_empty verb drops appropriate sized stacks
/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
if(!S.amount)
qdel(S)// todo: there's probably something missing here
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
// Instead of removing
/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
//I would prefer to drop a new stack, but the item/attack_hand code
// that calls this can't recieve a different object than you clicked on.
//Therefore, make a new stack internally that has the remainder.
// -Sayu
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount
return ..(S,new_location)
// -----------------------------
// Sheet Snatcher (Cyborg)
// -----------------------------
/obj/item/weapon/storage/bag/sheetsnatcher/borg
name = "sheet snatcher 9000"
desc = ""
capacity = 500//Borgs get more because >specialization
// -----------------------------
// Book bag
// -----------------------------
/obj/item/weapon/storage/bag/books
name = "book bag"
desc = "A bag for books."
icon = 'icons/obj/library.dmi'
icon_state = "bookbag"
display_contents_with_number = 0 //This would look really stupid otherwise
storage_slots = 7
max_combined_w_class = 21
max_w_class = 3
w_class = 4 //Bigger than a book because physics
can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook)
burn_state = FLAMMABLE
/*
* Trays - Agouri
*/
/obj/item/weapon/storage/bag/tray
name = "tray"
icon = 'icons/obj/food/containers.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
force = 5
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = 4
flags = CONDUCT
materials = list(MAT_METAL=3000)
preposition = "on"
/obj/item/weapon/storage/bag/tray/attack(mob/living/M, mob/living/user)
..()
// Drop all the things. All of them.
var/list/obj/item/oldContents = contents.Copy()
quick_empty()
// Make each item scatter a bit
for(var/obj/item/I in oldContents)
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1)
if(ishuman(M) || ismonkey(M))
if(prob(10))
M.Weaken(2)
/obj/item/weapon/storage/bag/tray/proc/rebuild_overlays()
cut_overlays()
for(var/obj/item/I in contents)
add_overlay(image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1))
/obj/item/weapon/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
..()
rebuild_overlays()
/obj/item/weapon/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
add_overlay(image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1))
. = ..()
/*
* Chemistry bag
*/
/obj/item/weapon/storage/bag/chemistry
name = "chemistry bag"
icon = 'icons/obj/chemical.dmi'
icon_state = "bag"
desc = "A bag for storing pills, patches, and bottles."
storage_slots = 50
max_combined_w_class = 200
w_class = 1
preposition = "in"
can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
burn_state = FLAMMABLE
/*
* Biowaste bag (mostly for xenobiologists)
*/
/obj/item/weapon/storage/bag/bio
name = "bio bag"
icon = 'icons/obj/chemical.dmi'
icon_state = "biobag"
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
storage_slots = 25
max_combined_w_class = 200
w_class = 1
preposition = "in"
can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse)
burn_state = FLAMMABLE
@@ -0,0 +1,416 @@
/obj/item/weapon/storage/belt
name = "belt"
desc = "Can hold various things."
icon = 'icons/obj/clothing/belts.dmi'
icon_state = "utilitybelt"
item_state = "utility"
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
/obj/item/weapon/storage/belt/update_icon()
cut_overlays()
for(var/obj/item/I in contents)
add_overlay("[I.name]")
..()
/obj/item/weapon/storage/belt/utility
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Holds tools."
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/stack/cable_coil,
/obj/item/device/t_scanner,
/obj/item/device/analyzer,
/obj/item/weapon/extinguisher/mini,
/obj/item/device/radio,
/obj/item/clothing/gloves/
)
/obj/item/weapon/storage/belt/utility/full/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
/obj/item/weapon/storage/belt/utility/atmostech/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/t_scanner(src)
new /obj/item/weapon/extinguisher/mini(src)
/obj/item/weapon/storage/belt/medical
name = "medical belt"
desc = "Can hold various medical equipment."
icon_state = "medicalbelt"
item_state = "medical"
max_w_class = 4
can_hold = list(
/obj/item/device/healthanalyzer,
/obj/item/weapon/dnainjector,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/reagent_containers/glass/beaker,
/obj/item/weapon/reagent_containers/glass/bottle,
/obj/item/weapon/reagent_containers/pill,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/lighter,
/obj/item/weapon/storage/fancy/cigarettes,
/obj/item/weapon/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen,
/obj/item/weapon/extinguisher/mini,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/device/sensor_device,
/obj/item/device/radio,
/obj/item/clothing/gloves/,
/obj/item/weapon/lazarus_injector,
/obj/item/weapon/bikehorn/rubberducky,
/obj/item/clothing/mask/surgical,
/obj/item/clothing/mask/breath,
/obj/item/clothing/mask/breath/medical,
/obj/item/weapon/surgical_drapes, //for true paramedics
/obj/item/weapon/scalpel,
/obj/item/weapon/circular_saw,
/obj/item/weapon/surgicaldrill,
/obj/item/weapon/retractor,
/obj/item/weapon/cautery,
/obj/item/weapon/hemostat,
/obj/item/device/geiger_counter,
/obj/item/clothing/tie/stethoscope,
/obj/item/weapon/stamp,
/obj/item/clothing/glasses,
/obj/item/weapon/wrench/medical,
/obj/item/clothing/mask/muzzle,
/obj/item/weapon/storage/bag/chemistry,
/obj/item/weapon/storage/bag/bio,
/obj/item/weapon/reagent_containers/blood,
/obj/item/weapon/tank/internals/emergency_oxygen
)
/obj/item/weapon/storage/belt/security
name = "security belt"
desc = "Can hold security gear like handcuffs and flashes."
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
storage_slots = 5
max_w_class = 3 //Because the baton wouldn't fit otherwise. - Neerti
can_hold = list(
/obj/item/weapon/melee/baton,
/obj/item/weapon/melee/classic_baton,
/obj/item/weapon/grenade,
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/restraints/handcuffs,
/obj/item/device/assembly/flash/handheld,
/obj/item/clothing/glasses,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_box,
/obj/item/weapon/reagent_containers/food/snacks/donut,
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
/obj/item/weapon/kitchen/knife/combat,
/obj/item/device/flashlight/seclite,
/obj/item/weapon/melee/classic_baton/telescopic,
/obj/item/device/radio,
/obj/item/clothing/gloves/,
/obj/item/weapon/restraints/legcuffs/bola
)
/obj/item/weapon/storage/belt/security/full/New()
..()
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/restraints/handcuffs(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/weapon/melee/baton/loaded(src)
/obj/item/weapon/storage/belt/mining
name = "explorer's webbing"
desc = "A versatile chest rig, cherished by miners and hunters alike."
icon_state = "explorer1"
item_state = "explorer1"
storage_slots = 6
w_class = 4
max_w_class = 4 //Pickaxes are big.
max_combined_w_class = 20 //Not an issue with this whitelist, probably.
can_hold = list(
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/weldingtool,
/obj/item/weapon/wirecutters,
/obj/item/weapon/wrench,
/obj/item/device/flashlight,
/obj/item/stack/cable_coil,
/obj/item/device/analyzer,
/obj/item/weapon/extinguisher/mini,
/obj/item/device/radio,
/obj/item/clothing/gloves,
/obj/item/weapon/resonator,
/obj/item/device/mining_scanner,
/obj/item/weapon/pickaxe,
/obj/item/stack/sheet/animalhide,
/obj/item/stack/sheet/sinew,
/obj/item/stack/sheet/bone,
/obj/item/weapon/lighter,
/obj/item/weapon/storage/fancy/cigarettes,
/obj/item/weapon/reagent_containers/food/drinks/bottle,
/obj/item/stack/medical,
/obj/item/weapon/kitchen/knife,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/device/gps,
/obj/item/weapon/storage/bag/ore,
/obj/item/weapon/survivalcapsule,
/obj/item/device/t_scanner/adv_mining_scanner,
/obj/item/weapon/reagent_containers/pill,
/obj/item/weapon/storage/pill_bottle,
/obj/item/weapon/ore,
/obj/item/weapon/reagent_containers/food/drinks
)
/obj/item/weapon/storage/belt/mining/vendor
contents = newlist(/obj/item/weapon/survivalcapsule)
/obj/item/weapon/storage/belt/mining/alt
icon_state = "explorer2"
item_state = "explorer2"
/obj/item/weapon/storage/belt/mining/primitive
name = "hunter's belt"
desc = "A versatile belt, woven from sinew."
storage_slots = 5
icon_state = "ebelt"
item_state = "ebelt"
/obj/item/weapon/storage/belt/soulstone
name = "soul stone belt"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away"
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
/obj/item/device/soulstone
)
/obj/item/weapon/storage/belt/soulstone/full/New()
..()
for(var/i in 1 to 6)
new /obj/item/device/soulstone(src)
/obj/item/weapon/storage/belt/champion
name = "championship belt"
desc = "Proves to the world that you are the strongest!"
icon_state = "championbelt"
item_state = "champion"
materials = list(MAT_GOLD=400)
storage_slots = 1
can_hold = list(
/obj/item/clothing/mask/luchador
)
/obj/item/weapon/storage/belt/military
name = "military belt"
desc = "A syndicate belt designed to be used by boarding parties. Its style is modeled after the hardsuits they wear."
icon_state = "militarybelt"
item_state = "military"
max_w_class = 2
/obj/item/weapon/storage/belt/military/army
name = "army belt"
desc = "A belt used by military forces."
icon_state = "grenadebeltold"
item_state = "security"
/obj/item/weapon/storage/belt/military/assault
name = "assault belt"
desc = "A tactical assault belt."
icon_state = "assaultbelt"
item_state = "security"
storage_slots = 6
/obj/item/weapon/storage/belt/grenade
name = "grenadier belt"
desc = "A belt for holding grenades."
icon_state = "grenadebeltnew"
item_state = "security"
max_w_class = 4
storage_slots = 30
can_hold = list(
/obj/item/weapon/grenade,
/obj/item/weapon/screwdriver,
/obj/item/weapon/lighter,
/obj/item/device/multitool,
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov,
/obj/item/weapon/c4,
)
/obj/item/weapon/storage/belt/grenade/full/New()
..()
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/syndieminibomb/concussion/frag(src)
new /obj/item/weapon/grenade/gluon(src)
new /obj/item/weapon/grenade/gluon(src)
new /obj/item/weapon/grenade/gluon(src)
new /obj/item/weapon/grenade/gluon(src)
new /obj/item/weapon/grenade/chem_grenade/incendiary(src)
new /obj/item/weapon/grenade/chem_grenade/incendiary(src)
new /obj/item/weapon/grenade/chem_grenade/facid(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/device/multitool(src)
/obj/item/weapon/storage/belt/wands
name = "wand belt"
desc = "A belt designed to hold various rods of power. A veritable fanny pack of exotic magic."
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
/obj/item/weapon/gun/magic/wand
)
/obj/item/weapon/storage/belt/wands/full/New()
..()
new /obj/item/weapon/gun/magic/wand/death(src)
new /obj/item/weapon/gun/magic/wand/resurrection(src)
new /obj/item/weapon/gun/magic/wand/polymorph(src)
new /obj/item/weapon/gun/magic/wand/teleport(src)
new /obj/item/weapon/gun/magic/wand/door(src)
new /obj/item/weapon/gun/magic/wand/fireball(src)
for(var/obj/item/weapon/gun/magic/wand/W in contents) //All wands in this pack come in the best possible condition
W.max_charges = initial(W.max_charges)
W.charges = W.max_charges
/obj/item/weapon/storage/belt/janitor
name = "janibelt"
desc = "A belt used to hold most janitorial supplies."
icon_state = "janibelt"
item_state = "janibelt"
storage_slots = 6
max_w_class = 4 // Set to this so the light replacer can fit.
can_hold = list(
/obj/item/weapon/grenade/chem_grenade,
/obj/item/device/lightreplacer,
/obj/item/device/flashlight,
/obj/item/weapon/reagent_containers/spray,
/obj/item/weapon/soap,
/obj/item/weapon/holosign_creator,
/obj/item/key/janitor,
/obj/item/clothing/gloves/
)
/obj/item/weapon/storage/belt/bandolier
name = "bandolier"
desc = "A bandolier for holding shotgun ammunition."
icon_state = "bandolier"
item_state = "bandolier"
storage_slots = 18
can_hold = list(
/obj/item/ammo_casing/shotgun
)
/obj/item/weapon/storage/belt/holster
name = "shoulder holster"
desc = "A holster to carry a handgun and ammo. WARNING: Badasses only."
icon_state = "holster"
item_state = "holster"
storage_slots = 3
max_w_class = 3
can_hold = list(
/obj/item/weapon/gun/projectile/automatic/pistol,
/obj/item/weapon/gun/projectile/revolver,
/obj/item/ammo_box,
)
alternate_worn_layer = UNDER_SUIT_LAYER
/obj/item/weapon/storage/belt/fannypack
name = "fannypack"
desc = "A dorky fannypack for keeping small items in."
icon_state = "fannypack_leather"
item_state = "fannypack_leather"
storage_slots = 3
max_w_class = 2
/obj/item/weapon/storage/belt/fannypack/black
name = "black fannypack"
icon_state = "fannypack_black"
item_state = "fannypack_black"
/obj/item/weapon/storage/belt/fannypack/red
name = "red fannypack"
icon_state = "fannypack_red"
item_state = "fannypack_red"
/obj/item/weapon/storage/belt/fannypack/purple
name = "purple fannypack"
icon_state = "fannypack_purple"
item_state = "fannypack_purple"
/obj/item/weapon/storage/belt/fannypack/blue
name = "blue fannypack"
icon_state = "fannypack_blue"
item_state = "fannypack_blue"
/obj/item/weapon/storage/belt/fannypack/orange
name = "orange fannypack"
icon_state = "fannypack_orange"
item_state = "fannypack_orange"
/obj/item/weapon/storage/belt/fannypack/white
name = "white fannypack"
icon_state = "fannypack_white"
item_state = "fannypack_white"
/obj/item/weapon/storage/belt/fannypack/green
name = "green fannypack"
icon_state = "fannypack_green"
item_state = "fannypack_green"
/obj/item/weapon/storage/belt/fannypack/pink
name = "pink fannypack"
icon_state = "fannypack_pink"
item_state = "fannypack_pink"
/obj/item/weapon/storage/belt/fannypack/cyan
name = "cyan fannypack"
icon_state = "fannypack_cyan"
item_state = "fannypack_cyan"
/obj/item/weapon/storage/belt/fannypack/yellow
name = "yellow fannypack"
icon_state = "fannypack_yellow"
item_state = "fannypack_yellow"
@@ -0,0 +1,208 @@
/obj/item/weapon/storage/book
name = "hollowed book"
desc = "I guess someone didn't like it."
icon = 'icons/obj/library.dmi'
icon_state ="book"
throw_speed = 2
throw_range = 5
w_class = 3
burn_state = FLAMMABLE
var/title = "book"
/obj/item/weapon/storage/book/attack_self(mob/user)
user << "<span class='notice'>The pages of [title] have been cut out!</span>"
/obj/item/weapon/storage/book/bible
name = "bible"
desc = "Apply to head repeatedly."
icon = 'icons/obj/storage.dmi'
icon_state ="bible"
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/weapon/storage/book/bible/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is offering \himself to [src.deity_name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS)
/obj/item/weapon/storage/book/bible/booze
name = "bible"
desc = "To be applied to the head repeatedly."
icon_state ="bible"
/obj/item/weapon/storage/book/bible/booze/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
//Pretty bible names
var/global/list/biblenames = list("Bible", "Quran", "Scrapbook", "Burning Bible", "Clown Bible", "Banana Bible", "Creeper Bible", "White Bible", "Holy Light", "The God Delusion", "Tome", "The King in Yellow", "Ithaqua", "Scientology", "Melted Bible", "Necronomicon")
//Bible iconstates
var/global/list/biblestates = list("bible", "koran", "scrapbook", "burning", "honk1", "honk2", "creeper", "white", "holylight", "atheist", "tome", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon")
//Bible itemstates
var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "bible", "bible", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon")
/obj/item/weapon/storage/book/bible/attack_self(mob/living/carbon/human/H)
if(!istype(H))
return
if(ticker && !ticker.Bible_icon_state && H.job == "Chaplain")
//Open bible selection
var/dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
var/i
for(i = 1, i < biblestates.len, i++)
var/icon/bibleicon = icon('icons/obj/storage.dmi', biblestates[i])
var/nicename = biblenames[i]
H << browse_rsc(bibleicon, nicename)
dat += {"<tr><td><img src="[nicename]"></td><td><a href="?src=\ref[src];seticon=[i]">[nicename]</a></td></tr>"}
dat += "</table></body></html>"
H << browse(dat, "window=editicon;can_close=0;can_minimize=0;size=250x650")
/obj/item/weapon/storage/book/bible/proc/setupbiblespecifics(obj/item/weapon/storage/book/bible/B, mob/living/carbon/human/H)
switch(B.icon_state)
if("honk1","honk2")
new /obj/item/weapon/bikehorn(B)
H.dna.add_mutation(CLOWNMUT)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
if("bible")
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.setDir(2)
if("koran")
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.setDir(4)
if("scientology")
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.setDir(8)
if("atheist")
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.setDir(10)
/obj/item/weapon/storage/book/bible/Topic(href, href_list)
if(href_list["seticon"] && ticker && !ticker.Bible_icon_state)
var/iconi = text2num(href_list["seticon"])
var/biblename = biblenames[iconi]
var/obj/item/weapon/storage/book/bible/B = locate(href_list["src"])
B.icon_state = biblestates[iconi]
B.item_state = bibleitemstates[iconi]
//Set biblespecific chapels
setupbiblespecifics(B, usr)
if(ticker)
ticker.Bible_icon_state = B.icon_state
ticker.Bible_item_state = B.item_state
feedback_set_details("religion_book","[biblename]")
usr << browse(null, "window=editicon") // Close window
/obj/item/weapon/storage/book/bible/proc/bless(mob/living/carbon/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/obj/item/bodypart/affecting in H.bodyparts)
if(affecting.status == ORGAN_ORGANIC) //No Bible can heal a robotic arm!
if(affecting.heal_damage(heal_amt, heal_amt, 0))
H.update_damage_overlays(0)
return
/obj/item/weapon/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user)
var/chaplain = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
chaplain = 1
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
if(!chaplain)
user << "<span class='danger'>The book sizzles in your hands.</span>"
user.take_organ_damage(0,10)
return
if (user.disabilities & CLUMSY && prob(50))
user << "<span class='danger'>The [src] slips out of your hand and hits your head.</span>"
user.take_organ_damage(10)
user.Paralyse(20)
return
if (M.stat !=2)
if(M.mind && (M.mind.assigned_role == "Chaplain"))
user << "<span class='warning'>You can't heal yourself!</span>"
return
if ((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/message_halt = 0
for(var/obj/item/bodypart/affecting in H.bodyparts)
if(affecting.status == ORGAN_ORGANIC)
if(message_halt == 0)
M.visible_message("<span class='notice'>[user] heals [M] with the power of [src.deity_name]!</span>")
M << "<span class='boldnotice'>May the power of [src.deity_name] compel you to be healed!</span>"
playsound(src.loc, "punch", 25, 1, -1)
message_halt = 1
else
user << "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>"
return
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
M << "<span class='danger'>You feel dumber.</span>"
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", \
"<span class='userdanger'>[user] beats [M] over the head with [src]!</span>")
playsound(src.loc, "punch", 25, 1, -1)
add_logs(user, M, "attacked", src)
else if(M.stat == 2)
M.visible_message("<span class='danger'>[user] smacks [M]'s lifeless corpse with [src].</span>")
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user, proximity)
if(!proximity)
return
if (istype(A, /turf/open/floor))
user << "<span class='notice'>You hit the floor with the bible.</span>"
if(user.mind && (user.mind.assigned_role == "Chaplain"))
for(var/obj/effect/rune/R in orange(2,user))
R.invisibility = 0
if(user.mind && (user.mind.assigned_role == "Chaplain"))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
user << "<span class='notice'>You bless [A].</span>"
var/water2holy = A.reagents.get_reagent_amount("water")
A.reagents.del_reagent("water")
A.reagents.add_reagent("holywater",water2holy)
if(A.reagents && A.reagents.has_reagent("unholywater")) //yeah yeah, copy pasted code - sue me
user << "<span class='notice'>You purify [A].</span>"
var/unholy2clean = A.reagents.get_reagent_amount("unholywater")
A.reagents.del_reagent("unholywater")
A.reagents.add_reagent("holywater",unholy2clean)
/obj/item/weapon/storage/book/bible/attackby(obj/item/weapon/W, mob/user, params)
playsound(src.loc, "rustle", 50, 1, -5)
return ..()
@@ -0,0 +1,839 @@
/*
* Everything derived from the common cardboard box.
* Basically everything except the original is a kit (starts full).
*
* Contains:
* Empty box, starter boxes (survival/engineer),
* Latex glove and sterile mask boxes,
* Syringe, beaker, dna injector boxes,
* Blanks, flashbangs, and EMP grenade boxes,
* Tracking and chemical implant boxes,
* Prescription glasses and drinking glass boxes,
* Condiment bottle and silly cup boxes,
* Donkpocket and monkeycube boxes,
* ID and security PDA cart boxes,
* Handcuff, mousetrap, and pillbottle boxes,
* Snap-pops and matchboxes,
* Replacement light boxes.
* Various paper bags.
*
* For syndicate call-ins see uplink_kits.dm
*/
/obj/item/weapon/storage/box
name = "box"
desc = "It's just an ordinary box."
icon_state = "box"
item_state = "syringe_kit"
burn_state = FLAMMABLE
var/foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/box/attack_self(mob/user)
..()
if(!foldable)
return
if(contents.len)
user << "<span class='warning'>You can't fold this box with items still inside!</span>"
return
if(!ispath(foldable))
return
//Close any open UI windows first
close_all()
user << "<span class='notice'>You fold [src] flat.</span>"
var/obj/item/I = new foldable(get_turf(src))
user.drop_item()
user.put_in_hands(I)
user.update_inv_l_hand()
user.update_inv_r_hand()
qdel(src)
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/packageWrap))
return 0
return ..()
// Ordinary survival box
/obj/item/weapon/storage/box/survival/New()
..()
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/weapon/storage/box/survival/radio/New()
..()
new /obj/item/device/radio/off(src)
/obj/item/weapon/storage/box/survival_mining/New()
..()
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
// Engineer survival box
/obj/item/weapon/storage/box/engineer/New()
..()
new /obj/item/clothing/mask/breath(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/weapon/storage/box/engineer/radio/New()
..()
new /obj/item/device/radio/off(src)
// Syndie survival box
/obj/item/weapon/storage/box/syndie/New()
..()
new /obj/item/clothing/mask/gas/syndicate(src)
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
// Security survival box
/obj/item/weapon/storage/box/security/New()
..()
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/weapon/storage/box/security/radio/New()
..()
new /obj/item/device/radio/off(src)
/obj/item/weapon/storage/box/gloves
name = "box of latex gloves"
desc = "Contains sterile latex gloves."
icon_state = "latex"
/obj/item/weapon/storage/box/gloves/New()
..()
for(var/i in 1 to 7)
new /obj/item/clothing/gloves/color/latex(src)
/obj/item/weapon/storage/box/masks
name = "box of sterile masks"
desc = "This box contains sterile medical masks."
icon_state = "sterile"
/obj/item/weapon/storage/box/masks/New()
..()
for(var/i in 1 to 7)
new /obj/item/clothing/mask/surgical(src)
/obj/item/weapon/storage/box/syringes
name = "box of syringes"
desc = "A box full of syringes."
desc = "A biohazard alert warning is printed on the box"
icon_state = "syringe"
/obj/item/weapon/storage/box/syringes/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/syringe( src )
/obj/item/weapon/storage/box/medipens
name = "box of medipens"
desc = "A box full of epinephrine MediPens."
icon_state = "syringe"
/obj/item/weapon/storage/box/medipens/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/hypospray/medipen( src )
/obj/item/weapon/storage/box/medipens/utility
name = "stimpack value kit"
desc = "A box with several stimpack medipens for the economical miner."
icon_state = "syringe"
/obj/item/weapon/storage/box/medipens/utility/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/reagent_containers/hypospray/medipen/stimpack(src)
/obj/item/weapon/storage/box/beakers
name = "box of beakers"
icon_state = "beaker"
/obj/item/weapon/storage/box/beakers/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/glass/beaker( src )
/obj/item/weapon/storage/box/injectors
name = "box of DNA injectors"
desc = "This box contains injectors it seems."
/obj/item/weapon/storage/box/injectors/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/dnainjector/h2m(src)
for(var/i in 1 to 3)
new /obj/item/weapon/dnainjector/m2h(src)
/obj/item/weapon/storage/box/flashbangs
name = "box of flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
icon_state = "flashbang"
/obj/item/weapon/storage/box/flashbangs/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/grenade/flashbang(src)
/obj/item/weapon/storage/box/flashes
name = "box of flashbulbs"
desc = "<B>WARNING: Flashes can cause serious eye damage, protective eyewear is required.</B>"
icon_state = "flashbang"
/obj/item/weapon/storage/box/flashes/New()
..()
for(var/i in 1 to 6)
new /obj/item/device/assembly/flash/handheld(src)
/obj/item/weapon/storage/box/wall_flash
name = "wall-mounted flash kit"
desc = "This box contains everything neccesary to build a wall-mounted flash. <B>WARNING: Flashes can cause serious eye damage, protective eyewear is required.</B>"
icon_state = "flashbang"
/obj/item/weapon/storage/box/wall_flash/New()
..()
var/id = rand(1000, 9999)
new /obj/item/wallframe/button(src)
new /obj/item/weapon/electronics/airlock(src)
var/obj/item/device/assembly/control/flasher/remote = new(src)
remote.id = id
var/obj/item/wallframe/flasher/frame = new(src)
frame.id = id
new /obj/item/device/assembly/flash/handheld(src)
new /obj/item/weapon/screwdriver(src)
/obj/item/weapon/storage/box/teargas
name = "box of tear gas grenades (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness and skin irritation.</B>"
icon_state = "flashbang"
/obj/item/weapon/storage/box/teargas/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
/obj/item/weapon/storage/box/emps
name = "box of emp grenades"
desc = "A box with 5 emp grenades."
icon_state = "flashbang"
/obj/item/weapon/storage/box/emps/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/grenade/empgrenade(src)
/obj/item/weapon/storage/box/trackimp
name = "boxed tracking implant kit"
desc = "Box full of scum-bag tracking utensils."
icon_state = "implant"
/obj/item/weapon/storage/box/trackimp/New()
..()
for(var/i in 1 to 4)
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
new /obj/item/weapon/locator(src)
/obj/item/weapon/storage/box/minertracker
name = "boxed tracking implant kit"
desc = "For finding those who have died on the accursed lavaworld."
icon_state = "implant"
/obj/item/weapon/storage/box/minertracker/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/implantcase/tracking(src)
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
new /obj/item/weapon/locator(src)
/obj/item/weapon/storage/box/chemimp
name = "boxed chemical implant kit"
desc = "Box of stuff used to implant chemicals."
icon_state = "implant"
/obj/item/weapon/storage/box/chemimp/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/implantcase/chem(src)
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
/obj/item/weapon/storage/box/exileimp
name = "boxed exile implant kit"
desc = "Box of exile implants. It has a picture of a clown being booted through the Gateway."
icon_state = "implant"
/obj/item/weapon/storage/box/exileimp/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/implantcase/exile(src)
new /obj/item/weapon/implanter(src)
/obj/item/weapon/storage/box/rxglasses
name = "box of prescription glasses"
desc = "This box contains nerd glasses."
icon_state = "glasses"
/obj/item/weapon/storage/box/rxglasses/New()
..()
for(var/i in 1 to 7)
new /obj/item/clothing/glasses/regular(src)
/obj/item/weapon/storage/box/drinkingglasses
name = "box of drinking glasses"
desc = "It has a picture of drinking glasses on it."
/obj/item/weapon/storage/box/drinkingglasses/New()
..()
for(var/i in 1 to 6)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(src)
/obj/item/weapon/storage/box/condimentbottles
name = "box of condiment bottles"
desc = "It has a large ketchup smear on it."
/obj/item/weapon/storage/box/condimentbottles/New()
..()
for(var/i in 1 to 6)
new /obj/item/weapon/reagent_containers/food/condiment(src)
/obj/item/weapon/storage/box/cups
name = "box of paper cups"
desc = "It has pictures of paper cups on the front."
/obj/item/weapon/storage/box/cups/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/food/drinks/sillycup( src )
/obj/item/weapon/storage/box/donkpockets
name = "box of donk-pockets"
desc = "<B>Instructions:</B> <I>Heat in microwave. Product will cool if not eaten within seven minutes.</I>"
icon_state = "donk_kit"
/obj/item/weapon/storage/box/donkpockets/New()
..()
for(var/i in 1 to 6)
new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src)
/obj/item/weapon/storage/box/monkeycubes
name = "monkey cube box"
desc = "Drymate brand monkey cubes. Just add water!"
icon = 'icons/obj/food/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube)
/obj/item/weapon/storage/box/monkeycubes/New()
..()
for(var/i = 1; i <= 5; i++)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube(src)
/obj/item/weapon/storage/box/permits
name = "box of construction permits"
desc = "A box for containing construction permits, used to officially declare built rooms as additions to the station."
icon_state = "id"
/obj/item/weapon/storage/box/permits/New() //There's only a few, so blueprints are still useful beyond setting every room's name to PRIMARY FART STORAGE
..()
for(var/i in 1 to 3)
new /obj/item/areaeditor/permit(src)
/obj/item/weapon/storage/box/ids
name = "box of spare IDs"
desc = "Has so many empty IDs."
icon_state = "id"
/obj/item/weapon/storage/box/ids/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/card/id(src)
/obj/item/weapon/storage/box/silver_ids
name = "box of spare silver IDs"
desc = "Shiny IDs for important people."
icon_state = "id"
/obj/item/weapon/storage/box/silver_ids/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/card/id/silver(src)
/obj/item/weapon/storage/box/prisoner
name = "box of prisoner IDs"
desc = "Take away their last shred of dignity, their name."
icon_state = "id"
/obj/item/weapon/storage/box/prisoner/New()
..()
new /obj/item/weapon/card/id/prisoner/one(src)
new /obj/item/weapon/card/id/prisoner/two(src)
new /obj/item/weapon/card/id/prisoner/three(src)
new /obj/item/weapon/card/id/prisoner/four(src)
new /obj/item/weapon/card/id/prisoner/five(src)
new /obj/item/weapon/card/id/prisoner/six(src)
new /obj/item/weapon/card/id/prisoner/seven(src)
/obj/item/weapon/storage/box/seccarts
name = "box of PDA security cartridges"
desc = "A box full of PDA cartridges used by Security."
icon_state = "pda"
/obj/item/weapon/storage/box/seccarts/New()
..()
new /obj/item/weapon/cartridge/detective(src)
for(var/i in 1 to 6)
new /obj/item/weapon/cartridge/security(src)
/obj/item/weapon/storage/box/firingpins
name = "box of standard firing pins"
desc = "A box full of standard firing pins, to allow newly-developed firearms to operate."
icon_state = "id"
/obj/item/weapon/storage/box/firingpins/New()
..()
for(var/i in 1 to 5)
new /obj/item/device/firing_pin(src)
/obj/item/weapon/storage/box/lasertagpins
name = "box of laser tag firing pins"
desc = "A box full of laser tag firing pins, to allow newly-developed firearms to require wearing brightly coloured plastic armor before being able to be used."
icon_state = "id"
/obj/item/weapon/storage/box/lasertagpins/New()
..()
for(var/i in 1 to 3)
new /obj/item/device/firing_pin/tag/red(src)
new /obj/item/device/firing_pin/tag/blue(src)
/obj/item/weapon/storage/box/handcuffs
name = "box of spare handcuffs"
desc = "A box full of handcuffs."
icon_state = "handcuff"
/obj/item/weapon/storage/box/handcuffs/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/restraints/handcuffs(src)
/obj/item/weapon/storage/box/zipties
name = "box of spare zipties"
desc = "A box full of zipties."
icon_state = "handcuff"
/obj/item/weapon/storage/box/zipties/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
/obj/item/weapon/storage/box/alienhandcuffs
name = "box of spare handcuffs"
desc = "A box full of handcuffs."
icon_state = "alienboxCuffs"
/obj/item/weapon/storage/box/alienhandcuffs/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/restraints/handcuffs/alien(src)
/obj/item/weapon/storage/box/fakesyndiesuit
name = "boxed space suit and helmet"
desc = "A sleek, sturdy box used to hold replica spacesuits."
icon_state = "box_of_doom"
/obj/item/weapon/storage/box/fakesyndiesuit/New()
..()
new /obj/item/clothing/head/syndicatefake(src)
new /obj/item/clothing/suit/syndicatefake(src)
/obj/item/weapon/storage/box/mousetraps
name = "box of Pest-B-Gon mousetraps"
desc = "<span class='alert'>Keep out of reach of children.</span>"
icon_state = "mousetraps"
/obj/item/weapon/storage/box/mousetraps/New()
..()
for(var/i in 1 to 6)
new /obj/item/device/assembly/mousetrap( src )
/obj/item/weapon/storage/box/pillbottles
name = "box of pill bottles"
desc = "It has pictures of pill bottles on its front."
icon_state = "pillbox"
/obj/item/weapon/storage/box/pillbottles/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/storage/pill_bottle( src )
/obj/item/weapon/storage/box/snappops
name = "snap pop box"
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list(/obj/item/toy/snappop)
/obj/item/weapon/storage/box/snappops/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/toy/snappop(src)
/obj/item/weapon/storage/box/matches
name = "matchbox"
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "matchbox"
item_state = "zippo"
storage_slots = 10
w_class = 1
slot_flags = SLOT_BELT
can_hold = list(/obj/item/weapon/match)
/obj/item/weapon/storage/box/matches/New()
..()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/match(src)
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/match/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/match))
W.matchignite()
/obj/item/weapon/storage/box/lights
name = "box of replacement bulbs"
icon = 'icons/obj/storage.dmi'
icon_state = "light"
desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
max_combined_w_class = 21
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/lights/bulbs/New()
..()
for(var/i = 0; i < 21; i++)
new /obj/item/weapon/light/bulb(src)
/obj/item/weapon/storage/box/lights/tubes
name = "box of replacement tubes"
icon_state = "lighttube"
/obj/item/weapon/storage/box/lights/tubes/New()
..()
for(var/i = 0; i < 21; i++)
new /obj/item/weapon/light/tube(src)
/obj/item/weapon/storage/box/lights/mixed
name = "box of replacement lights"
icon_state = "lightmixed"
/obj/item/weapon/storage/box/lights/mixed/New()
..()
for(var/i = 0; i < 14; i++)
new /obj/item/weapon/light/tube(src)
for(var/i = 0; i < 7; i++)
new /obj/item/weapon/light/bulb(src)
/obj/item/weapon/storage/box/deputy
name = "box of deputy armbands"
desc = "To be issued to those authorized to act as deputy of security."
/obj/item/weapon/storage/box/deputy/New()
..()
for(var/i in 1 to 7)
new /obj/item/clothing/tie/armband/deputy(src)
/obj/item/weapon/storage/box/metalfoam
name = "box of metal foam grenades"
desc = "To be used to rapidly seal hull breaches"
icon_state = "flashbang"
/obj/item/weapon/storage/box/metalfoam/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/grenade/chem_grenade/metalfoam(src)
/obj/item/weapon/storage/box/hug
name = "box of hugs"
desc = "A special box for sensitive people."
icon_state = "hugbox"
foldable = null
/obj/item/weapon/storage/box/hug/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] clamps the box of hugs on \his jugular! Guess it wasn't such a hugbox after all..</span>")
return (BRUTELOSS)
/obj/item/weapon/storage/box/hug/attack_self(mob/user)
..()
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, "rustle", 50, 1, -5)
user.visible_message("<span class='notice'>[user] hugs \the [src].</span>","<span class='notice'>You hug \the [src].</span>")
return
/obj/item/weapon/storage/box/hug/medical/New()
..()
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
/obj/item/ammo_casing/shotgun/rubbershot
/obj/item/weapon/storage/box/rubbershot
name = "box of rubber shots"
desc = "A box full of rubber shots, designed for riot shotguns."
icon_state = "rubbershot_box"
/obj/item/weapon/storage/box/rubbershot/New()
..()
for(var/i in 1 to 7)
new /obj/item/ammo_casing/shotgun/rubbershot(src)
/obj/item/weapon/storage/box/lethalshot
name = "box of lethal shotgun shots"
desc = "A box full of lethal shots, designed for riot shotguns."
icon_state = "lethalshot_box"
/obj/item/weapon/storage/box/lethalshot/New()
..()
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
new /obj/item/ammo_casing/shotgun/buckshot(src)
/obj/item/weapon/storage/box/beanbag
name = "box of beanbags"
desc = "A box full of beanbag shells."
icon_state = "rubbershot_box"
/obj/item/weapon/storage/box/beanbag/New()
..()
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
#define NODESIGN "None"
#define NANOTRASEN "NanotrasenStandard"
#define SYNDI "SyndiSnacks"
#define HEART "Heart"
#define SMILE "SmileyFace"
/obj/item/weapon/storage/box/papersack
name = "paper sack"
desc = "A sack neatly crafted out of paper."
icon_state = "paperbag_None"
item_state = "paperbag_None"
burn_state = FLAMMABLE
foldable = null
var/design = NODESIGN
/obj/item/weapon/storage/box/papersack/update_icon()
if(contents.len == 0)
icon_state = "[item_state]"
else icon_state = "[item_state]_closed"
/obj/item/weapon/storage/box/papersack/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/pen))
//if a pen is used on the sack, dialogue to change its design appears
if(contents.len)
user << "<span class='warning'>You can't modify this [src] with items still inside!</span>"
return
var/list/designs = list(NODESIGN, NANOTRASEN, SYNDI, HEART, SMILE, "Cancel")
var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) in designs
if(get_dist(usr, src) > 1)
usr << "<span class='warning'>You have moved too far away!</span>"
return
var/choice = designs.Find(switchDesign)
if(design == designs[choice] || designs[choice] == "Cancel")
return 0
usr << "<span class='notice'>You make some modifications to the [src] using your pen.</span>"
design = designs[choice]
icon_state = "paperbag_[design]"
item_state = "paperbag_[design]"
switch(designs[choice])
if(NODESIGN)
desc = "A sack neatly crafted out of paper."
if(NANOTRASEN)
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
if(SYNDI)
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
if(HEART)
desc = "A paper sack with a heart etched onto the side."
if(SMILE)
desc = "A paper sack with a crude smile etched onto the side."
return 0
else if(W.is_sharp())
if(!contents.len)
if(item_state == "paperbag_None")
user.show_message("<span class='notice'>You cut eyeholes into the [src].</span>", 1)
new /obj/item/clothing/head/papersack(user.loc)
qdel(src)
return 0
else if(item_state == "paperbag_SmileyFace")
user.show_message("<span class='notice'>You cut eyeholes into the [src] and modify the design.</span>", 1)
new /obj/item/clothing/head/papersack/smiley(user.loc)
qdel(src)
return 0
return ..()
#undef NODESIGN
#undef NANOTRASEN
#undef SYNDI
#undef HEART
#undef SMILE
/obj/item/weapon/storage/box/ingredients //This box is for the randomely chosen version the chef spawns with, it shouldn't actually exist.
name = "ingredients box"
icon_state = "donk_kit"
item_state = null
/obj/item/weapon/storage/box/ingredients/wildcard
item_state = "wildcard"
/obj/item/weapon/storage/box/ingredients/wildcard/New()
..()
for(var/i in 1 to 6)
//Pick common ingredients
var/randomFood = pick(/obj/item/weapon/reagent_containers/food/snacks/grown/chili,
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
/obj/item/weapon/reagent_containers/food/snacks/grown/apple,
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage,
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/corn)
new randomFood(src)
//Pick one random rare ingredient
var/randomRareFood = pick(/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/gold,
/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper,
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle)
new randomRareFood(src)
/obj/item/weapon/storage/box/ingredients/fiesta
item_state = "fiesta"
/obj/item/weapon/storage/box/ingredients/fiesta/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/food/snacks/tortilla(src)
for(var/i in 1 to 2)
new /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/chili(src)
/obj/item/weapon/storage/box/ingredients/italian
item_state = "italian"
/obj/item/weapon/storage/box/ingredients/italian/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/food/snacks/grown/tomato(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris(src)
new /obj/item/weapon/reagent_containers/food/snacks/faggot(src)
/obj/item/weapon/storage/box/ingredients/vegetarian
item_state = "vegetarian"
/obj/item/weapon/storage/box/ingredients/vegetarian/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/carrot(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/eggplant(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/potato(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/apple(src)
/obj/item/weapon/storage/box/ingredients/sweets
item_state = "sweets"
/obj/item/weapon/storage/box/ingredients/sweets/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/food/snacks/chocolatebar(src)
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/cherries(src)
new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(src)
new /obj/item/weapon/reagent_containers/food/snacks/icecream(src)
/obj/item/weapon/storage/box/ingredients/carnivore
item_state = "carnivore"
/obj/item/weapon/storage/box/ingredients/carnivore/New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/bear(src)
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/spider(src)
new /obj/item/weapon/reagent_containers/food/snacks/carpmeat(src)
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/slime(src)
new /obj/item/weapon/reagent_containers/food/snacks/faggot(src)
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/corgi(src)
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/monkey(src)
/obj/item/weapon/storage/box/ingredients/exotic
item_state = "exotic"
/obj/item/weapon/storage/box/ingredients/exotic/New()
..()
new /obj/item/weapon/reagent_containers/food/condiment/soysauce(src)
for(var/i in 1 to 2)
new /obj/item/weapon/reagent_containers/food/snacks/grown/cabbage(src)
new /obj/item/weapon/reagent_containers/food/snacks/soydope(src)
new /obj/item/weapon/reagent_containers/food/snacks/carpmeat(src)
/obj/item/weapon/storage/box/ingredients/New()
..()
if(item_state)
desc = "A box containing supplementary ingredients for the aspiring chef. This box's theme is '[item_state]'."
/obj/item/weapon/storage/box/emptysandbags
name = "box of empty sandbags"
/obj/item/weapon/storage/box/emptysandbags/New()
..()
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
new /obj/item/weapon/emptysandbag(src)
/obj/item/weapon/storage/box/rndboards
name = "\proper the liberator's legacy"
desc = "A box containing a gift for worthy golems."
/obj/item/weapon/storage/box/rndboards/New()
..()
new /obj/item/weapon/circuitboard/machine/protolathe(src)
new /obj/item/weapon/circuitboard/machine/destructive_analyzer(src)
new /obj/item/weapon/circuitboard/machine/circuit_imprinter(src)
new /obj/item/weapon/circuitboard/computer/rdconsole(src)
@@ -0,0 +1,56 @@
/obj/item/weapon/storage/briefcase
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
flags = CONDUCT
force = 8
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = 4
max_w_class = 3
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
burn_state = FLAMMABLE
burntime = 20
var/folder_path = /obj/item/weapon/folder //this is the path of the folder that gets spawned in New()
/obj/item/weapon/storage/briefcase/New()
..()
new /obj/item/weapon/pen(src)
var/obj/item/weapon/folder/folder = new folder_path(src)
for(var/i in 1 to 6)
new /obj/item/weapon/paper(folder)
/obj/item/weapon/storage/briefcase/lawyer
folder_path = /obj/item/weapon/folder/blue
/obj/item/weapon/storage/briefcase/lawyer/New()
new /obj/item/weapon/stamp/law(src)
..()
/obj/item/weapon/storage/briefcase/sniperbundle
name = "briefcase"
desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding. Smells like L'Air du Temps."
icon_state = "briefcase"
flags = CONDUCT
force = 10
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = 4
max_w_class = 3
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
burn_state = FLAMMABLE
burntime = 20
/obj/item/weapon/storage/briefcase/sniperbundle/New()
..()
new /obj/item/weapon/gun/projectile/automatic/sniper_rifle/syndicate(src)
new /obj/item/clothing/tie/red(src)
new /obj/item/clothing/under/syndicate/sniper(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
new /obj/item/ammo_box/magazine/sniper_rounds/haemorrhage(src)
new /obj/item/weapon/suppressor/specialoffer(src)
@@ -0,0 +1,249 @@
/*
* The 'fancy' path is for objects like donut boxes that show how many items are in the storage item on the sprite itself
* .. Sorry for the shitty path name, I couldnt think of a better one.
*
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
* TODO: Cigarette boxes should be ported to this standard
*
* Contains:
* Donut Box
* Egg Box
* Candle Box
* Cigarette Box
* Cigar Case
*/
/obj/item/weapon/storage/fancy
icon = 'icons/obj/food/containers.dmi'
icon_state = "donutbox6"
name = "donut box"
burn_state = FLAMMABLE
var/icon_type = "donut"
var/spawn_type = null
/obj/item/weapon/storage/fancy/New()
..()
for(var/i = 1 to storage_slots)
new spawn_type(src)
/obj/item/weapon/storage/fancy/update_icon(itemremoved = 0)
var/total_contents = src.contents.len - itemremoved
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/weapon/storage/fancy/examine(mob/user)
..()
if(contents.len == 1)
user << "There is one [src.icon_type] left."
else
user << "There are [contents.len <= 0 ? "no" : "[src.contents.len]"] [src.icon_type]s left."
/*
* Donut Box
*/
/obj/item/weapon/storage/fancy/donut_box
icon = 'icons/obj/food/containers.dmi'
icon_state = "donutbox6"
icon_type = "donut"
name = "donut box"
storage_slots = 6
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/donut
/*
* Egg Box
*/
/obj/item/weapon/storage/fancy/egg_box
icon = 'icons/obj/food/containers.dmi'
icon_state = "eggbox"
icon_type = "egg"
name = "egg box"
storage_slots = 12
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
spawn_type = /obj/item/weapon/reagent_containers/food/snacks/egg
/*
* Candle Box
*/
/obj/item/weapon/storage/fancy/candle_box
name = "candle pack"
desc = "A pack of red candles."
icon = 'icons/obj/candle.dmi'
icon_state = "candlebox5"
icon_type = "candle"
item_state = "candlebox5"
storage_slots = 5
throwforce = 2
slot_flags = SLOT_BELT
spawn_type = /obj/item/candle
////////////
//CIG PACK//
////////////
/obj/item/weapon/storage/fancy/cigarettes
name = "Space Cigarettes"
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig"
item_state = "cigpacket"
w_class = 1
throwforce = 0
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter)
icon_type = "cigarette"
spawn_type = /obj/item/clothing/mask/cigarette
/obj/item/weapon/storage/fancy/cigarettes/New()
..()
create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one
reagents.set_reacting(FALSE)
for(var/obj/item/clothing/mask/cigarette/cig in src)
cig.desc = "\An [name] brand [cig.name]."
name = "\improper [name] packet"
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
cut_overlays()
icon_state = initial(icon_state)
if(!contents.len)
icon_state += "_empty"
else
add_overlay("[icon_state]_open")
for(var/c = contents.len, c >= 1, c--)
add_overlay(image(icon = src.icon, icon_state = "cigarette", pixel_x = 1 * (c -1)))
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W, atom/new_location)
if(istype(W,/obj/item/clothing/mask/cigarette))
if(reagents)
reagents.trans_to(W,(reagents.total_volume/contents.len))
..()
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return
var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents
if(cig)
if(M == user && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/cigarette/W = cig
remove_from_storage(W, M)
M.equip_to_slot_if_possible(W, slot_wear_mask)
contents -= W
user << "<span class='notice'>You take a [icon_type] out of the pack.</span>"
else
..()
else
user << "<span class='notice'>There are no [icon_type]s left in the pack.</span>"
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
name = "DromedaryCo"
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
icon_state = "dromedary"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
name = "Uplift Smooth"
desc = "Your favorite brand, now menthol flavored."
icon_state = "uplift"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
name = "Robust"
desc = "Smoked by the robust."
icon_state = "robust"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
name = "Robust Gold"
desc = "Smoked by the truly robust."
icon_state = "robustg"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold/New()
..()
for(var/i = 1 to storage_slots)
reagents.add_reagent("gold",1)
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
name = "Carp Classic"
desc = "Since 2313."
icon_state = "carp"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
name = "unknown"
desc = "An obscure brand of cigarettes."
icon_state = "syndie"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate/New()
..()
for(var/i = 1 to storage_slots)
reagents.add_reagent("omnizine",15)
name = "cigarette packet"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
name = "Midori Tabako"
desc = "You can't understand the runes, but the packet smells funny."
icon_state = "midori"
spawn_type = /obj/item/clothing/mask/cigarette/rollie
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
name ="Shady Jim's Super Slims"
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
icon_state = "shadyjim"
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims/New()
..()
for(var/i = 1 to storage_slots)
reagents.add_reagent("lipolicide",4)
reagents.add_reagent("ammonia",2)
reagents.add_reagent("plantbgone",1)
reagents.add_reagent("toxin",1.5)
/obj/item/weapon/storage/fancy/rollingpapers
name = "rolling paper pack"
desc = "A pack of NanoTrasen brand rolling papers."
w_class = 1
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig_paper_pack"
storage_slots = 10
icon_type = "rolling paper"
can_hold = list(/obj/item/weapon/rollingpaper)
spawn_type = /obj/item/weapon/rollingpaper
/obj/item/weapon/storage/fancy/rollingpapers/update_icon()
cut_overlays()
if(!contents.len)
add_overlay("[icon_state]_empty")
return
/////////////
//CIGAR BOX//
/////////////
/obj/item/weapon/storage/fancy/cigarettes/cigars
name = "\improper premium cigar case"
desc = "A case of premium cigars. Very expensive."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cigarcase"
w_class = 3
storage_slots = 7
can_hold = list(/obj/item/clothing/mask/cigarette/cigar)
icon_type = "premium cigar"
spawn_type = /obj/item/clothing/mask/cigarette/cigar
/obj/item/weapon/storage/fancy/cigarettes/cigars/update_icon()
cut_overlays()
add_overlay("[icon_state]_open")
for(var/c = contents.len, c >= 1, c--)
add_overlay(image(icon = src.icon, icon_state = icon_type, pixel_x = 4 * (c -1)))
return
/obj/item/weapon/storage/fancy/cigarettes/cigars/cohiba
name = "\improper cohiba robusto cigar case"
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba
/obj/item/weapon/storage/fancy/cigarettes/cigars/havana
name = "\improper premium havanian cigar case"
desc = "A case of classy Havanian cigars."
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
@@ -0,0 +1,221 @@
/* First aid storage
* Contains:
* First Aid Kits
* Pill Bottles
* Dice Pack (in a pill bottle)
*/
/*
* First Aid Kits
*/
/obj/item/weapon/storage/firstaid
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 3
throw_range = 7
var/empty = 0
/obj/item/weapon/storage/firstaid/regular
icon_state = "firstaid"
desc = "A first aid kit with the ability to heal common types of injuries."
/obj/item/weapon/storage/firstaid/regular/New()
..()
if(empty) return
new /obj/item/stack/medical/gauze(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/stack/medical/ointment(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
new /obj/item/device/healthanalyzer(src)
return
/obj/item/weapon/storage/firstaid/fire
name = "burn treatment kit"
desc = "A specialized medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
icon_state = "ointment"
item_state = "firstaid-ointment"
/obj/item/weapon/storage/firstaid/fire/New()
..()
if(empty) return
icon_state = pick("ointment","firefirstaid")
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
new /obj/item/weapon/reagent_containers/pill/oxandrolone(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
new /obj/item/device/healthanalyzer(src)
return
/obj/item/weapon/storage/firstaid/toxin
name = "toxin treatment kit"
desc = "Used to treat toxic blood content and radiation poisoning."
icon_state = "antitoxin"
item_state = "firstaid-toxin"
/obj/item/weapon/storage/firstaid/toxin/New()
..()
if(empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/syringe/charcoal(src)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
new /obj/item/device/healthanalyzer(src)
return
/obj/item/weapon/storage/firstaid/o2
name = "oxygen deprivation treatment kit"
desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state = "firstaid-o2"
/obj/item/weapon/storage/firstaid/o2/New()
..()
if(empty) return
for(var/i in 1 to 4)
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
new /obj/item/weapon/reagent_containers/hypospray/medipen(src)
new /obj/item/device/healthanalyzer(src)
return
/obj/item/weapon/storage/firstaid/brute
name = "brute trauma treatment kit"
desc = "A first aid kit for when you get toolboxed."
icon_state = "brute"
item_state = "firstaid-brute"
/obj/item/weapon/storage/firstaid/brute/New()
..()
if(empty) return
for(var/i in 1 to 4)
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
new /obj/item/stack/medical/gauze(src)
new /obj/item/stack/medical/gauze(src)
new /obj/item/device/healthanalyzer(src)
return
/obj/item/weapon/storage/firstaid/tactical
name = "combat medical kit"
desc = "I hope you've got insurance."
icon_state = "bezerk"
max_w_class = 3
/obj/item/weapon/storage/firstaid/tactical/New()
..()
if(empty) return
new /obj/item/stack/medical/gauze(src)
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
new /obj/item/clothing/glasses/hud/health/night(src)
return
/*
* Pill Bottles
*/
/obj/item/weapon/storage/pill_bottle
name = "pill bottle"
desc = "It's an airtight container for storing medication."
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice)
allow_quick_gather = 1
use_to_pickup = 1
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object) //Quick pillbottle fix. -Agouri
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
var/mob/M = usr
if(!istype(over_object, /obj/screen) || !Adjacent(M))
return ..()
if(!M.restrained() && !M.stat && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if(usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/box/silver_sulf
name = "box of silver sulfadiazine patches"
desc = "Contains patches used to treat burns."
/obj/item/weapon/storage/box/silver_sulf/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
/obj/item/weapon/storage/pill_bottle/charcoal
name = "bottle of charcoal pills"
desc = "Contains pills used to counter toxins."
/obj/item/weapon/storage/pill_bottle/charcoal/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
/obj/item/weapon/storage/pill_bottle/epinephrine
name = "bottle of epinephrine pills"
desc = "Contains pills used to stabilize patients."
/obj/item/weapon/storage/pill_bottle/epinephrine/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/pill/epinephrine(src)
/obj/item/weapon/storage/pill_bottle/mutadone
name = "bottle of mutadone pills"
desc = "Contains pills used to treat genetic abnormalities."
/obj/item/weapon/storage/pill_bottle/mutadone/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/pill/mutadone(src)
/obj/item/weapon/storage/pill_bottle/mannitol
name = "bottle of mannitol pills"
desc = "Contains pills used to treat brain damage."
/obj/item/weapon/storage/pill_bottle/mannitol/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/pill/mannitol(src)
/obj/item/weapon/storage/pill_bottle/stimulant
name = "bottle of stimulant pills"
desc = "Guaranteed to give you that extra burst of energy during a long shift!"
/obj/item/weapon/storage/pill_bottle/stimulant/New()
..()
for(var/i in 1 to 5)
new /obj/item/weapon/reagent_containers/pill/stimulant(src)
/obj/item/weapon/storage/pill_bottle/mining
name = "box of patches"
desc = "Contains patches used to treat brute and burn damage."
/obj/item/weapon/storage/pill_bottle/mining/New()
..()
new /obj/item/weapon/reagent_containers/pill/patch/silver_sulf(src)
for(var/i in 1 to 3)
new /obj/item/weapon/reagent_containers/pill/patch/styptic(src)
@@ -0,0 +1,42 @@
/obj/item/weapon/storage/internal
storage_slots = 2
max_w_class = 2
max_combined_w_class = 4
w_class = 4
var/priority = 1
/*obj/item/weapon/storage/internal/pocket/New()
..()
if(loc) name = loc.name
/obj/item/weapon/storage/internal/pocket/big
max_w_class = 3
max_combined_w_class = 6
/obj/item/weapon/storage/internal/pocket/small
storage_slots = 1
max_combined_w_class = 2
priority = 0
/obj/item/weapon/storage/internal/pocket/tiny
storage_slots = 1
max_w_class = 1
max_combined_w_class = 1
priority = 0
/obj/item/weapon/storage/internal/pocket/small/detective
priority = 1
/obj/item/weapon/storage/internal/pocket/small/detective/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/flask/det(src)
proc/isstorage(var/atom/A)
if(istype(A, /obj/item/weapon/storage))
return 1
if(istype(A, /obj/item/clothing))
var/obj/item/clothing/C = A
if(C.pockets) return 1*/
@@ -0,0 +1,118 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = 4
max_w_class = 3
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(access_armory)
var/locked = 1
var/broken = 0
var/icon_locked = "lockbox+l"
var/icon_closed = "lockbox"
var/icon_broken = "lockbox+b"
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID())
if(broken)
user << "<span class='danger'>It appears to be broken.</span>"
return
if(allowed(user))
locked = !locked
if(locked)
icon_state = icon_locked
user << "<span class='danger'>You lock the [src.name]!</span>"
close_all()
return
else
icon_state = icon_closed
user << "<span class='danger'>You unlock the [src.name]!</span>"
return
else
user << "<span class='danger'>Access Denied.</span>"
return
if(!locked)
return ..()
else
user << "<span class='danger'>It's locked!</span>"
/obj/item/weapon/storage/lockbox/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
usr << "<span class='warning'>It's locked!</span>"
return 0
..()
/obj/item/weapon/storage/lockbox/emag_act(mob/user)
if(!broken)
broken = 1
locked = 0
desc += "It appears to be broken."
icon_state = src.icon_broken
if(user)
visible_message("<span class='warning'>\The [src] has been broken by [user] with an electromagnetic card!</span>")
return
/obj/item/weapon/storage/lockbox/show_to(mob/user)
if(locked)
user << "<span class='warning'>It's locked!</span>"
else
..()
return
//Check the destination item type for contentto.
/obj/item/weapon/storage/lockbox/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
user << "<span class='warning'>It's locked!</span>"
return 0
return ..()
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
return ..()
/obj/item/weapon/storage/lockbox/loyalty
name = "lockbox of mindshield implants"
req_access = list(access_security)
/obj/item/weapon/storage/lockbox/loyalty/New()
..()
for(var/i in 1 to 3)
new /obj/item/weapon/implantcase/mindshield(src)
new /obj/item/weapon/implanter/mindshield(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox of clusterbangs"
desc = "You have a bad feeling about opening this."
req_access = list(access_security)
/obj/item/weapon/storage/lockbox/clusterbang/New()
..()
new /obj/item/weapon/grenade/clusterbuster(src)
/obj/item/weapon/storage/lockbox/medal
name = "medal box"
desc = "A locked box used to store medals of honor."
icon_state = "medalbox+l"
item_state = "syringe_kit"
w_class = 3
max_w_class = 2
storage_slots = 6
req_access = list(access_captain)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
/obj/item/weapon/storage/lockbox/medal/New()
..()
new /obj/item/clothing/tie/medal/silver/valor(src)
new /obj/item/clothing/tie/medal/bronze_heart(src)
for(var/i in 1 to 3)
new /obj/item/clothing/tie/medal/conduct(src)
new /obj/item/clothing/tie/medal/gold/captain(src)
@@ -0,0 +1,222 @@
/*
* Absorbs /obj/item/weapon/secstorage.
* Reimplements it only slightly to use existing storage functionality.
*
* Contains:
* Secure Briefcase
* Wall Safe
*/
// -----------------------------
// Generic Item
// -----------------------------
/obj/item/weapon/storage/secure
name = "secstorage"
var/icon_locking = "secureb"
var/icon_sparking = "securespark"
var/icon_opened = "secure0"
var/locked = 1
var/code = ""
var/l_code = null
var/l_set = 0
var/l_setshort = 0
var/l_hacking = 0
var/emagged = 0
var/open = 0
w_class = 3
max_w_class = 2
max_combined_w_class = 14
/obj/item/weapon/storage/secure/examine(mob/user)
..()
user << text("The service panel is [src.open ? "open" : "closed"].")
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W, mob/user, params)
if(locked)
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20/W.toolspeed, target = src))
src.open =! src.open
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
src.l_hacking = 1
if (do_after(usr, 100/W.toolspeed, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
src.l_hacking = 0
else
src.l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
return
// -> storage/attackby() what with handle insertion, etc
return ..()
/obj/item/weapon/storage/secure/emag_act(mob/user)
if(locked)
if(!emagged)
emagged = 1
src.add_overlay(image('icons/obj/storage.dmi', icon_sparking))
sleep(6)
src.overlays = null
add_overlay(image('icons/obj/storage.dmi', icon_locking))
locked = 0
user << "<span class='notice'>You short out the lock on [src].</span>"
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
usr << "<span class='warning'>It's locked!</span>"
return 0
..()
/obj/item/weapon/storage/secure/attack_self(mob/user)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
if (!src.locked)
message = "*****"
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
user << browse(dat, "window=caselock;size=300x280")
/obj/item/weapon/storage/secure/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
add_overlay(image('icons/obj/storage.dmi', icon_opened))
src.code = null
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
return
return
/obj/item/weapon/storage/secure/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
user << "<span class='warning'>It's locked!</span>"
return 0
return ..()
/obj/item/weapon/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
return ..()
// -----------------------------
// Secure Briefcase
// -----------------------------
/obj/item/weapon/storage/secure/briefcase
name = "secure briefcase"
icon = 'icons/obj/storage.dmi'
icon_state = "secure"
item_state = "sec-case"
desc = "A large briefcase with a digital locking system."
force = 8
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = 4
max_w_class = 3
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/obj/item/weapon/storage/secure/briefcase/New()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
return ..()
/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
else if ((src.loc == user) && (!src.locked))
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
/obj/item/weapon/storage/secure/briefcase/syndie
force = 15
/obj/item/weapon/storage/secure/briefcase/syndie/New()
for(var/i = 0, i < storage_slots - 2, i++)
new /obj/item/stack/spacecash/c1000(src)
return ..()
// -----------------------------
// Secure Safe
// -----------------------------
/obj/item/weapon/storage/secure/safe
name = "secure safe"
icon = 'icons/obj/storage.dmi'
icon_state = "safe"
icon_opened = "safe0"
icon_locking = "safeb"
icon_sparking = "safespark"
force = 8
w_class = 8
max_w_class = 8
anchored = 1
density = 0
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
/obj/item/weapon/storage/secure/safe/New()
..()
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/storage/secure/safe/attack_hand(mob/user)
return attack_self(user)
/obj/item/weapon/storage/secure/safe/HoS/New()
..()
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
@@ -0,0 +1,501 @@
// External storage-related logic:
// /mob/proc/ClickOn() in /_onclick/click.dm - clicking items in storages
// /mob/living/Move() in /modules/mob/living/living.dm - hiding storage boxes on mob movement
// /item/attackby() in /game/objects/items.dm - use_to_pickup and allow_quick_gather functionality
// -- c0
/obj/item/weapon/storage
name = "storage"
icon = 'icons/obj/storage.dmi'
w_class = 3
var/silent = 0 // No message on putting items in
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
var/use_to_pickup //Set this to make it possible to use this item in an inverse way, so you can have the item in your hand and click items on the floor to pick them up.
var/display_contents_with_number //Set this to make the storage item group contents of the same type and display them as a number.
var/allow_quick_empty //Set this variable to allow the object to have the 'empty' verb, which dumps all the contents on the floor.
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile, 2 = pick all of a type
var/preposition = "in" // You put things 'in' a bag, but trays need 'on'.
/obj/item/weapon/storage/MouseDrop(atom/over_object)
if(iscarbon(usr) || isdrone(usr)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
var/mob/M = usr
if(!over_object)
return
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
orient2hud(M) // dunno why it wasn't before
if(M.s_active)
M.s_active.close(M)
show_to(M)
return
if(!M.restrained() && !M.stat)
if(!istype(over_object, /obj/screen))
return content_can_dump(over_object, M)
if(loc != usr || (loc && loc.loc == usr))
return
playsound(loc, "rustle", 50, 1, -5)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
add_fingerprint(usr)
//Check if this storage can dump the items
/obj/item/weapon/storage/proc/content_can_dump(atom/dest_object, mob/user)
if(Adjacent(user) && dest_object.Adjacent(user))
if(dest_object.storage_contents_dump_act(src, user))
playsound(loc, "rustle", 50, 1, -5)
return 1
return 0
//Object behaviour on storage dump
/obj/item/weapon/storage/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
for(var/obj/item/I in src_object)
if(user.s_active != src_object)
if(I.on_found(user))
return
if(can_be_inserted(I,0,user))
src_object.remove_from_storage(I, src)
orient2hud(user)
src_object.orient2hud(user)
if(user.s_active) //refresh the HUD to show the transfered contents
user.s_active.close(user)
user.s_active.show_to(user)
return 1
/obj/item/weapon/storage/proc/return_inv()
var/list/L = list()
L += contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
return L
/obj/item/weapon/storage/proc/show_to(mob/user)
if(!user.client)
return
if(user.s_active != src && (user.stat == CONSCIOUS))
for(var/obj/item/I in src)
if(I.on_found(user))
return
if(user.s_active)
user.s_active.hide_from(user)
user.client.screen |= boxes
user.client.screen |= closer
user.client.screen |= contents
user.s_active = src
is_seeing |= user
/obj/item/weapon/storage/throw_at(atom/target, range, speed, mob/thrower, spin)
close_all()
return ..()
/obj/item/weapon/storage/proc/hide_from(mob/user)
if(!user.client)
return
user.client.screen -= boxes
user.client.screen -= closer
user.client.screen -= contents
if(user.s_active == src)
user.s_active = null
is_seeing -= user
/obj/item/weapon/storage/proc/can_see_contents()
var/list/cansee = list()
for(var/mob/M in is_seeing)
if(M.s_active == src && M.client)
cansee |= M
else
is_seeing -= M
return cansee
/obj/item/weapon/storage/proc/close(mob/user)
hide_from(user)
user.s_active = null
/obj/item/weapon/storage/proc/close_all()
for(var/mob/M in can_see_contents())
close(M)
. = 1 //returns 1 if any mobs actually got a close(M) call
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in contents)
O.screen_loc = "[cx],[cy]"
O.layer = ABOVE_HUD_LAYER
cx++
if(cx > mx)
cx = tx
cy--
closer.screen_loc = "[mx+1],[my]"
//This proc draws out the inventory and places the items on it. It uses the standard position.
/obj/item/weapon/storage/proc/standard_orient_objs(rows, cols, list/obj/item/display_contents)
var/cx = 4
var/cy = 2+rows
boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16"
if(display_contents_with_number)
for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.mouse_opacity = 2
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = ABOVE_HUD_LAYER
cx++
if(cx > (4+cols))
cx = 4
cy--
else
for(var/obj/O in contents)
O.mouse_opacity = 2 //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = ABOVE_HUD_LAYER
cx++
if(cx > (4+cols))
cx = 4
cy--
closer.screen_loc = "[4+cols+1]:16,2:16"
/datum/numbered_display
var/obj/item/sample_object
var/number
/datum/numbered_display/New(obj/item/sample)
if(!istype(sample))
qdel(src)
sample_object = sample
number = 1
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user)
var/adjusted_contents = contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/I in contents)
var/found = 0
for(var/datum/numbered_display/ND in numbered_contents)
if(ND.sample_object.type == I.type)
ND.number++
found = 1
break
if(!found)
adjusted_contents++
numbered_contents.Add( new/datum/numbered_display(I) )
//var/mob/living/carbon/human/H = user
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if(adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
standard_orient_objs(row_num, col_count, numbered_contents)
//This proc return 1 if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(!istype(W) || (W.flags & ABSTRACT))
return //Not an item
if(loc == W)
return 0 //Means the item is already in the storage item
if(contents.len >= storage_slots)
if(!stop_messages)
usr << "<span class='warning'>[src] is full, make some space!</span>"
return 0 //Storage item is full
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, A))
ok = 1
break
if(!ok)
if(!stop_messages)
usr << "<span class='warning'>[src] cannot hold [W]!</span>"
return 0
for(var/A in cant_hold) //Check for specific items which this container can't hold.
if(istype(W, A))
if(!stop_messages)
usr << "<span class='warning'>[src] cannot hold [W]!</span>"
return 0
if(W.w_class > max_w_class)
if(!stop_messages)
usr << "<span class='warning'>[W] is too big for [src]!</span>"
return 0
var/sum_w_class = W.w_class
for(var/obj/item/I in contents)
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(!stop_messages)
usr << "<span class='warning'>[W] won't fit in [src], make some space!</span>"
return 0
if(W.w_class >= w_class && (istype(W, /obj/item/weapon/storage)))
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
if(!stop_messages)
usr << "<span class='warning'>[src] cannot hold [W] as it's a storage item of the same size!</span>"
return 0 //To prevent the stacking of same sized storage items.
if(W.flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry.
usr << "<span class='warning'>\the [W] is stuck to your hand, you can't put it in \the [src]!</span>"
return 0
return 1
//This proc handles items being inserted. It does not perform any checks of whether an item can or can't be inserted. That's done by can_be_inserted()
//The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once,
//such as when picking up all the items on a tile with one click.
/obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
if(!istype(W))
return 0
if(usr)
if(!usr.unEquip(W))
return 0
if(silent)
prevent_warning = 1
if(W.pulledby)
W.pulledby.stop_pulling()
W.loc = src
W.on_enter_storage(src)
if(usr)
if(usr.client && usr.s_active != src)
usr.client.screen -= W
add_fingerprint(usr)
if(!prevent_warning)
for(var/mob/M in viewers(usr, null))
if(M == usr)
usr << "<span class='notice'>You put [W] [preposition]to [src].</span>"
else if(in_range(M, usr)) //If someone is standing close enough, they can tell what it is...
M.show_message("<span class='notice'>[usr] puts [W] [preposition]to [src].</span>", 1)
else if(W && W.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
M.show_message("<span class='notice'>[usr] puts [W] [preposition]to [src].</span>", 1)
orient2hud(usr)
for(var/mob/M in can_see_contents())
show_to(M)
W.mouse_opacity = 2 //So you can click on the area around the item to equip it, instead of having to pixel hunt
update_icon()
return 1
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
if(!istype(W))
return 0
if(istype(src, /obj/item/weapon/storage/fancy))
var/obj/item/weapon/storage/fancy/F = src
F.update_icon(1)
for(var/mob/M in can_see_contents())
if(M.client)
M.client.screen -= W
if(ismob(loc))
var/mob/M = loc
W.dropped(M)
W.layer = initial(W.layer)
W.loc = new_location
if(usr)
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
if(W.maptext)
W.maptext = ""
W.on_exit_storage(src)
update_icon()
W.mouse_opacity = initial(W.mouse_opacity)
if(burn)
W.fire_act()
return 1
/obj/item/weapon/storage/empty_object_contents(burn, src.loc)
for(var/obj/item/Item in contents)
remove_from_storage(Item, src.loc, burn)
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W, mob/user, params)
..()
. = 1 //no afterattack
if(isrobot(user))
return //Robots can't interact with storage items.
if(!can_be_inserted(W, 0 , user))
return
handle_item_insertion(W, 0 , user)
/obj/item/weapon/storage/attack_hand(mob/user)
if(user.s_active == src && loc == user) //if you're already looking inside the storage item
user.s_active.close(user)
close(user)
return
playsound(loc, "rustle", 50, 1, -5)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == src && !H.get_active_hand()) //Prevents opening if it's in a pocket.
H.put_in_hands(src)
H.l_store = null
return
if(H.r_store == src && !H.get_active_hand())
H.put_in_hands(src)
H.r_store = null
return
orient2hud(user)
if(loc == user)
if(user.s_active)
user.s_active.close(user)
show_to(user)
else
..()
for(var/mob/M in range(1))
if(M.s_active == src)
close(M)
add_fingerprint(user)
/obj/item/weapon/storage/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/storage/verb/toggle_gathering_mode()
set name = "Switch Gathering Method"
set category = "Object"
if(usr.stat || !usr.canmove || usr.restrained())
return
collection_mode = (collection_mode+1)%3
switch (collection_mode)
if(2)
usr << "[src] now picks up all items of a single type at once."
if(1)
usr << "[src] now picks up all items in a tile at once."
if(0)
usr << "[src] now picks up one item at a time."
// Empty all the contents onto the current turf
/obj/item/weapon/storage/verb/quick_empty()
set name = "Empty Contents"
set category = "Object"
if((!ishuman(usr) && (loc != usr)) || usr.stat || usr.restrained() ||!usr.canmove)
return
do_quick_empty()
// Empty all the contents onto the current turf, without checking the user's status.
/obj/item/weapon/storage/proc/do_quick_empty()
var/turf/T = get_turf(src)
if(usr)
hide_from(usr)
for(var/obj/item/I in contents)
remove_from_storage(I, T)
/obj/item/weapon/storage/New()
..()
if(allow_quick_empty)
verbs += /obj/item/weapon/storage/verb/quick_empty
else
verbs -= /obj/item/weapon/storage/verb/quick_empty
if(allow_quick_gather)
verbs += /obj/item/weapon/storage/verb/toggle_gathering_mode
else
verbs -= /obj/item/weapon/storage/verb/toggle_gathering_mode
boxes = new /obj/screen/storage()
boxes.name = "storage"
boxes.master = src
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
boxes.layer = HUD_LAYER
closer = new /obj/screen/close()
closer.master = src
closer.icon_state = "backpack_close"
closer.layer = ABOVE_HUD_LAYER
orient2hud()
/obj/item/weapon/storage/Destroy()
for(var/obj/O in contents)
O.mouse_opacity = initial(O.mouse_opacity)
close_all()
qdel(boxes)
qdel(closer)
return ..()
/obj/item/weapon/storage/emp_act(severity)
if(!istype(loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()
/obj/item/weapon/storage/attack_self(mob/user)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
quick_empty()
/obj/item/weapon/storage/handle_atom_del(atom/A)
if(A in contents)
usr = null
remove_from_storage(A, loc)
@@ -0,0 +1,136 @@
/obj/item/weapon/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon_state = "red"
item_state = "toolbox_red"
flags = CONDUCT
force = 10
throwforce = 10
throw_speed = 2
throw_range = 7
w_class = 4
materials = list(MAT_METAL = 500)
origin_tech = "combat=1;engineering=1"
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
/obj/item/weapon/storage/toolbox/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] robusts \himself with [src]! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/weapon/storage/toolbox/emergency/New()
..()
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/weldingtool/mini(src)
new /obj/item/weapon/extinguisher/mini(src)
if(prob(50))
new /obj/item/device/flashlight(src)
else
new /obj/item/device/flashlight/flare(src)
new /obj/item/device/radio/off(src)
/obj/item/weapon/storage/toolbox/mechanical
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/weapon/storage/toolbox/mechanical/New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/device/analyzer(src)
new /obj/item/weapon/wirecutters(src)
/obj/item/weapon/storage/toolbox/electrical
name = "electrical toolbox"
icon_state = "yellow"
item_state = "toolbox_yellow"
/obj/item/weapon/storage/toolbox/electrical/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/t_scanner(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/stack/cable_coil(src,30,color)
if(prob(5))
new /obj/item/clothing/gloves/color/yellow(src)
else
new /obj/item/stack/cable_coil(src,30,color)
/obj/item/weapon/storage/toolbox/syndicate
name = "suspicious looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
origin_tech = "combat=2;syndicate=1;engineering=2"
silent = 1
force = 15
throwforce = 18
/obj/item/weapon/storage/toolbox/syndicate/New()
..()
new /obj/item/weapon/screwdriver/nuke(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool/largetank(src)
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/wirecutters(src, "red")
new /obj/item/device/multitool(src)
new /obj/item/clothing/gloves/combat(src)
/obj/item/weapon/storage/toolbox/drone
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/weapon/storage/toolbox/drone/New()
..()
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/stack/cable_coil(src,30,color)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
/obj/item/weapon/storage/toolbox/brass
name = "brass box"
desc = "A huge brass box with several indentations in its surface."
icon_state = "brassbox"
w_class = 5
max_w_class = 3
max_combined_w_class = 28
storage_slots = 28
slowdown = 1
flags = HANDSLOW
attack_verb = list("robusted", "crushed", "smashed")
var/proselytizer_type = /obj/item/clockwork/clockwork_proselytizer/scarab
/obj/item/weapon/storage/toolbox/brass/prefilled/New()
..()
new proselytizer_type(src)
new /obj/item/weapon/screwdriver/brass(src)
new /obj/item/weapon/wirecutters/brass(src)
new /obj/item/weapon/wrench/brass(src)
new /obj/item/weapon/crowbar/brass(src)
new /obj/item/weapon/weldingtool/experimental/brass(src)
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar
var/slab_type = /obj/item/clockwork/slab/scarab
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar/New()
..()
new slab_type(src)
/obj/item/weapon/storage/toolbox/brass/prefilled/ratvar/admin
slab_type = /obj/item/clockwork/slab/debug
proselytizer_type = /obj/item/clockwork/clockwork_proselytizer/scarab/debug
@@ -0,0 +1,285 @@
/obj/item/weapon/storage/box/syndicate/
/obj/item/weapon/storage/box/syndicate/New()
..()
switch (pickweight(list("bloodyspai" = 3, "stealth" = 3, "bond" = 1, "screwed" = 3, "sabotage" = 3, "guns" = 1, "murder" = 2, "implant" = 2, "hacker" = 2, "lordsingulo" = 2, "darklord" = 1)))
if("bloodyspai")
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/chameleon(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/clothing/shoes/chameleon(src)
new /obj/item/device/camera_bug(src)
new /obj/item/device/multitool/ai_detect(src)
new /obj/item/device/encryptionkey/syndicate(src)
new /obj/item/weapon/reagent_containers/syringe/mulligan(src)
new /obj/item/weapon/switchblade(src)
return
if("stealth")
new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow(src)
new /obj/item/weapon/pen/sleepy(src)
new /obj/item/device/healthanalyzer/rad_laser(src)
new /obj/item/device/chameleon(src)
new /obj/item/weapon/soap/syndie(src)
new /obj/item/clothing/glasses/thermal/syndi(src)
return
if("bond")
new /obj/item/weapon/gun/projectile/automatic/pistol(src)
new /obj/item/weapon/suppressor(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/clothing/under/chameleon(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/weapon/reagent_containers/syringe/stimulants(src)
return
if("screwed")
new /obj/item/device/sbeacondrop/bomb(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/device/sbeacondrop/powersink(src)
new /obj/item/clothing/suit/space/syndicate/black/red(src)
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
new /obj/item/device/encryptionkey/syndicate(src)
return
if("guns")
new /obj/item/weapon/gun/projectile/revolver(src)
new /obj/item/ammo_box/a357(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/weapon/grenade/plastic/c4(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/clothing/mask/gas/clown_hat(src)
new /obj/item/clothing/under/suit_jacket/really_black(src)
return
if("murder")
new /obj/item/weapon/melee/energy/sword/saber(src)
new /obj/item/clothing/glasses/thermal/syndi(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/clothing/shoes/chameleon(src)
return
if("implant")
new /obj/item/weapon/implanter/freedom(src)
new /obj/item/weapon/implanter/uplink(src)
new /obj/item/weapon/implanter/emp(src)
new /obj/item/weapon/implanter/adrenalin(src)
new /obj/item/weapon/implanter/explosive(src)
new /obj/item/weapon/implanter/storage(src)
return
if("hacker")
new /obj/item/weapon/aiModule/syndicate(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/device/encryptionkey/binary(src)
new /obj/item/weapon/aiModule/toyAI(src)
new /obj/item/device/multitool/ai_detect(src)
return
if("lordsingulo")
new /obj/item/device/sbeacondrop(src)
new /obj/item/clothing/suit/space/syndicate/black/red(src)
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
new /obj/item/weapon/card/emag(src)
return
if("sabotage")
new /obj/item/weapon/grenade/plastic/c4 (src)
new /obj/item/weapon/grenade/plastic/c4 (src)
new /obj/item/device/doorCharge(src)
new /obj/item/device/doorCharge(src)
new /obj/item/device/camera_bug(src)
new /obj/item/device/sbeacondrop/powersink(src)
new /obj/item/weapon/cartridge/syndicate(src)
if("darklord")
new /obj/item/weapon/melee/energy/sword/saber(src)
new /obj/item/weapon/melee/energy/sword/saber(src)
new /obj/item/weapon/dnainjector/telemut/darkbundle(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/weapon/card/id/syndicate(src)
return
/obj/item/weapon/storage/box/syndie_kit
name = "box"
desc = "A sleek, sturdy box."
icon_state = "box_of_doom"
/obj/item/weapon/storage/box/syndie_kit/imp_freedom
name = "boxed freedom implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_freedom/New()
..()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/freedom(O)
O.update_icon()
return
/*/obj/item/weapon/storage/box/syndie_kit/imp_compress
name = "Compressed Matter Implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_compress/New()
new /obj/item/weapon/implanter/compressed(src)
..()
return
*/
/obj/item/weapon/storage/box/syndie_kit/imp_microbomb
name = "Microbomb Implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_microbomb/New()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/explosive(O)
O.update_icon()
..()
return
/obj/item/weapon/storage/box/syndie_kit/imp_macrobomb
name = "Macrobomb Implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_macrobomb/New()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/explosive/macro(O)
O.update_icon()
..()
return
/obj/item/weapon/storage/box/syndie_kit/imp_uplink
name = "boxed uplink implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_uplink/New()
..()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/uplink(O)
O.update_icon()
return
/obj/item/weapon/storage/box/syndie_kit/bioterror
name = "bioterror syringe box"
/obj/item/weapon/storage/box/syndie_kit/bioterror/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/reagent_containers/syringe/bioterror(src)
return
/obj/item/weapon/storage/box/syndie_kit/imp_adrenal
name = "boxed adrenal implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_adrenal/New()
..()
var/obj/item/weapon/implanter/O = new(src)
O.imp = new /obj/item/weapon/implant/adrenalin(O)
O.update_icon()
return
/obj/item/weapon/storage/box/syndie_kit/imp_storage
name = "boxed storage implant (with injector)"
/obj/item/weapon/storage/box/syndie_kit/imp_storage/New()
..()
new /obj/item/weapon/implanter/storage(src)
return
/obj/item/weapon/storage/box/syndie_kit/space
name = "boxed space suit and helmet"
can_hold = list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate)
max_w_class = 3
/obj/item/weapon/storage/box/syndie_kit/space/New()
..()
new /obj/item/clothing/suit/space/syndicate/black/red(src) // Black and red is so in right now
new /obj/item/clothing/head/helmet/space/syndicate/black/red(src)
return
/obj/item/weapon/storage/box/syndie_kit/emp
name = "boxed EMP kit"
/obj/item/weapon/storage/box/syndie_kit/emp/New()
..()
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/implanter/emp(src)
/obj/item/weapon/storage/box/syndie_kit/chemical
name = "boxed chemical kit"
storage_slots = 14
/obj/item/weapon/storage/box/syndie_kit/chemical/New()
..()
new /obj/item/weapon/reagent_containers/glass/bottle/polonium(src)
new /obj/item/weapon/reagent_containers/glass/bottle/venom(src)
new /obj/item/weapon/reagent_containers/glass/bottle/neurotoxin2(src)
new /obj/item/weapon/reagent_containers/glass/bottle/formaldehyde(src)
new /obj/item/weapon/reagent_containers/glass/bottle/cyanide(src)
new /obj/item/weapon/reagent_containers/glass/bottle/histamine(src)
new /obj/item/weapon/reagent_containers/glass/bottle/initropidril(src)
new /obj/item/weapon/reagent_containers/glass/bottle/pancuronium(src)
new /obj/item/weapon/reagent_containers/glass/bottle/sodium_thiopental(src)
new /obj/item/weapon/reagent_containers/glass/bottle/coniine(src)
new /obj/item/weapon/reagent_containers/glass/bottle/curare(src)
new /obj/item/weapon/reagent_containers/glass/bottle/amanitin(src)
new /obj/item/weapon/reagent_containers/syringe(src)
return
/obj/item/weapon/storage/box/syndie_kit/nuke
name = "box"
/obj/item/weapon/storage/box/syndie_kit/nuke/New()
..()
new /obj/item/weapon/screwdriver/nuke(src)
new /obj/item/nuke_core_container(src)
new /obj/item/weapon/paper/nuke_instructions(src)
/obj/item/weapon/storage/box/syndie_kit/tuberculosisgrenade
name = "boxed virus grenade kit"
/obj/item/weapon/storage/box/syndie_kit/tuberculosisgrenade/New()
..()
new /obj/item/weapon/grenade/chem_grenade/tuberculosis(src)
for(var/i in 1 to 5)
new /obj/item/weapon/reagent_containers/hypospray/medipen/tuberculosiscure(src)
new /obj/item/weapon/reagent_containers/syringe(src)
new /obj/item/weapon/reagent_containers/glass/bottle/tuberculosiscure(src)
/obj/item/weapon/storage/box/syndie_kit/chameleon
name = "chameleon kit"
/obj/item/weapon/storage/box/syndie_kit/chameleon/New()
..()
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/suit/chameleon(src)
new /obj/item/clothing/gloves/chameleon(src)
new /obj/item/clothing/shoes/chameleon(src)
new /obj/item/clothing/glasses/chameleon(src)
new /obj/item/clothing/head/chameleon(src)
new /obj/item/clothing/mask/chameleon(src)
new /obj/item/weapon/storage/backpack/chameleon(src)
new /obj/item/device/radio/headset/chameleon(src)
new /obj/item/weapon/stamp/chameleon(src)
new /obj/item/device/pda/chameleon(src)
new /obj/item/weapon/gun/energy/laser/chameleon(src)
//5*(2*4) = 5*8 = 45, 45 damage if you hit one person with all 5 stars.
//Not counting the damage it will do while embedded (2*4 = 8, at 15% chance)
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons/New()
..()
contents = list()
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/restraints/legcuffs/bola/tactical(src)
new /obj/item/weapon/restraints/legcuffs/bola/tactical(src)
/obj/item/weapon/storage/box/syndie_kit/cutouts/New()
..()
for(var/i in 1 to 3)
new/obj/item/cardboard_cutout/adaptive(src)
new/obj/item/toy/crayon/rainbow(src)
@@ -0,0 +1,89 @@
/obj/item/weapon/storage/wallet
name = "wallet"
desc = "It can hold a few small and personal things."
storage_slots = 4
icon_state = "wallet"
w_class = 2
burn_state = FLAMMABLE
can_hold = list(
/obj/item/stack/spacecash,
/obj/item/weapon/card,
/obj/item/clothing/mask/cigarette,
/obj/item/device/flashlight/pen,
/obj/item/seeds,
/obj/item/stack/medical,
/obj/item/toy/crayon,
/obj/item/weapon/coin,
/obj/item/weapon/dice,
/obj/item/weapon/disk,
/obj/item/weapon/implanter,
/obj/item/weapon/lighter,
/obj/item/weapon/lipstick,
/obj/item/weapon/match,
/obj/item/weapon/paper,
/obj/item/weapon/pen,
/obj/item/weapon/photo,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/screwdriver,
/obj/item/weapon/stamp)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
var/list/combined_access = list()
/obj/item/weapon/storage/wallet/remove_from_storage(obj/item/W, atom/new_location)
. = ..(W, new_location)
if(.)
if(istype(W, /obj/item/weapon/card/id))
if(W == front_id)
front_id = null
refreshID()
update_icon()
/obj/item/weapon/storage/wallet/proc/refreshID()
combined_access.Cut()
for(var/obj/item/weapon/card/id/I in contents)
if(!front_id)
front_id = I
update_icon()
combined_access |= I.access
/obj/item/weapon/storage/wallet/handle_item_insertion(obj/item/W, prevent_warning = 0)
. = ..()
if(.)
if(istype(W, /obj/item/weapon/card/id))
refreshID()
/obj/item/weapon/storage/wallet/update_icon()
icon_state = "wallet"
if(front_id)
icon_state = "wallet_[front_id.icon_state]"
/obj/item/weapon/storage/wallet/GetID()
return front_id
/obj/item/weapon/storage/wallet/GetAccess()
if(combined_access.len)
return combined_access
else
return ..()
/obj/item/weapon/storage/wallet/random/New()
..()
var/item1_type = pick( /obj/item/stack/spacecash/c10,/obj/item/stack/spacecash/c100,/obj/item/stack/spacecash/c1000,/obj/item/stack/spacecash/c20,/obj/item/stack/spacecash/c200,/obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
var/item2_type
if(prob(50))
item2_type = pick( /obj/item/stack/spacecash/c10,/obj/item/stack/spacecash/c100,/obj/item/stack/spacecash/c1000,/obj/item/stack/spacecash/c20,/obj/item/stack/spacecash/c200,/obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
var/item3_type = pick( /obj/item/weapon/coin/silver, /obj/item/weapon/coin/silver, /obj/item/weapon/coin/gold, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron, /obj/item/weapon/coin/iron )
spawn(2)
if(item1_type)
new item1_type(src)
if(item2_type)
new item2_type(src)
if(item3_type)
new item3_type(src)
@@ -0,0 +1,184 @@
/obj/item/weapon/melee/baton
name = "stunbaton"
desc = "A stun baton for incapacitating people with."
icon_state = "stunbaton"
item_state = "baton"
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = 3
origin_tech = "combat=2"
attack_verb = list("beaten")
var/stunforce = 7
var/status = 0
var/obj/item/weapon/stock_parts/cell/high/bcell = null
var/hitcost = 1000
/obj/item/weapon/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
return (FIRELOSS)
/obj/item/weapon/melee/baton/New()
..()
update_icon()
return
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
..()
bcell = new(src)
update_icon()
/obj/item/weapon/melee/baton/proc/deductcharge(chrgdeductamt)
if(bcell)
. = bcell.use(chrgdeductamt)
if(bcell.charge >= hitcost) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off.
return
if(status)
status = 0
update_icon()
playsound(loc, "sparks", 75, 1, -1)
return 0
/obj/item/weapon/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
else if(!bcell)
icon_state = "[initial(name)]_nocell"
else
icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine(mob/user)
..()
if(bcell)
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
else
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/cell))
var/obj/item/weapon/stock_parts/cell/C = W
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
if(C.maxcharge < hitcost)
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
return
if(!user.unEquip(W))
return
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
else if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from [src].</span>"
status = 0
update_icon()
else
return ..()
/obj/item/weapon/melee/baton/attack_self(mob/user)
if(bcell && bcell.charge > hitcost)
status = !status
user << "<span class='notice'>[src] is now [status ? "on" : "off"].</span>"
playsound(loc, "sparks", 75, 1, -1)
else
status = 0
if(!bcell)
user << "<span class='warning'>[src] does not have a power source!</span>"
else
user << "<span class='warning'>[src] is out of charge.</span>"
update_icon()
add_fingerprint(user)
/obj/item/weapon/melee/baton/attack(mob/M, mob/living/carbon/human/user)
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Weaken(stunforce*3)
deductcharge(hitcost)
return
if(isrobot(M))
..()
return
if(!isliving(M))
return
var/mob/living/L = M
if(user.a_intent != "harm")
if(status)
if(baton_stun(L, user))
user.do_attack_animation(L)
return
else
L.visible_message("<span class='warning'>[user] has prodded [L] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
else
if(status)
baton_stun(L, user)
..()
/obj/item/weapon/melee/baton/proc/baton_stun(mob/living/L, mob/user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
return 0
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(hitcost))
return 0
else
if(!deductcharge(hitcost))
return 0
user.lastattacked = L
L.lastattacker = user
L.Stun(stunforce)
L.Weaken(stunforce)
L.apply_effect(STUTTER, stunforce)
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.forcesay(hit_appends)
add_logs(user, L, "stunned")
return 1
/obj/item/weapon/melee/baton/emp_act(severity)
deductcharge(1000 / severity)
..()
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/weapon/melee/baton/cattleprod
name = "stunprod"
desc = "An improvised stun baton."
icon_state = "stunprod_nocell"
item_state = "prod"
force = 3
throwforce = 5
stunforce = 5
hitcost = 2500
slot_flags = null
var/obj/item/device/assembly/igniter/sparkler = 0
/obj/item/weapon/melee/baton/cattleprod/New()
..()
sparkler = new (src)
/obj/item/weapon/melee/baton/cattleprod/baton_stun()
if(sparkler.activate())
..()
@@ -0,0 +1,176 @@
/obj/item/weapon/tank/jetpack
name = "jetpack (empty)"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
item_state = "jetpack"
w_class = 4
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/gas_type = "o2"
var/on = FALSE
var/stabilizers = FALSE
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/weapon/tank/jetpack/New()
..()
air_contents.assert_gas(gas_type)
air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
ion_trail = new
ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/ui_action_click(mob/user, actiontype)
if(actiontype == /datum/action/item_action/toggle_jetpack)
cycle(user)
else if(actiontype == /datum/action/item_action/jetpack_stabilization)
if(on)
stabilizers = !stabilizers
user << "<span class='notice'>You turn the jetpack stabilization [stabilizers ? "on" : "off"].</span>"
else
toggle_internals(user)
/obj/item/weapon/tank/jetpack/proc/cycle(mob/user)
if(user.incapacitated())
return
if(!on)
turn_on()
user << "<span class='notice'>You turn the jetpack on.</span>"
else
turn_off()
user << "<span class='notice'>You turn the jetpack off.</span>"
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/tank/jetpack/proc/turn_on()
on = TRUE
icon_state = "[initial(icon_state)]-on"
ion_trail.start()
/obj/item/weapon/tank/jetpack/proc/turn_off()
on = FALSE
stabilizers = FALSE
icon_state = initial(icon_state)
ion_trail.stop()
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user)
if(!on)
return
if((num < 0.005 || air_contents.total_moles() < num))
turn_off()
return
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off()
return
var/turf/T = get_turf(user)
T.assume_air(removed)
return 1
/obj/item/weapon/tank/jetpack/void
name = "void jetpack (oxygen)"
desc = "It works well in a void."
icon_state = "jetpack-void"
item_state = "jetpack-void"
/obj/item/weapon/tank/jetpack/oxygen
name = "jetpack (oxygen)"
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
item_state = "jetpack"
/obj/item/weapon/tank/jetpack/oxygen/harness
name = "jet harness (oxygen)"
desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks."
icon_state = "jetpack-mini"
item_state = "jetpack-mini"
volume = 40
throw_range = 7
w_class = 3
/obj/item/weapon/tank/jetpack/oxygen/captain
name = "\improper Captain's jetpack"
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
icon_state = "jetpack-captain"
item_state = "jetpack-captain"
w_class = 3
volume = 90
/obj/item/weapon/tank/jetpack/carbondioxide
name = "jetpack (carbon dioxide)"
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
icon_state = "jetpack-black"
item_state = "jetpack-black"
distribute_pressure = 0
gas_type = "co2"
/obj/item/weapon/tank/jetpack/suit
name = "suit inbuilt jetpack"
desc = "A device that will use your internals tank as a gas source for propulsion."
icon_state = "jetpack-void"
item_state = "jetpack-void"
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/obj/item/weapon/tank/internals/tank = null
/obj/item/weapon/tank/jetpack/suit/New()
..()
STOP_PROCESSING(SSobj, src)
air_contents = null
/obj/item/weapon/tank/jetpack/suit/cycle(mob/user)
var/mob/living/carbon/human/H = user
if(!istype(H.s_store, /obj/item/weapon/tank/internals))
user << "<span class='warning'>You need a tank in your suit storage!</span>"
return
..()
/obj/item/weapon/tank/jetpack/suit/turn_on()
if(!ishuman(loc.loc))
return
var/mob/living/carbon/human/H = loc.loc
tank = H.s_store
air_contents = tank.air_contents
START_PROCESSING(SSobj, src)
..()
/obj/item/weapon/tank/jetpack/suit/turn_off()
tank = null
air_contents = null
STOP_PROCESSING(SSobj, src)
..()
/obj/item/weapon/tank/jetpack/suit/process()
if(!ishuman(loc.loc))
turn_off()
return
var/mob/living/carbon/human/H = loc.loc
if(!tank || tank != H.s_store)
turn_off()
return
..()
//Return a jetpack that the mob can use
//Back worn jetpacks, hardsuit internal packs, and so on.
//Used in Process_Spacemove() and wherever you want to check for/get a jetpack
/mob/proc/get_jetpack()
return
/mob/living/carbon/get_jetpack()
var/obj/item/weapon/tank/jetpack/J = back
if(istype(J))
return J
/mob/living/carbon/human/get_jetpack()
var/obj/item/weapon/tank/jetpack/J = ..()
if(!istype(J) && istype(wear_suit, /obj/item/clothing/suit/space/hardsuit))
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
J = C.jetpack
return J
@@ -0,0 +1,181 @@
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
* Oxygen
*/
/obj/item/weapon/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/weapon/tank/internals/oxygen/New()
..()
air_contents.assert_gas("o2")
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
dog_fashion = null
/obj/item/weapon/tank/internals/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
dog_fashion = null
/*
* Anesthetic
*/
/obj/item/weapon/tank/internals/anesthetic
name = "anesthetic tank"
desc = "A tank with an N2O/O2 gas mix."
icon_state = "anesthetic"
item_state = "an_tank"
force = 10
/obj/item/weapon/tank/internals/anesthetic/New()
..()
air_contents.assert_gases("o2", "n2o")
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2o"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Air
*/
/obj/item/weapon/tank/internals/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "oxygen"
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/weapon/tank/internals/air/New()
..()
air_contents.assert_gases("o2","n2")
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Plasma
*/
/obj/item/weapon/tank/internals/plasma
name = "plasma tank"
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
icon_state = "plasma"
flags = CONDUCT
slot_flags = null //they have no straps!
force = 8
/obj/item/weapon/tank/internals/plasma/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/flamethrower))
var/obj/item/weapon/flamethrower/F = W
if ((!F.status)||(F.ptank))
return
src.master = F
F.ptank = src
user.unEquip(src)
src.loc = F
F.update_icon()
else
return ..()
/obj/item/weapon/tank/internals/plasma/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
* Plasmaman Plasma Tank
*/
/obj/item/weapon/tank/internals/plasmaman
name = "plasmaman plasma tank"
desc = "A tank of plasma gas."
icon_state = "plasmaman_tank"
item_state = "plasmaman_tank"
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/weapon/tank/internals/plasmaman/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/plasmaman/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/plasmaman/belt
icon_state = "plasmaman_tank_belt"
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
* Emergency Oxygen
*/
/obj/item/weapon/tank/internals/emergency_oxygen
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 2
force = 4
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/weapon/tank/internals/emergency_oxygen/New()
..()
air_contents.assert_gas("o2")
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
/obj/item/weapon/tank/internals/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_engi"
volume = 10
@@ -0,0 +1,265 @@
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
flags = CONDUCT
slot_flags = SLOT_BACK
hitsound = 'sound/weapons/smash.ogg'
pressure_resistance = ONE_ATMOSPHERE * 5
force = 5
throwforce = 10
throw_speed = 1
throw_range = 4
actions_types = list(/datum/action/item_action/set_internals)
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/volume = 70
/obj/item/weapon/tank/ui_action_click(mob/user)
toggle_internals(user)
/obj/item/weapon/tank/proc/toggle_internals(mob/user)
var/mob/living/carbon/human/H = user
if(!istype(H))
return
if(H.internal == src)
H << "<span class='notice'>You close [src] valve.</span>"
H.internal = null
H.update_internals_hud_icon(0)
else
if(!H.getorganslot("breathing_tube"))
if(!H.wear_mask)
H << "<span class='warning'>You need a mask!</span>"
return
if(H.wear_mask.mask_adjusted)
H.wear_mask.adjustmask(H)
if(!(H.wear_mask.flags & MASKINTERNALS))
H << "<span class='warning'>[H.wear_mask] can't use [src]!</span>"
return
if(H.internal)
H << "<span class='notice'>You switch your internals to [src].</span>"
else
H << "<span class='notice'>You open [src] valve.</span>"
H.internal = src
H.update_internals_hud_icon(1)
H.update_action_buttons_icon()
/obj/item/weapon/tank/New()
..()
air_contents = new(volume) //liters
air_contents.temperature = T20C
START_PROCESSING(SSobj, src)
/obj/item/weapon/tank/Destroy()
if(air_contents)
qdel(air_contents)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/tank/examine(mob/user)
var/obj/icon = src
..()
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if (icon == src) user << "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return
user << "<span class='notice'>The pressure gauge reads [src.air_contents.return_pressure()] kPa.</span>"
var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive
if (celsius_temperature < 20)
descriptive = "cold"
else if (celsius_temperature < 40)
descriptive = "room temperature"
else if (celsius_temperature < 80)
descriptive = "lukewarm"
else if (celsius_temperature < 100)
descriptive = "warm"
else if (celsius_temperature < 300)
descriptive = "hot"
else
descriptive = "furiously hot"
user << "<span class='notice'>It feels [descriptive].</span>"
/obj/item/weapon/tank/blob_act(obj/effect/blob/B)
if(prob(50))
var/turf/location = src.loc
if (!( istype(location, /turf) ))
qdel(src)
if(src.air_contents)
location.assume_air(air_contents)
qdel(src)
/obj/item/weapon/tank/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
user.visible_message("<span class='suicide'>[user] is putting the [src]'s valve to their lips! I don't think they're gonna stop!</span>")
playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3)
if (H && !qdeleted(H))
for(var/obj/item/W in H)
H.unEquip(W)
if(prob(50))
step(W, pick(alldirs))
H.hair_style = "Bald"
H.update_hair()
H.bleed_rate = 5
gibs(H.loc, H.viruses, H.dna)
H.adjustBruteLoss(1000) //to make the body super-bloody
return (BRUTELOSS)
/obj/item/weapon/tank/attackby(obj/item/weapon/W, mob/user, params)
add_fingerprint(user)
if((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
atmosanalyzer_scan(air_contents, user)
else if(istype(W, /obj/item/device/assembly_holder))
bomb_assemble(W,user)
else
return ..()
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = hands_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "tanks", name, 420, 200, master_ui, state)
ui.open()
/obj/item/weapon/tank/ui_data(mob/user)
var/list/data = list()
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["minReleasePressure"] = round(TANK_MIN_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
var/mob/living/carbon/C = user
if(!istype(C))
C = loc.loc
if(!istype(C))
return data
if(C.internal == src)
data["connected"] = TRUE
return data
/obj/item/weapon/tank/ui_act(action, params)
if(..())
return
switch(action)
if("pressure")
var/pressure = params["pressure"]
if(pressure == "reset")
pressure = TANK_DEFAULT_RELEASE_PRESSURE
. = TRUE
else if(pressure == "min")
pressure = TANK_MIN_RELEASE_PRESSURE
. = TRUE
else if(pressure == "max")
pressure = TANK_MAX_RELEASE_PRESSURE
. = TRUE
else if(pressure == "input")
pressure = input("New release pressure ([TANK_MIN_RELEASE_PRESSURE]-[TANK_MAX_RELEASE_PRESSURE] kPa):", name, distribute_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
pressure = text2num(pressure)
. = TRUE
if(.)
distribute_pressure = Clamp(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
/obj/item/weapon/tank/return_air()
return air_contents
/obj/item/weapon/tank/assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
check_status()
return 1
/obj/item/weapon/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
var/tank_pressure = air_contents.return_pressure()
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
return remove_air(moles_needed)
/obj/item/weapon/tank/process()
//Allow for reactions
air_contents.react()
check_status()
/obj/item/weapon/tank/proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
if(!air_contents)
return 0
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
air_contents.react()
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
var/turf/epicenter = get_turf(loc)
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
if(istype(src.loc,/obj/item/device/transfer_valve))
qdel(src.loc)
else
qdel(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
var/turf/T = get_turf(src)
if(!T)
return
T.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
qdel(src)
else
integrity--
else if(pressure > TANK_LEAK_PRESSURE)
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
var/turf/T = get_turf(src)
if(!T)
return
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
T.assume_air(leaked_gas)
else
integrity--
else if(integrity < 3)
integrity++
@@ -0,0 +1,480 @@
//Hydroponics tank and base code
/obj/item/weapon/watertank
name = "backpack water tank"
desc = "A S.U.N.S.H.I.N.E. brand watertank backpack with nozzle to water plants."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "waterbackpack"
item_state = "waterbackpack"
w_class = 4
slot_flags = SLOT_BACK
slowdown = 1
actions_types = list(/datum/action/item_action/toggle_mister)
var/obj/item/weapon/noz
var/on = 0
var/volume = 500
/obj/item/weapon/watertank/New()
..()
create_reagents(volume)
noz = make_noz()
/obj/item/weapon/watertank/ui_action_click()
toggle_mister()
/obj/item/weapon/watertank/item_action_slot_check(slot, mob/user)
if(slot == user.getBackSlot())
return 1
/obj/item/weapon/watertank/verb/toggle_mister()
set name = "Toggle Mister"
set category = "Object"
if (usr.get_item_by_slot(usr.getBackSlot()) != src)
usr << "<span class='warning'>The watertank must be worn properly to use!</span>"
return
if(usr.incapacitated())
return
on = !on
var/mob/living/carbon/human/user = usr
if(on)
if(noz == null)
noz = make_noz()
//Detach the nozzle into the user's hands
if(!user.put_in_hands(noz))
on = 0
user << "<span class='warning'>You need a free hand to hold the mister!</span>"
return
noz.loc = user
else
//Remove from their hands and put back "into" the tank
remove_noz()
return
/obj/item/weapon/watertank/proc/make_noz()
return new /obj/item/weapon/reagent_containers/spray/mister(src)
/obj/item/weapon/watertank/equipped(mob/user, slot)
..()
if(slot != slot_back)
remove_noz()
/obj/item/weapon/watertank/proc/remove_noz()
if(ismob(noz.loc))
var/mob/M = noz.loc
M.unEquip(noz, 1)
return
/obj/item/weapon/watertank/Destroy()
if (on)
remove_noz()
qdel(noz)
noz = null
return ..()
/obj/item/weapon/watertank/attack_hand(mob/user)
if(src.loc == user)
ui_action_click()
return
..()
/obj/item/weapon/watertank/MouseDrop(obj/over_object)
var/mob/M = src.loc
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
switch(H.slot_id)
if(slot_r_hand)
if(M.r_hand)
return
if(!M.unEquip(src))
return
M.put_in_r_hand(src)
if(slot_l_hand)
if(M.l_hand)
return
if(!M.unEquip(src))
return
M.put_in_l_hand(src)
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
if(W == noz)
remove_noz()
return 1
else
return ..()
// This mister item is intended as an extension of the watertank and always attached to it.
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
// watertank object will likely lead to weird behaviour or runtimes.
/obj/item/weapon/reagent_containers/spray/mister
name = "water mister"
desc = "A mister nozzle attached to a water tank."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "mister"
item_state = "mister"
w_class = 4
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
volume = 500
flags = NODROP | OPENCONTAINER | NOBLUDGEON
slot_flags = 0
var/obj/item/weapon/watertank/tank
/obj/item/weapon/reagent_containers/spray/mister/New(parent_tank)
..()
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents //This mister is really just a proxy for the tank's reagents
loc = tank
return
/obj/item/weapon/reagent_containers/spray/mister/dropped(mob/user)
..()
user << "<span class='notice'>The mister snaps back onto the watertank.</span>"
tank.on = 0
loc = tank
/obj/item/weapon/reagent_containers/spray/mister/attack_self()
return
/proc/check_tank_exists(parent_tank, mob/living/carbon/human/M, obj/O)
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
M.unEquip(O)
qdel(0)
return 0
else
return 1
/obj/item/weapon/reagent_containers/spray/mister/Move()
..()
if(loc != tank.loc)
loc = tank.loc
/obj/item/weapon/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
if(target.loc == loc) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it
return
..()
//Janitor tank
/obj/item/weapon/watertank/janitor
name = "backpack water tank"
desc = "A janitorial watertank backpack with nozzle to clean dirt and graffiti."
icon_state = "waterbackpackjani"
item_state = "waterbackpackjani"
/obj/item/weapon/watertank/janitor/New()
..()
reagents.add_reagent("cleaner", 500)
/obj/item/weapon/reagent_containers/spray/mister/janitor
name = "janitor spray nozzle"
desc = "A janitorial spray nozzle attached to a watertank, designed to clean up large messes."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "misterjani"
item_state = "misterjani"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
/obj/item/weapon/watertank/janitor/make_noz()
return new /obj/item/weapon/reagent_containers/spray/mister/janitor(src)
/obj/item/weapon/reagent_containers/spray/mister/janitor/attack_self(var/mob/user)
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
user << "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
//ATMOS FIRE FIGHTING BACKPACK
#define EXTINGUISHER 0
#define NANOFROST 1
#define METAL_FOAM 2
/obj/item/weapon/watertank/atmos
name = "backpack firefighter tank"
desc = "A refridgerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, nanofrost launcher, and metal foam dispenser for breaches. Nanofrost converts plasma in the air to nitrogen, but only if it is combusting at the time."
icon_state = "waterbackpackatmos"
item_state = "waterbackpackatmos"
volume = 200
/obj/item/weapon/watertank/atmos/New()
..()
reagents.add_reagent("water", 200)
/obj/item/weapon/watertank/atmos/make_noz()
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
/obj/item/weapon/watertank/atmos/dropped(mob/user)
..()
icon_state = "waterbackpackatmos"
if(istype(noz, /obj/item/weapon/extinguisher/mini/nozzle))
var/obj/item/weapon/extinguisher/mini/nozzle/N = noz
N.nozzle_mode = 0
/obj/item/weapon/extinguisher/mini/nozzle
name = "extinguisher nozzle"
desc = "A heavy duty nozzle attached to a firefighter's backpack tank."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "atmos_nozzle"
item_state = "nozzleatmos"
safety = 0
max_water = 200
power = 8
precision = 1
cooling_power = 5
w_class = 5
flags = NODROP //Necessary to ensure that the nozzle and tank never seperate
var/obj/item/weapon/watertank/tank
var/nozzle_mode = 0
var/metal_synthesis_cooldown = 0
var/nanofrost_cooldown = 0
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
if(check_tank_exists(parent_tank, src))
tank = parent_tank
reagents = tank.reagents
max_water = tank.volume
loc = tank
return
/obj/item/weapon/extinguisher/mini/nozzle/Move()
..()
if(loc != tank.loc)
loc = tank
return
/obj/item/weapon/extinguisher/mini/nozzle/attack_self(mob/user)
switch(nozzle_mode)
if(EXTINGUISHER)
nozzle_mode = NANOFROST
tank.icon_state = "waterbackpackatmos_1"
user << "Swapped to nanofrost launcher"
return
if(NANOFROST)
nozzle_mode = METAL_FOAM
tank.icon_state = "waterbackpackatmos_2"
user << "Swapped to metal foam synthesizer"
return
if(METAL_FOAM)
nozzle_mode = EXTINGUISHER
tank.icon_state = "waterbackpackatmos_0"
user << "Swapped to water extinguisher"
return
return
/obj/item/weapon/extinguisher/mini/nozzle/dropped(mob/user)
..()
user << "<span class='notice'>The nozzle snaps back onto the tank!</span>"
tank.on = 0
loc = tank
/obj/item/weapon/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
if(nozzle_mode == EXTINGUISHER)
..()
return
var/Adj = user.Adjacent(target)
if(Adj)
AttemptRefill(target, user)
if(nozzle_mode == NANOFROST)
if(Adj)
return //Safety check so you don't blast yourself trying to refill your tank
var/datum/reagents/R = reagents
if(R.total_volume < 100)
user << "<span class='warning'>You need at least 100 units of water to use the nanofrost launcher!</span>"
return
if(nanofrost_cooldown)
user << "<span class='warning'>Nanofrost launcher is still recharging...</span>"
return
nanofrost_cooldown = 1
R.remove_any(100)
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
playsound(src,'sound/items/syringeproj.ogg',40,1)
for(var/a=0, a<5, a++)
step_towards(A, target)
sleep(2)
A.Smoke()
spawn(100)
if(src)
nanofrost_cooldown = 0
return
if(nozzle_mode == METAL_FOAM)
if(!Adj|| !istype(target, /turf))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/particle_effect/foam/metal/F = PoolOrNew(/obj/effect/particle_effect/foam/metal, get_turf(target))
F.amount = 0
metal_synthesis_cooldown++
spawn(100)
metal_synthesis_cooldown--
else
user << "<span class='warning'>Metal foam mix is still being synthesized...</span>"
return
/obj/effect/nanofrost_container
name = "nanofrost container"
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area after activation."
icon = 'icons/effects/effects.dmi'
icon_state = "frozen_smoke_capsule"
mouse_opacity = 0
pass_flags = PASSTABLE
/obj/effect/nanofrost_container/proc/Smoke()
var/datum/effect_system/smoke_spread/freezing/S = new
S.set_up(2, src.loc, blasting=1)
S.start()
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
F.color = "#B2FFFF"
F.name = "nanofrost residue"
F.desc = "Residue left behind from a nanofrost detonation. Perhaps there was a fire here?"
playsound(src,'sound/effects/bamf.ogg',100,1)
qdel(src)
#undef EXTINGUISHER
#undef NANOFROST
#undef METAL_FOAM
/obj/item/weapon/reagent_containers/chemtank
name = "backpack chemical injector"
desc = "A chemical autoinjector that can be carried on your back."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "waterbackpackatmos"
item_state = "waterbackpackatmos"
w_class = 4
slot_flags = SLOT_BACK
slowdown = 1
actions_types = list(/datum/action/item_action/activate_injector)
var/on = 0
volume = 300
var/usage_ratio = 5 //5 unit added per 1 removed
var/injection_amount = 1
amount_per_transfer_from_this = 5
flags = OPENCONTAINER
spillable = 0
possible_transfer_amounts = list(5,10,15)
/obj/item/weapon/reagent_containers/chemtank/ui_action_click()
toggle_injection()
/obj/item/weapon/reagent_containers/chemtank/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
return 1
/obj/item/weapon/reagent_containers/chemtank/proc/toggle_injection()
var/mob/living/carbon/human/user = usr
if(!istype(user))
return
if (user.get_item_by_slot(slot_back) != src)
user << "<span class='warning'>The chemtank needs to be on your back before you can activate it!</span>"
return
if(on)
turn_off()
else
turn_on()
//Todo : cache these.
/obj/item/weapon/reagent_containers/chemtank/proc/update_filling()
cut_overlays()
if(reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi',icon_state = "backpack-10")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 15)
filling.icon_state = "backpack-10"
if(16 to 60)
filling.icon_state = "backpack50"
if(61 to INFINITY)
filling.icon_state = "backpack100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
/obj/item/weapon/reagent_containers/chemtank/worn_overlays(var/isinhands = FALSE) //apply chemcolor and level
. = list()
//inhands + reagent_filling
if(!isinhands && reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi',icon_state = "backpackmob-10")
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 15)
filling.icon_state = "backpackmob-10"
if(16 to 60)
filling.icon_state = "backpackmob50"
if(61 to INFINITY)
filling.icon_state = "backpackmob100"
filling.color = mix_color_from_reagents(reagents.reagent_list)
. += filling
/obj/item/weapon/reagent_containers/chemtank/proc/turn_on()
on = 1
START_PROCESSING(SSobj, src)
if(ismob(loc))
loc << "<span class='notice'>[src] turns on.</span>"
/obj/item/weapon/reagent_containers/chemtank/proc/turn_off()
on = 0
STOP_PROCESSING(SSobj, src)
if(ismob(loc))
loc << "<span class='notice'>[src] turns off.</span>"
/obj/item/weapon/reagent_containers/chemtank/process()
if(!istype(loc,/mob/living/carbon/human))
turn_off()
return
if(!reagents.total_volume)
turn_off()
return
var/mob/living/carbon/human/user = loc
if(user.back != src)
turn_off()
return
var/used_amount = injection_amount/usage_ratio
reagents.reaction(user, INJECT,injection_amount,0)
reagents.trans_to(user,used_amount,multiplier=usage_ratio)
update_filling()
user.update_inv_back() //for overlays update
/obj/item/weapon/reagent_containers/chemtank/stim/New()
..()
reagents.add_reagent("stimulants_longterm", 300)
update_filling()
//Operator backpack spray
/obj/item/weapon/watertank/operator
name = "backpack water tank"
desc = "A New Russian backpack spray for systematic cleansing of carbon lifeforms."
icon_state = "waterbackpackjani"
item_state = "waterbackpackjani"
w_class = 3
volume = 2000
slowdown = 0
/obj/item/weapon/watertank/operator/New()
..()
reagents.add_reagent("mutagen",350)
reagents.add_reagent("napalm",125)
reagents.add_reagent("welding_fuel",125)
reagents.add_reagent("clf3",300)
reagents.add_reagent("cryptobiolin",350)
reagents.add_reagent("plasma",250)
reagents.add_reagent("condensedcapsaicin",500)
/obj/item/weapon/reagent_containers/spray/mister/operator
name = "janitor spray nozzle"
desc = "A mister nozzle attached to several extended water tanks. It suspiciously has a compressor in the system and is labelled entirely in New Cyrillic."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "misterjani"
item_state = "misterjani"
w_class = 4
amount_per_transfer_from_this = 100
possible_transfer_amounts = list(75,100,150)
/obj/item/weapon/watertank/operator/make_noz()
return new /obj/item/weapon/reagent_containers/spray/mister/operator(src)
@@ -0,0 +1,182 @@
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/weapon/locator
name = "locator"
desc = "Used to track those with locater implants."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/temp = null
var/frequency = 1451
var/broadcasting = null
var/listening = 1
flags = CONDUCT
w_class = 2
item_state = "electronic"
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=400)
origin_tech = "magnets=3;bluespace=2"
/obj/item/weapon/locator/attack_self(mob/user)
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='?src=\ref[src];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/weapon/locator/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
usr << "The [src] is malfunctioning."
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if (sr)
src.temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/device/radio/beacon/W in world)
if (W.frequency == src.frequency)
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
if (direct < 20)
direct = "weak"
else
direct = "very weak"
src.temp += "[W.code]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>Extranneous Signals:</B><BR>"
for (var/obj/item/weapon/implant/tracking/W in tracked_implants)
if (!W.implanted || !ismob(W.loc))
continue
else
var/mob/M = W.loc
if (M.stat == 2)
if (M.timeofdeath + 6000 < world.time)
continue
var/turf/tr = get_turf(W)
if (tr.z == sr.z && tr)
var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
if (direct < 20)
if (direct < 5)
direct = "very strong"
else
if (direct < 10)
direct = "strong"
else
direct = "weak"
src.temp += "[W.imp_in.name]-[dir2text(get_dir(sr, tr))]-[direct]<BR>"
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
else
src.temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
else
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = sanitize_frequency(src.frequency)
else
if (href_list["temp"])
src.temp = null
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
return
/*
* Hand-tele
*/
/obj/item/weapon/hand_tele
name = "hand tele"
desc = "A portable item using blue-space technology."
icon = 'icons/obj/device.dmi'
icon_state = "hand_tele"
item_state = "electronic"
throwforce = 0
w_class = 2
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10000)
origin_tech = "magnets=3;bluespace=4"
var/active_portals = 0
/obj/item/weapon/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
if(!current_location||current_area.noteleport||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in machines)
if(com.target)
var/area/A = get_area(com.target)
if(A.noteleport)
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
else
L["[get_area(com.target)] (Inactive)"] = com.target
var/list/turfs = list( )
for(var/turf/T in urange(10, orange=1))
if(T.x>world.maxx-8 || T.x<8)
continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
if (user.get_active_hand() != src || user.incapacitated())
return
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
user.show_message("<span class='notice'>Locked In.</span>", 2)
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(src), T, src)
try_move_adjacent(P)
active_portals++
add_fingerprint(user)
@@ -0,0 +1,41 @@
/obj/item/weapon/melee/baton/cattleprod/teleprod
name = "teleprod"
desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
icon_state = "teleprod_nocell"
item_state = "teleprod"
origin_tech = "combat=2;bluespace=4;materials=3"
/obj/item/weapon/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
..()
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
if(do_teleport(user, get_turf(user), 50))//honk honk
user.Weaken(stunforce*3)
deductcharge(hitcost)
else
user.Weaken(stunforce*3)
deductcharge(hitcost/4)
return
else
if(status)
if(!istype(M) && M.anchored)
return .
else
do_teleport(M, get_turf(M), 15)
/obj/item/weapon/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
if(istype(I, /obj/item/weapon/ore/bluespace_crystal))
if(!bcell)
var/obj/item/weapon/melee/baton/cattleprod/teleprod/S = new /obj/item/weapon/melee/baton/cattleprod/teleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(S)
user << "<span class='notice'>You place the bluespace crystal firmly into the igniter.</span>"
qdel(I)
qdel(src)
else
user.visible_message("<span class='warning'>You can't put the crystal onto the stunprod while it has a power cell installed!</span>")
else
return ..()
+558
View File
@@ -0,0 +1,558 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/* Tools!
* Note: Multitools are /obj/item/device
*
* Contains:
* Wrench
* Screwdriver
* Wirecutters
* Welding Tool
* Crowbar
*/
/*
* Wrench
*/
/obj/item/weapon/wrench
name = "wrench"
desc = "A wrench with common uses. Can be found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
w_class = 2
materials = list(MAT_METAL=150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
/obj/item/weapon/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
icon = 'icons/obj/items_cyborg.dmi'
toolspeed = 2
/obj/item/weapon/wrench/brass
name = "brass wrench"
desc = "A brass wrench. It's faintly warm to the touch."
icon_state = "wrench_brass"
toolspeed = 2
/obj/item/weapon/wrench/medical
name = "medical wrench"
desc = "A medical wrench with common(medical?) uses. Can be found in your hand."
icon_state = "wrench_medical"
force = 2 //MEDICAL
throwforce = 4
origin_tech = "materials=1;engineering=1;biotech=3"
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed")
/obj/item/weapon/wrench/medical/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take \his soul. It looks like \he's trying to commit suicide.</span>")
// TODO Make them glow with the power of the M E D I C A L W R E N C H
// during their ascension
// Stun stops them from wandering off
user.Stun(5)
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
// Let the sound effect finish playing
sleep(20)
if(!user)
return
for(var/obj/item/W in user)
user.unEquip(W)
var/obj/item/weapon/wrench/medical/W = new /obj/item/weapon/wrench/medical(loc)
W.add_fingerprint(user)
W.desc += " For some reason, it reminds you of [user.name]."
if(!user)
return
user.dust()
return OXYLOSS
/*
* Screwdriver
*/
/obj/item/weapon/screwdriver
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = null
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
w_class = 1
throwforce = 5
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=75)
attack_verb = list("stabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
toolspeed = 1
/obj/item/weapon/screwdriver/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is stabbing the [src.name] into \his heart! It looks like \he's trying to commit suicide.</span>"))
return(BRUTELOSS)
/obj/item/weapon/screwdriver/New(loc, var/param_color = null)
..()
if(!icon_state)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
if (prob(75))
src.pixel_y = rand(0, 16)
return
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
if(user.zone_selected != "eyes" && user.zone_selected != "head")
return ..()
if(user.disabilities & CLUMSY && prob(50))
M = user
return eyestab(M,user)
/obj/item/weapon/screwdriver/brass
name = "brass screwdriver"
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 2
/obj/item/weapon/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "screwdriver_cyborg"
toolspeed = 2
/*
* Wirecutters
*/
/obj/item/weapon/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = null
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throw_speed = 3
throw_range = 7
w_class = 2
materials = list(MAT_METAL=80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/Wirecutter.ogg'
toolspeed = 1
/obj/item/weapon/wirecutters/New(loc, var/param_color = null)
..()
if(!icon_state)
if(!param_color)
param_color = pick("yellow","red")
icon_state = "cutters_[param_color]"
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
qdel(C.handcuffed)
C.handcuffed = null
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
return
else
..()
/obj/item/weapon/wirecutters/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is cutting at \his arteries with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/wirecutters/brass
name = "brass wirecutters"
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 2
/obj/item/weapon/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "cutters_cyborg"
toolspeed = 2
/*
* Welding Tool
*/
/obj/item/weapon/weldingtool
name = "welding tool"
desc = "A standard edition welder provided by NanoTrasen."
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 3
throwforce = 5
hitsound = "swing_hit"
throw_speed = 3
throw_range = 5
w_class = 2
materials = list(MAT_METAL=70, MAT_GLASS=30)
origin_tech = "engineering=1;plasmatech=1"
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/change_icons = 1
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
heat = 3800
toolspeed = 1
/obj/item/weapon/weldingtool/New()
..()
create_reagents(max_fuel)
reagents.add_reagent("welding_fuel", max_fuel)
update_icon()
return
/obj/item/weapon/weldingtool/proc/update_torch()
cut_overlays()
if(welding)
add_overlay("[initial(icon_state)]-on")
item_state = "[initial(item_state)]1"
else
item_state = "[initial(item_state)]"
/obj/item/weapon/weldingtool/update_icon()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = Ceiling(ratio*4) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)][ratio]"
update_torch()
return
/obj/item/weapon/weldingtool/examine(mob/user)
..()
user << "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weapon/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds \his every orifice closed! It looks like \he's trying to commit suicide..</span>")
return (FIRELOSS)
/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)
else
return ..()
/obj/item/weapon/weldingtool/attack(mob/living/carbon/human/H, mob/user)
if(!istype(H))
return ..()
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting && affecting.status == ORGAN_ROBOTIC && user.a_intent != "harm")
if(src.remove_fuel(1))
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
if(!do_mob(user, H, 50))
return
item_heal_robotic(H, user, 5, 0)
else
return ..()
/obj/item/weapon/weldingtool/process()
switch(welding)
if(0)
force = 3
damtype = "brute"
update_icon()
if(!can_off_process)
STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
force = 15
damtype = "fire"
if(prob(5))
remove_fuel(1)
update_icon()
//This is to start fires. process() is only called if the welder is on.
open_flame()
/obj/item/weapon/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity) return
if(welding)
remove_fuel(1)
var/turf/location = get_turf(user)
location.hotspot_expose(700, 50, 1)
if(isliving(O))
var/mob/living/L = O
if(L.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
log_game("[key_name(user)] set [key_name(L)] on fire")
/obj/item/weapon/weldingtool/attack_self(mob/user)
toggle(user)
update_icon()
//Returns the amount of fuel in the welder
/obj/item/weapon/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("welding_fuel")
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
if(!welding || !check_fuel())
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("welding_fuel", amount)
check_fuel()
if(M)
M.flash_eyes(light_intensity)
return 1
else
if(M)
M << "<span class='warning'>You need more welding fuel to complete this task!</span>"
return 0
//Returns whether or not the welding tool is currently on.
/obj/item/weapon/weldingtool/proc/isOn()
return welding
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
/obj/item/weapon/weldingtool/proc/check_fuel(mob/user)
if(get_fuel() <= 0 && welding)
toggle(user, 1)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
M.update_inv_r_hand(0)
M.update_inv_l_hand(0)
return 0
return 1
//Toggles the welder off and on
/obj/item/weapon/weldingtool/proc/toggle(mob/user, message = 0)
if(!status)
user << "<span class='warning'>[src] can't be turned on while unsecured!</span>"
return
welding = !welding
if(welding)
if(get_fuel() >= 1)
user << "<span class='notice'>You switch [src] on.</span>"
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
START_PROCESSING(SSobj, src)
else
user << "<span class='warning'>You need more fuel!</span>"
welding = 0
else
if(!message)
user << "<span class='notice'>You switch [src] off.</span>"
else
user << "<span class='warning'>[src] shuts off!</span>"
force = 3
damtype = "brute"
hitsound = "swing_hit"
update_icon()
/obj/item/weapon/weldingtool/is_hot()
return welding * heat
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
user << "<span class='warning'>Turn it off first!</span>"
return
status = !status
if(status)
user << "<span class='notice'>You resecure [src].</span>"
else
user << "<span class='notice'>[src] can now be attached and modified.</span>"
add_fingerprint(user)
/obj/item/weapon/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
if(!status)
var/obj/item/stack/rods/R = I
if (R.use(1))
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
if(!remove_item_from_storage(F))
user.unEquip(src)
loc = F
F.weldtool = src
add_fingerprint(user)
user << "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>"
user.put_in_hands(F)
else
user << "<span class='warning'>You need one rod to start building a flamethrower!</span>"
return
/obj/item/weapon/weldingtool/largetank
name = "industrial welding tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
materials = list(MAT_GLASS=60)
origin_tech = "engineering=2;plasmatech=2"
/obj/item/weapon/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "indwelder"
toolspeed = 2
/obj/item/weapon/weldingtool/largetank/flamethrower_screwdriver()
return
/obj/item/weapon/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = 1
materials = list(MAT_METAL=30, MAT_GLASS=10)
change_icons = 0
/obj/item/weapon/weldingtool/mini/flamethrower_screwdriver()
return
/obj/item/weapon/weldingtool/hugetank
name = "upgraded industrial welding tool"
desc = "An upgraded welder based of the industrial welder."
icon_state = "upindwelder"
item_state = "upindwelder"
max_fuel = 80
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "engineering=3;plasmatech=2"
/obj/item/weapon/weldingtool/experimental
name = "experimental welding tool"
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
var/last_gen = 0
change_icons = 0
can_off_process = 1
light_intensity = 1
toolspeed = 2
/obj/item/weapon/weldingtool/experimental/brass
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
icon_state = "brasswelder"
item_state = "brasswelder"
//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
//i don't think this is actually used, yaaaaay -Pete
/obj/item/weapon/weldingtool/experimental/proc/fuel_gen()
if(!welding && !last_gen)
last_gen = 1
reagents.add_reagent("welding_fuel",1)
spawn(10)
last_gen = 0
/obj/item/weapon/weldingtool/experimental/process()
..()
if(reagents.total_volume < max_fuel)
fuel_gen()
/*
* Crowbar
*/
/obj/item/weapon/crowbar
name = "pocket crowbar"
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
w_class = 2
materials = list(MAT_METAL=50)
origin_tech = "engineering=1;combat=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
/obj/item/weapon/crowbar/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/crowbar/red
icon_state = "crowbar_red"
force = 8
/obj/item/weapon/crowbar/brass
name = "brass crowbar"
desc = "A brass crowbar. It feels faintly warm to the touch."
icon_state = "crowbar_brass"
toolspeed = 2
/obj/item/weapon/crowbar/large
name = "crowbar"
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big."
force = 12
w_class = 3
throw_speed = 3
throw_range = 3
materials = list(MAT_METAL=70)
icon_state = "crowbar_large"
item_state = "crowbar"
toolspeed = 2
/obj/item/weapon/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
icon = 'icons/obj/items_cyborg.dmi'
force = 10
toolspeed = 2
@@ -0,0 +1,566 @@
/* Two-handed Weapons
* Contains:
* Twohanded
* Fireaxe
* Double-Bladed Energy Swords
* Spears
* CHAINSAWS
* Bone Axe and Spear
*/
/*##################################################################
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
####################################################################*/
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
//It also tidies stuff up elsewhere.
/*
* Twohanded
*/
/obj/item/weapon/twohanded
var/wielded = 0
var/force_unwielded = 0
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
/obj/item/weapon/twohanded/proc/unwield(mob/living/carbon/user)
if(!wielded || !user)
return
wielded = 0
if(force_unwielded)
force = force_unwielded
var/sf = findtext(name," (Wielded)")
if(sf)
name = copytext(name,1,sf)
else //something wrong
name = "[initial(name)]"
update_icon()
if(isrobot(user))
user << "<span class='notice'>You free up your module.</span>"
else if(istype(src, /obj/item/weapon/twohanded/required))
user << "<span class='notice'>You drop \the [name].</span>"
else
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if(unwieldsound)
playsound(loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
return
/obj/item/weapon/twohanded/proc/wield(mob/living/carbon/user)
if(wielded)
return
if(istype(user,/mob/living/carbon/monkey) )
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
if(user.get_inactive_hand())
user << "<span class='warning'>You need your other hand to be empty!</span>"
return
if(user.get_num_arms() < 2)
user << "<span class='warning'>You don't have enough hands.</span>"
return
wielded = 1
if(force_wielded)
force = force_wielded
name = "[name] (Wielded)"
update_icon()
if(isrobot(user))
user << "<span class='notice'>You dedicate your module to [name].</span>"
else
user << "<span class='notice'>You grab the [name] with both hands.</span>"
if (wieldsound)
playsound(loc, wieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[name] - offhand"
O.desc = "Your second grip on the [name]"
user.put_in_inactive_hand(O)
return
/obj/item/weapon/twohanded/mob_can_equip(mob/M, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [name] first!</span>"
return 0
return ..()
/obj/item/weapon/twohanded/dropped(mob/user)
..()
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield(user)
return unwield(user)
/obj/item/weapon/twohanded/update_icon()
return
/obj/item/weapon/twohanded/attack_self(mob/user)
..()
if(wielded) //Trying to unwield it
unwield(user)
else //Trying to wield it
wield(user)
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
name = "offhand"
icon_state = "offhand"
w_class = 5
flags = ABSTRACT
/obj/item/weapon/twohanded/offhand/unwield()
qdel(src)
/obj/item/weapon/twohanded/offhand/wield()
qdel(src)
///////////Two hand required objects///////////////
//This is for objects that require two hands to even pick up
/obj/item/weapon/twohanded/required/
w_class = 5
/obj/item/weapon/twohanded/required/attack_self()
return
/obj/item/weapon/twohanded/required/mob_can_equip(mob/M, slot)
if(wielded)
M << "<span class='warning'>\The [src] is too cumbersome to carry with anything but your hands!</span>"
return 0
return ..()
/obj/item/weapon/twohanded/required/attack_hand(mob/user)//Can't even pick it up without both hands empty
var/obj/item/weapon/twohanded/required/H = user.get_inactive_hand()
if(get_dist(src,user) > 1)
return 0
if(H != null)
user << "<span class='notice'>\The [src] is too cumbersome to carry in one hand!</span>"
return
wield(user)
..()
/obj/item/weapon/twohanded/
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
throwforce = 15
w_class = 4
slot_flags = SLOT_BACK
force_unwielded = 5
force_wielded = 24 // Was 18, Buffed - RobRichards/RR
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
/obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
icon_state = "fireaxe[wielded]"
return
/obj/item/weapon/twohanded/fireaxe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] axes \himself from head to toe! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(wielded) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
W.shatter()
else if(istype(A,/obj/structure/grille))
var/obj/structure/grille/G = A
G.take_damage(16)
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/weapon/twohanded/dualsaber
icon_state = "dualsaber0"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
w_class = 2
var/w_class_on = 4
force_unwielded = 3
force_wielded = 34
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
hitsound = "swing_hit"
armour_penetration = 35
origin_tech = "magnets=4;syndicate=5"
item_color = "green"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 75
var/hacked = 0
/obj/item/weapon/twohanded/dualsaber/New()
item_color = pick("red", "blue", "green", "purple")
/obj/item/weapon/twohanded/dualsaber/update_icon()
if(wielded)
icon_state = "dualsaber[item_color][wielded]"
else
icon_state = "dualsaber0"
clean_blood()//blood overlays get weird otherwise, because the sprite changes.
return
/obj/item/weapon/twohanded/dualsaber/attack(mob/target, mob/living/carbon/human/user)
if(user.has_dna())
if(user.dna.check_mutation(HULK))
user << "<span class='warning'>You grip the blade too hard and accidentally close it!</span>"
unwield()
return
..()
if(user.disabilities & CLUMSY && (wielded) && prob(40))
impale(user)
return
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.setDir(i)
if(i == 8)
user.emote("flip")
sleep(1)
/obj/item/weapon/twohanded/dualsaber/proc/impale(mob/living/user)
user << "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on \the [src].</span>"
if (force_wielded)
user.take_organ_damage(20,25)
else
user.adjustStaminaLoss(25)
/obj/item/weapon/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(wielded)
return ..()
return 0
/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
user << "<span class='warning'>You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!</span>"
return 1
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
if(M.has_dna())
if(M.dna.check_mutation(HULK))
M << "<span class='warning'>You lack the grace to wield this!</span>"
return
sharpness = IS_SHARP
w_class = w_class_on
..()
hitsound = 'sound/weapons/blade1.ogg'
/obj/item/weapon/twohanded/dualsaber/unwield() //Specific unwield () to switch hitsounds.
sharpness = initial(sharpness)
w_class = initial(w_class)
..()
hitsound = "swing_hit"
/obj/item/weapon/twohanded/dualsaber/IsReflect()
if(wielded)
return 1
/obj/item/weapon/twohanded/dualsaber/green/New()
item_color = "green"
/obj/item/weapon/twohanded/dualsaber/red/New()
item_color = "red"
/obj/item/weapon/twohanded/dualsaber/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/device/multitool))
if(hacked == 0)
hacked = 1
user << "<span class='warning'>2XRNBW_ENGAGE</span>"
item_color = "rainbow"
update_icon()
else
user << "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>"
else
return ..()
//spears
/obj/item/weapon/twohanded/spear
icon_state = "spearglass0"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
force = 10
w_class = 4
slot_flags = SLOT_BACK
force_unwielded = 10
force_wielded = 18
throwforce = 20
throw_speed = 4
embedded_impact_pain_multiplier = 3
armour_penetration = 10
materials = list(MAT_METAL=1150, MAT_GLASS=2075)
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = IS_SHARP
var/obj/item/weapon/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
/obj/item/weapon/twohanded/spear/update_icon()
if(explosive)
icon_state = "spearbomb[wielded]"
else
icon_state = "spearglass[wielded]"
/obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
if(!proximity)
return
if(istype(AM, /turf/open)) //So you can actually melee with it
return
if(explosive && wielded)
user.say("[war_cry]")
explosive.loc = AM
explosive.prime()
qdel(src)
//THIS MIGHT BE UNBALANCED SO I DUNNO // it totally is.
/obj/item/weapon/twohanded/spear/throw_impact(atom/target)
. = ..()
if(!.) //not caught
if(explosive)
explosive.prime()
qdel(src)
/obj/item/weapon/twohanded/spear/AltClick()
..()
if(!explosive)
return
if(ismob(loc))
var/mob/M = loc
var/input = stripped_input(M,"What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
if(input)
src.war_cry = input
/obj/item/weapon/twohanded/spear/CheckParts(list/parts_list)
..()
if(explosive)
explosive.loc = get_turf(src.loc)
explosive = null
var/obj/item/weapon/grenade/G = locate() in contents
if(G)
explosive = G
name = "explosive lance"
desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!"
return
update_icon()
// CHAINSAW
/obj/item/weapon/twohanded/required/chainsaw
name = "chainsaw"
desc = "A versatile power tool. Useful for limbing trees and delimbing humans."
icon_state = "chainsaw_off"
flags = CONDUCT
force = 13
w_class = 5
throwforce = 13
throw_speed = 2
throw_range = 4
materials = list(MAT_METAL=13000)
origin_tech = "materials=3;engineering=4;combat=2"
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "swing_hit"
sharpness = IS_SHARP
actions_types = list(/datum/action/item_action/startchainsaw)
var/on = 0
/obj/item/weapon/twohanded/required/chainsaw/attack_self(mob/user)
on = !on
user << "As you pull the starting cord dangling from \the [src], [on ? "it begins to whirr." : "the chain stops moving."]"
force = on ? 21 : 13
throwforce = on ? 21 : 13
icon_state = "chainsaw_[on ? "on" : "off"]"
if(hitsound == "swing_hit")
hitsound = 'sound/weapons/chainsawhit.ogg'
else
hitsound = "swing_hit"
if(src == user.get_active_hand()) //update inhands
user.update_inv_l_hand()
user.update_inv_r_hand()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/twohanded/required/chainsaw/get_dismemberment_chance()
if(wielded)
. = ..()
/obj/item/weapon/twohanded/required/chainsaw/doomslayer
name = "OOOH BABY"
desc = "<span class='warning'>VRRRRRRR!!!</span>"
armour_penetration = 100
//GREY TIDE
/obj/item/weapon/twohanded/spear/grey_tide
icon_state = "spearglass0"
name = "\improper Grey Tide"
desc = "Recovered from the aftermath of a revolt aboard Defense Outpost Theta Aegis, in which a seemingly endless tide of Assistants caused heavy casualities among Nanotrasen military forces."
force_unwielded = 15
force_wielded = 25
throwforce = 20
throw_speed = 4
attack_verb = list("gored")
/obj/item/weapon/twohanded/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity)
..()
if(!proximity)
return
user.faction |= "greytide(\ref[user])"
if(istype(AM, /mob/living))
var/mob/living/L = AM
if(istype (L, /mob/living/simple_animal/hostile/illusion))
return
if(!L.stat && prob(50))
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
M.faction = user.faction.Copy()
M.Copy_Parent(user, 100, user.health/2.5, 12, 30)
M.GiveTarget(L)
/obj/item/weapon/twohanded/pitchfork
icon_state = "pitchfork0"
name = "pitchfork"
desc = "A simple tool used for moving hay."
force = 7
throwforce = 15
w_class = 4
force_unwielded = 7
force_wielded = 15
attack_verb = list("attacked", "impaled", "pierced")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
/obj/item/weapon/twohanded/pitchfork/demonic
name = "demonic pitchfork"
desc = "A red pitchfork, it looks like the work of the devil."
force = 19
throwforce = 24
force_unwielded = 19
force_wielded = 25
/obj/item/weapon/twohanded/pitchfork/demonic/greater
force = 24
throwforce = 50
force_unwielded = 24
force_wielded = 34
/obj/item/weapon/twohanded/pitchfork/demonic/ascended
force = 100
throwforce = 100
force_unwielded = 100
force_wielded = 500000 // Kills you DEAD.
/obj/item/weapon/twohanded/pitchfork/update_icon()
icon_state = "pitchfork[wielded]"
/obj/item/weapon/twohanded/pitchfork/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] impales \himself in \his abdomen with [src]! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/twohanded/pitchfork/demonic/pickup(mob/user)
if(istype(user, /mob/living))
var/mob/living/U = user
if(U.mind && (!U.mind.devilinfo || (U.mind.soulOwner == U.mind))) //Burn hands unless they are a devil or have sold their soul
U.visible_message("<span class='warning'>As [U] picks [src] up, [U]'s arms briefly catch fire.</span>", \
"<span class='warning'>\"As you pick up the [src] your arms ignite, reminding you of all your past sins.\"</span>")
if(ishuman(U))
var/mob/living/carbon/human/H = U
H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
else
U.adjustFireLoss(rand(force/2,force))
/obj/item/weapon/twohanded/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
if(user.mind && (!user.mind.devilinfo || (user.mind.soulOwner == user.mind)))
user << "<span class ='warning'>The [src] burns in your hands.</span>"
user.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
..()
//HF blade
/obj/item/weapon/twohanded/vibro_weapon
icon_state = "hfrequency0"
name = "vibro sword"
desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire."
force_unwielded = 20
force_wielded = 40
armour_penetration = 100
block_chance = 40
throwforce = 20
throw_speed = 4
sharpness = IS_SHARP
attack_verb = list("cut", "sliced", "diced")
w_class = 4
slot_flags = SLOT_BACK
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/twohanded/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(wielded)
final_block_chance *= 2
if(wielded || attack_type != PROJECTILE_ATTACK)
if(prob(final_block_chance))
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
playsound(src, pick("sound/weapons/bulletflyby.ogg","sound/weapons/bulletflyby2.ogg","sound/weapons/bulletflyby3.ogg"), 75, 1)
return 1
else
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
return 1
return 0
/obj/item/weapon/twohanded/vibro_weapon/update_icon()
icon_state = "hfrequency[wielded]"
/*
* Bone Axe
*/
/obj/item/weapon/twohanded/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone.
icon_state = "bone_axe0"
name = "bone axe"
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
force_wielded = 23
/obj/item/weapon/twohanded/fireaxe/boneaxe/update_icon()
icon_state = "bone_axe[wielded]"
/*
* Bone Spear
*/
/obj/item/weapon/twohanded/bonespear //Blatant imitation of spear, but made out of bone. Not valid for explosive modification.
icon_state = "bone_spear0"
name = "bone spear"
desc = "A haphazardly-constructed yet still deadly weapon. The pinnacle of modern technology."
force = 11
w_class = 4
slot_flags = SLOT_BACK
force_unwielded = 11
force_wielded = 20 //I have no idea how to balance
throwforce = 22
throw_speed = 4
embedded_impact_pain_multiplier = 3
armour_penetration = 15 //Enhanced armor piercing
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = IS_SHARP
/obj/item/weapon/twohanded/bonespear/update_icon()
icon_state = "bone_spear[wielded]"
@@ -0,0 +1,73 @@
/obj/item/weapon/vending_refill
name = "resupply canister"
var/machine_name = "Generic"
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_snack"
item_state = "restock_unit"
flags = CONDUCT
force = 7
throwforce = 10
throw_speed = 1
throw_range = 7
w_class = 4
var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products
var/init_charges = list(0, 0, 0)
/obj/item/weapon/vending_refill/New(amt = -1)
..()
name = "\improper [machine_name] restocking unit"
if(isnum(amt) && amt > -1)
charges[1] = amt
/obj/item/weapon/vending_refill/examine(mob/user)
..()
if(charges[1] > 0)
user << "It can restock [charges[1]] item(s)."
else
user << "It's empty!"
//NOTE I decided to go for about 1/3 of a machine's capacity
/obj/item/weapon/vending_refill/boozeomat
machine_name = "Booze-O-Mat"
icon_state = "refill_booze"
charges = list(54, 4, 0)//of 159 standard, 12 contraband
init_charges = list(54, 4, 0)
/obj/item/weapon/vending_refill/coffee
machine_name = "Solar's Best Hot Drinks"
icon_state = "refill_joe"
charges = list(25, 4, 0)//of 75 standard, 12 contraband
init_charges = list(25, 4, 0)
/obj/item/weapon/vending_refill/snack
machine_name = "Getmore Chocolate Corp"
charges = list(12, 2, 0)//of 36 standard, 6 contraband
init_charges = list(12, 2, 0)
/obj/item/weapon/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
charges = list(20, 2, 0)//of 60 standard, 6 contraband
init_charges = list(20, 2, 0)
/obj/item/weapon/vending_refill/cigarette
machine_name = "ShadyCigs Deluxe"
icon_state = "refill_smoke"
charges = list(12, 1, 2)// of 36 standard, 3 contraband, 6 premium
init_charges = list(12, 1, 2)
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = list(27, 2, 3)// of 75 standard, 6 contraband, 9 premium
init_charges = list(27, 2, 3)
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"
icon_state = "refill_clothes"
charges = list(31, 2, 4)// of 87 standard, 6 contraband, 10 premium(?)
init_charges = list(31, 2, 4)
+300
View File
@@ -0,0 +1,300 @@
/obj/item/weapon/banhammer
desc = "A banhammer"
name = "banhammer"
icon = 'icons/obj/items.dmi'
icon_state = "toyhammer"
slot_flags = SLOT_BELT
throwforce = 0
w_class = 1
throw_speed = 3
throw_range = 7
attack_verb = list("banned")
/obj/item/weapon/banhammer/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.</span>")
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
/obj/item/weapon/banhammer/attack(mob/M, mob/user)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'>You have <b>BANNED</b> [M]</font>"
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
/obj/item/weapon/sord
name = "\improper SORD"
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
icon_state = "sord"
item_state = "sord"
slot_flags = SLOT_BELT
force = 2
throwforce = 1
w_class = 3
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/sord/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to impale \himself with \the [name]! It might be a suicide attempt if it weren't so shitty.</span>", "<span class='suicide'>You try to impale yourself with \the [name], but it's USELESS...</span>")
return(SHAME)
/obj/item/weapon/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
hitsound = 'sound/weapons/bladeslice.ogg'
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
sharpness = IS_SHARP
/obj/item/weapon/claymore/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>")
return(BRUTELOSS)
/obj/item/weapon/katana
name = "katana"
desc = "Woefully underpowered in D20"
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
w_class = 3
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
sharpness = IS_SHARP
/obj/item/weapon/katana/cursed
slot_flags = null
/obj/item/weapon/katana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>")
return(BRUTELOSS)
/obj/item/weapon/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags = CONDUCT
force = 9
throwforce = 10
w_class = 3
materials = list(MAT_METAL=1150, MAT_GLASS=75)
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
/obj/item/weapon/wirerod/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/shard))
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(S)
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
qdel(I)
qdel(src)
else if(istype(I, /obj/item/device/assembly/igniter) && !(I.flags & NODROP))
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(P)
user << "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>"
qdel(I)
qdel(src)
else
return ..()
/obj/item/weapon/throwing_star
name = "throwing star"
desc = "An ancient weapon still used to this day due to it's ease of lodging itself into victim's body parts"
icon_state = "throwingstar"
item_state = "eshield0"
force = 2
throwforce = 20 //This is never used on mobs since this has a 100% embed chance.
throw_speed = 4
embedded_pain_multiplier = 4
w_class = 2
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
sharpness = IS_SHARP
materials = list(MAT_METAL=500, MAT_GLASS=500)
/obj/item/weapon/switchblade
name = "switchblade"
icon_state = "switchblade"
desc = "A sharp, concealable, spring-loaded knife."
flags = CONDUCT
force = 3
w_class = 2
throwforce = 5
throw_speed = 3
throw_range = 6
materials = list(MAT_METAL=12000)
origin_tech = "engineering=3;combat=2"
hitsound = 'sound/weapons/Genhit.ogg'
attack_verb = list("stubbed", "poked")
var/extended = 0
/obj/item/weapon/switchblade/attack_self(mob/user)
extended = !extended
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
if(extended)
force = 20
w_class = 3
throwforce = 23
icon_state = "switchblade_ext"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
else
force = 3
w_class = 2
throwforce = 5
icon_state = "switchblade"
attack_verb = list("stubbed", "poked")
hitsound = 'sound/weapons/Genhit.ogg'
sharpness = IS_BLUNT
/obj/item/weapon/switchblade/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting \his own throat with the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS)
/obj/item/weapon/phone
name = "red phone"
desc = "Should anything ever go wrong..."
icon = 'icons/obj/items.dmi'
icon_state = "red_phone"
force = 3
throwforce = 2
throw_speed = 3
throw_range = 4
w_class = 2
attack_verb = list("called", "rang")
hitsound = 'sound/weapons/ring.ogg'
/obj/item/weapon/phone/suicide_act(mob/user)
if(locate(/obj/structure/chair/stool) in user.loc)
user.visible_message("<span class='suicide'>[user] begins to tie a noose with the [src.name]'s cord! It looks like \he's trying to commit suicide.</span>")
else
user.visible_message("<span class='suicide'>[user] is strangling \himself with the [src.name]'s cord! It looks like \he's trying to commit suicide.</span>")
return(OXYLOSS)
/obj/item/weapon/cane
name = "cane"
desc = "A cane used by a true gentleman. Or a clown."
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
force = 5
throwforce = 5
w_class = 2
materials = list(MAT_METAL=50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/staff
name = "wizard staff"
desc = "Apparently a staff used by the wizard."
icon = 'icons/obj/wizard.dmi'
icon_state = "staff"
force = 3
throwforce = 5
throw_speed = 2
throw_range = 5
w_class = 2
armour_penetration = 100
attack_verb = list("bludgeoned", "whacked", "disciplined")
burn_state = FLAMMABLE
/obj/item/weapon/staff/broom
name = "broom"
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
icon = 'icons/obj/wizard.dmi'
icon_state = "broom"
burn_state = FLAMMABLE
/obj/item/weapon/staff/stick
name = "stick"
desc = "A great tool to drag someone else's drinks across the bar."
icon = 'icons/obj/weapons.dmi'
icon_state = "stick"
item_state = "stick"
force = 3
throwforce = 5
throw_speed = 2
throw_range = 5
w_class = 2
/obj/item/weapon/ectoplasm
name = "ectoplasm"
desc = "spooky"
gender = PLURAL
icon = 'icons/obj/wizard.dmi'
icon_state = "ectoplasm"
/obj/item/weapon/ectoplasm/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is inhaling the [src.name]! It looks like \he's trying to visit the astral plane.</span>")
return (OXYLOSS)
/obj/item/weapon/mounted_chainsaw
name = "mounted chainsaw"
desc = "A chainsaw that has replaced your arm."
icon_state = "chainsaw_on"
item_state = "mounted_chainsaw"
flags = NODROP | ABSTRACT
w_class = 5.0
force = 21
throwforce = 0
throw_range = 0
throw_speed = 0
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "sound/weapons/chainsawhit.ogg"
/obj/item/weapon/mounted_chainsaw/dropped()
..()
new /obj/item/weapon/twohanded/required/chainsaw(get_turf(src))
qdel(src)
/obj/item/weapon/tailclub
name = "tail club"
desc = "For the beating to death of lizards with their own tails."
icon_state = "tailclub"
force = 14
throwforce = 1 // why are you throwing a club do you even weapon
throw_speed = 1
throw_range = 1
attack_verb = list("clubbed", "bludgeoned")
/obj/item/weapon/melee/chainofcommand/tailwhip
name = "liz o' nine tails"
desc = "A whip fashioned from the severed tails of lizards."
icon_state = "tailwhip"
origin_tech = "engineering=3;combat=3;biotech=3"
needs_permit = 0
/obj/item/weapon/melee/skateboard
name = "skateboard"
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
icon_state = "skateboard"
item_state = "skateboard"
force = 12
throwforce = 4
w_class = 5.0
attack_verb = list("smacked", "whacked", "slammed", "smashed")
/obj/item/weapon/melee/skateboard/attack_self(mob/user)
new /obj/vehicle/scooter/skateboard(get_turf(user))
qdel(src)