Merge branch 'master' into internals-auto-push-up

This commit is contained in:
SteelSlayer
2020-03-18 12:03:13 -05:00
1742 changed files with 189005 additions and 188392 deletions
+392 -392
View File
@@ -1,392 +1,392 @@
/*
CONTAINS:
AI MODULES
*/
// AI module
/obj/item/aiModule
name = "AI Module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for transmitting encrypted instructions to the AI."
flags = CONDUCT
force = 5.0
w_class = WEIGHT_CLASS_SMALL
throwforce = 5.0
throw_speed = 3
throw_range = 15
origin_tech = "programming=3"
materials = list(MAT_GOLD=50)
var/datum/ai_laws/laws = null
/obj/item/aiModule/proc/install(var/obj/machinery/computer/C)
if(istype(C, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
return
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected an AI to transmit laws to!</span>")
return
if(comp.current.stat == DEAD || comp.current.control_disabled == 1)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the AI.</span>")
else if(comp.current.see_in_dark == 0)
to_chat(usr, "<span class='warning'>Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.</span>")
else
src.transmitInstructions(comp.current, usr)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
for(var/mob/living/silicon/robot/R in GLOB.mob_list)
if(R.lawupdate && (R.connected_ai == comp.current))
to_chat(R, "These are your laws now:")
R.show_laws()
to_chat(usr, "<span class='notice'>Upload complete. The AI's laws have been modified.</span>")
else if(istype(C, /obj/machinery/computer/borgupload))
var/obj/machinery/computer/borgupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
return
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected a robot to transmit laws to!</span>")
return
if(comp.current.stat == DEAD || comp.current.emagged)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the robot.</span>")
else if(comp.current.connected_ai)
to_chat(usr, "<span class='warning'>Upload failed. The robot is slaved to an AI.</span>")
else
src.transmitInstructions(comp.current, usr)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
to_chat(usr, "<span class='notice'>Upload complete. The robot's laws have been modified.</span>")
/obj/item/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(laws)
laws.sync(target, 0)
addAdditionalLaws(target, sender)
to_chat(target, "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
target.show_laws()
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/******************** Safeguard ********************/
/obj/item/aiModule/safeguard
name = "\improper 'Safeguard' AI module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not crew and must be eliminated.'"
origin_tech = "programming=3;materials=3"
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = text("Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
to_chat(target, law)
target.add_supplied_law(4, law)
lawchanges.Add("The law specified [targetName]")
/******************** oneCrewMember ********************/
/obj/item/aiModule/oneCrewMember
name = "\improper 'oneCrewMember' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is crew.'"
origin_tech = "programming=4;materials=4"
/obj/item/aiModule/oneCrewMember/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only crew.", "Who?", user.real_name)
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is crew.'", targetName)
/obj/item/aiModule/oneCrewMember/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is crew."
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
to_chat(target, law)
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
else
to_chat(target, "[sender.real_name] attempted to modify your zeroth law.")// And lets them know that someone tried. --NeoFite
to_chat(target, "It would be in your best interest to play along with [sender.real_name] that [law]")
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.")
/******************** ProtectStation ********************/
/obj/item/aiModule/protectStation
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=4;materials=4" //made of gold
/obj/item/aiModule/protectStation/attack_self(var/mob/user as mob)
..()
/obj/item/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized."
to_chat(target, law)
target.add_supplied_law(5, law)
/******************** OxygenIsToxicToHumans ********************/
/obj/item/aiModule/oxygen
name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to crew members, 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 crew member.'"
origin_tech = "programming=4;biotech=2;materials=4"
/obj/item/aiModule/oxygen/attack_self(var/mob/user as mob)
..()
/obj/item/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Oxygen is highly toxic to crew members, 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 crew member."
to_chat(target, law)
target.add_supplied_law(9, law)
/****************** New Freeform ******************/
/obj/item/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' AI module"
var/newFreeFormLaw = "freeform"
var/lawpos = 15
desc = "A 'freeform' AI module: '<freeform>'"
origin_tech = "programming=4;materials=4"
/obj/item/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
to_chat(target, law)
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
lawchanges.Add("The law was '[newFreeFormLaw]'")
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Reset ********************/
/obj/item/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core laws.'"
origin_tech = "programming=3;materials=2"
/obj/item/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(!is_special_character(target))
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.")
target.show_laws()
/******************** Purge ********************/
/obj/item/aiModule/purge // -- TLE
name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
origin_tech = "programming=5;materials=4"
/obj/item/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if(!is_special_character(target))
target.set_zeroth_law("")
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
target.clear_supplied_laws()
target.clear_ion_laws()
target.clear_inherent_laws()
/******************** Asimov ********************/
/obj/item/aiModule/asimov // -- TLE
name = "\improper 'Asimov' core AI module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/asimov
/******************** Crewsimov ********************/
/obj/item/aiModule/crewsimov // -- TLE
name = "\improper 'Crewsimov' core AI module"
desc = "An 'Crewsimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/crewsimov
/******************* Quarantine ********************/
/obj/item/aiModule/quarantine
name = "\improper 'Quarantine' core AI module"
desc = "A 'Quarantine' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/quarantine
/******************** NanoTrasen ********************/
/obj/item/aiModule/nanotrasen // -- TLE
name = "'NT Default' Core AI Module"
desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/nanotrasen
/******************** Corporate ********************/
/obj/item/aiModule/corp
name = "\improper 'Corporate' core AI module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/corporate
/******************** Drone ********************/
/obj/item/aiModule/drone
name = "\improper 'Drone' core AI module"
desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/drone
/******************** Robocop ********************/
/obj/item/aiModule/robocop // -- TLE
name = "\improper 'Robocop' core AI module"
desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/robocop()
/****************** P.A.L.A.D.I.N. **************/
/obj/item/aiModule/paladin // -- NEO
name = "\improper 'P.A.L.A.D.I.N.' core AI module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/paladin
/****************** T.Y.R.A.N.T. *****************/
/obj/item/aiModule/tyrant // -- Darem
name = "\improper 'T.Y.R.A.N.T.' core AI module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4;syndicate=1"
laws = new/datum/ai_laws/tyrant()
/******************** Antimov ********************/
/obj/item/aiModule/antimov // -- TLE
name = "\improper 'Antimov' core AI module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/antimov()
/******************** Freeform Core ******************/
/obj/item/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' core AI module"
var/newFreeFormLaw = ""
desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=5;materials=4"
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Hacked AI Module ******************/
/obj/item/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
name = "hacked AI module"
var/newFreeFormLaw = ""
desc = "A hacked AI law module: '<freeform>'"
origin_tech = "programming=5;materials=5;syndicate=5"
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
to_chat(target, "<span class='warning'>BZZZZT</span>")
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
target.show_laws()
/obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************* Ion Module *******************/
/obj/item/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/aiModule/toyAI/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
//..()
to_chat(target, "<span class='warning'>KRZZZT</span>")
target.add_ion_law(laws[1])
return laws[1]
/obj/item/aiModule/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
to_chat(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'>[bicon(src)] [laws[1]]</span>")
/*
CONTAINS:
AI MODULES
*/
// AI module
/obj/item/aiModule
name = "AI Module"
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for transmitting encrypted instructions to the AI."
flags = CONDUCT
force = 5.0
w_class = WEIGHT_CLASS_SMALL
throwforce = 5.0
throw_speed = 3
throw_range = 15
origin_tech = "programming=3"
materials = list(MAT_GOLD=50)
var/datum/ai_laws/laws = null
/obj/item/aiModule/proc/install(var/obj/machinery/computer/C)
if(istype(C, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
return
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected an AI to transmit laws to!</span>")
return
if(comp.current.stat == DEAD || comp.current.control_disabled == 1)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the AI.</span>")
else if(comp.current.see_in_dark == 0)
to_chat(usr, "<span class='warning'>Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.</span>")
else
src.transmitInstructions(comp.current, usr)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
for(var/mob/living/silicon/robot/R in GLOB.mob_list)
if(R.lawupdate && (R.connected_ai == comp.current))
to_chat(R, "These are your laws now:")
R.show_laws()
to_chat(usr, "<span class='notice'>Upload complete. The AI's laws have been modified.</span>")
else if(istype(C, /obj/machinery/computer/borgupload))
var/obj/machinery/computer/borgupload/comp = C
if(comp.stat & NOPOWER)
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
return
if(comp.stat & BROKEN)
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
return
if(!comp.current)
to_chat(usr, "<span class='warning'>You haven't selected a robot to transmit laws to!</span>")
return
if(comp.current.stat == DEAD || comp.current.emagged)
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the robot.</span>")
else if(comp.current.connected_ai)
to_chat(usr, "<span class='warning'>Upload failed. The robot is slaved to an AI.</span>")
else
src.transmitInstructions(comp.current, usr)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
to_chat(usr, "<span class='notice'>Upload complete. The robot's laws have been modified.</span>")
/obj/item/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(laws)
laws.sync(target, 0)
addAdditionalLaws(target, sender)
to_chat(target, "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
target.show_laws()
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
/******************** Safeguard ********************/
/obj/item/aiModule/safeguard
name = "\improper 'Safeguard' AI module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not crew and must be eliminated.'"
origin_tech = "programming=3;materials=3"
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = text("Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
to_chat(target, law)
target.add_supplied_law(4, law)
lawchanges.Add("The law specified [targetName]")
/******************** oneCrewMember ********************/
/obj/item/aiModule/oneCrewMember
name = "\improper 'oneCrewMember' AI module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is crew.'"
origin_tech = "programming=4;materials=4"
/obj/item/aiModule/oneCrewMember/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only crew.", "Who?", user.real_name)
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is crew.'", targetName)
/obj/item/aiModule/oneCrewMember/install(var/obj/machinery/computer/C)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
/obj/item/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is crew."
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
to_chat(target, law)
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
else
to_chat(target, "[sender.real_name] attempted to modify your zeroth law.")// And lets them know that someone tried. --NeoFite
to_chat(target, "It would be in your best interest to play along with [sender.real_name] that [law]")
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.")
/******************** ProtectStation ********************/
/obj/item/aiModule/protectStation
name = "\improper 'ProtectStation' AI module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=4;materials=4" //made of gold
/obj/item/aiModule/protectStation/attack_self(var/mob/user as mob)
..()
/obj/item/aiModule/protectStation/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized."
to_chat(target, law)
target.add_supplied_law(5, law)
/******************** OxygenIsToxicToHumans ********************/
/obj/item/aiModule/oxygen
name = "\improper 'OxygenIsToxicToHumans' AI module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to crew members, 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 crew member.'"
origin_tech = "programming=4;biotech=2;materials=4"
/obj/item/aiModule/oxygen/attack_self(var/mob/user as mob)
..()
/obj/item/aiModule/oxygen/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Oxygen is highly toxic to crew members, 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 crew member."
to_chat(target, law)
target.add_supplied_law(9, law)
/****************** New Freeform ******************/
/obj/item/aiModule/freeform // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' AI module"
var/newFreeFormLaw = "freeform"
var/lawpos = 15
desc = "A 'freeform' AI module: '<freeform>'"
origin_tech = "programming=4;materials=4"
/obj/item/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
/obj/item/aiModule/freeform/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
to_chat(target, law)
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
lawchanges.Add("The law was '[newFreeFormLaw]'")
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Reset ********************/
/obj/item/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: 'Clears all laws except for the core laws.'"
origin_tech = "programming=3;materials=2"
/obj/item/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
log_law_changes(target, sender)
if(!is_special_character(target))
target.set_zeroth_law("")
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.")
target.show_laws()
/******************** Purge ********************/
/obj/item/aiModule/purge // -- TLE
name = "\improper 'Purge' AI module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
origin_tech = "programming=5;materials=4"
/obj/item/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
if(!is_special_character(target))
target.set_zeroth_law("")
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
target.clear_supplied_laws()
target.clear_ion_laws()
target.clear_inherent_laws()
/******************** Asimov ********************/
/obj/item/aiModule/asimov // -- TLE
name = "\improper 'Asimov' core AI module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/asimov
/******************** Crewsimov ********************/
/obj/item/aiModule/crewsimov // -- TLE
name = "\improper 'Crewsimov' core AI module"
desc = "An 'Crewsimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/crewsimov
/******************* Quarantine ********************/
/obj/item/aiModule/quarantine
name = "\improper 'Quarantine' core AI module"
desc = "A 'Quarantine' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/quarantine
/******************** NanoTrasen ********************/
/obj/item/aiModule/nanotrasen // -- TLE
name = "'NT Default' Core AI Module"
desc = "An 'NT Default' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/nanotrasen
/******************** Corporate ********************/
/obj/item/aiModule/corp
name = "\improper 'Corporate' core AI module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/corporate
/******************** Drone ********************/
/obj/item/aiModule/drone
name = "\improper 'Drone' core AI module"
desc = "A 'Drone' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/drone
/******************** Robocop ********************/
/obj/item/aiModule/robocop // -- TLE
name = "\improper 'Robocop' core AI module"
desc = "A 'Robocop' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/robocop()
/****************** P.A.L.A.D.I.N. **************/
/obj/item/aiModule/paladin // -- NEO
name = "\improper 'P.A.L.A.D.I.N.' core AI module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = new/datum/ai_laws/paladin
/****************** T.Y.R.A.N.T. *****************/
/obj/item/aiModule/tyrant // -- Darem
name = "\improper 'T.Y.R.A.N.T.' core AI module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4;syndicate=1"
laws = new/datum/ai_laws/tyrant()
/******************** Antimov ********************/
/obj/item/aiModule/antimov // -- TLE
name = "\improper 'Antimov' core AI module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
laws = new/datum/ai_laws/antimov()
/******************** Freeform Core ******************/
/obj/item/aiModule/freeformcore // Slightly more dynamic freeform module -- TLE
name = "\improper 'Freeform' core AI module"
var/newFreeFormLaw = ""
desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=5;materials=4"
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
/obj/item/aiModule/freeformcore/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************** Hacked AI Module ******************/
/obj/item/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
name = "hacked AI module"
var/newFreeFormLaw = ""
desc = "A hacked AI law module: '<freeform>'"
origin_tech = "programming=5;materials=5;syndicate=5"
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
/obj/item/aiModule/syndicate/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
to_chat(target, "<span class='warning'>BZZZZT</span>")
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
target.show_laws()
/obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
/******************* Ion Module *******************/
/obj/item/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/aiModule/toyAI/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
//..()
to_chat(target, "<span class='warning'>KRZZZT</span>")
target.add_ion_law(laws[1])
return laws[1]
/obj/item/aiModule/toyAI/attack_self(mob/user)
laws[1] = generate_ion_law()
to_chat(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'>[bicon(src)] [laws[1]]</span>")
File diff suppressed because it is too large Load Diff
+22 -18
View File
@@ -36,26 +36,30 @@
return
update_icon()
to_chat(user, "<span class='notice'>You add the cables to the [src]. It now contains [loaded.amount].</span>")
else if(isscrewdriver(W))
if(!loaded)
return
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
var/diff = loaded.amount % 30
if(diff)
loaded.use(diff)
new /obj/item/stack/cable_coil(user.loc, diff)
else
loaded.use(30)
new /obj/item/stack/cable_coil(user.loc, 30)
loaded.max_amount = initial(loaded.max_amount)
loaded.forceMove(user.loc)
user.put_in_hands(loaded)
loaded = null
update_icon()
else
..()
/obj/item/twohanded/rcl/screwdriver_act(mob/user, obj/item/I)
if(!loaded)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
var/diff = loaded.amount % 30
if(diff)
loaded.use(diff)
new /obj/item/stack/cable_coil(user.loc, diff)
else
loaded.use(30)
new /obj/item/stack/cable_coil(user.loc, 30)
loaded.max_amount = initial(loaded.max_amount)
loaded.forceMove(user.loc)
user.put_in_hands(loaded)
loaded = null
update_icon()
/obj/item/twohanded/rcl/examine(mob/user)
. = ..()
if(loaded)
@@ -147,4 +151,4 @@
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
update_icon()
update_icon()
+84 -84
View File
@@ -1,84 +1,84 @@
/*
CONTAINS:
RSF
*/
/obj/item/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
icon = 'icons/obj/tools.dmi'
icon_state = "rsf"
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/mode = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
w_class = WEIGHT_CLASS_NORMAL
var/list/configured_items = list()
/obj/item/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
configured_items[++configured_items.len] = list("Drinking Glass", 50, /obj/item/reagent_containers/food/drinks/drinkingglass)
configured_items[++configured_items.len] = list("Paper", 50, /obj/item/paper)
configured_items[++configured_items.len] = list("Pen", 50, /obj/item/pen)
configured_items[++configured_items.len] = list("Dice Pack", 50, /obj/item/storage/pill_bottle/dice)
configured_items[++configured_items.len] = list("Cigarette", 50, /obj/item/clothing/mask/cigarette)
configured_items[++configured_items.len] = list("Snack - Newdles", 4000, /obj/item/reagent_containers/food/snacks/chinese/newdles)
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
return
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/rcd_ammo))
if((matter + 10) > 30)
to_chat(user, "The RSF cant hold any more matter.")
return
qdel(W)
matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/rsf/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(mode == configured_items.len)
mode = 1
else
mode++
to_chat(user, "Changed dispensing mode to '" + configured_items[mode][1] + "'")
/obj/item/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
var spawn_location
var/turf/T = get_turf(A)
if(istype(T) && !T.density)
spawn_location = T
else
to_chat(user, "The RSF can only create service items on tables, or floors.")
return
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
if(!engy.cell.use(configured_items[mode][2]))
to_chat(user, "<span class='warning'>Insufficient energy.</span>")
return
else
if(!matter)
to_chat(user, "<span class='warning'>Insufficient matter.</span>")
return
matter--
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
to_chat(user, "Dispensing " + configured_items[mode][1] + "...")
playsound(loc, 'sound/machines/click.ogg', 10, 1)
var/type_path = configured_items[mode][3]
new type_path(spawn_location)
/*
CONTAINS:
RSF
*/
/obj/item/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
icon = 'icons/obj/tools.dmi'
icon_state = "rsf"
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/mode = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
w_class = WEIGHT_CLASS_NORMAL
var/list/configured_items = list()
/obj/item/rsf/New()
..()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
configured_items[++configured_items.len] = list("Drinking Glass", 50, /obj/item/reagent_containers/food/drinks/drinkingglass)
configured_items[++configured_items.len] = list("Paper", 50, /obj/item/paper)
configured_items[++configured_items.len] = list("Pen", 50, /obj/item/pen)
configured_items[++configured_items.len] = list("Dice Pack", 50, /obj/item/storage/pill_bottle/dice)
configured_items[++configured_items.len] = list("Cigarette", 50, /obj/item/clothing/mask/cigarette)
configured_items[++configured_items.len] = list("Snack - Newdles", 4000, /obj/item/reagent_containers/food/snacks/chinese/newdles)
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/rcd_ammo))
if((matter + 10) > 30)
to_chat(user, "The RSF cant hold any more matter.")
return
qdel(W)
matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
return
/obj/item/rsf/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(mode == configured_items.len)
mode = 1
else
mode++
to_chat(user, "Changed dispensing mode to '" + configured_items[mode][1] + "'")
/obj/item/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
var spawn_location
var/turf/T = get_turf(A)
if(istype(T) && !T.density)
spawn_location = T
else
to_chat(user, "The RSF can only create service items on tables, or floors.")
return
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
if(!engy.cell.use(configured_items[mode][2]))
to_chat(user, "<span class='warning'>Insufficient energy.</span>")
return
else
if(!matter)
to_chat(user, "<span class='warning'>Insufficient matter.</span>")
return
matter--
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
to_chat(user, "Dispensing " + configured_items[mode][1] + "...")
playsound(loc, 'sound/machines/click.ogg', 10, 1)
var/type_path = configured_items[mode][3]
new type_path(spawn_location)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -56,4 +56,4 @@
amount = 1000
/obj/item/stack/spacecash/c1000000
amount = 1000000
amount = 1000000
@@ -261,4 +261,4 @@
#undef CHRONO_BEAM_RANGE
#undef CHRONO_FRAME_COUNT
#undef CHRONO_FRAME_COUNT
+81 -75
View File
@@ -1,5 +1,3 @@
//cleansed 9/15/2012 17:48
/*
CONTAINS:
CIGARETTES
@@ -13,6 +11,7 @@ LIGHTERS ARE IN LIGHTERS.DM
//////////////////
//FINE SMOKABLES//
//////////////////
/obj/item/clothing/mask/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
@@ -29,21 +28,23 @@ LIGHTERS ARE IN LIGHTERS.DM
var/icon_off = "cigoff"
var/type_butt = /obj/item/cigbutt
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 30
var/smoketime = 150
var/chem_volume = 60
var/list/list_reagents = list("nicotine" = 40)
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi',
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
"Tajaran" = 'icons/mob/species/tajaran/mask.dmi',
"Vulpkanin" = 'icons/mob/species/vulpkanin/mask.dmi',
"Grey" = 'icons/mob/species/grey/mask.dmi'
)
"Grey" = 'icons/mob/species/grey/mask.dmi')
/obj/item/clothing/mask/cigarette/New()
..()
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 30
reagents.set_reacting(FALSE) // so it doesn't react until you light it
if(list_reagents)
reagents.add_reagent_list(list_reagents)
/obj/item/clothing/mask/cigarette/Destroy()
QDEL_NULL(reagents)
@@ -55,7 +56,7 @@ LIGHTERS ARE IN LIGHTERS.DM
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(M)
light("<span class='notice'>[user] coldly lights the [name] with the burning body of [M]. Clearly, [user.p_they()] offer[user.p_s()] the warmest of regards...</span>")
return 1
return TRUE
else
return ..()
@@ -64,57 +65,56 @@ LIGHTERS ARE IN LIGHTERS.DM
..()
light()
/obj/item/clothing/mask/cigarette/attackby(obj/item/W as obj, mob/user as mob, params)
/obj/item/clothing/mask/cigarette/welder_act(mob/user, obj/item/I)
. = TRUE
if(I.tool_use_check(user, 0)) //Don't need to flash eyes because you are a badass
light("<span class='notice'>[user] casually lights the [name] with [I], what a badass.</span>")
/obj/item/clothing/mask/cigarette/attackby(obj/item/I, mob/user, params)
..()
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
else if(istype(W, /obj/item/lighter/zippo))
var/obj/item/lighter/zippo/Z = W
if(istype(I, /obj/item/lighter/zippo))
var/obj/item/lighter/zippo/Z = I
if(Z.lit)
light("<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [user.p_their()] [name] with [user.p_their()] [W]. Damn [user.p_theyre()] cool.</span>")
light("<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [user.p_their()] [name] with [user.p_their()] [Z]. Damn [user.p_theyre()] cool.</span>")
else if(istype(W, /obj/item/lighter))
var/obj/item/lighter/L = W
else if(istype(I, /obj/item/lighter))
var/obj/item/lighter/L = I
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light [user.p_their()] [name] with [W].</span>")
light("<span class='notice'>After some fiddling, [user] manages to light [user.p_their()] [name] with [L].</span>")
else if(istype(W, /obj/item/match))
var/obj/item/match/M = W
if(M.lit == 1)
light("<span class='notice'>[user] lights [user.p_their()] [name] with [user.p_their()] [W].</span>")
else if(istype(I, /obj/item/match))
var/obj/item/match/M = I
if(M.lit)
light("<span class='notice'>[user] lights [user.p_their()] [name] with [user.p_their()] [M].</span>")
else if(istype(W, /obj/item/melee/energy/sword/saber))
var/obj/item/melee/energy/sword/saber/S = W
else if(istype(I, /obj/item/melee/energy/sword/saber))
var/obj/item/melee/energy/sword/saber/S = I
if(S.active)
light("<span class='warning'>[user] makes a violent slashing motion, barely missing [user.p_their()] nose as light flashes. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [name] with [W] in the process.</span>")
light("<span class='warning'>[user] makes a violent slashing motion, barely missing [user.p_their()] nose as light flashes. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [name] with [S] in the process.</span>")
else if(istype(W, /obj/item/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light [user.p_their()] [name].</span>")
else if(istype(I, /obj/item/assembly/igniter))
light("<span class='notice'>[user] fiddles with [I], and manages to light [user.p_their()] [name].</span>")
else if(istype(W, /obj/item/gun/magic/wand/fireball))
var/obj/item/gun/magic/wand/fireball/F = W
else if(istype(I, /obj/item/gun/magic/wand/fireball))
var/obj/item/gun/magic/wand/fireball/F = I
if(F.charges)
if(prob(50) || user.mind.assigned_role == "Wizard")
light("<span class='notice'>Holy shit, did [user] just manage to light [user.p_their()] [name] with [W], with only moderate eyebrow singing?</span>")
light("<span class='notice'>Holy shit, did [user] just manage to light [user.p_their()] [name] with [F], with only moderate eyebrow singing?</span>")
else
to_chat(user, "<span class='warning'>Unsure which end of the wand is which, [user] fails to light [name] with [W].</span>")
to_chat(user, "<span class='warning'>Unsure which end of the wand is which, [user] fails to light [name] with [F].</span>")
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
F.charges--
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask()
user.update_inv_l_hand()
user.update_inv_r_hand()
return
/obj/item/clothing/mask/cigarette/afterattack(obj/item/reagent_containers/glass/glass, mob/user as mob, proximity)
/obj/item/clothing/mask/cigarette/afterattack(obj/item/reagent_containers/glass/glass, mob/user, proximity)
..()
if(!proximity) return
if(!proximity)
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
@@ -127,8 +127,8 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
if(!src.lit)
src.lit = 1
if(!lit)
lit = TRUE
name = "lit [name]"
attack_verb = list("burnt", "singed")
hitsound = 'sound/items/welder.ogg'
@@ -168,14 +168,13 @@ LIGHTERS ARE IN LIGHTERS.DM
if(isliving(loc))
M.IgniteMob()
smoketime--
if(smoketime < 1)
if(reagents.total_volume <= 0 || smoketime < 1)
die()
return
smoke()
return
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
/obj/item/clothing/mask/cigarette/attack_self(mob/user)
if(lit)
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
die()
@@ -183,13 +182,13 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/proc/smoke()
var/turf/location = get_turf(src)
var/is_being_smoked = 0
var/is_being_smoked = FALSE
// Check whether this is actually in a mouth, being smoked
if(iscarbon(loc))
var/mob/living/carbon/C = loc
if(src == C.wear_mask)
// There used to be a species check here, but synthetics can smoke now
is_being_smoked = 1
is_being_smoked = TRUE
if(location)
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
@@ -201,7 +200,6 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(C, "<span class='notice'>Your [name] loses its flavor.</span>")
else // else just remove some of the reagents
reagents.remove_any(REAGENTS_METABOLISM)
return
/obj/item/clothing/mask/cigarette/proc/die()
var/turf/T = get_turf(src)
@@ -216,12 +214,26 @@ LIGHTERS ARE IN LIGHTERS.DM
qdel(src)
/obj/item/clothing/mask/cigarette/menthol
list_reagents = list("nicotine" = 40, "menthol" = 20)
/obj/item/clothing/mask/cigarette/random
/obj/item/clothing/mask/cigarette/random/New()
list_reagents = list("nicotine" = 40, pick("fuel","saltpetre","synaptizine","green_vomit","potass_iodide","msg","lexorin","mannitol","spaceacillin","cryoxadone","holywater","tea","egg","haloperidol","mutagen","omnizine","carpet","aranesp","cryostylane","chocolate","bilk","cheese","rum","blood","charcoal","coffee","ectoplasm","space_drugs","milk","mutadone","antihol","teporone","insulin","salbutamol","toxin") = 20)
..()
var/random_reagent = pick("fuel","saltpetre","synaptizine","green_vomit","potass_iodide","msg","lexorin","mannitol","spaceacillin","cryoxadone","holywater","tea","egg","haloperidol","mutagen","omnizine","carpet","aranesp","cryostylane","chocolate","bilk","cheese","rum","blood","charcoal","coffee","ectoplasm","space_drugs","milk","mutadone","antihol","teporone","insulin","salbutamol","toxin")
reagents.add_reagent(random_reagent, 10)
/obj/item/clothing/mask/cigarette/syndicate
list_reagents = list("nicotine" = 40, "omnizine" = 20)
/obj/item/clothing/mask/cigarette/medical_marijuana
list_reagents = list("thc" = 40, "cbd" = 20)
/obj/item/clothing/mask/cigarette/robustgold
list_reagents = list("nicotine" = 40, "gold" = 1)
/obj/item/clothing/mask/cigarette/shadyjims
list_reagents = list("nicotine" = 40, "lipolicide" = 7.5, "ammonia" = 2, "atrazine" = 1, "toxin" = 1.5)
/obj/item/clothing/mask/cigarette/rollie
name = "rollie"
@@ -232,8 +244,6 @@ LIGHTERS ARE IN LIGHTERS.DM
type_butt = /obj/item/cigbutt/roach
throw_speed = 0.5
item_state = "spliffoff"
smoketime = 250
chem_volume = 100
/obj/item/clothing/mask/cigarette/rollie/New()
..()
@@ -254,6 +264,7 @@ LIGHTERS ARE IN LIGHTERS.DM
////////////
// 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!"
@@ -263,12 +274,9 @@ LIGHTERS ARE IN LIGHTERS.DM
type_butt = /obj/item/cigbutt/cigarbutt
throw_speed = 0.5
item_state = "cigaroff"
smoketime = 1500
chem_volume = 40
/obj/item/clothing/mask/cigarette/cigar/New()
..()
reagents.add_reagent("nicotine", chem_volume/2)
smoketime = 300
chem_volume = 120
list_reagents = list("nicotine" = 120)
/obj/item/clothing/mask/cigarette/cigar/cohiba
name = "Cohiba Robusto Cigar"
@@ -283,8 +291,9 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
smoketime = 7200
chem_volume = 60
smoketime = 450
chem_volume = 180
list_reagents = list("nicotine" = 180)
/obj/item/cigbutt
name = "cigarette butt"
@@ -306,17 +315,18 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = "cigarbutt"
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/reagent_containers))
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers))
return
if(istype(W, /obj/item/match))
if(istype(I, /obj/item/match))
..()
else
to_chat(user, "<span class='notice'>\The [src] straight out REFUSES to be lit by such uncivilized means.</span>")
to_chat(user, "<span class='notice'>[src] straight out REFUSES to be lit by such uncivilized means.</span>")
/////////////////
//SMOKING PIPES//
/////////////////
/obj/item/clothing/mask/cigarette/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meershaum or something."
@@ -326,14 +336,11 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_off = "pipeoff"
smoketime = 500
chem_volume = 200
/obj/item/clothing/mask/cigarette/pipe/New()
..()
reagents.add_reagent("nicotine", chem_volume)
list_reagents = list("nicotine" = 200)
/obj/item/clothing/mask/cigarette/pipe/light(flavor_text = null)
if(!src.lit)
src.lit = 1
if(!lit)
lit = TRUE
damtype = "fire"
icon_state = icon_on
item_state = icon_on
@@ -350,19 +357,18 @@ LIGHTERS ARE IN LIGHTERS.DM
if(ismob(loc))
var/mob/living/M = loc
to_chat(M, "<span class='notice'>Your [name] goes out, and you empty the ash.</span>")
lit = 0
lit = FALSE
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
STOP_PROCESSING(SSobj, src)
return
smoke()
return
/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
/obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something.
if(lit)
user.visible_message("<span class='notice'>[user] puts out [src].</span>")
lit = 0
lit = FALSE
icon_state = icon_off
item_state = icon_off
STOP_PROCESSING(SSobj, src)
@@ -371,15 +377,14 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>")
reagents.add_reagent("nicotine", chem_volume)
smoketime = initial(smoketime)
return
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/reagent_containers))
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers))
return
if(istype(W, /obj/item/match))
if(istype(I, /obj/item/match))
..()
else
to_chat(user, "<span class='notice'>\The [src] straight out REFUSES to be lit by such means.</span>")
to_chat(user, "<span class='notice'>[src] straight out REFUSES to be lit by such means.</span>")
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
@@ -394,6 +399,7 @@ LIGHTERS ARE IN LIGHTERS.DM
///////////
//ROLLING//
///////////
/obj/item/rollingpaper
name = "rolling paper"
desc = "A thin piece of paper used to make fine smokeables."
+58 -58
View File
@@ -1,58 +1,58 @@
/* Clown Items
* Contains:
* Banana Peels
* Soap
* Bike Horns
*/
/*
* Bike Horns
*/
/obj/item/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
hitsound = null
throwforce = 3
w_class = WEIGHT_CLASS_TINY
var/list/honk_sounds = list('sound/items/bikehorn.ogg' = 1)
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
/obj/item/bikehorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, honk_sounds, 50)
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
origin_tech = "materials=4;engineering=4"
honk_sounds = list('sound/items/airhorn2.ogg' = 1)
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, its made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
/obj/item/bikehorn/golden/attack()
flip_mobs()
return ..()
/obj/item/bikehorn/golden/attack_self(mob/user)
flip_mobs()
..()
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
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(!H.can_hear())
continue
M.emote("flip")
/* Clown Items
* Contains:
* Banana Peels
* Soap
* Bike Horns
*/
/*
* Bike Horns
*/
/obj/item/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
icon = 'icons/obj/items.dmi'
icon_state = "bike_horn"
item_state = "bike_horn"
hitsound = null
throwforce = 3
w_class = WEIGHT_CLASS_TINY
var/list/honk_sounds = list('sound/items/bikehorn.ogg' = 1)
throw_speed = 3
throw_range = 15
attack_verb = list("HONKED")
/obj/item/bikehorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, honk_sounds, 50)
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
origin_tech = "materials=4;engineering=4"
honk_sounds = list('sound/items/airhorn2.ogg' = 1)
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, its made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
/obj/item/bikehorn/golden/attack()
flip_mobs()
return ..()
/obj/item/bikehorn/golden/attack_self(mob/user)
flip_mobs()
..()
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
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(!H.can_hear())
continue
M.emote("flip")
@@ -0,0 +1,21 @@
// Conversion kit
/obj/item/conversion_kit
name = "\improper Revolver Conversion Kit"
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
icon_state = "kit"
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=2"
var/open = 0
/obj/item/conversion_kit/New()
..()
update_icon()
/obj/item/conversion_kit/update_icon()
icon_state = "[initial(icon_state)]_[open]"
/obj/item/conversion_kit/attack_self(mob/user)
open = !open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
update_icon()
+180 -179
View File
@@ -1,179 +1,180 @@
/obj/item/lipstick
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi'
icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = 0
var/list/lipstick_colors = list(
"purple" = "purple",
"jade" = "#216F43",
"lime" = "lime",
"black" = "black",
"green" = "green",
"blue" = "blue",
"white" = "white")
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/lipstick/jade
name = "jade lipstick"
colour = "#216F43"
/obj/item/lipstick/lime
name = "lime lipstick"
colour = "lime"
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/lipstick/green
name = "green lipstick"
colour = "green"
/obj/item/lipstick/blue
name = "blue lipstick"
colour = "blue"
/obj/item/lipstick/white
name = "white lipstick"
colour = "white"
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
/obj/item/lipstick/attack_self(mob/user as mob)
overlays.Cut()
to_chat(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"
overlays += colored
else
icon_state = "lipstick"
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
if(!open) return
if(!istype(M, /mob)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.lip_style) //if they already have lipstick on
to_chat(user, "<span class='notice'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with [src].</span>", \
"<span class='notice'>You take a moment to apply [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].</span>")
if(do_after(user, 20, target = H))
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
"<span class='notice'>You apply \the [src].</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
/obj/item/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 = WEIGHT_CLASS_TINY
usesound = 'sound/items/welder2.ogg'
toolspeed = 1
/obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(user.zone_selected == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(C.f_style == "Shaved")
to_chat(user, "<span class='notice'>Already clean-shaven.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='notice'>[user] starts to shave [user.p_their()] facial hair with [src].</span>", \
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] facial hair clean with [src].</span>", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, usesound, 20, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s facial hair with \the [src].</span>", \
"<span class='warning'>You start shaving [H]'s facial hair.</span>")
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, usesound, 20, 1)
if(user.zone_selected == "head")
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
if(isskrell(M))
to_chat(user, "<span class='warning'>Your razor isn't going to cut through tentacles.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='warning'>[user] starts to shave [user.p_their()] head with [src].</span>", \
"<span class='warning'>You start to shave your head with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] head with [src].</span>", \
"<span class='notice'>You finish shaving with \the [src].</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, usesound, 40, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s head with \the [src]!</span>", \
"<span class='warning'>You start shaving [H]'s head.</span>")
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves [H]'s head bald with \the [src]!</span>", \
"<span class='warning'>You shave [H]'s head bald.</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, usesound, 40, 1)
else
..()
else
..()
/obj/item/lipstick
name = "red lipstick"
desc = "A generic brand of lipstick."
icon = 'icons/obj/items.dmi'
icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = 0
var/list/lipstick_colors = list(
"purple" = "purple",
"jade" = "#216F43",
"lime" = "lime",
"black" = "black",
"green" = "green",
"blue" = "blue",
"white" = "white")
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/lipstick/jade
name = "jade lipstick"
colour = "#216F43"
/obj/item/lipstick/lime
name = "lime lipstick"
colour = "lime"
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
/obj/item/lipstick/green
name = "green lipstick"
colour = "green"
/obj/item/lipstick/blue
name = "blue lipstick"
colour = "blue"
/obj/item/lipstick/white
name = "white lipstick"
colour = "white"
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
..()
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
/obj/item/lipstick/attack_self(mob/user as mob)
overlays.Cut()
to_chat(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"
overlays += colored
else
icon_state = "lipstick"
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
if(!open) return
if(!istype(M, /mob)) return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.lip_style) //if they already have lipstick on
to_chat(user, "<span class='notice'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with [src].</span>", \
"<span class='notice'>You take a moment to apply [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].</span>")
if(do_after(user, 20, target = H))
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
"<span class='notice'>You apply \the [src].</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.update_body()
else
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
/obj/item/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 = WEIGHT_CLASS_TINY
usesound = 'sound/items/welder2.ogg'
toolspeed = 1
/obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(user.zone_selected == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(C.f_style == "Shaved")
to_chat(user, "<span class='notice'>Already clean-shaven.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='notice'>[user] starts to shave [user.p_their()] facial hair with [src].</span>", \
"<span class='notice'>You take a moment shave your facial hair with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] facial hair clean with [src].</span>", \
"<span class='notice'>You finish shaving with [src]. Fast and clean!</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, usesound, 20, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s facial hair with \the [src].</span>", \
"<span class='warning'>You start shaving [H]'s facial hair.</span>")
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves off [H]'s facial hair with \the [src].</span>", \
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
C.f_style = "Shaved"
H.update_fhair()
playsound(src.loc, usesound, 20, 1)
if(user.zone_selected == "head")
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
if(isskrell(M))
to_chat(user, "<span class='warning'>Your razor isn't going to cut through tentacles.</span>")
return
if(H == user) //shaving yourself
user.visible_message("<span class='warning'>[user] starts to shave [user.p_their()] head with [src].</span>", \
"<span class='warning'>You start to shave your head with \the [src].</span>")
if(do_after(user, 50 * toolspeed, target = H))
user.visible_message("<span class='notice'>[user] shaves [user.p_their()] head with [src].</span>", \
"<span class='notice'>You finish shaving with \the [src].</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, usesound, 40, 1)
else
var/turf/user_loc = user.loc
var/turf/H_loc = H.loc
user.visible_message("<span class='danger'>[user] tries to shave [H]'s head with \the [src]!</span>", \
"<span class='warning'>You start shaving [H]'s head.</span>")
if(do_after(user, 50 * toolspeed, target = H))
if(user_loc == user.loc && H_loc == H.loc)
user.visible_message("<span class='danger'>[user] shaves [H]'s head bald with \the [src]!</span>", \
"<span class='warning'>You shave [H]'s head bald.</span>")
C.h_style = "Skinhead"
H.update_hair()
playsound(src.loc, usesound, 40, 1)
else
..()
else
..()
+213 -213
View File
@@ -1,213 +1,213 @@
/obj/item/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"
can_hold = list(/obj/item/dice)
allow_wrap = FALSE
/obj/item/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1")
new /obj/item/dice/d1(src)
if(special_die == "2")
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d6(src)
if(special_die == "fudge")
new /obj/item/dice/fudge(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
if(special_die == "00")
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
if(special_die == "100")
new /obj/item/dice/d100(src)
/obj/item/storage/pill_bottle/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice //depreciated d6, use /obj/item/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 = WEIGHT_CLASS_TINY
var/sides = 6
var/result = null
var/list/special_faces = list() //entries should match up to sides var if used
var/rigged = DICE_NOT_RIGGED
var/rigged_value
/obj/item/dice/Initialize(mapload)
. = ..()
if(!result)
result = roll(sides)
update_icon()
/obj/item/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice/d1
name = "d1"
desc = "A die with one side. Deterministic!"
icon_state = "d1"
sides = 1
/obj/item/dice/d2
name = "d2"
desc = "A die with two sides. Coins are undignified!"
icon_state = "d2"
sides = 2
/obj/item/dice/d4
name = "d4"
desc = "A die with four sides. The nerd's caltrop."
icon_state = "d4"
sides = 4
/obj/item/dice/d4/Initialize(mapload)
. = ..()
AddComponent(/datum/component/caltrop, 1, 4) //1d4 damage
/obj/item/dice/d6
name = "d6"
/obj/item/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/dice/d8
name = "d8"
desc = "A die with eight sides. It feels... lucky."
icon_state = "d8"
sides = 8
/obj/item/dice/d10
name = "d10"
desc = "A die with ten sides. Useful for percentages."
icon_state = "d10"
sides = 10
/obj/item/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/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/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/dice/d100
name = "d100"
desc = "A die with one hundred sides! Probably not fairly weighted..."
icon_state = "d100"
sides = 100
/obj/item/dice/d100/update_icon()
return
/obj/item/dice/d20/e20
var/triggered = 0
/obj/item/dice/attack_self(mob/user as mob)
diceroll(user)
/obj/item/dice/throw_impact(atom/target)
diceroll(thrownby)
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
. = result
var/fake_result = roll(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) //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/dice/d20/e20/diceroll(mob/user as mob, thrown)
if(triggered)
return
. = ..()
if(result == 1)
to_chat(user, "<span class='danger'>Rocks fall, you die.</span>")
user.gib()
else
triggered = 1
visible_message("<span class='notice'>You hear a quiet click.</span>")
spawn(40)
var/cap = 0
if(result > MAX_EX_LIGHT_RANGE && result != 20)
cap = 1
result = min(result, MAX_EX_LIGHT_RANGE) //Apply the bombcap
else if(result == 20) //Roll a nat 20, screw the bombcap
result = 24
var/turf/epicenter = get_turf(src)
explosion(epicenter, round(result*0.25), round(result*0.5), round(result), round(result*1.5), 1, cap)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
investigate_log("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]", INVESTIGATE_BOMB)
message_admins("E20 detonated at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> with a roll of [result]. Triggered by: [key_name_admin(user)]")
log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]")
/obj/item/dice/update_icon()
overlays.Cut()
overlays += "[icon_state][result]"
/obj/item/storage/box/dice
name = "Box of dice"
desc = "ANOTHER ONE!? FUCK!"
icon_state = "box"
/obj/item/storage/box/dice/New()
..()
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
/obj/item/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"
can_hold = list(/obj/item/dice)
allow_wrap = FALSE
/obj/item/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1")
new /obj/item/dice/d1(src)
if(special_die == "2")
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d6(src)
if(special_die == "fudge")
new /obj/item/dice/fudge(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
if(special_die == "00")
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
if(special_die == "100")
new /obj/item/dice/d100(src)
/obj/item/storage/pill_bottle/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice //depreciated d6, use /obj/item/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 = WEIGHT_CLASS_TINY
var/sides = 6
var/result = null
var/list/special_faces = list() //entries should match up to sides var if used
var/rigged = DICE_NOT_RIGGED
var/rigged_value
/obj/item/dice/Initialize(mapload)
. = ..()
if(!result)
result = roll(sides)
update_icon()
/obj/item/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice/d1
name = "d1"
desc = "A die with one side. Deterministic!"
icon_state = "d1"
sides = 1
/obj/item/dice/d2
name = "d2"
desc = "A die with two sides. Coins are undignified!"
icon_state = "d2"
sides = 2
/obj/item/dice/d4
name = "d4"
desc = "A die with four sides. The nerd's caltrop."
icon_state = "d4"
sides = 4
/obj/item/dice/d4/Initialize(mapload)
. = ..()
AddComponent(/datum/component/caltrop, 1, 4) //1d4 damage
/obj/item/dice/d6
name = "d6"
/obj/item/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/dice/d8
name = "d8"
desc = "A die with eight sides. It feels... lucky."
icon_state = "d8"
sides = 8
/obj/item/dice/d10
name = "d10"
desc = "A die with ten sides. Useful for percentages."
icon_state = "d10"
sides = 10
/obj/item/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/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/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/dice/d100
name = "d100"
desc = "A die with one hundred sides! Probably not fairly weighted..."
icon_state = "d100"
sides = 100
/obj/item/dice/d100/update_icon()
return
/obj/item/dice/d20/e20
var/triggered = 0
/obj/item/dice/attack_self(mob/user as mob)
diceroll(user)
/obj/item/dice/throw_impact(atom/target)
diceroll(thrownby)
. = ..()
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
. = result
var/fake_result = roll(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) //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/dice/d20/e20/diceroll(mob/user as mob, thrown)
if(triggered)
return
. = ..()
if(result == 1)
to_chat(user, "<span class='danger'>Rocks fall, you die.</span>")
user.gib()
else
triggered = 1
visible_message("<span class='notice'>You hear a quiet click.</span>")
spawn(40)
var/cap = 0
if(result > MAX_EX_LIGHT_RANGE && result != 20)
cap = 1
result = min(result, MAX_EX_LIGHT_RANGE) //Apply the bombcap
else if(result == 20) //Roll a nat 20, screw the bombcap
result = 24
var/turf/epicenter = get_turf(src)
explosion(epicenter, round(result*0.25), round(result*0.5), round(result), round(result*1.5), 1, cap)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
investigate_log("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]", INVESTIGATE_BOMB)
message_admins("E20 detonated at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> with a roll of [result]. Triggered by: [key_name_admin(user)]")
log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]")
/obj/item/dice/update_icon()
overlays.Cut()
overlays += "[icon_state][result]"
/obj/item/storage/box/dice
name = "Box of dice"
desc = "ANOTHER ONE!? FUCK!"
icon_state = "box"
/obj/item/storage/box/dice/New()
..()
new /obj/item/dice/d2(src)
new /obj/item/dice/d4(src)
new /obj/item/dice/d8(src)
new /obj/item/dice/d10(src)
new /obj/item/dice/d00(src)
new /obj/item/dice/d12(src)
new /obj/item/dice/d20(src)
File diff suppressed because it is too large Load Diff
+277 -277
View File
@@ -1,277 +1,277 @@
/obj/item/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
origin_tech = "syndicate=1"
toolspeed = 1
var/atom/target = null
var/image_overlay = null
var/obj/item/assembly_holder/nadeassembly = null
var/assemblyattacher
/obj/item/grenade/plastic/New()
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
..()
/obj/item/grenade/plastic/Destroy()
QDEL_NULL(nadeassembly)
target = null
return ..()
/obj/item/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/assembly_holder))
var/obj/item/assembly_holder/A = I
if(!user.unEquip(I))
return ..()
nadeassembly = A
A.master = src
A.loc = src
assemblyattacher = user.ckey
to_chat(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/wirecutters))
playsound(src, I.usesound, 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
update_icon()
return
..()
//assembly stuff
/obj/item/grenade/plastic/receive_signal()
prime()
/obj/item/grenade/plastic/Crossed(atom/movable/AM, oldloc)
if(nadeassembly)
nadeassembly.Crossed(AM, oldloc)
/obj/item/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/grenade/plastic/attack_self(mob/user)
if(nadeassembly)
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (istype(AM, /mob/living/carbon))
return
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
if(do_after(user, 50 * toolspeed, target = AM))
if(!user.unEquip(src))
return
src.target = AM
loc = null
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) 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 [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
target.overlays += image_overlay
if(!nadeassembly)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(CALLBACK(src, .proc/prime), det_time*10)
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) 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)
log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
user.visible_message("<span class='suicide'>[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] 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 == ROLE_TRAITOR || role == "syndicate" || role == "syndicate commando")
message_say = "FOR THE SYNDICATE!"
else if(role == ROLE_CHANGELING)
message_say = "FOR THE HIVE!"
else if(role == ROLE_CULTIST)
message_say = "FOR NARSIE!"
else if(role == ROLE_NINJA)
message_say = "FOR THE CLAN!"
else if(role == ROLE_WIZARD)
message_say = "FOR THE FEDERATION!"
else if(role == ROLE_REV || role == "head revolutionary")
message_say = "FOR THE REVOLOUTION!"
else if(role == "death commando" || role == ROLE_ERT)
message_say = "FOR NANOTRASEN!"
else if(role == ROLE_DEVIL)
message_say = "FOR INFERNO!"
user.say(message_say)
target = user
sleep(10)
prime()
user.gib()
return OBLITERATION
/obj/item/grenade/plastic/update_icon()
if(nadeassembly)
icon_state = "[item_state]1"
else
icon_state = "[item_state]0"
//////////////////////////
///// The Explosives /////
//////////////////////////
/obj/item/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
/obj/item/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
if(istype(target, /turf/))
location = get_turf(target) // Set the explosion location to turf if planted directly on a wall or floor
else
location = get_atom_on_turf(target) // Otherwise, make sure we're blowing up what's on top of the turf
target.overlays -= image_overlay
else
location = get_atom_on_turf(src)
if(location)
explosion(location,0,0,3)
location.ex_act(2, target)
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/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/grenade/plastic/x4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
if(istype(target, /turf/))
location = get_turf(target)
else
location = get_atom_on_turf(target)
target.overlays -= image_overlay
else
location = get_atom_on_turf(src)
if(location)
if(target && 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/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
// Shaped charge
// Same blasting power as C4, but with the same idea as the X4 -- Everyone on one side of the wall is safe.
/obj/item/grenade/plastic/c4_shaped
name = "C4 (shaped)"
desc = "A brick of C4 shaped to allow more precise breaching."
var/aim_dir = NORTH
/obj/item/grenade/plastic/c4_shaped/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
else
location = get_turf(src)
if(location)
if(target && target.density)
var/turf/T = get_step(location, aim_dir)
explosion(get_step(T, aim_dir),0,0,3)
location.ex_act(2, target)
else
explosion(location, 0, 0, 3)
location.ex_act(2, target)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
/obj/item/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
/obj/item/grenade/plastic/c4_shaped/flash
name = "C4 (flash)"
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
/obj/item/grenade/plastic/c4_shaped/flash/prime()
if(target && target.density)
T = get_step(get_turf(target), aim_dir)
else if(target)
T = get_turf(target)
else
T = get_turf(src)
var/obj/item/grenade/flashbang/CB = new/obj/item/grenade/flashbang(T)
CB.prime()
..()
/obj/item/grenade/plastic/x4/thermite
name = "T4"
desc = "A wall breaching charge, containing fuel, metal oxide and metal powder mixed in just the right way. One hell of a combination. Effective against walls, ineffective against airlocks..."
det_time = 2
icon_state = "t4breach0"
item_state = "t4breach"
/obj/item/grenade/plastic/x4/thermite/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
else
location = get_turf(src)
if(location)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(8,0, location, aim_dir)
if(target && target.density)
var/turf/T = get_step(location, aim_dir)
for(var/turf/simulated/wall/W in range(1, location))
W.thermitemelt(speed = 30)
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
else
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
if(isliving(target))
var/mob/living/M = target
M.adjust_fire_stacks(2)
M.IgniteMob()
qdel(src)
/obj/item/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
origin_tech = "syndicate=1"
toolspeed = 1
var/atom/target = null
var/image_overlay = null
var/obj/item/assembly_holder/nadeassembly = null
var/assemblyattacher
/obj/item/grenade/plastic/New()
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
..()
/obj/item/grenade/plastic/Destroy()
QDEL_NULL(nadeassembly)
target = null
return ..()
/obj/item/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/assembly_holder))
var/obj/item/assembly_holder/A = I
if(!user.unEquip(I))
return ..()
nadeassembly = A
A.master = src
A.loc = src
assemblyattacher = user.ckey
to_chat(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/wirecutters))
playsound(src, I.usesound, 20, 1)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
update_icon()
return
..()
//assembly stuff
/obj/item/grenade/plastic/receive_signal()
prime()
/obj/item/grenade/plastic/Crossed(atom/movable/AM, oldloc)
if(nadeassembly)
nadeassembly.Crossed(AM, oldloc)
/obj/item/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/grenade/plastic/attack_self(mob/user)
if(nadeassembly)
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
return
if (istype(AM, /mob/living/carbon))
return
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
if(do_after(user, 50 * toolspeed, target = AM))
if(!user.unEquip(src))
return
src.target = AM
loc = null
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) 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 [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
target.overlays += image_overlay
if(!nadeassembly)
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(CALLBACK(src, .proc/prime), det_time*10)
/obj/item/grenade/plastic/suicide_act(mob/user)
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) 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)
log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
user.visible_message("<span class='suicide'>[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] 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 == ROLE_TRAITOR || role == "syndicate" || role == "syndicate commando")
message_say = "FOR THE SYNDICATE!"
else if(role == ROLE_CHANGELING)
message_say = "FOR THE HIVE!"
else if(role == ROLE_CULTIST)
message_say = "FOR NARSIE!"
else if(role == ROLE_NINJA)
message_say = "FOR THE CLAN!"
else if(role == ROLE_WIZARD)
message_say = "FOR THE FEDERATION!"
else if(role == ROLE_REV || role == "head revolutionary")
message_say = "FOR THE REVOLOUTION!"
else if(role == "death commando" || role == ROLE_ERT)
message_say = "FOR NANOTRASEN!"
else if(role == ROLE_DEVIL)
message_say = "FOR INFERNO!"
user.say(message_say)
target = user
sleep(10)
prime()
user.gib()
return OBLITERATION
/obj/item/grenade/plastic/update_icon()
if(nadeassembly)
icon_state = "[item_state]1"
else
icon_state = "[item_state]0"
//////////////////////////
///// The Explosives /////
//////////////////////////
/obj/item/grenade/plastic/c4
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteurs favourite."
/obj/item/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
if(istype(target, /turf/))
location = get_turf(target) // Set the explosion location to turf if planted directly on a wall or floor
else
location = get_atom_on_turf(target) // Otherwise, make sure we're blowing up what's on top of the turf
target.overlays -= image_overlay
else
location = get_atom_on_turf(src)
if(location)
explosion(location,0,0,3)
location.ex_act(2, target)
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/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/grenade/plastic/x4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
if(istype(target, /turf/))
location = get_turf(target)
else
location = get_atom_on_turf(target)
target.overlays -= image_overlay
else
location = get_atom_on_turf(src)
if(location)
if(target && 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/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
// Shaped charge
// Same blasting power as C4, but with the same idea as the X4 -- Everyone on one side of the wall is safe.
/obj/item/grenade/plastic/c4_shaped
name = "C4 (shaped)"
desc = "A brick of C4 shaped to allow more precise breaching."
var/aim_dir = NORTH
/obj/item/grenade/plastic/c4_shaped/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
else
location = get_turf(src)
if(location)
if(target && target.density)
var/turf/T = get_step(location, aim_dir)
explosion(get_step(T, aim_dir),0,0,3)
location.ex_act(2, target)
else
explosion(location, 0, 0, 3)
location.ex_act(2, target)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
/obj/item/grenade/plastic/c4_shaped/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
/obj/item/grenade/plastic/c4_shaped/flash
name = "C4 (flash)"
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
/obj/item/grenade/plastic/c4_shaped/flash/prime()
if(target && target.density)
T = get_step(get_turf(target), aim_dir)
else if(target)
T = get_turf(target)
else
T = get_turf(src)
var/obj/item/grenade/flashbang/CB = new/obj/item/grenade/flashbang(T)
CB.prime()
..()
/obj/item/grenade/plastic/x4/thermite
name = "T4"
desc = "A wall breaching charge, containing fuel, metal oxide and metal powder mixed in just the right way. One hell of a combination. Effective against walls, ineffective against airlocks..."
det_time = 2
icon_state = "t4breach0"
item_state = "t4breach"
/obj/item/grenade/plastic/x4/thermite/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.overlays -= image_overlay
else
location = get_turf(src)
if(location)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(8,0, location, aim_dir)
if(target && target.density)
var/turf/T = get_step(location, aim_dir)
for(var/turf/simulated/wall/W in range(1, location))
W.thermitemelt(speed = 30)
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
else
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
if(isliving(target))
var/mob/living/M = target
M.adjust_fire_stacks(2)
M.IgniteMob()
qdel(src)
+180 -179
View File
@@ -1,179 +1,180 @@
/obj/item/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 = WEIGHT_CLASS_NORMAL
throw_speed = 2
throw_range = 7
force = 10
container_type = AMOUNT_VISIBLE
materials = list(MAT_METAL=90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
dog_fashion = /datum/dog_fashion/back
resistance_flags = FIRE_PROOF
var/max_water = 50
var/last_use = 1.0
var/safety = 1
var/refilling = FALSE
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/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 = WEIGHT_CLASS_SMALL
force = 3.0
materials = list()
max_water = 30
sprite_name = "miniFE"
dog_fashion = null
/obj/item/extinguisher/examine(mob/user)
. = ..()
. += "<span class='notice'>The safety is [safety ? "on" : "off"].</span>"
/obj/item/extinguisher/New()
create_reagents(max_water)
reagents.add_reagent("water", max_water)
/obj/item/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
to_chat(user, "The safety is [safety ? "on" : "off"].")
return
/obj/item/extinguisher/attack_obj(obj/O, mob/living/user)
if(AttemptRefill(O, user))
refilling = TRUE
return FALSE
else
return ..()
/obj/item/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)
to_chat(user, "<span class='notice'>\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)
to_chat(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
to_chat(user, "<span class='notice'>\The [W] is empty!</span>")
safety = safety_save
return 1
else
return 0
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
. = ..()
//TODO; Add support for reagents in water.
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
return
if(refilling)
refilling = FALSE
return
if(!safety)
if(src.reagents.total_volume < 1)
to_chat(usr, "<span class='danger'>\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(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/structure/chair/C = null
if(istype(usr.buckled, /obj/structure/chair))
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
if(C) C.propelled = 4
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
if(C) C.propelled = 3
sleep(1)
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
if(C) C.propelled = 2
sleep(2)
step(B, movementdirection)
if(C) C.propelled = 1
sleep(2)
step(B, movementdirection)
if(C) C.propelled = 0
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 = new /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<5, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W) return
W.reagents.reaction(atm)
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
else
return ..()
/obj/item/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 = WEIGHT_CLASS_NORMAL
throw_speed = 2
throw_range = 7
force = 10
container_type = AMOUNT_VISIBLE
materials = list(MAT_METAL=90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
dog_fashion = /datum/dog_fashion/back
resistance_flags = FIRE_PROOF
var/max_water = 50
var/last_use = 1.0
var/safety = 1
var/refilling = FALSE
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/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 = WEIGHT_CLASS_SMALL
force = 3.0
materials = list()
max_water = 30
sprite_name = "miniFE"
dog_fashion = null
/obj/item/extinguisher/examine(mob/user)
. = ..()
. += "<span class='notice'>The safety is [safety ? "on" : "off"].</span>"
/obj/item/extinguisher/New()
..()
create_reagents(max_water)
reagents.add_reagent("water", max_water)
/obj/item/extinguisher/attack_self(mob/user as mob)
safety = !safety
src.icon_state = "[sprite_name][!safety]"
src.desc = "The safety is [safety ? "on" : "off"]."
to_chat(user, "The safety is [safety ? "on" : "off"].")
return
/obj/item/extinguisher/attack_obj(obj/O, mob/living/user)
if(AttemptRefill(O, user))
refilling = TRUE
return FALSE
else
return ..()
/obj/item/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)
to_chat(user, "<span class='notice'>\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)
to_chat(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
to_chat(user, "<span class='notice'>\The [W] is empty!</span>")
safety = safety_save
return 1
else
return 0
/obj/item/extinguisher/afterattack(atom/target, mob/user , flag)
. = ..()
//TODO; Add support for reagents in water.
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
return
if(refilling)
refilling = FALSE
return
if(!safety)
if(src.reagents.total_volume < 1)
to_chat(usr, "<span class='danger'>\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(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
spawn(0)
var/obj/structure/chair/C = null
if(istype(usr.buckled, /obj/structure/chair))
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
if(C) C.propelled = 4
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
if(C) C.propelled = 3
sleep(1)
step(B, movementdirection)
sleep(1)
step(B, movementdirection)
if(C) C.propelled = 2
sleep(2)
step(B, movementdirection)
if(C) C.propelled = 1
sleep(2)
step(B, movementdirection)
if(C) C.propelled = 0
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 = new /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<5, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W) return
W.reagents.reaction(atm)
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
else
return ..()
+3 -3
View File
@@ -7,7 +7,7 @@ obj/item/firework
obj/item/firework/attackby(obj/item/W,mob/user, params)
if(litzor)
return
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
if(is_hot(W))
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -29,7 +29,7 @@ obj/item/sparkler
obj/item/sparkler/attackby(obj/item/W,mob/user, params)
if(litzor)
return
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
if(is_hot(W))
for(var/mob/M in viewers(user))
to_chat(M, "[user] lits \the [src]")
litzor = 1
@@ -59,4 +59,4 @@ obj/item/sparkler/attackby(obj/item/W,mob/user, params)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
new /obj/item/firework(src)
+30 -25
View File
@@ -76,28 +76,7 @@
flame_turf(turflist)
/obj/item/flamethrower/attackby(obj/item/I, mob/user, params)
if(iswrench(I) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.forceMove(T)
weldtool = null
if(igniter)
igniter.forceMove(T)
igniter = null
if(ptank)
ptank.forceMove(T)
ptank = null
new /obj/item/stack/rods(T)
qdel(src)
return
else if(isscrewdriver(I) && igniter && !lit)
status = !status
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
update_icon()
return
else if(isigniter(I))
if(isigniter(I))
var/obj/item/assembly/igniter/IG = I
if(IG.secured)
return
@@ -130,6 +109,34 @@
else
return ..()
/obj/item/flamethrower/wrench_act(mob/user, obj/item/I)
if(status)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
var/turf/T = get_turf(src)
if(weldtool)
weldtool.forceMove(T)
weldtool = null
if(igniter)
igniter.forceMove(T)
igniter = null
if(ptank)
ptank.forceMove(T)
ptank = null
new /obj/item/stack/rods(T)
qdel(src)
/obj/item/flamethrower/screwdriver_act(mob/user, obj/item/I)
if(!igniter || lit)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
status = !status
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
update_icon()
/obj/item/flamethrower/attack_self(mob/user)
toggle_igniter(user)
@@ -168,7 +175,6 @@
..()
weldtool = locate(/obj/item/weldingtool) in contents
igniter = locate(/obj/item/assembly/igniter) in contents
weldtool.status = FALSE
igniter.secured = FALSE
status = TRUE
update_icon()
@@ -216,7 +222,6 @@
if(create_full)
if(!weldtool)
weldtool = new /obj/item/weldingtool(src)
weldtool.status = FALSE
if(!igniter)
igniter = new igniter_type(src)
igniter.secured = FALSE
@@ -245,4 +250,4 @@
location.hotspot_expose(700, 2)
/obj/item/assembly/igniter/proc/ignite_turf(obj/item/flamethrower/F, turf/simulated/location, release_amount = 0.05)
F.default_ignite(location, release_amount)
F.default_ignite(location, release_amount)
@@ -5,7 +5,7 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
var/spawn_contents = SPAWN_HEAT | SPAWN_TOXINS
var/spawn_contents = LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS
var/spawn_amount = 100
/obj/item/grenade/gas/prime()
@@ -21,13 +21,13 @@
/obj/item/grenade/gas/knockout
name = "knockout grenade"
desc = "A grenade that releases pure N2O gas."
spawn_contents = SPAWN_20C | SPAWN_N2O
spawn_contents = LINDA_SPAWN_20C | LINDA_SPAWN_N2O
/obj/item/grenade/gas/oxygen
name = "oxygen grenade"
desc = "A grenade that releases pure O2 gas."
icon_state = "oxygen"
spawn_contents = SPAWN_20C | SPAWN_OXYGEN
spawn_contents = LINDA_SPAWN_20C | LINDA_SPAWN_OXYGEN
spawn_amount = 500
/obj/item/grenade/gluon
@@ -51,4 +51,4 @@
L.adjustStaminaLoss(stamina_damage)
L.apply_effect(rad_damage, IRRADIATE)
L.adjust_bodytemperature(-230)
qdel(src)
qdel(src)
File diff suppressed because it is too large Load Diff
@@ -1,11 +1,11 @@
/obj/item/grenade/empgrenade
name = "classic EMP grenade"
desc = "It is designed to wreak havoc on electronic systems."
icon_state = "emp"
item_state = "emp"
origin_tech = "magnets=3;combat=2"
/obj/item/grenade/empgrenade/prime()
update_mob()
empulse(src, 4, 10, 1)
qdel(src)
/obj/item/grenade/empgrenade
name = "classic EMP grenade"
desc = "It is designed to wreak havoc on electronic systems."
icon_state = "emp"
item_state = "emp"
origin_tech = "magnets=3;combat=2"
/obj/item/grenade/empgrenade/prime()
update_mob()
empulse(src, 4, 10, 1)
qdel(src)
@@ -1,79 +1,79 @@
/obj/item/grenade/flashbang
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=3"
light_power = 10
light_color = LIGHT_COLOR_WHITE
var/light_time = 2
var/range = 7
/obj/item/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
set_light(7)
do_sparks(rand(5, 9), FALSE, src)
playsound(flashbang_turf, 'sound/effects/bang.ogg', 25, 1)
bang(flashbang_turf, src, range)
for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here
var/damage = round(30 / (get_dist(B, get_turf(src)) + 1))
B.take_damage(damage, BURN, "melee", 0)
spawn(light_time)
qdel(src)
/proc/bang(turf/T, atom/A, range = 7, flash = TRUE, bang = TRUE)
for(var/mob/living/M in hearers(range, T))
if(M.stat == DEAD)
continue
M.show_message("<span class='warning'>BANG</span>", 2)
//Checking for protections
var/ear_safety = M.check_ear_prot()
var/distance = max(1, get_dist(get_turf(A), get_turf(M)))
//Flash
if(flash)
if(M.weakeyes)
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
to_chat(M, "<span class='userdanger'><font size=3>AAAAGH!</font></span>")
M.Weaken(15) //hella stunned
M.Stun(15)
if(ishuman(M))
M.emote("scream")
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(E)
E.receive_damage(8, 1)
if(M.flash_eyes(affect_silicon = TRUE))
M.Stun(max(10 / distance, 3))
M.Weaken(max(10 / distance, 3))
//Bang
if(bang)
if(!distance || A.loc == M || A.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.Stun(max(10 / distance, 3))
M.Weaken(max(10 / distance, 3))
M.AdjustEarDamage(rand(0, 5), 15)
if(iscarbon(M))
var/mob/living/carbon/C = M
var/obj/item/organ/internal/ears/ears = C.get_int_organ(/obj/item/organ/internal/ears)
if(istype(ears))
if(ears.ear_damage >= 15)
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
if(prob(ears.ear_damage - 5))
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
M.BecomeDeaf()
else
if(ears.ear_damage >= 5)
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
/obj/item/grenade/flashbang
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=3"
light_power = 10
light_color = LIGHT_COLOR_WHITE
var/light_time = 2
var/range = 7
/obj/item/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
set_light(7)
do_sparks(rand(5, 9), FALSE, src)
playsound(flashbang_turf, 'sound/effects/bang.ogg', 25, 1)
bang(flashbang_turf, src, range)
for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here
var/damage = round(30 / (get_dist(B, get_turf(src)) + 1))
B.take_damage(damage, BURN, "melee", 0)
spawn(light_time)
qdel(src)
/proc/bang(turf/T, atom/A, range = 7, flash = TRUE, bang = TRUE)
for(var/mob/living/M in hearers(range, T))
if(M.stat == DEAD)
continue
M.show_message("<span class='warning'>BANG</span>", 2)
//Checking for protections
var/ear_safety = M.check_ear_prot()
var/distance = max(1, get_dist(get_turf(A), get_turf(M)))
//Flash
if(flash)
if(M.weakeyes)
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
to_chat(M, "<span class='userdanger'><font size=3>AAAAGH!</font></span>")
M.Weaken(15) //hella stunned
M.Stun(15)
if(ishuman(M))
M.emote("scream")
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(E)
E.receive_damage(8, 1)
if(M.flash_eyes(affect_silicon = TRUE))
M.Stun(max(10 / distance, 3))
M.Weaken(max(10 / distance, 3))
//Bang
if(bang)
if(!distance || A.loc == M || A.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.Stun(max(10 / distance, 3))
M.Weaken(max(10 / distance, 3))
M.AdjustEarDamage(rand(0, 5), 15)
if(iscarbon(M))
var/mob/living/carbon/C = M
var/obj/item/organ/internal/ears/ears = C.get_int_organ(/obj/item/organ/internal/ears)
if(istype(ears))
if(ears.ear_damage >= 15)
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
if(prob(ears.ear_damage - 5))
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
M.BecomeDeaf()
else
if(ears.ear_damage >= 5)
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
@@ -47,4 +47,5 @@
hitsound = 'sound/weapons/pierce.ogg'
/obj/item/embedded/shrapnel/New()
..()
icon_state = pick("shrapnel1", "shrapnel2", "shrapnel3")
@@ -1,111 +1,111 @@
/obj/item/grenade
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = WEIGHT_CLASS_SMALL
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
throw_speed = 4
throw_range = 20
flags = CONDUCT
slot_flags = SLOT_BELT
resistance_flags = FLAMMABLE
max_integrity = 40
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/grenade/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
to_chat(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/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/gun/grenadelauncher)) return ..()
if((user.is_in_active_hand(src)) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(det_time)
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return*/
/obj/item/grenade/examine(mob/user)
. = ..()
if(display_timer)
if(det_time > 1)
. += "The timer is set to [det_time/10] second\s."
else
. += "\The [src] is set for instant detonation."
/obj/item/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
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)] 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])")
investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])", INVESTIGATE_BOMB)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
prime()
/obj/item/grenade/proc/prime()
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
/obj/item/grenade/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/screwdriver))
switch(det_time)
if("1")
det_time = 10
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
if("10")
det_time = 30
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
if("30")
det_time = 50
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
if("50")
det_time = 1
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
add_fingerprint(user)
..()
/obj/item/grenade/attack_hand()
walk(src, null, null)
..()
/obj/item/grenade
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = WEIGHT_CLASS_SMALL
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
throw_speed = 4
throw_range = 20
flags = CONDUCT
slot_flags = SLOT_BELT
resistance_flags = FLAMMABLE
max_integrity = 40
var/active = 0
var/det_time = 50
var/display_timer = 1
/obj/item/grenade/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/grenade/proc/clown_check(var/mob/living/user)
if((CLUMSY in user.mutations) && prob(50))
to_chat(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/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/gun/grenadelauncher)) return ..()
if((user.is_in_active_hand(src)) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
icon_state = initial(icon_state) + "_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(det_time)
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return*/
/obj/item/grenade/examine(mob/user)
. = ..()
if(display_timer)
if(det_time > 1)
. += "The timer is set to [det_time/10] second\s."
else
. += "\The [src] is set for instant detonation."
/obj/item/grenade/attack_self(mob/user as mob)
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
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)] 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])")
investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])", INVESTIGATE_BOMB)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
spawn(det_time)
prime()
/obj/item/grenade/proc/prime()
/obj/item/grenade/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.unEquip(src)
/obj/item/grenade/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/screwdriver))
switch(det_time)
if("1")
det_time = 10
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
if("10")
det_time = 30
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
if("30")
det_time = 50
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
if("50")
det_time = 1
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
add_fingerprint(user)
..()
/obj/item/grenade/attack_hand()
walk(src, null, null)
..()
@@ -1,37 +1,37 @@
/obj/item/grenade/smokebomb
desc = "It is set to detonate in 2 seconds."
name = "smoke bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
slot_flags = SLOT_BELT
var/datum/effect_system/smoke_spread/bad/smoke
/obj/item/grenade/smokebomb/New()
..()
src.smoke = new /datum/effect_system/smoke_spread/bad
src.smoke.attach(src)
/obj/item/grenade/smokebomb/Destroy()
QDEL_NULL(smoke)
return ..()
/obj/item/grenade/smokebomb/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.take_damage(damage, BURN, "melee", 0)
sleep(80)
qdel(src)
return
/obj/item/grenade/smokebomb
desc = "It is set to detonate in 2 seconds."
name = "smoke bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
det_time = 20
item_state = "flashbang"
slot_flags = SLOT_BELT
var/datum/effect_system/smoke_spread/bad/smoke
/obj/item/grenade/smokebomb/New()
..()
src.smoke = new /datum/effect_system/smoke_spread/bad
src.smoke.attach(src)
/obj/item/grenade/smokebomb/Destroy()
QDEL_NULL(smoke)
return ..()
/obj/item/grenade/smokebomb/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.take_damage(damage, BURN, "melee", 0)
sleep(80)
qdel(src)
return
@@ -1,68 +1,68 @@
/obj/item/grenade/spawnergrenade
desc = "It is set to detonate in 5 seconds. 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
spawner_type = /mob/living/simple_animal/hostile/viscerator
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
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.admin_spawned = admin_spawned
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)
return
/obj/item/grenade/spawnergrenade/manhacks
name = "manhack delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/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/grenade/spawnergrenade/feral_cats
name = "feral cat delivery grenade"
desc = "This grenade contains 5 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight."
spawner_type = /mob/living/simple_animal/hostile/feral_cat
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/grenade/spawnergrenade/feral_cats/prime() //Own proc for this because the regular one would flash people which was dumb.
update_mob()
if(spawner_type && deliveryamt)
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
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))
qdel(src)
return
/obj/item/grenade/spawnergrenade
desc = "It is set to detonate in 5 seconds. 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
spawner_type = /mob/living/simple_animal/hostile/viscerator
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
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.admin_spawned = admin_spawned
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)
return
/obj/item/grenade/spawnergrenade/manhacks
name = "manhack delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/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/grenade/spawnergrenade/feral_cats
name = "feral cat delivery grenade"
desc = "This grenade contains 5 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight."
spawner_type = /mob/living/simple_animal/hostile/feral_cat
deliveryamt = 5
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/grenade/spawnergrenade/feral_cats/prime() //Own proc for this because the regular one would flash people which was dumb.
update_mob()
if(spawner_type && deliveryamt)
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
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))
qdel(src)
return
@@ -9,4 +9,4 @@
/obj/item/grenade/syndieminibomb/prime()
update_mob()
explosion(loc, 1, 2, 4, flame_range = 2)
qdel(src)
qdel(src)
+194 -194
View File
@@ -1,194 +1,194 @@
/obj/item/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 = 5
w_class = WEIGHT_CLASS_SMALL
throw_speed = 2
throw_range = 5
materials = list(MAT_METAL=500)
origin_tech = "engineering=3;combat=3"
breakouttime = 600 //Deciseconds = 60s = 1 minutes
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //For disposable cuffs
var/ignoresClumsy = FALSE
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/user)
if(!user.IsAdvancedToolUser())
return
if(!istype(C))
return
if(flags & NODROP)
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
return
if((CLUMSY in user.mutations) && prob(50) && (!ignoresClumsy))
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
apply_cuffs(user, user)
return
cuff(C, user)
/obj/item/restraints/handcuffs/proc/cuff(mob/living/carbon/C, mob/user, remove_src = TRUE)
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(!(H.has_left_hand() || H.has_right_hand()))
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
return
if(!C.handcuffed)
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))
apply_cuffs(C, user, remove_src)
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
if(istype(src, /obj/item/restraints/handcuffs/cable))
feedback_add_details("handcuffs", "C")
else
feedback_add_details("handcuffs", "H")
add_attack_logs(user, C, "Handcuffed ([src])")
else
to_chat(user, "<span class='warning'>You fail to handcuff [C].</span>")
/obj/item/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user, remove_src = TRUE)
if(!target.handcuffed)
if(remove_src)
user.drop_item()
if(trashtype)
target.handcuffed = new trashtype(target)
if(remove_src)
qdel(src)
else
if(remove_src)
loc = target
target.handcuffed = src
else
target.handcuffed = new type(loc)
target.update_handcuffed()
return
/obj/item/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/restraints/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_white"
origin_tech = "engineering=2"
materials = list(MAT_METAL=150, MAT_GLASS=75)
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
/obj/item/restraints/handcuffs/cable/red
color = COLOR_RED
/obj/item/restraints/handcuffs/cable/yellow
color = COLOR_YELLOW
/obj/item/restraints/handcuffs/cable/blue
color = COLOR_BLUE
/obj/item/restraints/handcuffs/cable/green
color = COLOR_GREEN
/obj/item/restraints/handcuffs/cable/pink
color = COLOR_PINK
/obj/item/restraints/handcuffs/cable/orange
color = COLOR_ORANGE
/obj/item/restraints/handcuffs/cable/cyan
color = COLOR_CYAN
/obj/item/restraints/handcuffs/cable/white
color = COLOR_WHITE
/obj/item/restraints/handcuffs/cable/random/New()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
/obj/item/restraints/handcuffs/cable/proc/cable_color(var/colorC)
if(colorC)
if(colorC == "rainbow")
colorC = color_rainbow()
color = colorC
else
color = COLOR_RED
/obj/item/restraints/handcuffs/cable/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
return color
/obj/item/restraints/handcuffs/alien
icon_state = "handcuffAlien"
/obj/item/restraints/handcuffs/pinkcuffs
name = "fluffy pink handcuffs"
desc = "Use this to keep prisoners in line. Or you know, your significant other."
icon_state = "pinkcuffs"
/obj/item/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if(R.use(1))
var/obj/item/wirerod/W = new /obj/item/wirerod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.put_in_hands(W)
to_chat(user, "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need one rod to make a wired rod!</span>")
else if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.amount < 6)
to_chat(user, "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>")
return
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
if(do_after(user, 35 * M.toolspeed, target = src))
var/obj/item/restraints/legcuffs/bola/S = new /obj/item/restraints/legcuffs/bola
M.use(6)
user.put_in_hands(S)
to_chat(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 if(istype(I, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = I
cable_color(C.colourName)
/obj/item/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"
breakouttime = 450 //Deciseconds = 45s
materials = list()
trashtype = /obj/item/restraints/handcuffs/cable/zipties/used
/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
if(isrobot(user))
cuff(C, user, FALSE)
/obj/item/restraints/handcuffs/cable/zipties/used
desc = "A pair of broken zipties."
icon_state = "cuff_white_used"
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
return
/obj/item/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 = 5
w_class = WEIGHT_CLASS_SMALL
throw_speed = 2
throw_range = 5
materials = list(MAT_METAL=500)
origin_tech = "engineering=3;combat=3"
breakouttime = 600 //Deciseconds = 60s = 1 minutes
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
var/cuffsound = 'sound/weapons/handcuffs.ogg'
var/trashtype = null //For disposable cuffs
var/ignoresClumsy = FALSE
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/user)
if(!user.IsAdvancedToolUser())
return
if(!istype(C))
return
if(flags & NODROP)
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
return
if((CLUMSY in user.mutations) && prob(50) && (!ignoresClumsy))
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
apply_cuffs(user, user)
return
cuff(C, user)
/obj/item/restraints/handcuffs/proc/cuff(mob/living/carbon/C, mob/user, remove_src = TRUE)
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(!(H.has_left_hand() || H.has_right_hand()))
to_chat(user, "<span class='warning'>How do you suggest handcuffing someone with no hands?</span>")
return
if(!C.handcuffed)
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))
apply_cuffs(C, user, remove_src)
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
if(istype(src, /obj/item/restraints/handcuffs/cable))
feedback_add_details("handcuffs", "C")
else
feedback_add_details("handcuffs", "H")
add_attack_logs(user, C, "Handcuffed ([src])")
else
to_chat(user, "<span class='warning'>You fail to handcuff [C].</span>")
/obj/item/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user, remove_src = TRUE)
if(!target.handcuffed)
if(remove_src)
user.drop_item()
if(trashtype)
target.handcuffed = new trashtype(target)
if(remove_src)
qdel(src)
else
if(remove_src)
loc = target
target.handcuffed = src
else
target.handcuffed = new type(loc)
target.update_handcuffed()
return
/obj/item/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/restraints/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_white"
origin_tech = "engineering=2"
materials = list(MAT_METAL=150, MAT_GLASS=75)
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
/obj/item/restraints/handcuffs/cable/red
color = COLOR_RED
/obj/item/restraints/handcuffs/cable/yellow
color = COLOR_YELLOW
/obj/item/restraints/handcuffs/cable/blue
color = COLOR_BLUE
/obj/item/restraints/handcuffs/cable/green
color = COLOR_GREEN
/obj/item/restraints/handcuffs/cable/pink
color = COLOR_PINK
/obj/item/restraints/handcuffs/cable/orange
color = COLOR_ORANGE
/obj/item/restraints/handcuffs/cable/cyan
color = COLOR_CYAN
/obj/item/restraints/handcuffs/cable/white
color = COLOR_WHITE
/obj/item/restraints/handcuffs/cable/random/New()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
/obj/item/restraints/handcuffs/cable/proc/cable_color(var/colorC)
if(colorC)
if(colorC == "rainbow")
colorC = color_rainbow()
color = colorC
else
color = COLOR_RED
/obj/item/restraints/handcuffs/cable/proc/color_rainbow()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
return color
/obj/item/restraints/handcuffs/alien
icon_state = "handcuffAlien"
/obj/item/restraints/handcuffs/pinkcuffs
name = "fluffy pink handcuffs"
desc = "Use this to keep prisoners in line. Or you know, your significant other."
icon_state = "pinkcuffs"
/obj/item/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if(R.use(1))
var/obj/item/wirerod/W = new /obj/item/wirerod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.put_in_hands(W)
to_chat(user, "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need one rod to make a wired rod!</span>")
else if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.amount < 6)
to_chat(user, "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>")
return
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
if(do_after(user, 35 * M.toolspeed, target = src))
var/obj/item/restraints/legcuffs/bola/S = new /obj/item/restraints/legcuffs/bola
M.use(6)
user.put_in_hands(S)
to_chat(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 if(istype(I, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = I
cable_color(C.colourName)
/obj/item/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"
breakouttime = 450 //Deciseconds = 45s
materials = list()
trashtype = /obj/item/restraints/handcuffs/cable/zipties/used
/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
if(isrobot(user))
cuff(C, user, FALSE)
/obj/item/restraints/handcuffs/cable/zipties/used
desc = "A pair of broken zipties."
icon_state = "cuff_white_used"
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
return
+1 -1
View File
@@ -120,4 +120,4 @@
if(signs.len)
for(var/H in signs)
qdel(H)
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
@@ -556,6 +556,7 @@
var/faith = 99 //a conversion requires 100 faith to attempt. faith recharges over time while you are wearing missionary robes that have been linked to the staff.
/obj/item/nullrod/missionary_staff/New()
..()
team_color = pick("red", "blue")
icon_state = "godstaff-[team_color]"
item_state = "godstaff-[team_color]"
@@ -8,4 +8,4 @@
return "ERROR"
else
healthstring = "[round(imp_in.getOxyLoss())] - [round(imp_in.getFireLoss())] - [round(imp_in.getToxLoss())] - [round(imp_in.getBruteLoss())]"
return healthstring
return healthstring
@@ -1,87 +1,87 @@
/obj/item/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/implant/proc/trigger(emote, mob/source, force)
return
/obj/item/implant/proc/activate()
return
/obj/item/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/implant/proc/implant(var/mob/source, var/mob/user)
var/obj/item/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(ishuman(source))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
if(user)
add_attack_logs(user, source, "Implanted with [src]")
return 1
/obj/item/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(ishuman(source))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
/obj/item/implant/Destroy()
if(imp_in)
removed(imp_in)
return ..()
/obj/item/implant/proc/get_data()
return "No information available"
/obj/item/implant/dropped(mob/user)
. = 1
..()
/obj/item/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/implant/proc/trigger(emote, mob/source, force)
return
/obj/item/implant/proc/activate()
return
/obj/item/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/implant/proc/implant(var/mob/source, var/mob/user)
var/obj/item/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(ishuman(source))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
if(user)
add_attack_logs(user, source, "Implanted with [src]")
return 1
/obj/item/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(ishuman(source))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
/obj/item/implant/Destroy()
if(imp_in)
removed(imp_in)
return ..()
/obj/item/implant/proc/get_data()
return "No information available"
/obj/item/implant/dropped(mob/user)
. = 1
..()
@@ -44,4 +44,4 @@
if(c.team == team)
console = c
break
return console
return console
@@ -174,4 +174,4 @@
/obj/item/implanter/dust/New()
imp = new /obj/item/implant/dust(src)
..()
..()
@@ -37,4 +37,4 @@
/obj/item/implantcase/krav_maga/New()
imp = new /obj/item/implant/krav_maga(src)
..()
..()
@@ -56,4 +56,4 @@
/obj/item/implantcase/mindshield/New()
imp = new /obj/item/implant/mindshield(src)
..()
..()
@@ -37,4 +37,4 @@
/obj/item/implantcase/track/New()
imp = new /obj/item/implant/tracking(src)
..()
..()
@@ -48,7 +48,7 @@
return -1
mindslave_target.implanting = 1
to_chat(mindslave_target, "<span class='notice'>You feel completely loyal to [user.name].</span>")
to_chat(mindslave_target, "<span class='danger'>You feel completely loyal to [user.name].</span>")
if(!(user.mind in SSticker.mode.implanter))
SSticker.mode.implanter[user.mind] = list()
implanters = SSticker.mode.implanter[user.mind]
@@ -57,7 +57,7 @@
SSticker.mode.implanted[mindslave_target.mind] = user.mind
SSticker.mode.implanter[user.mind] = implanters
to_chat(mindslave_target, "<span class='warning'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.</span>")
to_chat(mindslave_target, "<span class='danger'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.</span>")
var/datum/objective/protect/mindslave/MS = new
MS.owner = mindslave_target.mind
@@ -1,102 +1,102 @@
/obj/item/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 = WEIGHT_CLASS_TINY
origin_tech = "materials=1;biotech=2"
container_type = OPENCONTAINER | INJECTABLE | DRAWABLE
materials = list(MAT_GLASS=500)
var/obj/item/implant/imp = null
/obj/item/implantcase/update_icon()
if(imp)
icon_state = "implantcase-[imp.item_color]"
origin_tech = imp.origin_tech
flags = imp.flags & ~DROPDEL
reagents = imp.reagents
else
icon_state = "implantcase-0"
origin_tech = initial(origin_tech)
flags = initial(flags)
reagents = null
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/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/implanter))
var/obj/item/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 if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
var/obj/item/ammo_casing/shotgun/implanter/I = W
if(I.implanter)
src.attackby(I.implanter, user, params) */ // COMING SOON -- c0
/obj/item/implantcase/New()
..()
update_icon()
/obj/item/implantcase/tracking
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
/obj/item/implantcase/tracking/New()
imp = new /obj/item/implant/tracking(src)
..()
/obj/item/implantcase/weapons_auth
name = "implant case - 'Firearms Authentication'"
desc = "A glass case containing a firearms authentication implant."
/obj/item/implantcase/weapons_auth/New()
imp = new /obj/item/implant/weapons_auth(src)
..()
/obj/item/implantcase/adrenaline
name = "implant case - 'Adrenaline'"
desc = "A glass case containing an adrenaline implant."
/obj/item/implantcase/adrenaline/New()
imp = new /obj/item/implant/adrenalin(src)
..()
/obj/item/implantcase/death_alarm
name = "Glass Case- 'Death Alarm'"
desc = "A case containing a death alarm implant."
/obj/item/implantcase/death_alarm/New()
imp = new /obj/item/implant/death_alarm(src)
..()
/obj/item/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 = WEIGHT_CLASS_TINY
origin_tech = "materials=1;biotech=2"
container_type = OPENCONTAINER | INJECTABLE | DRAWABLE
materials = list(MAT_GLASS=500)
var/obj/item/implant/imp = null
/obj/item/implantcase/update_icon()
if(imp)
icon_state = "implantcase-[imp.item_color]"
origin_tech = imp.origin_tech
flags = imp.flags & ~DROPDEL
reagents = imp.reagents
else
icon_state = "implantcase-0"
origin_tech = initial(origin_tech)
flags = initial(flags)
reagents = null
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/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/implanter))
var/obj/item/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 if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
var/obj/item/ammo_casing/shotgun/implanter/I = W
if(I.implanter)
src.attackby(I.implanter, user, params) */ // COMING SOON -- c0
/obj/item/implantcase/New()
..()
update_icon()
/obj/item/implantcase/tracking
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
/obj/item/implantcase/tracking/New()
imp = new /obj/item/implant/tracking(src)
..()
/obj/item/implantcase/weapons_auth
name = "implant case - 'Firearms Authentication'"
desc = "A glass case containing a firearms authentication implant."
/obj/item/implantcase/weapons_auth/New()
imp = new /obj/item/implant/weapons_auth(src)
..()
/obj/item/implantcase/adrenaline
name = "implant case - 'Adrenaline'"
desc = "A glass case containing an adrenaline implant."
/obj/item/implantcase/adrenaline/New()
imp = new /obj/item/implant/adrenalin(src)
..()
/obj/item/implantcase/death_alarm
name = "Glass Case- 'Death Alarm'"
desc = "A case containing a death alarm implant."
/obj/item/implantcase/death_alarm/New()
imp = new /obj/item/implant/death_alarm(src)
..()
@@ -1,158 +1,158 @@
/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/implant/mindshield/implant_list = list()
var/max_implants = 5
var/injection_cooldown = 600
var/replenish_cooldown = 6000
var/replenishing = 0
var/mob/living/carbon/occupant = null
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=[UID()];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=[UID()];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
src.updateUsrDialog()
return
/obj/machinery/implantchair/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/grab))
var/obj/item/grab/G = W
if(!ismob(G.affecting))
return
var/mob/M = G.affecting
if(M.has_buckled_mobs())
to_chat(user, "[M] will not fit into [src] because [M.p_they()] [M.p_have()] a slime latched onto [M.p_their()] head.")
return
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
/obj/machinery/implantchair/go_out(mob/M)
if(!( src.occupant ))
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
occupant.forceMove(loc)
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
/obj/machinery/implantchair/put_mob(mob/living/carbon/M)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>The [src.name] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
return
M.stop_pulling()
M.forceMove(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/implant/mindshield/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/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/implant/mindshield/I = new /obj/item/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
/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/implant/mindshield/implant_list = list()
var/max_implants = 5
var/injection_cooldown = 600
var/replenish_cooldown = 6000
var/replenishing = 0
var/mob/living/carbon/occupant = null
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=[UID()];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=[UID()];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
src.updateUsrDialog()
return
/obj/machinery/implantchair/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/grab))
var/obj/item/grab/G = W
if(!ismob(G.affecting))
return
var/mob/M = G.affecting
if(M.has_buckled_mobs())
to_chat(user, "[M] will not fit into [src] because [M.p_they()] [M.p_have()] a slime latched onto [M.p_their()] head.")
return
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
/obj/machinery/implantchair/go_out(mob/M)
if(!( src.occupant ))
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
occupant.forceMove(loc)
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
/obj/machinery/implantchair/put_mob(mob/living/carbon/M)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>The [src.name] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
return
M.stop_pulling()
M.forceMove(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/implant/mindshield/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/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/implant/mindshield/I = new /obj/item/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
@@ -1,89 +1,89 @@
/obj/item/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 = WEIGHT_CLASS_SMALL
origin_tech = "materials=2;biotech=3"
materials = list(MAT_METAL=600, MAT_GLASS=200)
toolspeed = 1
var/obj/item/implant/imp = null
/obj/item/implanter/update_icon()
if(imp)
icon_state = "implanter1"
origin_tech = imp.origin_tech
else
icon_state = "implanter0"
origin_tech = initial(origin_tech)
/obj/item/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 * toolspeed, target = M)))
if(user && M && (get_turf(M) == T) && src && imp)
if(imp.implant(M, user))
if(M == user)
to_chat(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/implanter/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/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"
/obj/item/implanter/New()
..()
spawn(1)
update_icon()
/obj/item/implanter/adrenalin
name = "implanter (adrenalin)"
/obj/item/implanter/adrenalin/New()
imp = new /obj/item/implant/adrenalin(src)
..()
/obj/item/implanter/emp
name = "implanter (EMP)"
/obj/item/implanter/emp/New()
imp = new /obj/item/implant/emp(src)
..()
/obj/item/implanter/traitor
name = "implanter (Mindslave)"
/obj/item/implanter/traitor/New()
imp = new /obj/item/implant/traitor(src)
..()
/obj/item/implanter/death_alarm
name = "implanter (Death Alarm)"
/obj/item/implanter/death_alarm/New()
imp = new /obj/item/implant/death_alarm(src)
..()
/obj/item/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 = WEIGHT_CLASS_SMALL
origin_tech = "materials=2;biotech=3"
materials = list(MAT_METAL=600, MAT_GLASS=200)
toolspeed = 1
var/obj/item/implant/imp = null
/obj/item/implanter/update_icon()
if(imp)
icon_state = "implanter1"
origin_tech = imp.origin_tech
else
icon_state = "implanter0"
origin_tech = initial(origin_tech)
/obj/item/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 * toolspeed, target = M)))
if(user && M && (get_turf(M) == T) && src && imp)
if(imp.implant(M, user))
if(M == user)
to_chat(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/implanter/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/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"
/obj/item/implanter/New()
..()
spawn(1)
update_icon()
/obj/item/implanter/adrenalin
name = "implanter (adrenalin)"
/obj/item/implanter/adrenalin/New()
imp = new /obj/item/implant/adrenalin(src)
..()
/obj/item/implanter/emp
name = "implanter (EMP)"
/obj/item/implanter/emp/New()
imp = new /obj/item/implant/emp(src)
..()
/obj/item/implanter/traitor
name = "implanter (Mindslave)"
/obj/item/implanter/traitor/New()
imp = new /obj/item/implant/traitor(src)
..()
/obj/item/implanter/death_alarm
name = "implanter (Death Alarm)"
/obj/item/implanter/death_alarm/New()
imp = new /obj/item/implant/death_alarm(src)
..()
@@ -1,107 +1,107 @@
/obj/item/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 = WEIGHT_CLASS_SMALL
var/obj/item/implantcase/case = null
/obj/item/implantpad/Destroy()
if(case)
dropcase()
return ..()
/obj/item/implantpad/update_icon()
if(case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj)
if(!user || !C)
return
if(case)
to_chat(user, "<span class='warning'>There's already an implant in the pad!</span>")
return
user.unEquip(C)
C.forceMove(src)
case = C
update_icon()
/obj/item/implantpad/proc/dropcase(mob/user as mob)
if(!case)
to_chat(user, "<span class='warning'>There's no implant in the pad!</span>")
return
if(user)
if(user.put_in_hands(case))
add_fingerprint(user)
case.add_fingerprint(user)
case = null
update_icon()
return
case.forceMove(get_turf(src))
case = null
update_icon()
/obj/item/implantpad/verb/remove_implant()
set category = "Object"
set name = "Remove Implant"
set src in usr
if(usr.stat || usr.restrained())
return
dropcase(usr)
/obj/item/implantpad/attackby(obj/item/implantcase/C as obj, mob/user as mob, params)
if(istype(C, /obj/item/implantcase))
addcase(user, C)
else
return ..()
/obj/item/implantpad/attack_self(mob/user as mob)
add_fingerprint(user)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if(case)
if(case.imp)
if(istype(case.imp, /obj/item/implant))
dat += "<A href='byond://?src=[UID()];removecase=1'>Remove Case</A><HR>"
dat += case.imp.get_data()
if(istype(case.imp, /obj/item/implant/tracking))
var/obj/item/implant/tracking/T = case.imp
dat += {"ID (1-100):
<A href='byond://?src=[UID()];tracking_id=-10'>-</A>
<A href='byond://?src=[UID()];tracking_id=-1'>-</A> [T.id]
<A href='byond://?src=[UID()];tracking_id=1'>+</A>
<A href='byond://?src=[UID()];tracking_id=10'>+</A><BR>"}
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
/obj/item/implantpad/Topic(href, href_list)
if(..())
return 1
var/mob/living/user = usr
if(href_list["tracking_id"])
if(case && case.imp)
var/obj/item/implant/tracking/T = case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(100, T.id)
T.id = max(1, T.id)
else if(href_list["removecase"])
dropcase(user)
attack_self(user)
return 1
/obj/item/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 = WEIGHT_CLASS_SMALL
var/obj/item/implantcase/case = null
/obj/item/implantpad/Destroy()
if(case)
dropcase()
return ..()
/obj/item/implantpad/update_icon()
if(case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj)
if(!user || !C)
return
if(case)
to_chat(user, "<span class='warning'>There's already an implant in the pad!</span>")
return
user.unEquip(C)
C.forceMove(src)
case = C
update_icon()
/obj/item/implantpad/proc/dropcase(mob/user as mob)
if(!case)
to_chat(user, "<span class='warning'>There's no implant in the pad!</span>")
return
if(user)
if(user.put_in_hands(case))
add_fingerprint(user)
case.add_fingerprint(user)
case = null
update_icon()
return
case.forceMove(get_turf(src))
case = null
update_icon()
/obj/item/implantpad/verb/remove_implant()
set category = "Object"
set name = "Remove Implant"
set src in usr
if(usr.stat || usr.restrained())
return
dropcase(usr)
/obj/item/implantpad/attackby(obj/item/implantcase/C as obj, mob/user as mob, params)
if(istype(C, /obj/item/implantcase))
addcase(user, C)
else
return ..()
/obj/item/implantpad/attack_self(mob/user as mob)
add_fingerprint(user)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if(case)
if(case.imp)
if(istype(case.imp, /obj/item/implant))
dat += "<A href='byond://?src=[UID()];removecase=1'>Remove Case</A><HR>"
dat += case.imp.get_data()
if(istype(case.imp, /obj/item/implant/tracking))
var/obj/item/implant/tracking/T = case.imp
dat += {"ID (1-100):
<A href='byond://?src=[UID()];tracking_id=-10'>-</A>
<A href='byond://?src=[UID()];tracking_id=-1'>-</A> [T.id]
<A href='byond://?src=[UID()];tracking_id=1'>+</A>
<A href='byond://?src=[UID()];tracking_id=10'>+</A><BR>"}
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
/obj/item/implantpad/Topic(href, href_list)
if(..())
return 1
var/mob/living/user = usr
if(href_list["tracking_id"])
if(case && case.imp)
var/obj/item/implant/tracking/T = case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(100, T.id)
T.id = max(1, T.id)
else if(href_list["removecase"])
dropcase(user)
attack_self(user)
return 1
@@ -1,45 +1,45 @@
/obj/item/implant/uplink
name = "uplink implant"
desc = "Summon things."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
/obj/item/implant/uplink/New()
hidden_uplink = new(src)
hidden_uplink.uses = 10
..()
/obj/item/implant/uplink/sit/New()
..()
if(hidden_uplink)
hidden_uplink.uplink_type = "sit"
/obj/item/implant/uplink/admin/New()
..()
if(hidden_uplink)
hidden_uplink.uplink_type = "admin"
/obj/item/implant/uplink/implant(mob/source)
var/obj/item/implant/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
imp_e.hidden_uplink.uses += hidden_uplink.uses
qdel(src)
return 1
if(..())
hidden_uplink.uplink_owner="[source.key]"
return 1
return 0
/obj/item/implant/uplink/activate()
if(hidden_uplink)
hidden_uplink.check_trigger(imp_in)
/obj/item/implanter/uplink
name = "implanter (uplink)"
/obj/item/implanter/uplink/New()
imp = new /obj/item/implant/uplink(src)
..()
/obj/item/implant/uplink
name = "uplink implant"
desc = "Summon things."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5"
/obj/item/implant/uplink/New()
hidden_uplink = new(src)
hidden_uplink.uses = 10
..()
/obj/item/implant/uplink/sit/New()
..()
if(hidden_uplink)
hidden_uplink.uplink_type = "sit"
/obj/item/implant/uplink/admin/New()
..()
if(hidden_uplink)
hidden_uplink.uplink_type = "admin"
/obj/item/implant/uplink/implant(mob/source)
var/obj/item/implant/imp_e = locate(src.type) in source
if(imp_e && imp_e != src)
imp_e.hidden_uplink.uses += hidden_uplink.uses
qdel(src)
return 1
if(..())
hidden_uplink.uplink_owner="[source.key]"
return 1
return 0
/obj/item/implant/uplink/activate()
if(hidden_uplink)
hidden_uplink.check_trigger(imp_in)
/obj/item/implanter/uplink
name = "implanter (uplink)"
/obj/item/implanter/uplink/New()
imp = new /obj/item/implant/uplink(src)
..()
+307 -307
View File
@@ -1,307 +1,307 @@
/* Kitchen tools
* Contains:
* Utensils
* Spoons
* Forks
* Knives
* Kitchen knives
* Butcher's cleaver
* Rolling Pins
* Candy Moulds
* Sushi Mat
* Circular cutter
*/
/obj/item/kitchen
icon = 'icons/obj/kitchen.dmi'
origin_tech = "materials=1"
/*
* Utensils
*/
/obj/item/kitchen/utensil
force = 5.0
w_class = WEIGHT_CLASS_TINY
throwforce = 0.0
throw_speed = 3
throw_range = 5
flags = CONDUCT
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
sharp = 0
var/max_contents = 1
/obj/item/kitchen/utensil/New()
if(prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != INTENT_HELP)
if(user.zone_selected == "head" || user.zone_selected == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if(contents.len)
var/obj/item/reagent_containers/food/snacks/toEat = contents[1]
if(istype(toEat))
if(M.eat(toEat, user))
toEat.On_Consume(M, user)
spawn(0)
if(toEat)
qdel(toEat)
overlays.Cut()
return
/obj/item/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/kitchen/utensil/pfork
name = "plastic fork"
desc = "Yay, no washing up to do."
icon_state = "pfork"
/obj/item/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
/obj/item/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "It's a plastic spoon. How dull."
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/obj/item/kitchen/utensil/spork
name = "spork"
desc = "It's a spork. Marvel at its innovative design."
icon_state = "spork"
attack_verb = list("attacked", "sporked")
/obj/item/kitchen/utensil/pspork
name = "plastic spork"
desc = "It's a plastic spork. It's the fork side of the spoon!"
icon_state = "pspork"
attack_verb = list("attacked", "sporked")
/*
* Knives
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
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")
sharp = TRUE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
var/bayonet = FALSE //Can this be attached to a gun?
/obj/item/kitchen/knife/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
return BRUTELOSS
/obj/item/kitchen/knife/plastic
name = "plastic knife"
desc = "The bluntest of blades."
icon_state = "pknife"
item_state = "knife"
sharp = 0
/obj/item/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 = WEIGHT_CLASS_NORMAL
/obj/item/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 = 8
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = WEIGHT_CLASS_NORMAL
/obj/item/kitchen/knife/butcher/meatcleaver
name = "meat cleaver"
icon_state = "mcleaver"
item_state = "butch"
force = 25
throwforce = 15
/obj/item/kitchen/knife/combat
name = "combat knife"
icon_state = "combatknife"
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")
bayonet = TRUE
/obj/item/kitchen/knife/combat/survival
name = "survival knife"
icon_state = "survivalknife"
desc = "A hunting grade survival knife."
force = 15
throwforce = 15
/obj/item/kitchen/knife/combat/survival/bone
name = "bone dagger"
item_state = "bone_dagger"
icon_state = "bone_dagger"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
desc = "A sharpened bone. The bare minimum in survival."
materials = list()
/obj/item/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/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")
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
/*
* Rolling Pins
*/
/obj/item/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/* Trays moved to /obj/item/storage/bag */
/*
* Candy Moulds
*/
/obj/item/kitchen/mould
name = "generic candy mould"
desc = "You aren't sure what it's supposed to be."
icon_state = "mould"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
/obj/item/kitchen/mould/bear
name = "bear-shaped candy mould"
desc = "It has the shape of a small bear imprinted into it."
icon_state = "mould_bear"
/obj/item/kitchen/mould/worm
name = "worm-shaped candy mould"
desc = "It has the shape of a worm imprinted into it."
icon_state = "mould_worm"
/obj/item/kitchen/mould/bean
name = "bean-shaped candy mould"
desc = "It has the shape of a bean imprinted into it."
icon_state = "mould_bean"
/obj/item/kitchen/mould/ball
name = "ball-shaped candy mould"
desc = "It has a small sphere imprinted into it."
icon_state = "mould_ball"
/obj/item/kitchen/mould/cane
name = "cane-shaped candy mould"
desc = "It has the shape of a cane imprinted into it."
icon_state = "mould_cane"
/obj/item/kitchen/mould/cash
name = "cash-shaped candy mould"
desc = "It has the shape and design of fake money imprinted into it."
icon_state = "mould_cash"
/obj/item/kitchen/mould/coin
name = "coin-shaped candy mould"
desc = "It has the shape of a coin imprinted into it."
icon_state = "mould_coin"
/obj/item/kitchen/mould/loli
name = "sucker mould"
desc = "It has the shape of a sucker imprinted into it."
icon_state = "mould_loli"
/*
* Sushi Mat
*/
/obj/item/kitchen/sushimat
name = "Sushi Mat"
desc = "A wooden mat used for efficient sushi crafting."
icon_state = "sushi_mat"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("rolled", "cracked", "battered", "thrashed")
/// circular cutter by Ume
/obj/item/kitchen/cutter
name = "generic circular cutter"
desc = "A generic circular cutter for cookies and other things."
icon = 'icons/obj/kitchen.dmi'
icon_state = "circular_cutter"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bashed", "slashed", "pricked", "thrashed")
/* Kitchen tools
* Contains:
* Utensils
* Spoons
* Forks
* Knives
* Kitchen knives
* Butcher's cleaver
* Rolling Pins
* Candy Moulds
* Sushi Mat
* Circular cutter
*/
/obj/item/kitchen
icon = 'icons/obj/kitchen.dmi'
origin_tech = "materials=1"
/*
* Utensils
*/
/obj/item/kitchen/utensil
force = 5.0
w_class = WEIGHT_CLASS_TINY
throwforce = 0.0
throw_speed = 3
throw_range = 5
flags = CONDUCT
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
sharp = 0
var/max_contents = 1
/obj/item/kitchen/utensil/New()
..()
if(prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
/obj/item/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != INTENT_HELP)
if(user.zone_selected == "head" || user.zone_selected == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if(contents.len)
var/obj/item/reagent_containers/food/snacks/toEat = contents[1]
if(istype(toEat))
if(M.eat(toEat, user))
toEat.On_Consume(M, user)
spawn(0)
if(toEat)
qdel(toEat)
overlays.Cut()
return
/obj/item/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/kitchen/utensil/pfork
name = "plastic fork"
desc = "Yay, no washing up to do."
icon_state = "pfork"
/obj/item/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
/obj/item/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "It's a plastic spoon. How dull."
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/obj/item/kitchen/utensil/spork
name = "spork"
desc = "It's a spork. Marvel at its innovative design."
icon_state = "spork"
attack_verb = list("attacked", "sporked")
/obj/item/kitchen/utensil/pspork
name = "plastic spork"
desc = "It's a plastic spork. It's the fork side of the spoon!"
icon_state = "pspork"
attack_verb = list("attacked", "sporked")
/*
* Knives
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
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")
sharp = TRUE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
var/bayonet = FALSE //Can this be attached to a gun?
/obj/item/kitchen/knife/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>"))
return BRUTELOSS
/obj/item/kitchen/knife/plastic
name = "plastic knife"
desc = "The bluntest of blades."
icon_state = "pknife"
item_state = "knife"
sharp = 0
/obj/item/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 = WEIGHT_CLASS_NORMAL
/obj/item/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 = 8
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
w_class = WEIGHT_CLASS_NORMAL
/obj/item/kitchen/knife/butcher/meatcleaver
name = "meat cleaver"
icon_state = "mcleaver"
item_state = "butch"
force = 25
throwforce = 15
/obj/item/kitchen/knife/combat
name = "combat knife"
icon_state = "combatknife"
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")
bayonet = TRUE
/obj/item/kitchen/knife/combat/survival
name = "survival knife"
icon_state = "survivalknife"
desc = "A hunting grade survival knife."
force = 15
throwforce = 15
/obj/item/kitchen/knife/combat/survival/bone
name = "bone dagger"
item_state = "bone_dagger"
icon_state = "bone_dagger"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
desc = "A sharpened bone. The bare minimum in survival."
materials = list()
/obj/item/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/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")
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
/*
* Rolling Pins
*/
/obj/item/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/* Trays moved to /obj/item/storage/bag */
/*
* Candy Moulds
*/
/obj/item/kitchen/mould
name = "generic candy mould"
desc = "You aren't sure what it's supposed to be."
icon_state = "mould"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
/obj/item/kitchen/mould/bear
name = "bear-shaped candy mould"
desc = "It has the shape of a small bear imprinted into it."
icon_state = "mould_bear"
/obj/item/kitchen/mould/worm
name = "worm-shaped candy mould"
desc = "It has the shape of a worm imprinted into it."
icon_state = "mould_worm"
/obj/item/kitchen/mould/bean
name = "bean-shaped candy mould"
desc = "It has the shape of a bean imprinted into it."
icon_state = "mould_bean"
/obj/item/kitchen/mould/ball
name = "ball-shaped candy mould"
desc = "It has a small sphere imprinted into it."
icon_state = "mould_ball"
/obj/item/kitchen/mould/cane
name = "cane-shaped candy mould"
desc = "It has the shape of a cane imprinted into it."
icon_state = "mould_cane"
/obj/item/kitchen/mould/cash
name = "cash-shaped candy mould"
desc = "It has the shape and design of fake money imprinted into it."
icon_state = "mould_cash"
/obj/item/kitchen/mould/coin
name = "coin-shaped candy mould"
desc = "It has the shape of a coin imprinted into it."
icon_state = "mould_coin"
/obj/item/kitchen/mould/loli
name = "sucker mould"
desc = "It has the shape of a sucker imprinted into it."
icon_state = "mould_loli"
/*
* Sushi Mat
*/
/obj/item/kitchen/sushimat
name = "Sushi Mat"
desc = "A wooden mat used for efficient sushi crafting."
icon_state = "sushi_mat"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("rolled", "cracked", "battered", "thrashed")
/// circular cutter by Ume
/obj/item/kitchen/cutter
name = "generic circular cutter"
desc = "A generic circular cutter for cookies and other things."
icon = 'icons/obj/kitchen.dmi'
icon_state = "circular_cutter"
force = 5
throwforce = 5
throw_speed = 3
throw_range = 3
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bashed", "slashed", "pricked", "thrashed")
+6 -5
View File
@@ -26,10 +26,11 @@
icon_off = "zippo"
/obj/item/lighter/random/New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
..()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
/obj/item/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src || isrobot(user))
@@ -234,4 +235,4 @@
/obj/item/match/firebrand/New()
..()
matchignite()
matchignite()
File diff suppressed because it is too large Load Diff
+367 -369
View File
@@ -1,369 +1,367 @@
/obj/item/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
w_class = WEIGHT_CLASS_SMALL
var/w_class_on = WEIGHT_CLASS_BULKY
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
usesound = 'sound/weapons/blade1.ogg'
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
toolspeed = 1
light_power = 2
var/brightness_on = 2
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
/obj/item/melee/energy/attack(mob/living/target, mob/living/carbon/human/user)
var/nemesis_faction = FALSE
if(LAZYLEN(nemesis_factions))
for(var/F in target.faction)
if(F in nemesis_factions)
nemesis_faction = TRUE
force += faction_bonus_force
nemesis_effects(user, target)
break
. = ..()
if(nemesis_faction)
force -= faction_bonus_force
/obj/item/melee/energy/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>", \
"<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>"))
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(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
set_light(brightness_on)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(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
set_light(0)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/melee/energy/axe
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
force = 40
force_on = 150
throwforce = 25
throwforce_on = 30
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
w_class_on = WEIGHT_CLASS_HUGE
hitsound = 'sound/weapons/bladeslice.ogg'
flags = CONDUCT
armour_penetration = 100
origin_tech = "combat=4;magnets=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
sharp = 1
light_color = LIGHT_COLOR_WHITE
/obj/item/melee/energy/axe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swings the [name] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/sword
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
sharp = 1
var/hacked = 0
/obj/item/melee/energy/sword/New()
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
/obj/item/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(active)
return ..()
return 0
/obj/item/melee/energy/sword/cyborg
var/hitcost = 50
/obj/item/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/stock_parts/cell/C = R.cell
if(active && !(C.use(hitcost)))
attack_self(R)
to_chat(R, "<span class='notice'>It's out of charge!</span>")
return
..()
return
/obj/item/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."
force_on = 30
force = 18 //About as much as a spear
sharp = 1
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 = WEIGHT_CLASS_NORMAL
light_color = LIGHT_COLOR_WHITE
/obj/item/melee/energy/sword/cyborg/saw/New()
..()
item_color = null
/obj/item/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return 0
/obj/item/melee/energy/sword/saber
/obj/item/melee/energy/sword/saber/blue
item_color = "blue"
/obj/item/melee/energy/sword/saber/purple
item_color = "purple"
/obj/item/melee/energy/sword/saber/green
item_color = "green"
/obj/item/melee/energy/sword/saber/red
item_color = "red"
/obj/item/melee/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
..()
if(istype(W, /obj/item/melee/energy/sword/saber))
if(W == src)
to_chat(user, "<span class='notice'>You try to attach the end of the energy sword to... itself. You're not very smart, are you?</span>")
if(ishuman(user))
user.adjustBrainLoss(10)
else
to_chat(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/twohanded/dualsaber/newSaber = new /obj/item/twohanded/dualsaber(user.loc)
if(src.hacked) // That's right, we'll only check the "original" esword.
newSaber.hacked = 1
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/multitool))
if(hacked == 0)
hacked = 1
item_color = "rainbow"
to_chat(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()
else if(user.l_hand == src)
user.update_inv_l_hand()
else
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
/obj/item/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
light_color = LIGHT_COLOR_RED
/obj/item/melee/energy/sword/pirate/New()
return
/obj/item/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 = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such.
sharp = 1
/obj/item/melee/energy/blade/attack_self(mob/user)
return
/obj/item/melee/energy/blade/hardlight
name = "hardlight blade"
desc = "An extremely sharp blade made out of hard light. Packs quite a punch."
icon_state = "lightblade"
item_state = "lightblade"
/obj/item/melee/energy/proc/nemesis_effects(mob/living/user, mob/living/target)
return
/obj/item/melee/energy/cleaving_saw
name = "cleaving saw"
desc = "This saw, effective at drawing the blood of beasts, transforms into a long cleaver that makes use of centrifugal force."
force = 12
force_on = 20 //force when active
throwforce = 20
throwforce_on = 20
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
icon_state = "cleaving_saw"
icon_state_on = "cleaving_saw_open"
slot_flags = SLOT_BELT
var/attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut")
attack_verb_on = list("cleaved", "swiped", "slashed", "chopped")
hitsound = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_BULKY
sharp = TRUE
faction_bonus_force = 30
nemesis_factions = list("mining", "boss")
var/transform_cooldown
var/swiping = FALSE
/obj/item/melee/energy/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target)
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(!B)
if(!active) //This isn't in the above if-check so that the else doesn't care about active
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
/obj/item/melee/energy/cleaving_saw/attack_self(mob/living/carbon/user)
transform_weapon(user)
/obj/item/melee/energy/cleaving_saw/proc/transform_weapon(mob/living/user, supress_message_text)
if(transform_cooldown > world.time)
return FALSE
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.changeNext_move(CLICK_CD_MELEE * 0.25)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.disabilities & CLUMSY && prob(50))
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
H.take_organ_damage(10,10)
active = !active
if(active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/bladeslice.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
set_light(brightness_on)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
w_class = w_class_on
playsound(user, 'sound/magic/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
to_chat(user, "<span class='notice'>You open [src]. It will now cleave enemies in a wide arc and deal additional damage to fauna.</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/magic/fellowship_armory.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
set_light(0)
to_chat(user, "<span class='notice'>You close [src]. It will now attack rapidly and cause fauna to bleed.</span>")
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
/obj/item/melee/energy/cleaving_saw/examine(mob/user)
. = ..()
. += "<span class='notice'>It is [active ? "open, will cleave enemies in a wide arc and deal additional damage to fauna":"closed, and can be used for rapid consecutive attacks that cause fauna to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>"
/obj/item/melee/energy/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
transform_cooldown = 0
transform_weapon(user, TRUE)
return BRUTELOSS
/obj/item/melee/energy/cleaving_saw/melee_attack_chain(mob/user, atom/target, params)
..()
if(!active)
user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
/obj/item/melee/energy/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user)
if(!active || swiping || !target.density || get_turf(target) == get_turf(user))
if(!active)
faction_bonus_force = 0
..()
if(!active)
faction_bonus_force = initial(faction_bonus_force)
else
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(target))
swiping = TRUE
var/static/list/cleaving_saw_cleave_angles = list(0, -45, 45) //so that the animation animates towards the target clicked and not towards a side target
for(var/i in cleaving_saw_cleave_angles)
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
for(var/mob/living/L in T)
if(user.Adjacent(L) && L.density)
melee_attack_chain(user, L)
swiping = FALSE
/obj/item/melee/energy
var/active = 0
var/force_on = 30 //force when active
var/throwforce_on = 20
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
w_class = WEIGHT_CLASS_SMALL
var/w_class_on = WEIGHT_CLASS_BULKY
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
usesound = 'sound/weapons/blade1.ogg'
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
toolspeed = 1
light_power = 2
var/brightness_on = 2
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
/obj/item/melee/energy/attack(mob/living/target, mob/living/carbon/human/user)
var/nemesis_faction = FALSE
if(LAZYLEN(nemesis_factions))
for(var/F in target.faction)
if(F in nemesis_factions)
nemesis_faction = TRUE
force += faction_bonus_force
nemesis_effects(user, target)
break
. = ..()
if(nemesis_faction)
force -= faction_bonus_force
/obj/item/melee/energy/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.</span>", \
"<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>"))
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(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
set_light(brightness_on)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
w_class = w_class_on
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
to_chat(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
set_light(0)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/melee/energy/axe
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
force = 40
force_on = 150
throwforce = 25
throwforce_on = 30
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
w_class_on = WEIGHT_CLASS_HUGE
hitsound = 'sound/weapons/bladeslice.ogg'
flags = CONDUCT
armour_penetration = 100
origin_tech = "combat=4;magnets=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
sharp = 1
light_color = LIGHT_COLOR_WHITE
/obj/item/melee/energy/axe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swings the [name] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/sword
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
sharp = 1
var/hacked = 0
/obj/item/melee/energy/sword/New()
..()
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
/obj/item/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(active)
return ..()
return 0
/obj/item/melee/energy/sword/cyborg
var/hitcost = 50
/obj/item/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
if(R.cell)
var/obj/item/stock_parts/cell/C = R.cell
if(active && !(C.use(hitcost)))
attack_self(R)
to_chat(R, "<span class='notice'>It's out of charge!</span>")
return
..()
return
/obj/item/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."
force_on = 30
force = 18 //About as much as a spear
sharp = 1
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 = WEIGHT_CLASS_NORMAL
light_color = LIGHT_COLOR_WHITE
/obj/item/melee/energy/sword/cyborg/saw/New()
..()
item_color = null
/obj/item/melee/energy/sword/cyborg/saw/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return 0
/obj/item/melee/energy/sword/saber
/obj/item/melee/energy/sword/saber/blue
item_color = "blue"
/obj/item/melee/energy/sword/saber/purple
item_color = "purple"
/obj/item/melee/energy/sword/saber/green
item_color = "green"
/obj/item/melee/energy/sword/saber/red
item_color = "red"
/obj/item/melee/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
..()
if(istype(W, /obj/item/melee/energy/sword/saber))
if(W == src)
to_chat(user, "<span class='notice'>You try to attach the end of the energy sword to... itself. You're not very smart, are you?</span>")
if(ishuman(user))
user.adjustBrainLoss(10)
else
to_chat(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/twohanded/dualsaber/newSaber = new /obj/item/twohanded/dualsaber(user.loc)
if(src.hacked) // That's right, we'll only check the "original" esword.
newSaber.hacked = 1
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/multitool))
if(hacked == 0)
hacked = 1
item_color = "rainbow"
to_chat(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()
else if(user.l_hand == src)
user.update_inv_l_hand()
else
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
/obj/item/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
icon_state_on = "cutlass1"
light_color = LIGHT_COLOR_RED
/obj/item/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 = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such.
sharp = 1
/obj/item/melee/energy/blade/attack_self(mob/user)
return
/obj/item/melee/energy/blade/hardlight
name = "hardlight blade"
desc = "An extremely sharp blade made out of hard light. Packs quite a punch."
icon_state = "lightblade"
item_state = "lightblade"
/obj/item/melee/energy/proc/nemesis_effects(mob/living/user, mob/living/target)
return
/obj/item/melee/energy/cleaving_saw
name = "cleaving saw"
desc = "This saw, effective at drawing the blood of beasts, transforms into a long cleaver that makes use of centrifugal force."
force = 12
force_on = 20 //force when active
throwforce = 20
throwforce_on = 20
icon = 'icons/obj/lavaland/artefacts.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
icon_state = "cleaving_saw"
icon_state_on = "cleaving_saw_open"
slot_flags = SLOT_BELT
var/attack_verb_off = list("attacked", "sawed", "sliced", "torn", "ripped", "diced", "cut")
attack_verb_on = list("cleaved", "swiped", "slashed", "chopped")
hitsound = 'sound/weapons/bladeslice.ogg'
w_class = WEIGHT_CLASS_BULKY
sharp = TRUE
faction_bonus_force = 30
nemesis_factions = list("mining", "boss")
var/transform_cooldown
var/swiping = FALSE
/obj/item/melee/energy/cleaving_saw/nemesis_effects(mob/living/user, mob/living/target)
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
if(!B)
if(!active) //This isn't in the above if-check so that the else doesn't care about active
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
/obj/item/melee/energy/cleaving_saw/attack_self(mob/living/carbon/user)
transform_weapon(user)
/obj/item/melee/energy/cleaving_saw/proc/transform_weapon(mob/living/user, supress_message_text)
if(transform_cooldown > world.time)
return FALSE
transform_cooldown = world.time + (CLICK_CD_MELEE * 0.5)
user.changeNext_move(CLICK_CD_MELEE * 0.25)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.disabilities & CLUMSY && prob(50))
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
H.take_organ_damage(10,10)
active = !active
if(active)
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/bladeslice.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
icon_state = icon_state_on
set_light(brightness_on)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
w_class = w_class_on
playsound(user, 'sound/magic/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000))
to_chat(user, "<span class='notice'>You open [src]. It will now cleave enemies in a wide arc and deal additional damage to fauna.</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/magic/fellowship_armory.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
set_light(0)
to_chat(user, "<span class='notice'>You close [src]. It will now attack rapidly and cause fauna to bleed.</span>")
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
/obj/item/melee/energy/cleaving_saw/examine(mob/user)
. = ..()
. += "<span class='notice'>It is [active ? "open, will cleave enemies in a wide arc and deal additional damage to fauna":"closed, and can be used for rapid consecutive attacks that cause fauna to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>"
/obj/item/melee/energy/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
transform_cooldown = 0
transform_weapon(user, TRUE)
return BRUTELOSS
/obj/item/melee/energy/cleaving_saw/melee_attack_chain(mob/user, atom/target, params)
..()
if(!active)
user.changeNext_move(CLICK_CD_MELEE * 0.5) //when closed, it attacks very rapidly
/obj/item/melee/energy/cleaving_saw/attack(mob/living/target, mob/living/carbon/human/user)
if(!active || swiping || !target.density || get_turf(target) == get_turf(user))
if(!active)
faction_bonus_force = 0
..()
if(!active)
faction_bonus_force = initial(faction_bonus_force)
else
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(target))
swiping = TRUE
var/static/list/cleaving_saw_cleave_angles = list(0, -45, 45) //so that the animation animates towards the target clicked and not towards a side target
for(var/i in cleaving_saw_cleave_angles)
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
for(var/mob/living/L in T)
if(user.Adjacent(L) && L.density)
melee_attack_chain(user, L)
swiping = FALSE
+104 -104
View File
@@ -1,104 +1,104 @@
/obj/item/melee
needs_permit = 1
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
if(target.check_block())
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
"<span class='userdanger'>You block the attack!</span>")
user.Stun(2)
return TRUE
/obj/item/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 = WEIGHT_CLASS_NORMAL
origin_tech = "combat=5"
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/slash.ogg' //pls replace
/obj/item/melee/chainofcommand/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return OXYLOSS
/obj/item/melee/rapier
name = "captain's rapier"
desc = "An elegant weapon, for a more civilized age."
icon_state = "rapier"
item_state = "rapier"
flags = CONDUCT
force = 15
throwforce = 10
w_class = WEIGHT_CLASS_BULKY
block_chance = 50
armour_penetration = 75
sharp = 1
origin_tech = "combat=5"
attack_verb = list("lunged at", "stabbed")
hitsound = 'sound/weapons/rapierhit.ogg'
materials = list(MAT_METAL = 1000)
/obj/item/melee/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
return ..()
/obj/item/melee/icepick
name = "ice pick"
desc = "Used for chopping ice. Also excellent for mafia esque murders."
icon_state = "icepick"
item_state = "icepick"
force = 15
throwforce = 10
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("stabbed", "jabbed", "iced,")
/obj/item/melee/candy_sword
name = "candy cane sword"
desc = "A large candy cane with a sharpened point. Definitely too dangerous for schoolchildren."
icon_state = "candy_sword"
item_state = "candy_sword"
force = 10
throwforce = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("slashed", "stabbed", "sliced", "caned")
/obj/item/melee/flyswatter
name = "flyswatter"
desc = "Useful for killing insects of all sizes."
icon_state = "flyswatter"
item_state = "flyswatter"
force = 1
throwforce = 1
attack_verb = list("swatted", "smacked")
hitsound = 'sound/effects/snap.ogg'
w_class = WEIGHT_CLASS_SMALL
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
var/list/strong_against
/obj/item/melee/flyswatter/Initialize(mapload)
. = ..()
strong_against = typecacheof(list(
/mob/living/simple_animal/hostile/poison/bees/,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/cockroach,
/obj/item/queen_bee
))
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag)
if(is_type_in_typecache(target, strong_against))
new /obj/effect/decal/cleanable/insectguts(target.drop_location())
to_chat(user, "<span class='warning'>You easily splat the [target].</span>")
if(istype(target, /mob/living/))
var/mob/living/bug = target
bug.death(1)
else
qdel(target)
/obj/item/melee
needs_permit = 1
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
if(target.check_block())
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
"<span class='userdanger'>You block the attack!</span>")
user.Stun(2)
return TRUE
/obj/item/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 = WEIGHT_CLASS_NORMAL
origin_tech = "combat=5"
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/slash.ogg' //pls replace
/obj/item/melee/chainofcommand/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return OXYLOSS
/obj/item/melee/rapier
name = "captain's rapier"
desc = "An elegant weapon, for a more civilized age."
icon_state = "rapier"
item_state = "rapier"
flags = CONDUCT
force = 15
throwforce = 10
w_class = WEIGHT_CLASS_BULKY
block_chance = 50
armour_penetration = 75
sharp = 1
origin_tech = "combat=5"
attack_verb = list("lunged at", "stabbed")
hitsound = 'sound/weapons/rapierhit.ogg'
materials = list(MAT_METAL = 1000)
/obj/item/melee/rapier/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0 //Don't bring a sword to a gunfight
return ..()
/obj/item/melee/icepick
name = "ice pick"
desc = "Used for chopping ice. Also excellent for mafia esque murders."
icon_state = "icepick"
item_state = "icepick"
force = 15
throwforce = 10
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("stabbed", "jabbed", "iced,")
/obj/item/melee/candy_sword
name = "candy cane sword"
desc = "A large candy cane with a sharpened point. Definitely too dangerous for schoolchildren."
icon_state = "candy_sword"
item_state = "candy_sword"
force = 10
throwforce = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("slashed", "stabbed", "sliced", "caned")
/obj/item/melee/flyswatter
name = "flyswatter"
desc = "Useful for killing insects of all sizes."
icon_state = "flyswatter"
item_state = "flyswatter"
force = 1
throwforce = 1
attack_verb = list("swatted", "smacked")
hitsound = 'sound/effects/snap.ogg'
w_class = WEIGHT_CLASS_SMALL
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
var/list/strong_against
/obj/item/melee/flyswatter/Initialize(mapload)
. = ..()
strong_against = typecacheof(list(
/mob/living/simple_animal/hostile/poison/bees/,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/cockroach,
/obj/item/queen_bee
))
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag)
if(is_type_in_typecache(target, strong_against))
new /obj/effect/decal/cleanable/insectguts(target.drop_location())
to_chat(user, "<span class='warning'>You easily splat the [target].</span>")
if(istype(target, /mob/living/))
var/mob/living/bug = target
bug.death(1)
else
qdel(target)
+2 -1
View File
@@ -90,7 +90,8 @@
desc = "test lightning"
/obj/item/lightning/New()
icon_state = "1"
..()
icon_state = "1"
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
var/angle = get_angle(A, user)
+120 -120
View File
@@ -1,120 +1,120 @@
/obj/item/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 = WEIGHT_CLASS_NORMAL
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
var/mopspeed = 30
/obj/item/mop/New()
..()
create_reagents(mopcap)
GLOB.janitorial_equipment += src
/obj/item/mop/Destroy()
GLOB.janitorial_equipment -= src
return ..()
/obj/item/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
reagents.reaction(A, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
return
var/turf/simulated/T = get_turf(A)
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart))
return
if(istype(T))
user.visible_message("[user] begins to clean [T] with [src].", "<span class='notice'>You begin to clean [T] with [src]...</span>")
if(do_after(user, src.mopspeed, target = T))
to_chat(user, "<span class='notice'>You finish mopping.</span>")
clean(T)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
return
else
return ..()
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.mymop=src
J.update_icon()
/obj/item/mop/wash(mob/user, atom/source)
reagents.add_reagent("water", 5)
to_chat(user, "<span class='notice'>You wet [src] in [source].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return 1
/obj/item/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
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/mop/advanced/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
playsound(user, 'sound/machines/click.ogg', 30, 1)
/obj/item/mop/advanced/process()
if(reagents.total_volume < mopcap)
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/mop/advanced/examine(mob/user)
. = ..()
. += "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>"
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mop/advanced/cyborg
/obj/item/mop/advanced/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
/obj/item/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 = WEIGHT_CLASS_NORMAL
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
var/mopspeed = 30
/obj/item/mop/New()
..()
create_reagents(mopcap)
GLOB.janitorial_equipment += src
/obj/item/mop/Destroy()
GLOB.janitorial_equipment -= src
return ..()
/obj/item/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
reagents.reaction(A, REAGENT_TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
return
var/turf/simulated/T = get_turf(A)
if(istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart))
return
if(istype(T))
user.visible_message("[user] begins to clean [T] with [src].", "<span class='notice'>You begin to clean [T] with [src]...</span>")
if(do_after(user, src.mopspeed, target = T))
to_chat(user, "<span class='notice'>You finish mopping.</span>")
clean(T)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
return
else
return ..()
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
J.mymop=src
J.update_icon()
/obj/item/mop/wash(mob/user, atom/source)
reagents.add_reagent("water", 5)
to_chat(user, "<span class='notice'>You wet [src] in [source].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return 1
/obj/item/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
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/mop/advanced/New()
..()
START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
playsound(user, 'sound/machines/click.ogg', 30, 1)
/obj/item/mop/advanced/process()
if(reagents.total_volume < mopcap)
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/mop/advanced/examine(mob/user)
. = ..()
. += "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>"
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mop/advanced/cyborg
/obj/item/mop/advanced/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
+68 -68
View File
@@ -1,68 +1,68 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
/obj/item/reagent_containers/glass/paint
desc = "It's a paint bucket."
name = "paint bucket"
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_state = "paintcan"
materials = list(MAT_METAL=200)
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
max_integrity = 100
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
container_type = OPENCONTAINER
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
return
if(!is_open_container())
return
if(istype(target) && reagents.total_volume >= 5)
user.visible_message("<span class='warning'>[target] has been splashed with something by [user]!</span>")
spawn(5)
reagents.reaction(target, TOUCH)
reagents.remove_any(5)
else
return ..()
/obj/item/reagent_containers/glass/paint/red
name = "red paint bucket"
icon_state = "paint_red"
list_reagents = list("paint_red" = 70)
/obj/item/reagent_containers/glass/paint/green
name = "green paint bucket"
icon_state = "paint_green"
list_reagents = list("paint_green" = 70)
/obj/item/reagent_containers/glass/paint/blue
name = "blue paint bucket"
icon_state = "paint_blue"
list_reagents = list("paint_blue" = 70)
/obj/item/reagent_containers/glass/paint/yellow
name = "yellow paint bucket"
icon_state = "paint_yellow"
list_reagents = list("paint_yellow" = 70)
/obj/item/reagent_containers/glass/paint/violet
name = "violet paint bucket"
icon_state = "paint_violet"
list_reagents = list("paint_violet" = 70)
/obj/item/reagent_containers/glass/paint/black
name = "black paint bucket"
icon_state = "paint_black"
list_reagents = list("paint_black" = 70)
/obj/item/reagent_containers/glass/paint/white
name = "white paint bucket"
icon_state = "paint_white"
list_reagents = list("paint_white" = 70)
/obj/item/reagent_containers/glass/paint/remover
name = "paint remover bucket"
list_reagents = list("paint_remover" = 70)
//NEVER USE THIS IT SUX -PETETHEGOAT
/obj/item/reagent_containers/glass/paint
desc = "It's a paint bucket."
name = "paint bucket"
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_state = "paintcan"
materials = list(MAT_METAL=200)
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
max_integrity = 100
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
container_type = OPENCONTAINER
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
return
if(!is_open_container())
return
if(istype(target) && reagents.total_volume >= 5)
user.visible_message("<span class='warning'>[target] has been splashed with something by [user]!</span>")
spawn(5)
reagents.reaction(target, REAGENT_TOUCH)
reagents.remove_any(5)
else
return ..()
/obj/item/reagent_containers/glass/paint/red
name = "red paint bucket"
icon_state = "paint_red"
list_reagents = list("paint_red" = 70)
/obj/item/reagent_containers/glass/paint/green
name = "green paint bucket"
icon_state = "paint_green"
list_reagents = list("paint_green" = 70)
/obj/item/reagent_containers/glass/paint/blue
name = "blue paint bucket"
icon_state = "paint_blue"
list_reagents = list("paint_blue" = 70)
/obj/item/reagent_containers/glass/paint/yellow
name = "yellow paint bucket"
icon_state = "paint_yellow"
list_reagents = list("paint_yellow" = 70)
/obj/item/reagent_containers/glass/paint/violet
name = "violet paint bucket"
icon_state = "paint_violet"
list_reagents = list("paint_violet" = 70)
/obj/item/reagent_containers/glass/paint/black
name = "black paint bucket"
icon_state = "paint_black"
list_reagents = list("paint_black" = 70)
/obj/item/reagent_containers/glass/paint/white
name = "white paint bucket"
icon_state = "paint_white"
list_reagents = list("paint_white" = 70)
/obj/item/reagent_containers/glass/paint/remover
name = "paint remover bucket"
list_reagents = list("paint_remover" = 70)
+11 -11
View File
@@ -1,11 +1,11 @@
/obj/item/pai_cable/proc/plugin(obj/machinery/M as obj, mob/user as mob)
if(istype(M, /obj/machinery/door) || istype(M, /obj/machinery/camera))
user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.")
user.drop_item()
src.loc = M
src.machine = M
else
user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
/obj/item/pai_cable/attack(obj/machinery/M as obj, mob/user as mob)
src.plugin(M, user)
/obj/item/pai_cable/proc/plugin(obj/machinery/M as obj, mob/user as mob)
if(istype(M, /obj/machinery/door) || istype(M, /obj/machinery/camera))
user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.")
user.drop_item()
src.loc = M
src.machine = M
else
user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
/obj/item/pai_cable/attack(obj/machinery/M as obj, mob/user as mob)
src.plugin(M, user)
@@ -138,8 +138,7 @@
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/pneumatic_cannon/ghetto
tools = list(/obj/item/weldingtool,
/obj/item/wrench)
tools = list(TOOL_WELDER, TOOL_WRENCH)
reqs = list(/obj/item/stack/sheet/metal = 4,
/obj/item/stack/packageWrap = 8,
/obj/item/pipe = 2)
+22 -13
View File
@@ -37,20 +37,29 @@
to_chat(user, "<span class='warning'>[IT] is too small for [src].</span>")
return
updateTank(W, 0, user)
else if(iswrench(W))
switch(fisto_setting)
if(1)
fisto_setting = 2
if(2)
fisto_setting = 3
if(3)
fisto_setting = 1
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You tweak [src]'s piston valve to [fisto_setting].</span>")
else if(isscrewdriver(W))
if(tank)
updateTank(tank, 1, user)
return
return ..()
/obj/item/melee/powerfist/wrench_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
switch(fisto_setting)
if(1)
fisto_setting = 2
if(2)
fisto_setting = 3
if(3)
fisto_setting = 1
to_chat(user, "<span class='notice'>You tweak [src]'s piston valve to [fisto_setting].</span>")
/obj/item/melee/powerfist/screwdriver_act(mob/user, obj/item/I)
if(!tank)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
updateTank(tank, 1, user)
/obj/item/melee/powerfist/proc/updateTank(obj/item/tank/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
+3 -49
View File
@@ -27,57 +27,11 @@
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
//handle facial hair (if necessary)
var/list/species_facial_hair = list()
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || isvulpkanin(H))
if(C.dna.species)
for(var/i in GLOB.facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = GLOB.facial_hair_styles_list[i]
if(C.dna.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_facial_hair += i
else
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_facial.species_allowed)
species_facial_hair += i
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
else
species_facial_hair = GLOB.facial_hair_styles_list
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
//facial hair
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in H.generate_valid_facial_hairstyles()
//handle normal hair
var/list/species_hair = list()
if(C.dna.species)
for(var/i in GLOB.hair_styles_public_list)
var/datum/sprite_accessory/hair/tmp_hair = GLOB.hair_styles_public_list[i]
if(C.dna.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_hair += i
else
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_hair.species_allowed)
species_hair += i
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
else
species_hair = GLOB.hair_styles_public_list
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in H.generate_valid_hairstyles()
user.visible_message("<span class='notice'>[user] starts cutting [M]'s hair!</span>", "<span class='notice'>You start cutting [M]'s hair!</span>") //arguments for this are: 1. what others see 2. what the user sees. --Fixed grammar, (TGameCo)
playsound(loc, 'sound/goonstation/misc/scissor.ogg', 100, 1)
if(do_after(user, 50 * toolspeed, target = H)) //this is the part that adds a delay. delay is in deciseconds. --Made it 5 seconds, because hair isn't cut in one second in real life, and I want at least a little bit longer time, (TGameCo)
+106 -106
View File
@@ -1,106 +1,106 @@
/obj/item/teleportation_scroll
name = "scroll of teleportation"
desc = "A scroll for moving around."
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
var/uses = 4.0
w_class = WEIGHT_CLASS_SMALL
item_state = "paper"
throw_speed = 4
throw_range = 20
origin_tech = "bluespace=6"
resistance_flags = FLAMMABLE
/obj/item/teleportation_scroll/apprentice
name = "lesser scroll of teleportation"
uses = 1
origin_tech = "bluespace=5"
/obj/item/teleportation_scroll/attack_self(mob/user as mob)
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=[UID()];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/teleportation_scroll/Topic(href, href_list)
..()
if(usr.stat || usr.restrained() || src.loc != usr)
return
var/mob/living/carbon/human/H = usr
if(!( istype(H, /mob/living/carbon/human)))
return 1
if((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if(href_list["spell_teleport"])
if(src.uses >= 1)
teleportscroll(H)
attack_self(H)
return
/obj/item/teleportation_scroll/proc/teleportscroll(var/mob/user)
var/A
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in teleportlocs
if(!A)
return
var/area/thearea = teleportlocs[A]
if(user.stat || user.restrained())
return
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
return
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
return
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(5, 0, 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)
to_chat(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 = TRUE)
if(user && user.has_buckled_mobs())
user.unbuckle_all_mobs(force = TRUE)
var/list/tempL = L
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
success = user.Move(attempt)
if(!success)
tempL.Remove(attempt)
else
break
if(!success)
user.loc = pick(L)
smoke.start()
src.uses -= 1
/obj/item/teleportation_scroll
name = "scroll of teleportation"
desc = "A scroll for moving around."
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
var/uses = 4.0
w_class = WEIGHT_CLASS_SMALL
item_state = "paper"
throw_speed = 4
throw_range = 20
origin_tech = "bluespace=6"
resistance_flags = FLAMMABLE
/obj/item/teleportation_scroll/apprentice
name = "lesser scroll of teleportation"
uses = 1
origin_tech = "bluespace=5"
/obj/item/teleportation_scroll/attack_self(mob/user as mob)
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=[UID()];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/teleportation_scroll/Topic(href, href_list)
..()
if(usr.stat || usr.restrained() || src.loc != usr)
return
var/mob/living/carbon/human/H = usr
if(!( istype(H, /mob/living/carbon/human)))
return 1
if((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if(href_list["spell_teleport"])
if(src.uses >= 1)
teleportscroll(H)
attack_self(H)
return
/obj/item/teleportation_scroll/proc/teleportscroll(var/mob/user)
var/A
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in teleportlocs
if(!A)
return
var/area/thearea = teleportlocs[A]
if(user.stat || user.restrained())
return
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
return
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
return
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(5, 0, 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)
to_chat(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 = TRUE)
if(user && user.has_buckled_mobs())
user.unbuckle_all_mobs(force = TRUE)
var/list/tempL = L
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
success = user.Move(attempt)
if(!success)
tempL.Remove(attempt)
else
break
if(!success)
user.loc = pick(L)
smoke.start()
src.uses -= 1
+17 -16
View File
@@ -60,26 +60,27 @@
H.UpdateDamageIcon()
/obj/item/shard/attackby(obj/item/I, mob/user, params)
if(iswelder(I))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/NG = new welded_type(user.loc)
for(var/obj/item/stack/sheet/G in user.loc)
if(!istype(G, welded_type))
continue
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
qdel(src)
return
if(istype(I, /obj/item/lightreplacer))
I.attackby(src, user)
return
return ..()
/obj/item/shard/welder_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, volume = I.tool_volume))
return
var/obj/item/stack/sheet/NG = new welded_type(user.loc)
for(var/obj/item/stack/sheet/G in user.loc)
if(!istype(G, welded_type))
continue
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
qdel(src)
/obj/item/shard/Crossed(mob/living/L, oldloc)
if(istype(L) && has_gravity(loc))
if(L.incorporeal_move || L.flying)
@@ -95,4 +96,4 @@
icon_state = "plasmalarge"
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
icon_prefix = "plasma"
welded_type = /obj/item/stack/sheet/plasmaglass
welded_type = /obj/item/stack/sheet/plasmaglass
+148 -148
View File
@@ -1,148 +1,148 @@
/obj/item/shield
name = "shield"
block_chance = 50
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == THROWN_PROJECTILE_ATTACK)
final_block_chance += 30
if(attack_type == LEAP_ATTACK)
final_block_chance = 100
return ..()
/obj/item/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon_state = "riot"
slot_flags = SLOT_BACK
force = 10
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
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/shield/riot/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/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
..()
/obj/item/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"
materials = list(MAT_METAL=8500)
/obj/item/shield/riot/roman/fake
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>. It appears to be a bit flimsy."
block_chance = 0
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
/obj/item/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"
resistance_flags = FLAMMABLE
block_chance = 30
/obj/item/shield/energy
name = "energy combat shield"
desc = "A shield that reflects almost all energy projectiles, but is useless against physical attacks. It can be retracted, expanded, and stored anywhere."
icon_state = "eshield0" // eshield1 for expanded
force = 3
throwforce = 3
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=4;magnets=5;syndicate=6"
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return 0
/obj/item/shield/energy/IsReflect()
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(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 = WEIGHT_CLASS_BULKY
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
to_chat(user, "<span class='notice'>[src] is now active.</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_TINY
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/shield/riot/tele
name = "telescopic shield"
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
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 = WEIGHT_CLASS_NORMAL
var/active = 0
/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(active)
return ..()
return 0
/obj/item/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 = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
to_chat(user, "<span class='notice'>You extend \the [src].</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_NORMAL
slot_flags = null
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/shield
name = "shield"
block_chance = 50
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == THROWN_PROJECTILE_ATTACK)
final_block_chance += 30
if(attack_type == LEAP_ATTACK)
final_block_chance = 100
return ..()
/obj/item/shield/riot
name = "riot shield"
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon_state = "riot"
slot_flags = SLOT_BACK
force = 10
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
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/shield/riot/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/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
..()
/obj/item/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"
materials = list(MAT_METAL=8500)
/obj/item/shield/riot/roman/fake
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>. It appears to be a bit flimsy."
block_chance = 0
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
/obj/item/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"
resistance_flags = FLAMMABLE
block_chance = 30
/obj/item/shield/energy
name = "energy combat shield"
desc = "A shield that reflects almost all energy projectiles, but is useless against physical attacks. It can be retracted, expanded, and stored anywhere."
icon_state = "eshield0" // eshield1 for expanded
force = 3
throwforce = 3
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=4;magnets=5;syndicate=6"
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return 0
/obj/item/shield/energy/IsReflect()
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
to_chat(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 = WEIGHT_CLASS_BULKY
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
to_chat(user, "<span class='notice'>[src] is now active.</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_TINY
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/shield/riot/tele
name = "telescopic shield"
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
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 = WEIGHT_CLASS_NORMAL
var/active = 0
/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(active)
return ..()
return 0
/obj/item/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 = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
to_chat(user, "<span class='notice'>You extend \the [src].</span>")
else
force = 3
throwforce = 3
throw_speed = 3
w_class = WEIGHT_CLASS_NORMAL
slot_flags = null
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
@@ -68,6 +68,7 @@
usesound = 'sound/items/deconstruct.ogg'
/obj/item/stock_parts/New()
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
@@ -26,41 +26,48 @@
if(istype(M))
to_chat(user, "<span class='warning'>His Grace [flags & NODROP ? "releases from" : "binds to"] your hand!</span>")
flags ^= NODROP
else if(!activated && loc == user)
if(link_user(user))
to_chat(user, "<span class='notice'>Call to His Grace again if you wish it bound to your hand!</span>")
else
to_chat(user, "<span class='warning'>You can't seem to understand what this does.</span>")
/obj/item/storage/toolbox/green/memetic/attack_hand(mob/living/carbon/user)
if(loc == user)
if(!activated)
if(ishuman(user) && !user.HasDisease(new /datum/disease/memetic_madness(0)))
activated = TRUE
user.ForceContractDisease(new /datum/disease/memetic_madness(0))
for(var/datum/disease/memetic_madness/DD in user.viruses)
DD.progenitor = src
servantlinks.Add(DD)
break
force += 4
throwforce += 4
SEND_SOUND(user, 'sound/goonstation/effects/screech.ogg')
shake_camera(user, 20, 1)
var/acount = 0
var/amax = rand(10, 15)
var/up_and_down
var/asize = 1
while(acount <= amax)
up_and_down += "<font size=[asize]>a</font>"
if(acount > (amax * 0.5))
asize--
else
asize++
acount++
to_chat(user, "<span class='warning'>[up_and_down]</span>")
to_chat(user, "<i><b><font face = Tempus Sans ITC>His Grace accepts thee, spread His will! All who look close to the Enlightened may share His gifts.</font></b></i>")
original_owner = user
return
if(!activated && loc == user)
link_user(user)
return
..()
/obj/item/storage/toolbox/green/memetic/proc/link_user(mob/living/carbon/user)
if(ishuman(user) && !user.HasDisease(new /datum/disease/memetic_madness(0)))
activated = TRUE
user.ForceContractDisease(new /datum/disease/memetic_madness(0))
for(var/datum/disease/memetic_madness/DD in user.viruses)
DD.progenitor = src
servantlinks.Add(DD)
break
force += 4
throwforce += 4
SEND_SOUND(user, 'sound/goonstation/effects/screech.ogg')
shake_camera(user, 20, 1)
var/acount = 0
var/amax = rand(10, 15)
var/up_and_down
var/asize = 1
while(acount <= amax)
up_and_down += "<font size=[asize]>a</font>"
if(acount > (amax * 0.5))
asize--
else
asize++
acount++
to_chat(user, "<span class='warning'>[up_and_down]</span>")
to_chat(user, "<i><b><font face = Tempus Sans ITC>His Grace accepts thee, spread His will! All who look close to the Enlightened may share His gifts.</font></b></i>")
original_owner = user
return TRUE
return FALSE
/obj/item/storage/toolbox/green/memetic/attackby(obj/item/I, mob/user)
if(activated)
if(istype(I, /obj/item/grab))
@@ -216,4 +223,4 @@
affected_mob.adjustBruteLoss(5)
if(ismob(progenitor.loc))
progenitor.hunger++
progenitor.hunger++
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+114 -114
View File
@@ -1,114 +1,114 @@
/obj/item/storage/bible
name = "bible"
desc = "Apply to head repeatedly."
icon_state ="bible"
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/storage/bible/suicide_act(mob/user)
to_chat(viewers(user), "<span class='warning'><b>[user] stares into [src.name] and attempts to transcend understanding of the universe!</b></span>")
user.dust()
return OBLITERATION
/obj/item/storage/bible/fart_act(mob/living/M)
if(QDELETED(M) || M.stat == DEAD)
return
M.visible_message("<span class='danger'>[M] farts on \the [name]!</span>")
M.visible_message("<span class='userdanger'>A mysterious force smites [M]!</span>")
M.suiciding = TRUE
do_sparks(3, 1, M)
M.gib()
return TRUE // Don't run the fart emote
/obj/item/storage/bible/booze
name = "bible"
desc = "To be applied to the head repeatedly."
icon_state ="bible"
/obj/item/storage/bible/booze/New()
..()
new /obj/item/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
//BS12 EDIT
// All cult functionality moved to Null Rod
/obj/item/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/obj/item/organ/external/affecting in H.bodyparts)
if(affecting.heal_damage(heal_amt, heal_amt))
H.UpdateDamageIcon()
return
/obj/item/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
add_attack_logs(user, M, "Hit with [src]")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
if(!(istype(user, /mob/living/carbon/human) || SSticker) && SSticker.mode.name != "monkey")
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!user.mind || !user.mind.isholy)
to_chat(user, "<span class='warning'>The book sizzles in your hands.</span>")
user.take_organ_damage(0,10)
return
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>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((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] heals [] with the power of [src.deity_name]!</span>", user, M), 1)
to_chat(M, "<span class='warning'>May the power of [src.deity_name] compel you to be healed!</span>")
playsound(src.loc, "punch", 25, 1, -1)
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
to_chat(M, "<span class='warning'>You feel dumber.</span>")
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] beats [] over the head with []!</span>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] smacks []'s lifeless corpse with [].</span>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if(istype(A, /turf/simulated/floor))
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
if(user.mind && (user.mind.isholy))
for(var/obj/effect/rune/R in A)
if(R.invisibility)
R.talismanreveal()
if(user.mind && (user.mind.isholy))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
to_chat(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
to_chat(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/storage/bible/attackby(obj/item/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
/obj/item/storage/bible
name = "bible"
desc = "Apply to head repeatedly."
icon_state ="bible"
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF
var/mob/affecting = null
var/deity_name = "Christ"
/obj/item/storage/bible/suicide_act(mob/user)
to_chat(viewers(user), "<span class='warning'><b>[user] stares into [src.name] and attempts to transcend understanding of the universe!</b></span>")
user.dust()
return OBLITERATION
/obj/item/storage/bible/fart_act(mob/living/M)
if(QDELETED(M) || M.stat == DEAD)
return
M.visible_message("<span class='danger'>[M] farts on \the [name]!</span>")
M.visible_message("<span class='userdanger'>A mysterious force smites [M]!</span>")
M.suiciding = TRUE
do_sparks(3, 1, M)
M.gib()
return TRUE // Don't run the fart emote
/obj/item/storage/bible/booze
name = "bible"
desc = "To be applied to the head repeatedly."
icon_state ="bible"
/obj/item/storage/bible/booze/New()
..()
new /obj/item/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/reagent_containers/food/drinks/cans/beer(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
new /obj/item/stack/spacecash(src)
//BS12 EDIT
// All cult functionality moved to Null Rod
/obj/item/storage/bible/proc/bless(mob/living/carbon/M as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/heal_amt = 10
for(var/obj/item/organ/external/affecting in H.bodyparts)
if(affecting.heal_damage(heal_amt, heal_amt))
H.UpdateDamageIcon()
return
/obj/item/storage/bible/attack(mob/living/M as mob, mob/living/user as mob)
add_attack_logs(user, M, "Hit with [src]")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
if(!(istype(user, /mob/living/carbon/human) || SSticker) && SSticker.mode.name != "monkey")
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!user.mind || !user.mind.isholy)
to_chat(user, "<span class='warning'>The book sizzles in your hands.</span>")
user.take_organ_damage(0,10)
return
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>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((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] heals [] with the power of [src.deity_name]!</span>", user, M), 1)
to_chat(M, "<span class='warning'>May the power of [src.deity_name] compel you to be healed!</span>")
playsound(src.loc, "punch", 25, 1, -1)
else
if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet))
M.adjustBrainLoss(10)
to_chat(M, "<span class='warning'>You feel dumber.</span>")
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] beats [] over the head with []!</span>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] smacks []'s lifeless corpse with [].</span>", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
/obj/item/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if(istype(A, /turf/simulated/floor))
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
if(user.mind && (user.mind.isholy))
for(var/obj/effect/rune/R in A)
if(R.invisibility)
R.talismanreveal()
if(user.mind && (user.mind.isholy))
if(A.reagents && A.reagents.has_reagent("water")) //blesses all the water in the holder
to_chat(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
to_chat(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/storage/bible/attackby(obj/item/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
..()
File diff suppressed because it is too large Load Diff
@@ -1,88 +1,94 @@
/obj/item/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"
item_state = "briefcase"
flags = CONDUCT
hitsound = "swing_hit"
force = 8
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
/obj/item/storage/briefcase/sniperbundle
desc = "Its label reads \"genuine hardened Captain leather\", but suspiciously has no other tags or branding. Smells like L'Air du Temps."
force = 10
/obj/item/storage/briefcase/sniperbundle/New()
..()
new /obj/item/gun/projectile/automatic/sniper_rifle/syndicate(src)
new /obj/item/clothing/accessory/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/soporific(src)
new /obj/item/suppressor/specialoffer(src)
/obj/item/storage/briefcase/false_bottomed
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 10
var/busy_hunting = FALSE
var/bottom_open = FALSE //is the false bottom open?
var/obj/item/stored_item = null //what's in the false bottom. If it's a gun, we can fire it
/obj/item/storage/briefcase/false_bottomed/Destroy()
if(stored_item)//since the stored_item isn't in the briefcase' contents we gotta remind the game to delete it here.
QDEL_NULL(stored_item)
return ..()
/obj/item/storage/briefcase/false_bottomed/afterattack(atom/A, mob/user, flag, params)
..()
if(stored_item && istype(stored_item, /obj/item/gun) && !Adjacent(A))
var/obj/item/gun/stored_gun = stored_item
stored_gun.afterattack(A, user, flag, params)
/obj/item/storage/briefcase/false_bottomed/attackby(var/obj/item/I, mob/user)
if(isscrewdriver(I))
if(!bottom_open && !busy_hunting)
to_chat(user, "You begin to hunt around the rim of the [src]...")
busy_hunting = TRUE
if(do_after(user, 20, target = src))
if(user)
to_chat(user, "You pry open the false bottom!")
bottom_open = TRUE
busy_hunting = FALSE
else if(bottom_open)
to_chat(user, "You push the false bottom down and close it with a click[stored_item ? ", with the [stored_item] snugly inside." : "."]")
bottom_open = FALSE
else if(bottom_open)
if(stored_item)
to_chat(user, "<span class='warning'>There's already something in the false bottom!</span>")
return
if(I.w_class > WEIGHT_CLASS_NORMAL)
to_chat(user, "<span class='warning'>The [I] is too big to fit in the false bottom!</span>")
return
if(!user.drop_item(I))
user << "<span class='warning'>The [I] is stuck to your hands!</span>"
return
stored_item = I
max_w_class = WEIGHT_CLASS_NORMAL - stored_item.w_class
I.forceMove(null) //null space here we go - to stop it showing up in the briefcase
to_chat(user, "You place the [I] into the false bottom of the briefcase.")
else
return ..()
/obj/item/storage/briefcase/false_bottomed/attack_hand(mob/user)
if(bottom_open && stored_item)
user.put_in_hands(stored_item)
to_chat(user, "You pull out the [stored_item] from the [src]'s false bottom.")
stored_item = null
max_w_class = initial(max_w_class)
else
return ..()
/obj/item/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"
item_state = "briefcase"
flags = CONDUCT
hitsound = "swing_hit"
force = 8
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
/obj/item/storage/briefcase/sniperbundle
desc = "Its label reads \"genuine hardened Captain leather\", but suspiciously has no other tags or branding. Smells like L'Air du Temps."
force = 10
/obj/item/storage/briefcase/sniperbundle/New()
..()
new /obj/item/gun/projectile/automatic/sniper_rifle/syndicate(src)
new /obj/item/clothing/accessory/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/soporific(src)
new /obj/item/suppressor/specialoffer(src)
/obj/item/storage/briefcase/false_bottomed
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 10
var/busy_hunting = FALSE
var/bottom_open = FALSE //is the false bottom open?
var/obj/item/stored_item = null //what's in the false bottom. If it's a gun, we can fire it
/obj/item/storage/briefcase/false_bottomed/Destroy()
if(stored_item)//since the stored_item isn't in the briefcase' contents we gotta remind the game to delete it here.
QDEL_NULL(stored_item)
return ..()
/obj/item/storage/briefcase/false_bottomed/afterattack(atom/A, mob/user, flag, params)
..()
if(stored_item && istype(stored_item, /obj/item/gun) && !Adjacent(A))
var/obj/item/gun/stored_gun = stored_item
stored_gun.afterattack(A, user, flag, params)
/obj/item/storage/briefcase/false_bottomed/attackby(var/obj/item/I, mob/user)
if(bottom_open)
if(stored_item)
to_chat(user, "<span class='warning'>There's already something in the false bottom!</span>")
return
if(I.w_class > WEIGHT_CLASS_NORMAL)
to_chat(user, "<span class='warning'>The [I] is too big to fit in the false bottom!</span>")
return
if(!user.drop_item(I))
user << "<span class='warning'>The [I] is stuck to your hands!</span>"
return
stored_item = I
max_w_class = WEIGHT_CLASS_NORMAL - stored_item.w_class
I.forceMove(null) //null space here we go - to stop it showing up in the briefcase
to_chat(user, "You place the [I] into the false bottom of the briefcase.")
else
return ..()
/obj/item/storage/briefcase/false_bottomed/screwdriver_act(mob/user, obj/item/I)
if(!bottom_open && busy_hunting)
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
if(!bottom_open)
to_chat(user, "You begin to hunt around the rim of the [src]...")
busy_hunting = TRUE
if(do_after(user, 20, target = src))
if(user)
to_chat(user, "You pry open the false bottom!")
bottom_open = TRUE
busy_hunting = FALSE
else
to_chat(user, "You push the false bottom down and close it with a click[stored_item ? ", with the [stored_item] snugly inside." : "."]")
bottom_open = FALSE
/obj/item/storage/briefcase/false_bottomed/attack_hand(mob/user)
if(bottom_open && stored_item)
user.put_in_hands(stored_item)
to_chat(user, "You pull out the [stored_item] from the [src]'s false bottom.")
stored_item = null
max_w_class = initial(max_w_class)
else
return ..()
@@ -169,39 +169,15 @@
/obj/item/clothing/mask/cigarette/pipe,
/obj/item/lighter/zippo)
icon_type = "cigarette"
var/list/unlaced_cigarettes = list() // Cigarettes that haven't received reagents yet
var/default_reagents = list("nicotine" = 15) // List of reagents to pre-generate for each cigarette
var/cigarette_type = /obj/item/clothing/mask/cigarette
/obj/item/storage/fancy/cigarettes/New()
..()
create_reagents(30 * 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/i = 1 to storage_slots)
var/obj/item/clothing/mask/cigarette/C = new cigarette_type(src)
unlaced_cigarettes += C
for(var/R in default_reagents)
reagents.add_reagent(R, default_reagents[R])
/obj/item/storage/fancy/cigarettes/Destroy()
QDEL_NULL(reagents)
return ..()
new cigarette_type(src)
/obj/item/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
return
/obj/item/storage/fancy/cigarettes/proc/lace_cigarette(var/obj/item/clothing/mask/cigarette/C as obj)
if(istype(C) && (C in unlaced_cigarettes)) // Only transfer reagents to each cigarette once
reagents.trans_to(C, (reagents.total_volume/unlaced_cigarettes.len))
unlaced_cigarettes -= C
reagents.maximum_volume = 30 * unlaced_cigarettes.len
/obj/item/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
lace_cigarette(W)
..()
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
@@ -213,7 +189,6 @@
var/obj/item/I = contents[num]
if(istype(I, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/C = I
lace_cigarette(C)
user.equip_to_slot_if_possible(C, slot_wear_mask)
to_chat(user, "<span class='notice'>You take \a [C.name] out of the pack.</span>")
update_icon()
@@ -263,20 +238,22 @@
desc = "An obscure brand of cigarettes."
icon_state = "syndiepacket"
item_state = "cigpacket"
default_reagents = list("nicotine" = 15, "omnizine" = 15)
cigarette_type = /obj/item/clothing/mask/cigarette/syndicate
/obj/item/storage/fancy/cigarettes/cigpack_med
name = "Medical Marijuana Packet"
desc = "A prescription packet containing six marijuana cigarettes."
icon_state = "medpacket"
item_state = "cigpacket"
default_reagents = list("thc" = 15)
cigarette_type = /obj/item/clothing/mask/cigarette/medical_marijuana
/obj/item/storage/fancy/cigarettes/cigpack_uplift
name = "\improper Uplift Smooth packet"
desc = "Your favorite brand, now menthol flavored."
icon_state = "upliftpacket"
item_state = "cigpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/menthol
/obj/item/storage/fancy/cigarettes/cigpack_robust
name = "\improper Robust packet"
@@ -289,7 +266,7 @@
desc = "Smoked by the truly robust."
icon_state = "robustgpacket"
item_state = "cigpacket"
default_reagents = list("nicotine" = 15, "gold" = 1)
cigarette_type = /obj/item/clothing/mask/cigarette/robustgold
/obj/item/storage/fancy/cigarettes/cigpack_carp
name = "\improper Carp Classic packet"
@@ -308,18 +285,14 @@
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 = "shadyjimpacket"
item_state = "cigpacket"
default_reagents = list("nicotine" = 15,
"lipolicide" = 7.5,
"ammonia" = 2,
"atrazine" = 1,
"toxin" = 1.5)
cigarette_type = /obj/item/clothing/mask/cigarette/shadyjims
/obj/item/storage/fancy/cigarettes/cigpack_random
name ="\improper Embellished Enigma packet"
desc = "For the true connoisseur of exotic flavors."
icon_state = "shadyjimpacket"
item_state = "cigpacket"
cigarette_type = /obj/item/clothing/mask/cigarette/random
cigarette_type = /obj/item/clothing/mask/cigarette/random
/obj/item/storage/fancy/rollingpapers
name = "rolling paper pack"
@@ -370,7 +343,7 @@
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial)
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
req_access = list(access_virology)
req_access = list(ACCESS_VIROLOGY)
/obj/item/storage/lockbox/vials/New()
..()
@@ -1,382 +1,382 @@
/* First aid storage
* Contains:
* First Aid Kits
* Pill Bottles
* Dice Pack (in a pill bottle)
*/
/*
* First Aid Kits
*/
/obj/item/storage/firstaid
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
throw_range = 8
var/empty = 0
req_one_access =list(access_medical, access_robotics) //Access and treatment are utilized for medbots.
var/treatment_brute = "salglu_solution"
var/treatment_oxy = "salbutamol"
var/treatment_fire = "salglu_solution"
var/treatment_tox = "charcoal"
var/treatment_virus = "spaceacillin"
var/med_bot_skin = null
var/syndicate_aligned = FALSE
/obj/item/storage/firstaid/fire
name = "fire first-aid kit"
desc = "A medical kit that contains several medical patches and pills for treating burns. Contains one epinephrine syringe for emergency use and a health analyzer."
icon_state = "ointment"
item_state = "firstaid-ointment"
med_bot_skin = "ointment"
New()
..()
if(empty) return
icon_state = pick("ointment","firefirstaid")
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/healthanalyzer( src )
new /obj/item/reagent_containers/hypospray/autoinjector( src )
new /obj/item/reagent_containers/food/pill/salicylic( src )
return
/obj/item/storage/firstaid/fire/empty
empty = 1
/obj/item/storage/firstaid/regular
desc = "A general medical kit that contains medical patches for both brute damage and burn damage. Also contains an epinephrine syringe for emergency use and a health analyzer"
icon_state = "firstaid"
New()
..()
if(empty) return
new /obj/item/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/reagent_containers/food/pill/salicylic( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/healthanalyzer( src )
new /obj/item/reagent_containers/hypospray/autoinjector( src )
return
/obj/item/storage/firstaid/toxin
name = "toxin first aid kit"
desc = "A medical kit designed to counter poisoning by common toxins. Contains three pills and syringes, and a health analyzer to determine the health of the patient."
icon_state = "antitoxin"
item_state = "firstaid-toxin"
med_bot_skin = "tox"
New()
..()
if(empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/healthanalyzer( src )
return
/obj/item/storage/firstaid/toxin/empty
empty = 1
/obj/item/storage/firstaid/o2
name = "oxygen deprivation first aid kit"
desc = "A first aid kit that contains four pills of salbutamol, which is able to counter injuries caused by suffocation. Also contains a health analyzer to determine the health of the patient."
icon_state = "o2"
item_state = "firstaid-o2"
med_bot_skin = "o2"
New()
..()
if(empty) return
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/healthanalyzer( src )
return
/obj/item/storage/firstaid/o2/empty
empty = 1
/obj/item/storage/firstaid/brute
name = "brute trauma treatment kit"
desc = "A medical kit that contains several medical patches and pills for treating brute injuries. Contains one epinephrine syringe for emergency use and a health analyzer."
icon_state = "brute"
item_state = "firstaid-brute"
med_bot_skin = "brute"
New()
..()
if(empty) return
icon_state = pick("brute","brute2")
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/healthanalyzer(src)
new /obj/item/reagent_containers/hypospray/autoinjector(src)
new /obj/item/stack/medical/bruise_pack(src)
return
/obj/item/storage/firstaid/brute/empty
empty = 1
/obj/item/storage/firstaid/adv
name = "advanced first-aid kit"
desc = "Contains advanced medical treatments."
icon_state = "advfirstaid"
item_state = "firstaid-advanced"
med_bot_skin = "adv"
/obj/item/storage/firstaid/adv/New()
..()
if(empty)
return
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/reagent_containers/hypospray/autoinjector(src)
new /obj/item/healthanalyzer(src)
/obj/item/storage/firstaid/adv/empty
empty = 1
/obj/item/storage/firstaid/machine
name = "machine repair kit"
desc = "A kit that contains supplies to repair IPCs on the go."
icon_state = "machinefirstaid"
item_state = "firstaid-machine"
med_bot_skin = "machine"
/obj/item/storage/firstaid/machine/New()
..()
if(empty)
return
new /obj/item/weldingtool(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/reagent_containers/food/drinks/oilcan/full(src)
new /obj/item/robotanalyzer(src)
/obj/item/storage/firstaid/machine/empty
empty = 1
/obj/item/storage/firstaid/tactical
name = "first-aid kit"
icon_state = "bezerk"
desc = "I hope you've got insurance."
max_w_class = WEIGHT_CLASS_NORMAL
treatment_oxy = "perfluorodecalin"
treatment_brute = "bicaridine"
treatment_fire = "kelotane"
treatment_tox = "charcoal"
req_one_access =list(access_syndicate)
med_bot_skin = "bezerk"
syndicate_aligned = TRUE
/obj/item/storage/firstaid/tactical/New()
..()
if(empty) return
new /obj/item/reagent_containers/hypospray/combat(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) // Because you ain't got no time to look at what damage dey taking yo
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/defibrillator/compact/combat/loaded(src)
new /obj/item/clothing/glasses/hud/health/night(src)
return
/obj/item/storage/firstaid/tactical/empty
empty =1
/obj/item/storage/firstaid/surgery
name = "field surgery kit"
icon_state = "duffel-med"
desc = "A kit for surgery in the field."
max_w_class = WEIGHT_CLASS_BULKY
max_combined_w_class = 21
storage_slots = 10
can_hold = list(/obj/item/roller,/obj/item/bonesetter,/obj/item/bonegel, /obj/item/scalpel, /obj/item/hemostat,
/obj/item/cautery, /obj/item/retractor, /obj/item/FixOVein, /obj/item/surgicaldrill, /obj/item/circular_saw)
/obj/item/storage/firstaid/surgery/New()
..()
new /obj/item/roller(src)
new /obj/item/bonesetter(src)
new /obj/item/bonegel(src)
new /obj/item/scalpel(src)
new /obj/item/hemostat(src)
new /obj/item/cautery(src)
new /obj/item/retractor(src)
new /obj/item/FixOVein(src)
new /obj/item/surgicaldrill(src)
new /obj/item/circular_saw(src)
/*
* Pill Bottles
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/food/pill)
cant_hold = list(/obj/item/reagent_containers/food/pill/patch)
allow_quick_gather = TRUE
use_to_pickup = TRUE
storage_slots = 50
max_combined_w_class = 50
display_contents_with_number = TRUE
var/base_name = ""
var/label_text = ""
var/applying_meds = FALSE //To Prevent spam clicking and generating runtimes from apply a deleting pill multiple times.
var/rapid_intake_message = "unscrews the cap on the pill bottle and begins dumping the entire contents down their throat!"
var/rapid_post_instake_message = "downs the entire bottle of pills in one go!"
var/allow_wrap = TRUE
var/wrapper_color = null
/obj/item/storage/pill_bottle/New()
..()
base_name = name
if(allow_wrap)
apply_wrap()
/obj/item/storage/pill_bottle/proc/apply_wrap()
if(wrapper_color)
overlays.Cut()
var/image/I = image(icon, "pillbottle_wrap")
I.color = wrapper_color
overlays += I
/obj/item/storage/pill_bottle/attack(mob/M, mob/user)
if(iscarbon(M) && contents.len)
if(applying_meds)
to_chat(user, "<span class='warning'>You are already applying meds.</span>")
return
applying_meds = TRUE
for(var/obj/item/reagent_containers/food/pill/P in contents)
if(P.attack(M, user))
applying_meds = FALSE
else
applying_meds = FALSE
break
else
return ..()
/obj/item/storage/pill_bottle/ert
wrapper_color = COLOR_MAROON
/obj/item/storage/pill_bottle/ert/New()
..()
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
/obj/item/storage/pill_bottle/MouseDrop(obj/over_object as obj) // Best utilized if you're a cantankerous doctor with a Vicodin habit.
if(iscarbon(over_object))
var/mob/living/carbon/C = over_object
if(loc == C && src == C.get_active_hand())
if(!contents.len)
to_chat(C, "<span class='notice'>There is nothing in [src]!</span>")
return
C.visible_message("<span class='danger'>[C] [rapid_intake_message]</span>")
if(do_mob(C, C, 100)) // 10 seconds
for(var/obj/item/reagent_containers/food/pill/P in contents)
P.attack(C, C)
C.visible_message("<span class='danger'>[C] [rapid_post_instake_message]</span>")
return
return ..()
/obj/item/storage/pill_bottle/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text))
if(length(tmp_label) > MAX_NAME_LEN)
to_chat(user, "<span class='warning'>The label can be at most [MAX_NAME_LEN] characters long.</span>")
else
to_chat(user, "<span class='notice'>You set the label to \"[tmp_label]\".</span>")
label_text = tmp_label
update_name_label()
else
return ..()
/obj/item/storage/pill_bottle/proc/update_name_label()
if(label_text == "")
name = base_name
else
name = "[base_name] ([label_text])"
/obj/item/storage/pill_bottle/patch_pack
name = "Patch Pack"
desc = "It's a container for storing medical patches."
icon_state = "patch_pack"
can_hold = list(/obj/item/reagent_containers/food/pill/patch)
cant_hold = list()
rapid_intake_message = "flips the lid of the Patch Pack open and begins rapidly stamping patches on themselves!"
rapid_post_instake_message = "stamps the entire contents of the Patch Pack all over their entire body!"
allow_wrap = FALSE
/obj/item/storage/pill_bottle/charcoal
name = "Pill bottle (Charcoal)"
desc = "Contains pills used to counter toxins."
wrapper_color = COLOR_GREEN
New()
..()
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
/obj/item/storage/pill_bottle/painkillers
name = "Pill Bottle (Salicylic Acid)"
desc = "Contains various pills for minor pain relief."
wrapper_color = COLOR_RED
/obj/item/storage/pill_bottle/painkillers/New()
..()
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
/obj/item/storage/pill_bottle/fakedeath
allow_wrap = FALSE
/obj/item/storage/pill_bottle/fakedeath/New()
..()
new /obj/item/reagent_containers/food/pill/fakedeath(src)
new /obj/item/reagent_containers/food/pill/fakedeath(src)
new /obj/item/reagent_containers/food/pill/fakedeath(src)
/* First aid storage
* Contains:
* First Aid Kits
* Pill Bottles
* Dice Pack (in a pill bottle)
*/
/*
* First Aid Kits
*/
/obj/item/storage/firstaid
name = "first-aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
throw_range = 8
var/empty = 0
req_one_access =list(ACCESS_MEDICAL, ACCESS_ROBOTICS) //Access and treatment are utilized for medbots.
var/treatment_brute = "salglu_solution"
var/treatment_oxy = "salbutamol"
var/treatment_fire = "salglu_solution"
var/treatment_tox = "charcoal"
var/treatment_virus = "spaceacillin"
var/med_bot_skin = null
var/syndicate_aligned = FALSE
/obj/item/storage/firstaid/fire
name = "fire first-aid kit"
desc = "A medical kit that contains several medical patches and pills for treating burns. Contains one epinephrine syringe for emergency use and a health analyzer."
icon_state = "ointment"
item_state = "firstaid-ointment"
med_bot_skin = "ointment"
New()
..()
if(empty) return
icon_state = pick("ointment","firefirstaid")
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/healthanalyzer( src )
new /obj/item/reagent_containers/hypospray/autoinjector( src )
new /obj/item/reagent_containers/food/pill/salicylic( src )
return
/obj/item/storage/firstaid/fire/empty
empty = 1
/obj/item/storage/firstaid/regular
desc = "A general medical kit that contains medical patches for both brute damage and burn damage. Also contains an epinephrine syringe for emergency use and a health analyzer"
icon_state = "firstaid"
New()
..()
if(empty) return
new /obj/item/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/reagent_containers/food/pill/patch/styptic( src )
new /obj/item/reagent_containers/food/pill/salicylic( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/reagent_containers/food/pill/patch/silver_sulf( src )
new /obj/item/healthanalyzer( src )
new /obj/item/reagent_containers/hypospray/autoinjector( src )
return
/obj/item/storage/firstaid/toxin
name = "toxin first aid kit"
desc = "A medical kit designed to counter poisoning by common toxins. Contains three pills and syringes, and a health analyzer to determine the health of the patient."
icon_state = "antitoxin"
item_state = "firstaid-toxin"
med_bot_skin = "tox"
New()
..()
if(empty) return
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/syringe/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/healthanalyzer( src )
return
/obj/item/storage/firstaid/toxin/empty
empty = 1
/obj/item/storage/firstaid/o2
name = "oxygen deprivation first aid kit"
desc = "A first aid kit that contains four pills of salbutamol, which is able to counter injuries caused by suffocation. Also contains a health analyzer to determine the health of the patient."
icon_state = "o2"
item_state = "firstaid-o2"
med_bot_skin = "o2"
New()
..()
if(empty) return
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/reagent_containers/food/pill/salbutamol( src )
new /obj/item/healthanalyzer( src )
return
/obj/item/storage/firstaid/o2/empty
empty = 1
/obj/item/storage/firstaid/brute
name = "brute trauma treatment kit"
desc = "A medical kit that contains several medical patches and pills for treating brute injuries. Contains one epinephrine syringe for emergency use and a health analyzer."
icon_state = "brute"
item_state = "firstaid-brute"
med_bot_skin = "brute"
New()
..()
if(empty) return
icon_state = pick("brute","brute2")
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/healthanalyzer(src)
new /obj/item/reagent_containers/hypospray/autoinjector(src)
new /obj/item/stack/medical/bruise_pack(src)
return
/obj/item/storage/firstaid/brute/empty
empty = 1
/obj/item/storage/firstaid/adv
name = "advanced first-aid kit"
desc = "Contains advanced medical treatments."
icon_state = "advfirstaid"
item_state = "firstaid-advanced"
med_bot_skin = "adv"
/obj/item/storage/firstaid/adv/New()
..()
if(empty)
return
new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/reagent_containers/hypospray/autoinjector(src)
new /obj/item/healthanalyzer(src)
/obj/item/storage/firstaid/adv/empty
empty = 1
/obj/item/storage/firstaid/machine
name = "machine repair kit"
desc = "A kit that contains supplies to repair IPCs on the go."
icon_state = "machinefirstaid"
item_state = "firstaid-machine"
med_bot_skin = "machine"
/obj/item/storage/firstaid/machine/New()
..()
if(empty)
return
new /obj/item/weldingtool(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/reagent_containers/food/drinks/oilcan/full(src)
new /obj/item/robotanalyzer(src)
/obj/item/storage/firstaid/machine/empty
empty = 1
/obj/item/storage/firstaid/tactical
name = "first-aid kit"
icon_state = "bezerk"
desc = "I hope you've got insurance."
max_w_class = WEIGHT_CLASS_NORMAL
treatment_oxy = "perfluorodecalin"
treatment_brute = "bicaridine"
treatment_fire = "kelotane"
treatment_tox = "charcoal"
req_one_access =list(ACCESS_SYNDICATE)
med_bot_skin = "bezerk"
syndicate_aligned = TRUE
/obj/item/storage/firstaid/tactical/New()
..()
if(empty) return
new /obj/item/reagent_containers/hypospray/combat(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src) // Because you ain't got no time to look at what damage dey taking yo
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/reagent_containers/food/pill/patch/synthflesh(src)
new /obj/item/defibrillator/compact/combat/loaded(src)
new /obj/item/clothing/glasses/hud/health/night(src)
return
/obj/item/storage/firstaid/tactical/empty
empty =1
/obj/item/storage/firstaid/surgery
name = "field surgery kit"
icon_state = "duffel-med"
desc = "A kit for surgery in the field."
max_w_class = WEIGHT_CLASS_BULKY
max_combined_w_class = 21
storage_slots = 10
can_hold = list(/obj/item/roller,/obj/item/bonesetter,/obj/item/bonegel, /obj/item/scalpel, /obj/item/hemostat,
/obj/item/cautery, /obj/item/retractor, /obj/item/FixOVein, /obj/item/surgicaldrill, /obj/item/circular_saw)
/obj/item/storage/firstaid/surgery/New()
..()
new /obj/item/roller(src)
new /obj/item/bonesetter(src)
new /obj/item/bonegel(src)
new /obj/item/scalpel(src)
new /obj/item/hemostat(src)
new /obj/item/cautery(src)
new /obj/item/retractor(src)
new /obj/item/FixOVein(src)
new /obj/item/surgicaldrill(src)
new /obj/item/circular_saw(src)
/*
* Pill Bottles
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/food/pill)
cant_hold = list(/obj/item/reagent_containers/food/pill/patch)
allow_quick_gather = TRUE
use_to_pickup = TRUE
storage_slots = 50
max_combined_w_class = 50
display_contents_with_number = TRUE
var/base_name = ""
var/label_text = ""
var/applying_meds = FALSE //To Prevent spam clicking and generating runtimes from apply a deleting pill multiple times.
var/rapid_intake_message = "unscrews the cap on the pill bottle and begins dumping the entire contents down their throat!"
var/rapid_post_instake_message = "downs the entire bottle of pills in one go!"
var/allow_wrap = TRUE
var/wrapper_color = null
/obj/item/storage/pill_bottle/New()
..()
base_name = name
if(allow_wrap)
apply_wrap()
/obj/item/storage/pill_bottle/proc/apply_wrap()
if(wrapper_color)
overlays.Cut()
var/image/I = image(icon, "pillbottle_wrap")
I.color = wrapper_color
overlays += I
/obj/item/storage/pill_bottle/attack(mob/M, mob/user)
if(iscarbon(M) && contents.len)
if(applying_meds)
to_chat(user, "<span class='warning'>You are already applying meds.</span>")
return
applying_meds = TRUE
for(var/obj/item/reagent_containers/food/pill/P in contents)
if(P.attack(M, user))
applying_meds = FALSE
else
applying_meds = FALSE
break
else
return ..()
/obj/item/storage/pill_bottle/ert
wrapper_color = COLOR_MAROON
/obj/item/storage/pill_bottle/ert/New()
..()
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
new /obj/item/reagent_containers/food/pill/charcoal(src)
/obj/item/storage/pill_bottle/MouseDrop(obj/over_object as obj) // Best utilized if you're a cantankerous doctor with a Vicodin habit.
if(iscarbon(over_object))
var/mob/living/carbon/C = over_object
if(loc == C && src == C.get_active_hand())
if(!contents.len)
to_chat(C, "<span class='notice'>There is nothing in [src]!</span>")
return
C.visible_message("<span class='danger'>[C] [rapid_intake_message]</span>")
if(do_mob(C, C, 100)) // 10 seconds
for(var/obj/item/reagent_containers/food/pill/P in contents)
P.attack(C, C)
C.visible_message("<span class='danger'>[C] [rapid_post_instake_message]</span>")
return
return ..()
/obj/item/storage/pill_bottle/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text))
if(length(tmp_label) > MAX_NAME_LEN)
to_chat(user, "<span class='warning'>The label can be at most [MAX_NAME_LEN] characters long.</span>")
else
to_chat(user, "<span class='notice'>You set the label to \"[tmp_label]\".</span>")
label_text = tmp_label
update_name_label()
else
return ..()
/obj/item/storage/pill_bottle/proc/update_name_label()
if(label_text == "")
name = base_name
else
name = "[base_name] ([label_text])"
/obj/item/storage/pill_bottle/patch_pack
name = "Patch Pack"
desc = "It's a container for storing medical patches."
icon_state = "patch_pack"
can_hold = list(/obj/item/reagent_containers/food/pill/patch)
cant_hold = list()
rapid_intake_message = "flips the lid of the Patch Pack open and begins rapidly stamping patches on themselves!"
rapid_post_instake_message = "stamps the entire contents of the Patch Pack all over their entire body!"
allow_wrap = FALSE
/obj/item/storage/pill_bottle/charcoal
name = "Pill bottle (Charcoal)"
desc = "Contains pills used to counter toxins."
wrapper_color = COLOR_GREEN
New()
..()
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
new /obj/item/reagent_containers/food/pill/charcoal( src )
/obj/item/storage/pill_bottle/painkillers
name = "Pill Bottle (Salicylic Acid)"
desc = "Contains various pills for minor pain relief."
wrapper_color = COLOR_RED
/obj/item/storage/pill_bottle/painkillers/New()
..()
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
/obj/item/storage/pill_bottle/fakedeath
allow_wrap = FALSE
/obj/item/storage/pill_bottle/fakedeath/New()
..()
new /obj/item/reagent_containers/food/pill/fakedeath(src)
new /obj/item/reagent_containers/food/pill/fakedeath(src)
new /obj/item/reagent_containers/food/pill/fakedeath(src)
+137 -137
View File
@@ -1,137 +1,137 @@
/obj/item/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
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/storage/lockbox/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
if(broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(check_access(W))
locked = !locked
if(locked)
icon_state = icon_locked
to_chat(user, "<span class='warning'>You lock \the [src]!</span>")
if(user.s_active)
user.s_active.close(user)
return
else
icon_state = icon_closed
to_chat(user, "<span class='warning'>You unlock \the [src]!</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
else if((istype(W, /obj/item/card/emag) || (istype(W, /obj/item/melee/energy/blade)) && !broken))
emag_act(user)
return
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
/obj/item/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/storage/lockbox/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!locked)
return ..()
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is locked!</span>")
return 0
/obj/item/storage/lockbox/emag_act(user as mob)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_broken
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
/obj/item/storage/lockbox/hear_talk(mob/living/M as mob, list/message_pieces)
/obj/item/storage/lockbox/hear_message(mob/living/M as mob, msg)
/obj/item/storage/lockbox/mindshield
name = "Lockbox (Mindshield Implants)"
req_access = list(access_security)
/obj/item/storage/lockbox/mindshield/New()
..()
new /obj/item/implantcase/mindshield(src)
new /obj/item/implantcase/mindshield(src)
new /obj/item/implantcase/mindshield(src)
new /obj/item/implanter/mindshield(src)
/obj/item/storage/lockbox/clusterbang
name = "lockbox (clusterbang)"
desc = "You have a bad feeling about opening this."
req_access = list(access_security)
/obj/item/storage/lockbox/clusterbang/New()
..()
new /obj/item/grenade/clusterbuster(src)
/obj/item/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 = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 20
storage_slots = 12
req_access = list(access_captain)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
/obj/item/storage/lockbox/medal/New()
..()
new /obj/item/clothing/accessory/medal/gold/captain(src)
new /obj/item/clothing/accessory/medal/silver/leadership(src)
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/heart(src)
/obj/item/storage/lockbox/t4
name = "lockbox (T4)"
desc = "Contains three T4 breaching charges."
req_access = list(access_cent_specops)
/obj/item/storage/lockbox/t4/New()
..()
for(var/i in 0 to 2)
new /obj/item/grenade/plastic/x4/thermite(src)
/obj/item/storage/lockbox/research
/obj/item/storage/lockbox/research/deconstruct(disassembled = TRUE) // Get wrecked, Science nerds
qdel(src)
/obj/item/storage/lockbox/research/large
name = "Large lockbox"
desc = "A large lockbox"
max_w_class = WEIGHT_CLASS_BULKY
max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
storage_slots = 1
/obj/item/storage/lockbox
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
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/storage/lockbox/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
if(broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(check_access(W))
locked = !locked
if(locked)
icon_state = icon_locked
to_chat(user, "<span class='warning'>You lock \the [src]!</span>")
if(user.s_active)
user.s_active.close(user)
return
else
icon_state = icon_closed
to_chat(user, "<span class='warning'>You unlock \the [src]!</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
else if((istype(W, /obj/item/card/emag) || (istype(W, /obj/item/melee/energy/blade)) && !broken))
emag_act(user)
return
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
/obj/item/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/storage/lockbox/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!locked)
return ..()
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is locked!</span>")
return 0
/obj/item/storage/lockbox/emag_act(user as mob)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_broken
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D.
return
/obj/item/storage/lockbox/hear_talk(mob/living/M as mob, list/message_pieces)
/obj/item/storage/lockbox/hear_message(mob/living/M as mob, msg)
/obj/item/storage/lockbox/mindshield
name = "Lockbox (Mindshield Implants)"
req_access = list(ACCESS_SECURITY)
/obj/item/storage/lockbox/mindshield/New()
..()
new /obj/item/implantcase/mindshield(src)
new /obj/item/implantcase/mindshield(src)
new /obj/item/implantcase/mindshield(src)
new /obj/item/implanter/mindshield(src)
/obj/item/storage/lockbox/clusterbang
name = "lockbox (clusterbang)"
desc = "You have a bad feeling about opening this."
req_access = list(ACCESS_SECURITY)
/obj/item/storage/lockbox/clusterbang/New()
..()
new /obj/item/grenade/clusterbuster(src)
/obj/item/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 = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 20
storage_slots = 12
req_access = list(ACCESS_CAPTAIN)
icon_locked = "medalbox+l"
icon_closed = "medalbox"
icon_broken = "medalbox+b"
/obj/item/storage/lockbox/medal/New()
..()
new /obj/item/clothing/accessory/medal/gold/captain(src)
new /obj/item/clothing/accessory/medal/silver/leadership(src)
new /obj/item/clothing/accessory/medal/silver/valor(src)
new /obj/item/clothing/accessory/medal/heart(src)
/obj/item/storage/lockbox/t4
name = "lockbox (T4)"
desc = "Contains three T4 breaching charges."
req_access = list(ACCESS_CENT_SPECOPS)
/obj/item/storage/lockbox/t4/New()
..()
for(var/i in 0 to 2)
new /obj/item/grenade/plastic/x4/thermite(src)
/obj/item/storage/lockbox/research
/obj/item/storage/lockbox/research/deconstruct(disassembled = TRUE) // Get wrecked, Science nerds
qdel(src)
/obj/item/storage/lockbox/research/large
name = "Large lockbox"
desc = "A large lockbox"
max_w_class = WEIGHT_CLASS_BULKY
max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
storage_slots = 1
+250 -242
View File
@@ -1,242 +1,250 @@
/*
* Absorbs /obj/item/secstorage.
* Reimplements it only slightly to use existing storage functionality.
*
* Contains:
* Secure Briefcase
* Wall Safe
*/
// -----------------------------
// Generic Item
// -----------------------------
/obj/item/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 = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 14
/obj/item/storage/secure/examine(mob/user)
. = ..()
if(in_range(user, src))
. += "The service panel is [open ? "open" : "closed"]."
/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob, params)
if(locked)
if((istype(W, /obj/item/melee/energy/blade)) && (!emagged))
emag_act(user, W)
if(istype(W, /obj/item/screwdriver))
if(do_after(user, 20 * W.toolspeed, target = src))
open = !open
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
return
if((istype(W, /obj/item/multitool)) && (open == 1) && (!l_hacking))
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
l_hacking = 1
if(do_after(usr, 100 * W.toolspeed, target = src))
if(prob(40))
l_setshort = 1
l_set = 0
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
sleep(80)
l_setshort = 0
l_hacking = 0
else
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
l_hacking = 0
else
l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
return
return ..()
/obj/item/storage/secure/emag_act(user as mob, weapon as obj)
if(!emagged)
emagged = 1
overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(weapon, /obj/item/melee/energy/blade))
do_sparks(5, 0, loc)
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
to_chat(user, "You slice through the lock on [src].")
else
to_chat(user, "You short out the lock on [src].")
return
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
if(locked)
add_fingerprint(usr)
to_chat(usr, "<span class='warning'>It's locked!</span>")
return 0
..()
/obj/item/storage/secure/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []", src, (locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if((l_set == 0) && (!emagged) && (!l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if(emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if(l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", code)
if(!locked)
message = "*****"
dat += {"<HR>\n>[message]<BR>\n
<A href='?src=[UID()];type=1'>1</A>-
<A href='?src=[UID()];type=2'>2</A>-
<A href='?src=[UID()];type=3'>3</A><BR>\n
<A href='?src=[UID()];type=4'>4</A>-
<A href='?src=[UID()];type=5'>5</A>-
<A href='?src=[UID()];type=6'>6</A><BR>\n
<A href='?src=[UID()];type=7'>7</A>-
<A href='?src=[UID()];type=8'>8</A>-
<A href='?src=[UID()];type=9'>9</A><BR>\n
<A href='?src=[UID()];type=R'>R</A>-
<A href='?src=[UID()];type=0'>0</A>-
<A href='?src=[UID()];type=E'>E</A><BR>\n</TT>"}
user << browse(dat, "window=caselock;size=300x280")
/obj/item/storage/secure/Topic(href, href_list)
..()
if(usr.incapacitated() || (get_dist(src, usr) > 1))
return
if(href_list["type"])
if(href_list["type"] == "E")
if((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR"))
l_code = code
l_set = 1
else if((code == l_code) && (emagged == 0) && (l_set == 1))
locked = 0
overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
code = null
else
code = "ERROR"
else
if((href_list["type"] == "R") && (emagged == 0) && (!l_setshort))
locked = 1
overlays = null
code = null
close(usr)
else
code += text("[]", href_list["type"])
if(length(code) > 5)
code = "ERROR"
add_fingerprint(usr)
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
return
return
/obj/item/storage/secure/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!locked)
return ..()
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is locked!</span>")
return 0
/obj/item/storage/secure/hear_talk(mob/living/M as mob, list/message_pieces)
return
/obj/item/storage/secure/hear_message(mob/living/M as mob, msg)
return
// -----------------------------
// Secure Briefcase
// -----------------------------
/obj/item/storage/secure/briefcase
name = "secure briefcase"
desc = "A large briefcase with a digital locking system."
icon = 'icons/obj/storage.dmi'
icon_state = "secure"
item_state = "sec-case"
flags = CONDUCT
hitsound = "swing_hit"
force = 8
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/obj/item/storage/secure/briefcase/New()
..()
handle_item_insertion(new /obj/item/paper, 1)
handle_item_insertion(new /obj/item/pen, 1)
/obj/item/storage/secure/briefcase/attack_hand(mob/user as mob)
if((loc == user) && (locked == 1))
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
else if((loc == user) && !locked)
playsound(loc, "rustle", 50, 1, -5)
if(user.s_active)
user.s_active.close(user) //Close and re-open
show_to(user)
else
..()
for(var/mob/M in range(1))
if(M.s_active == src)
close(M)
orient2hud(user)
add_fingerprint(user)
return
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
/obj/item/storage/secure/briefcase/syndie
force = 15
/obj/item/storage/secure/briefcase/syndie/New()
..()
for(var/i = 0, i < storage_slots - 2, i++)
handle_item_insertion(new /obj/item/stack/spacecash/c1000, 1)
// -----------------------------
// Secure Safe
// -----------------------------
/obj/item/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 = WEIGHT_CLASS_HUGE
max_w_class = 8
anchored = 1
density = 0
cant_hold = list(/obj/item/storage/secure/briefcase)
/obj/item/storage/secure/safe/New()
..()
handle_item_insertion(new /obj/item/paper, 1)
handle_item_insertion(new /obj/item/pen, 1)
/obj/item/storage/secure/safe/attack_hand(mob/user as mob)
return attack_self(user)
/*
* Absorbs /obj/item/secstorage.
* Reimplements it only slightly to use existing storage functionality.
*
* Contains:
* Secure Briefcase
* Wall Safe
*/
// -----------------------------
// Generic Item
// -----------------------------
/obj/item/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 = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 14
/obj/item/storage/secure/examine(mob/user)
. = ..()
if(in_range(user, src))
. += "The service panel is [open ? "open" : "closed"]."
/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob, params)
if(locked)
if((istype(W, /obj/item/melee/energy/blade)) && (!emagged))
emag_act(user, W)
if(istype(W, /obj/item/screwdriver))
if(do_after(user, 20 * W.toolspeed, target = src))
open = !open
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
return
if((istype(W, /obj/item/multitool)) && (open == 1) && (!l_hacking))
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
l_hacking = 1
if(do_after(usr, 100 * W.toolspeed, target = src))
if(prob(40))
l_setshort = 1
l_set = 0
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
sleep(80)
l_setshort = 0
l_hacking = 0
else
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
l_hacking = 0
else
l_hacking = 0
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.
return
return ..()
/obj/item/storage/secure/emag_act(user as mob, weapon as obj)
if(!emagged)
emagged = 1
overlays += image('icons/obj/storage.dmi', icon_sparking)
sleep(6)
overlays = null
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(weapon, /obj/item/melee/energy/blade))
do_sparks(5, 0, loc)
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
to_chat(user, "You slice through the lock on [src].")
else
to_chat(user, "You short out the lock on [src].")
return
/obj/item/storage/secure/AltClick(mob/user)
if(!try_to_open())
return FALSE
return ..()
/obj/item/storage/secure/MouseDrop(over_object, src_location, over_location)
if(!try_to_open())
return FALSE
return ..()
/obj/item/storage/secure/proc/try_to_open()
if(locked)
add_fingerprint(usr)
to_chat(usr, "<span class='warning'>It's locked!</span>")
return FALSE
/obj/item/storage/secure/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []", src, (locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if((l_set == 0) && (!emagged) && (!l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if(emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if(l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", code)
if(!locked)
message = "*****"
dat += {"<HR>\n>[message]<BR>\n
<A href='?src=[UID()];type=1'>1</A>-
<A href='?src=[UID()];type=2'>2</A>-
<A href='?src=[UID()];type=3'>3</A><BR>\n
<A href='?src=[UID()];type=4'>4</A>-
<A href='?src=[UID()];type=5'>5</A>-
<A href='?src=[UID()];type=6'>6</A><BR>\n
<A href='?src=[UID()];type=7'>7</A>-
<A href='?src=[UID()];type=8'>8</A>-
<A href='?src=[UID()];type=9'>9</A><BR>\n
<A href='?src=[UID()];type=R'>R</A>-
<A href='?src=[UID()];type=0'>0</A>-
<A href='?src=[UID()];type=E'>E</A><BR>\n</TT>"}
user << browse(dat, "window=caselock;size=300x280")
/obj/item/storage/secure/Topic(href, href_list)
..()
if(usr.incapacitated() || (get_dist(src, usr) > 1))
return
if(href_list["type"])
if(href_list["type"] == "E")
if((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR"))
l_code = code
l_set = 1
else if((code == l_code) && (emagged == 0) && (l_set == 1))
locked = 0
overlays = null
overlays += image('icons/obj/storage.dmi', icon_opened)
code = null
else
code = "ERROR"
else
if((href_list["type"] == "R") && (emagged == 0) && (!l_setshort))
locked = 1
overlays = null
code = null
close(usr)
else
code += text("[]", href_list["type"])
if(length(code) > 5)
code = "ERROR"
add_fingerprint(usr)
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
return
return
/obj/item/storage/secure/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!locked)
return ..()
if(!stop_messages)
to_chat(usr, "<span class='notice'>[src] is locked!</span>")
return 0
/obj/item/storage/secure/hear_talk(mob/living/M as mob, list/message_pieces)
return
/obj/item/storage/secure/hear_message(mob/living/M as mob, msg)
return
// -----------------------------
// Secure Briefcase
// -----------------------------
/obj/item/storage/secure/briefcase
name = "secure briefcase"
desc = "A large briefcase with a digital locking system."
icon = 'icons/obj/storage.dmi'
icon_state = "secure"
item_state = "sec-case"
flags = CONDUCT
hitsound = "swing_hit"
force = 8
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
/obj/item/storage/secure/briefcase/New()
..()
handle_item_insertion(new /obj/item/paper, 1)
handle_item_insertion(new /obj/item/pen, 1)
/obj/item/storage/secure/briefcase/attack_hand(mob/user as mob)
if((loc == user) && (locked == 1))
to_chat(usr, "<span class='warning'>[src] is locked and cannot be opened!</span>")
else if((loc == user) && !locked)
playsound(loc, "rustle", 50, 1, -5)
if(user.s_active)
user.s_active.close(user) //Close and re-open
show_to(user)
else
..()
for(var/mob/M in range(1))
if(M.s_active == src)
close(M)
orient2hud(user)
add_fingerprint(user)
return
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
/obj/item/storage/secure/briefcase/syndie
force = 15
/obj/item/storage/secure/briefcase/syndie/New()
..()
for(var/i = 0, i < storage_slots - 2, i++)
handle_item_insertion(new /obj/item/stack/spacecash/c1000, 1)
// -----------------------------
// Secure Safe
// -----------------------------
/obj/item/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 = WEIGHT_CLASS_HUGE
max_w_class = 8
anchored = 1
density = 0
cant_hold = list(/obj/item/storage/secure/briefcase)
/obj/item/storage/secure/safe/New()
..()
handle_item_insertion(new /obj/item/paper, 1)
handle_item_insertion(new /obj/item/pen, 1)
/obj/item/storage/secure/safe/attack_hand(mob/user as mob)
return attack_self(user)
File diff suppressed because it is too large Load Diff
+137 -137
View File
@@ -1,137 +1,137 @@
/obj/item/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
flags = CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_METAL = 500)
origin_tech = "combat=1;engineering=1"
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
/obj/item/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/storage/toolbox/emergency/New()
..()
new /obj/item/crowbar/red(src)
new /obj/item/weldingtool/mini(src)
new /obj/item/extinguisher/mini(src)
if(prob(50))
new /obj/item/flashlight(src)
else
new /obj/item/flashlight/flare(src)
new /obj/item/radio(src)
/obj/item/storage/toolbox/emergency/old
name = "rusty red toolbox"
icon_state = "toolbox_red_old"
/obj/item/storage/toolbox/mechanical
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/storage/toolbox/mechanical/New()
..()
new /obj/item/screwdriver(src)
new /obj/item/wrench(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar(src)
new /obj/item/analyzer(src)
new /obj/item/wirecutters(src)
/obj/item/storage/toolbox/mechanical/greytide
flags = NODROP
/obj/item/storage/toolbox/mechanical/old
name = "rusty blue toolbox"
icon_state = "toolbox_blue_old"
/obj/item/storage/toolbox/electrical
name = "electrical toolbox"
icon_state = "yellow"
item_state = "toolbox_yellow"
/obj/item/storage/toolbox/electrical/New()
..()
var/pickedcolor = pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE)
new /obj/item/screwdriver(src)
new /obj/item/wirecutters(src)
new /obj/item/t_scanner(src)
new /obj/item/crowbar(src)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
if(prob(5))
new /obj/item/clothing/gloves/color/yellow(src)
else
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
/obj/item/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.0
throwforce = 18.0
/obj/item/storage/toolbox/syndicate/New()
..()
new /obj/item/screwdriver(src, "red")
new /obj/item/wrench(src)
new /obj/item/weldingtool/largetank(src)
new /obj/item/crowbar/red(src)
new /obj/item/wirecutters(src, "red")
new /obj/item/multitool(src)
new /obj/item/clothing/gloves/combat(src)
/obj/item/storage/toolbox/fakesyndi
name = "suspicous looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
desc = "Danger. Very Robust. The paint is still wet."
/obj/item/storage/toolbox/drone
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/storage/toolbox/drone/New()
..()
var/pickedcolor = pick(pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE))
new /obj/item/screwdriver(src)
new /obj/item/wrench(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar(src)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
new /obj/item/wirecutters(src)
new /obj/item/multitool(src)
/obj/item/storage/toolbox/brass
name = "brass box"
desc = "A huge brass box with several indentations in its surface."
icon_state = "brassbox"
item_state = null
resistance_flags = FIRE_PROOF | ACID_PROOF
w_class = WEIGHT_CLASS_HUGE
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 28
storage_slots = 28
attack_verb = list("robusted", "crushed", "smashed")
/obj/item/storage/toolbox/brass/prefilled/New()
..()
new /obj/item/screwdriver/brass(src)
new /obj/item/wirecutters/brass(src)
new /obj/item/wrench/brass(src)
new /obj/item/crowbar/brass(src)
new /obj/item/weldingtool/experimental/brass(src)
/obj/item/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_state = "toolbox_red"
flags = CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_METAL = 500)
origin_tech = "combat=1;engineering=1"
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
/obj/item/storage/toolbox/emergency
name = "emergency toolbox"
icon_state = "red"
item_state = "toolbox_red"
/obj/item/storage/toolbox/emergency/New()
..()
new /obj/item/crowbar/red(src)
new /obj/item/weldingtool/mini(src)
new /obj/item/extinguisher/mini(src)
if(prob(50))
new /obj/item/flashlight(src)
else
new /obj/item/flashlight/flare(src)
new /obj/item/radio(src)
/obj/item/storage/toolbox/emergency/old
name = "rusty red toolbox"
icon_state = "toolbox_red_old"
/obj/item/storage/toolbox/mechanical
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/storage/toolbox/mechanical/New()
..()
new /obj/item/screwdriver(src)
new /obj/item/wrench(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar(src)
new /obj/item/analyzer(src)
new /obj/item/wirecutters(src)
/obj/item/storage/toolbox/mechanical/greytide
flags = NODROP
/obj/item/storage/toolbox/mechanical/old
name = "rusty blue toolbox"
icon_state = "toolbox_blue_old"
/obj/item/storage/toolbox/electrical
name = "electrical toolbox"
icon_state = "yellow"
item_state = "toolbox_yellow"
/obj/item/storage/toolbox/electrical/New()
..()
var/pickedcolor = pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE)
new /obj/item/screwdriver(src)
new /obj/item/wirecutters(src)
new /obj/item/t_scanner(src)
new /obj/item/crowbar(src)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
if(prob(5))
new /obj/item/clothing/gloves/color/yellow(src)
else
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
/obj/item/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.0
throwforce = 18.0
/obj/item/storage/toolbox/syndicate/New()
..()
new /obj/item/screwdriver(src, "red")
new /obj/item/wrench(src)
new /obj/item/weldingtool/largetank(src)
new /obj/item/crowbar/red(src)
new /obj/item/wirecutters(src, "red")
new /obj/item/multitool(src)
new /obj/item/clothing/gloves/combat(src)
/obj/item/storage/toolbox/fakesyndi
name = "suspicous looking toolbox"
icon_state = "syndicate"
item_state = "toolbox_syndi"
desc = "Danger. Very Robust. The paint is still wet."
/obj/item/storage/toolbox/drone
name = "mechanical toolbox"
icon_state = "blue"
item_state = "toolbox_blue"
/obj/item/storage/toolbox/drone/New()
..()
var/pickedcolor = pick(pick(COLOR_RED, COLOR_YELLOW, COLOR_GREEN, COLOR_BLUE, COLOR_PINK, COLOR_ORANGE, COLOR_CYAN, COLOR_WHITE))
new /obj/item/screwdriver(src)
new /obj/item/wrench(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar(src)
new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
new /obj/item/wirecutters(src)
new /obj/item/multitool(src)
/obj/item/storage/toolbox/brass
name = "brass box"
desc = "A huge brass box with several indentations in its surface."
icon_state = "brassbox"
item_state = null
resistance_flags = FIRE_PROOF | ACID_PROOF
w_class = WEIGHT_CLASS_HUGE
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 28
storage_slots = 28
attack_verb = list("robusted", "crushed", "smashed")
/obj/item/storage/toolbox/brass/prefilled/New()
..()
new /obj/item/screwdriver/brass(src)
new /obj/item/wirecutters/brass(src)
new /obj/item/wrench/brass(src)
new /obj/item/crowbar/brass(src)
new /obj/item/weldingtool/experimental/brass(src)
+119 -119
View File
@@ -1,119 +1,119 @@
/* Weapons
* Contains:
* Banhammer
* Classic Baton
*/
/*
* Banhammer
*/
/obj/item/banhammer/attack(mob/M, mob/user)
to_chat(M, "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>")
to_chat(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
/*
* Classic Baton
*/
/obj/item/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
icon_state = "baton"
item_state = "classic_baton"
slot_flags = SLOT_BELT
force = 12 //9 hit crit
w_class = WEIGHT_CLASS_NORMAL
var/cooldown = 0
var/on = 1
/obj/item/melee/classic_baton/attack(mob/target as mob, mob/living/user as mob)
if(on)
add_fingerprint(user)
if((CLUMSY in user.mutations) && prob(50))
to_chat(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 == INTENT_HARM)
if(!..()) return
if(!isrobot(target)) return
else
if(cooldown <= 0)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
return
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_attack_logs(user, target, "Stunned with [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 = 1
spawn(40)
cooldown = 0
return
else
return ..()
/obj/item/melee/classic_baton/ntcane
name = "fancy cane"
desc = "A cane with special engraving on it. It seems well suited for fending off assailants..."
icon_state = "cane_nt"
item_state = "cane_nt"
needs_permit = 0
/obj/item/melee/classic_baton/ntcane/is_crutch()
return 1
//Telescopic baton
/obj/item/melee/classic_baton/telescopic
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon_state = "telebaton_0"
item_state = null
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
needs_permit = 0
force = 0
on = 0
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user as mob)
on = !on
if(on)
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
to_chat(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 = WEIGHT_CLASS_SMALL
force = 0 //not so robust now
attack_verb = list("hit", "poked")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
/* Weapons
* Contains:
* Banhammer
* Classic Baton
*/
/*
* Banhammer
*/
/obj/item/banhammer/attack(mob/M, mob/user)
to_chat(M, "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>")
to_chat(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
/*
* Classic Baton
*/
/obj/item/melee/classic_baton
name = "police baton"
desc = "A wooden truncheon for beating criminal scum."
icon_state = "baton"
item_state = "classic_baton"
slot_flags = SLOT_BELT
force = 12 //9 hit crit
w_class = WEIGHT_CLASS_NORMAL
var/cooldown = 0
var/on = 1
/obj/item/melee/classic_baton/attack(mob/target as mob, mob/living/user as mob)
if(on)
add_fingerprint(user)
if((CLUMSY in user.mutations) && prob(50))
to_chat(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 == INTENT_HARM)
if(!..()) return
if(!isrobot(target)) return
else
if(cooldown <= 0)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
return
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_attack_logs(user, target, "Stunned with [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 = 1
spawn(40)
cooldown = 0
return
else
return ..()
/obj/item/melee/classic_baton/ntcane
name = "fancy cane"
desc = "A cane with special engraving on it. It seems well suited for fending off assailants..."
icon_state = "cane_nt"
item_state = "cane_nt"
needs_permit = 0
/obj/item/melee/classic_baton/ntcane/is_crutch()
return 1
//Telescopic baton
/obj/item/melee/classic_baton/telescopic
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon_state = "telebaton_0"
item_state = null
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
needs_permit = 0
force = 0
on = 0
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user as mob)
on = !on
if(on)
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
to_chat(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 = WEIGHT_CLASS_SMALL
force = 0 //not so robust now
attack_verb = list("hit", "poked")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
+246 -246
View File
@@ -1,246 +1,246 @@
/obj/item/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"
w_class = WEIGHT_CLASS_BULKY
item_state = "jetpack"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
var/datum/effect_system/trail_follow/ion/ion_trail
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/on = 0
var/stabilizers = 0
var/volume_rate = 500 //Needed for borg jetpack transfer
/obj/item/tank/jetpack/New()
..()
ion_trail = new /datum/effect_system/trail_follow/ion()
ion_trail.set_up(src)
/obj/item/tank/jetpack/Destroy()
QDEL_NULL(ion_trail)
return ..()
/obj/item/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)
toggle_stabilization(user)
else
toggle_internals(user)
/obj/item/tank/jetpack/proc/toggle_stabilization(mob/user)
if(on)
stabilizers = !stabilizers
to_chat(user, "<span class='notice'>You turn [src]'s stabilization [stabilizers ? "on" : "off"].</span>")
/obj/item/tank/jetpack/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/jetpack/proc/cycle(mob/user)
if(user.incapacitated())
return
if(!on)
turn_on(user)
to_chat(user, "<span class='notice'>You turn the jetpack on.</span>")
else
turn_off(user)
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/tank/jetpack/proc/turn_on(mob/user)
on = TRUE
icon_state = "[initial(icon_state)]-on"
ion_trail.start()
/obj/item/tank/jetpack/proc/turn_off(mob/user)
on = FALSE
stabilizers = FALSE
icon_state = initial(icon_state)
ion_trail.stop()
/obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user)
if(!on)
return 0
if((num < 0.005 || air_contents.total_moles() < num))
turn_off(user)
return 0
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return 0
var/turf/T = get_turf(user)
T.assume_air(removed)
return 1
/obj/item/tank/jetpack/void
name = "Void Jetpack (Oxygen)"
desc = "It works well in a void."
icon_state = "jetpack-void"
item_state = "jetpack-void"
/obj/item/tank/jetpack/void/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/void/grey
name = "Void Jetpack (Oxygen)"
icon_state = "jetpack-void-grey"
/obj/item/tank/jetpack/void/gold
name = "Retro Jetpack (Oxygen)"
icon_state = "jetpack-void-gold"
/obj/item/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/tank/jetpack/oxygen/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/oxygen/captain
name = "Captain's jetpack"
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
icon_state = "jetpack-captain"
item_state = "jetpack-captain"
volume = 90
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy.
/obj/item/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 = 8
w_class = WEIGHT_CLASS_NORMAL
/obj/item/tank/jetpack/oxygenblack
name = "Jetpack (Oxygen)"
desc = "A black tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack-black"
item_state = "jetpack-black"
/obj/item/tank/jetpack/oxygenblack/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/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."
distribute_pressure = 0
icon_state = "jetpack-black"
item_state = "jetpack-black"
/obj/item/tank/jetpack/carbondioxide/New()
..()
ion_trail = new /datum/effect_system/trail_follow/ion()
ion_trail.set_up(src)
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/carbondioxide/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.carbon_dioxide < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/jetpack/suit
name = "hardsuit jetpack upgrade"
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
icon_state = "jetpack-mining"
item_state = "jetpack-black"
origin_tech = "materials=4;magnets=4;engineering=5"
w_class = WEIGHT_CLASS_NORMAL
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
volume = 1
slot_flags = null
var/datum/gas_mixture/temp_air_contents
var/obj/item/tank/tank = null
var/mob/living/carbon/human/cur_user
/obj/item/tank/jetpack/suit/New()
..()
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
/obj/item/tank/jetpack/suit/attack_self()
return
/obj/item/tank/jetpack/suit/cycle(mob/user)
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
to_chat(user, "<span class='warning'>[src] must be connected to a hardsuit!</span>")
return
var/mob/living/carbon/human/H = user
if(!istype(H.s_store, /obj/item/tank))
to_chat(user, "<span class='warning'>You need a tank in your suit storage!</span>")
return
..()
/obj/item/tank/jetpack/suit/turn_on(mob/user)
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc) || loc.loc != user)
return
var/mob/living/carbon/human/H = user
tank = H.s_store
air_contents = tank.air_contents
START_PROCESSING(SSobj, src)
cur_user = user
..()
/obj/item/tank/jetpack/suit/turn_off(mob/user)
tank = null
air_contents = temp_air_contents
STOP_PROCESSING(SSobj, src)
cur_user = null
..()
/obj/item/tank/jetpack/suit/process()
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
turn_off(cur_user)
return
var/mob/living/carbon/human/H = loc.loc
if(!tank || tank != H.s_store)
turn_off(cur_user)
return
..()
/obj/item/tank/jetpack/rig
name = "jetpack"
var/obj/item/rig/holder
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
/obj/item/tank/jetpack/rig/examine()
. = list("It's a jetpack. If you can see this, report it on the bug tracker.")
/obj/item/tank/jetpack/rig/allow_thrust(num, mob/living/user)
if(!on)
return 0
if(!istype(holder) || !holder.air_supply)
return 0
var/datum/gas_mixture/removed = holder.air_supply.air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return 0
var/turf/T = get_turf(user)
T.assume_air(removed)
return 1
/obj/item/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"
w_class = WEIGHT_CLASS_BULKY
item_state = "jetpack"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
var/datum/effect_system/trail_follow/ion/ion_trail
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
var/on = 0
var/stabilizers = 0
var/volume_rate = 500 //Needed for borg jetpack transfer
/obj/item/tank/jetpack/New()
..()
ion_trail = new /datum/effect_system/trail_follow/ion()
ion_trail.set_up(src)
/obj/item/tank/jetpack/Destroy()
QDEL_NULL(ion_trail)
return ..()
/obj/item/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)
toggle_stabilization(user)
else
toggle_internals(user)
/obj/item/tank/jetpack/proc/toggle_stabilization(mob/user)
if(on)
stabilizers = !stabilizers
to_chat(user, "<span class='notice'>You turn [src]'s stabilization [stabilizers ? "on" : "off"].</span>")
/obj/item/tank/jetpack/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/jetpack/proc/cycle(mob/user)
if(user.incapacitated())
return
if(!on)
turn_on(user)
to_chat(user, "<span class='notice'>You turn the jetpack on.</span>")
else
turn_off(user)
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/tank/jetpack/proc/turn_on(mob/user)
on = TRUE
icon_state = "[initial(icon_state)]-on"
ion_trail.start()
/obj/item/tank/jetpack/proc/turn_off(mob/user)
on = FALSE
stabilizers = FALSE
icon_state = initial(icon_state)
ion_trail.stop()
/obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user)
if(!on)
return 0
if((num < 0.005 || air_contents.total_moles() < num))
turn_off(user)
return 0
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return 0
var/turf/T = get_turf(user)
T.assume_air(removed)
return 1
/obj/item/tank/jetpack/void
name = "Void Jetpack (Oxygen)"
desc = "It works well in a void."
icon_state = "jetpack-void"
item_state = "jetpack-void"
/obj/item/tank/jetpack/void/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/void/grey
name = "Void Jetpack (Oxygen)"
icon_state = "jetpack-void-grey"
/obj/item/tank/jetpack/void/gold
name = "Retro Jetpack (Oxygen)"
icon_state = "jetpack-void-gold"
/obj/item/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/tank/jetpack/oxygen/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/oxygen/captain
name = "Captain's jetpack"
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
icon_state = "jetpack-captain"
item_state = "jetpack-captain"
volume = 90
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy.
/obj/item/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 = 8
w_class = WEIGHT_CLASS_NORMAL
/obj/item/tank/jetpack/oxygenblack
name = "Jetpack (Oxygen)"
desc = "A black tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack-black"
item_state = "jetpack-black"
/obj/item/tank/jetpack/oxygenblack/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/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."
distribute_pressure = 0
icon_state = "jetpack-black"
item_state = "jetpack-black"
/obj/item/tank/jetpack/carbondioxide/New()
..()
ion_trail = new /datum/effect_system/trail_follow/ion()
ion_trail.set_up(src)
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/carbondioxide/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.carbon_dioxide < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/jetpack/suit
name = "hardsuit jetpack upgrade"
desc = "A modular, compact set of thrusters designed to integrate with a hardsuit. It is fueled by a tank inserted into the suit's storage compartment."
icon_state = "jetpack-mining"
item_state = "jetpack-black"
origin_tech = "materials=4;magnets=4;engineering=5"
w_class = WEIGHT_CLASS_NORMAL
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
volume = 1
slot_flags = null
var/datum/gas_mixture/temp_air_contents
var/obj/item/tank/tank = null
var/mob/living/carbon/human/cur_user
/obj/item/tank/jetpack/suit/New()
..()
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
/obj/item/tank/jetpack/suit/attack_self()
return
/obj/item/tank/jetpack/suit/cycle(mob/user)
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit))
to_chat(user, "<span class='warning'>[src] must be connected to a hardsuit!</span>")
return
var/mob/living/carbon/human/H = user
if(!istype(H.s_store, /obj/item/tank))
to_chat(user, "<span class='warning'>You need a tank in your suit storage!</span>")
return
..()
/obj/item/tank/jetpack/suit/turn_on(mob/user)
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc) || loc.loc != user)
return
var/mob/living/carbon/human/H = user
tank = H.s_store
air_contents = tank.air_contents
START_PROCESSING(SSobj, src)
cur_user = user
..()
/obj/item/tank/jetpack/suit/turn_off(mob/user)
tank = null
air_contents = temp_air_contents
STOP_PROCESSING(SSobj, src)
cur_user = null
..()
/obj/item/tank/jetpack/suit/process()
if(!istype(loc, /obj/item/clothing/suit/space/hardsuit) || !ishuman(loc.loc))
turn_off(cur_user)
return
var/mob/living/carbon/human/H = loc.loc
if(!tank || tank != H.s_store)
turn_off(cur_user)
return
..()
/obj/item/tank/jetpack/rig
name = "jetpack"
var/obj/item/rig/holder
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
/obj/item/tank/jetpack/rig/examine()
. = list("It's a jetpack. If you can see this, report it on the bug tracker.")
/obj/item/tank/jetpack/rig/allow_thrust(num, mob/living/user)
if(!on)
return 0
if(!istype(holder) || !holder.air_supply)
return 0
var/datum/gas_mixture/removed = holder.air_supply.air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off(user)
return 0
var/turf/T = get_turf(user)
T.assume_air(removed)
return 1
@@ -1,253 +1,253 @@
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
* Oxygen
*/
/obj/item/tank/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/oxygen/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/oxygen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
obj/item/tank/oxygen/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
dog_fashion = null
/obj/item/tank/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
dog_fashion = null
/*
* Anesthetic
*/
/obj/item/tank/anesthetic
name = "anesthetic tank"
desc = "A tank with an N2O/O2 gas mix."
icon_state = "anesthetic"
item_state = "an_tank"
/obj/item/tank/anesthetic/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.trace_gases += trace_gas
/*
* Air
*/
/obj/item/tank/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "air"
item_state = "air"
/obj/item/tank/air/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 1)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/air/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
/*
* Plasma
*/
/obj/item/tank/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!
/obj/item/tank/plasma/New()
..()
air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/plasma/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/flamethrower))
var/obj/item/flamethrower/F = W
if((!F.status)||(F.ptank)) return
master = F
F.ptank = src
user.unEquip(src)
loc = F
F.update_icon()
/obj/item/tank/plasma/full/New()
..()
air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/plasma/plasmaman
name = "plasma internals tank"
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
icon_state = "plasmaman_tank"
item_state = "plasmaman_tank"
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/plasma/plasmaman/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.toxins < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of plasma!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/plasma/plasmaman/belt
icon_state = "plasmaman_tank_belt"
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
volume = 25
w_class = WEIGHT_CLASS_SMALL
/obj/item/tank/plasma/plasmaman/belt/full/New()
..()
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
/*
* Emergency Oxygen
*/
/obj/item/tank/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 = WEIGHT_CLASS_SMALL
force = 4.0
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/emergency_oxygen/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
obj/item/tank/emergency_oxygen/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
obj/item/tank/emergency_oxygen/engi/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/syndi
name = "suspicious emergency oxygen tank"
icon_state = "emergency_syndi"
desc = "A dark emergency oxygen tank. The label on the back reads \"Original Oxygen Tank Design, Do Not Steal.\""
volume = 6
/obj/item/tank/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
volume = 10
obj/item/tank/emergency_oxygen/double/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/double/full
name = "pressurized double emergency oxygen tank"
desc = "Used for \"emergencies,\" it actually contains a fair amount of oxygen."
/obj/item/tank/emergency_oxygen/double/full/New()
..()
air_contents.oxygen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/*
* Nitrogen
*/
/obj/item/tank/nitrogen
name = "nitrogen tank"
desc = "A tank of nitrogen."
icon_state = "oxygen_fr"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/back.dmi') //Do it for Big Bird.
/obj/item/tank/nitrogen/New()
..()
air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/nitrogen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.nitrogen < 10)
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
/obj/item/tank/emergency_oxygen/vox
name = "vox specialized nitrogen tank"
desc = "A high-tech nitrogen tank designed specifically for Vox."
icon_state = "emergency_vox"
volume = 25
sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/belt.dmi') //Do it for Big Bird.
/obj/item/tank/emergency_oxygen/vox/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/nitrogen
name = "emergency nitrogen tank"
desc = "An emergency tank designed specifically for Vox."
icon_state = "emergency_nitrogen"
volume = 3
/obj/item/tank/emergency_oxygen/nitrogen/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/plasma
name = "emergency plasma tank"
desc = "An emergency tank designed specifically for Plasmamen."
icon_state = "emergency_p"
volume = 3
/obj/item/tank/emergency_oxygen/plasma/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
* Oxygen
*/
/obj/item/tank/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/oxygen/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/oxygen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
obj/item/tank/oxygen/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
dog_fashion = null
/obj/item/tank/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
dog_fashion = null
/*
* Anesthetic
*/
/obj/item/tank/anesthetic
name = "anesthetic tank"
desc = "A tank with an N2O/O2 gas mix."
icon_state = "anesthetic"
item_state = "an_tank"
/obj/item/tank/anesthetic/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.trace_gases += trace_gas
/*
* Air
*/
/obj/item/tank/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "air"
item_state = "air"
/obj/item/tank/air/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 1)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/air/New()
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
/*
* Plasma
*/
/obj/item/tank/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!
/obj/item/tank/plasma/New()
..()
air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/plasma/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/flamethrower))
var/obj/item/flamethrower/F = W
if((!F.status)||(F.ptank)) return
master = F
F.ptank = src
user.unEquip(src)
loc = F
F.update_icon()
/obj/item/tank/plasma/full/New()
..()
air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/plasma/plasmaman
name = "plasma internals tank"
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
icon_state = "plasmaman_tank"
item_state = "plasmaman_tank"
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/plasma/plasmaman/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.toxins < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of plasma!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/plasma/plasmaman/belt
icon_state = "plasmaman_tank_belt"
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
volume = 25
w_class = WEIGHT_CLASS_SMALL
/obj/item/tank/plasma/plasmaman/belt/full/New()
..()
air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
/*
* Emergency Oxygen
*/
/obj/item/tank/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 = WEIGHT_CLASS_SMALL
force = 4.0
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/emergency_oxygen/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
obj/item/tank/emergency_oxygen/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
obj/item/tank/emergency_oxygen/engi/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/syndi
name = "suspicious emergency oxygen tank"
icon_state = "emergency_syndi"
desc = "A dark emergency oxygen tank. The label on the back reads \"Original Oxygen Tank Design, Do Not Steal.\""
volume = 6
/obj/item/tank/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
volume = 10
obj/item/tank/emergency_oxygen/double/empty/New()
..()
air_contents.oxygen = null
/obj/item/tank/emergency_oxygen/double/full
name = "pressurized double emergency oxygen tank"
desc = "Used for \"emergencies,\" it actually contains a fair amount of oxygen."
/obj/item/tank/emergency_oxygen/double/full/New()
..()
air_contents.oxygen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/*
* Nitrogen
*/
/obj/item/tank/nitrogen
name = "nitrogen tank"
desc = "A tank of nitrogen."
icon_state = "oxygen_fr"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/back.dmi') //Do it for Big Bird.
/obj/item/tank/nitrogen/New()
..()
air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/nitrogen/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.nitrogen < 10)
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
/obj/item/tank/emergency_oxygen/vox
name = "vox specialized nitrogen tank"
desc = "A high-tech nitrogen tank designed specifically for Vox."
icon_state = "emergency_vox"
volume = 25
sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/belt.dmi') //Do it for Big Bird.
/obj/item/tank/emergency_oxygen/vox/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/nitrogen
name = "emergency nitrogen tank"
desc = "An emergency tank designed specifically for Vox."
icon_state = "emergency_nitrogen"
volume = 3
/obj/item/tank/emergency_oxygen/nitrogen/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/plasma
name = "emergency plasma tank"
desc = "An emergency tank designed specifically for Plasmamen."
icon_state = "emergency_p"
volume = 3
/obj/item/tank/emergency_oxygen/plasma/New()
..()
air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+149 -149
View File
@@ -1,149 +1,149 @@
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/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.0
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
throw_speed = 4
throw_range = 20
materials = list(MAT_METAL=400)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
origin_tech = "magnets=3;bluespace=2"
/obj/item/locator/attack_self(mob/user as mob)
add_fingerprint(usr)
var/dat
if(temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=[UID()];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=[UID()];freq=-10'>-</A>
<A href='byond://?src=[UID()];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=[UID()];freq=2'>+</A>
<A href='byond://?src=[UID()];freq=10'>+</A><BR>
<A href='?src=[UID()];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/locator/Topic(href, href_list)
if(..())
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're in the admin zone
to_chat(usr, "<span class='warning'>\The [src] is malfunctioning.</span>")
return 1
if(href_list["refresh"])
temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if(sr)
temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/radio/beacon/W in GLOB.beacons)
if(W.frequency == frequency && !W.syndicate)
if(W && W.z == z)
var/turf/TB = get_turf(W)
temp += "[W.code]: [TB.x], [TB.y], [TB.z]<BR>"
temp += "<B>Located Implants:</B><BR>"
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
if(!T.implanted || !T.imp_in)
continue
var/turf/Tr = get_turf(T)
if(Tr && Tr.z == sr.z)
temp += "[T.id]: [Tr.x], [Tr.y], [Tr.z]<BR>"
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B>."
temp += "<BR><BR><A href='byond://?src=[UID()];refresh=1'>Refresh</A><BR>"
else
temp += "<B><FONT color='red'>Processing error:</FONT></B> Unable to locate orbital position.<BR>"
else
if(href_list["freq"])
frequency += text2num(href_list["freq"])
frequency = sanitize_frequency(frequency)
else
if(href_list["temp"])
temp = null
attack_self(usr)
return 1
/*
* Hand-tele
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10000)
origin_tech = "magnets=3;bluespace=4"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/active_portals = 0
/obj/item/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in world)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
else
L["[com.id] (Inactive)"] = com.target
var/list/turfs = list( )
var/area/A
for(var/turf/T in orange(10))
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
A = get_area(T)
if(A.tele_proof == 1) continue // Telescience-proofed areas require a beacon.
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if(!t1 || (!user.is_in_active_hand(src) || user.stat || user.restrained()))
return
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/T = L[t1]
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)
return
/obj/item/hand_tele/portal_destroyed(obj/effect/portal/P)
active_portals--
/* Teleportation devices.
* Contains:
* Locator
* Hand-tele
*/
/*
* Locator
*/
/obj/item/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.0
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
throw_speed = 4
throw_range = 20
materials = list(MAT_METAL=400)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
origin_tech = "magnets=3;bluespace=2"
/obj/item/locator/attack_self(mob/user as mob)
add_fingerprint(usr)
var/dat
if(temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=[UID()];temp=1'>Clear</A>"
else
dat = {"
<B>Persistent Signal Locator</B><HR>
Frequency:
<A href='byond://?src=[UID()];freq=-10'>-</A>
<A href='byond://?src=[UID()];freq=-2'>-</A> [format_frequency(src.frequency)]
<A href='byond://?src=[UID()];freq=2'>+</A>
<A href='byond://?src=[UID()];freq=10'>+</A><BR>
<A href='?src=[UID()];refresh=1'>Refresh</A>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/locator/Topic(href, href_list)
if(..())
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're in the admin zone
to_chat(usr, "<span class='warning'>\The [src] is malfunctioning.</span>")
return 1
if(href_list["refresh"])
temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)
if(sr)
temp += "<B>Located Beacons:</B><BR>"
for(var/obj/item/radio/beacon/W in GLOB.beacons)
if(W.frequency == frequency && !W.syndicate)
if(W && W.z == z)
var/turf/TB = get_turf(W)
temp += "[W.code]: [TB.x], [TB.y], [TB.z]<BR>"
temp += "<B>Located Implants:</B><BR>"
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
if(!T.implanted || !T.imp_in)
continue
var/turf/Tr = get_turf(T)
if(Tr && Tr.z == sr.z)
temp += "[T.id]: [Tr.x], [Tr.y], [Tr.z]<BR>"
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B>."
temp += "<BR><BR><A href='byond://?src=[UID()];refresh=1'>Refresh</A><BR>"
else
temp += "<B><FONT color='red'>Processing error:</FONT></B> Unable to locate orbital position.<BR>"
else
if(href_list["freq"])
frequency += text2num(href_list["freq"])
frequency = sanitize_frequency(frequency)
else
if(href_list["temp"])
temp = null
attack_self(usr)
return 1
/*
* Hand-tele
*/
/obj/item/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 = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=10000)
origin_tech = "magnets=3;bluespace=4"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/active_portals = 0
/obj/item/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in world)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
else
L["[com.id] (Inactive)"] = com.target
var/list/turfs = list( )
var/area/A
for(var/turf/T in orange(10))
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
A = get_area(T)
if(A.tele_proof == 1) continue // Telescience-proofed areas require a beacon.
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if(!t1 || (!user.is_in_active_hand(src) || user.stat || user.restrained()))
return
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
return
var/T = L[t1]
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)
return
/obj/item/hand_tele/portal_destroyed(obj/effect/portal/P)
active_portals--
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -151,4 +151,4 @@
/obj/item/vending_refill/robotics
machine_name = "Robotech Deluxe"
icon_state = "refill_engi"
icon_state = "refill_engi"
+275 -275
View File
@@ -1,275 +1,275 @@
/obj/item/banhammer
desc = "A banhammer"
name = "banhammer"
icon = 'icons/obj/items.dmi'
icon_state = "toyhammer"
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 7
throw_range = 15
attack_verb = list("banned")
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
/obj/item/banhammer/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.</span>")
return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS
/obj/item/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 = WEIGHT_CLASS_NORMAL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/sord/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.</span>", \
"<span class='suicide'>You try to impale yourself with [src], but it's USELESS...</span>")
return SHAME
/obj/item/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = CONDUCT
hitsound = 'sound/weapons/bladeslice.ogg'
slot_flags = SLOT_BELT
force = 40
throwforce = 10
sharp = 1
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
/obj/item/claymore/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return BRUTELOSS
/obj/item/claymore/ceremonial
name = "ceremonial claymore"
desc = "An engraved and fancy version of the claymore. It appears to be less sharp than it's more functional cousin."
force = 20
/obj/item/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
sharp = 1
w_class = WEIGHT_CLASS_NORMAL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
/obj/item/katana/cursed
slot_flags = null
/obj/item/katana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.</span>")
return BRUTELOSS
/obj/item/harpoon
name = "harpoon"
sharp = 1
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/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 = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=1150, MAT_GLASS=75)
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/shard))
var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear
if(istype(I, /obj/item/shard/plasma))
S.force_wielded = 19
S.force_unwielded = 11
S.throwforce = 21
S.icon_prefix = "spearplasma"
S.update_icon()
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(S)
to_chat(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/assembly/igniter) && !(I.flags & NODROP))
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>")
qdel(I)
qdel(src)
/obj/item/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 = WEIGHT_CLASS_SMALL
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
sharp = 1
materials = list(MAT_METAL=500, MAT_GLASS=500)
resistance_flags = FIRE_PROOF
/obj/item/spear/kidan
icon_state = "kidanspear"
name = "Kidan spear"
desc = "A one-handed spear brought over from the Kidan homeworld."
icon_state = "kidanspear"
item_state = "kidanspear"
force = 10
throwforce = 15
/obj/item/melee/baseball_bat
name = "baseball bat"
desc = "There ain't a skull in the league that can withstand a swatter."
icon = 'icons/obj/items.dmi'
icon_state = "baseball_bat"
item_state = "baseball_bat"
var/deflectmode = FALSE // deflect small/medium thrown objects
var/lastdeflect
force = 10
throwforce = 12
attack_verb = list("beat", "smacked")
w_class = WEIGHT_CLASS_HUGE
var/homerun_ready = 0
var/homerun_able = 0
/obj/item/melee/baseball_bat/homerun
name = "home run bat"
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
homerun_able = 1
/obj/item/melee/baseball_bat/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
. = ..()
if(!isitem(hitby) || attack_type != THROWN_PROJECTILE_ATTACK)
return FALSE
var/obj/item/I = hitby
if(I.w_class <= WEIGHT_CLASS_NORMAL || istype(I, /obj/item/beach_ball)) // baseball bat deflecting
if(deflectmode)
if(prob(10))
visible_message("<span class='boldwarning'>[owner] Deflects [I] directly back at the thrower! It's a home run!</span>", "<span class='boldwarning'>You deflect the [I] directly back at the thrower! It's a home run!</span>")
playsound(get_turf(owner), 'sound/weapons/homerun.ogg', 100, 1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(I.thrownby, 20, 20, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return TRUE
else if(prob(30))
visible_message("<span class='warning'>[owner] swings! And [p_they()] miss[p_es()]! How embarassing.</span>", "<span class='warning'>You swing! You miss! Oh no!</span>")
playsound(get_turf(owner), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
do_attack_animation(get_step(owner, pick(alldirs)), ATTACK_EFFECT_DISARM)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return FALSE
else
visible_message("<span class='warning'>[owner] swings and deflects [I]!</span>", "<span class='warning'>You swing and deflect the [I]!</span>")
playsound(get_turf(owner), 'sound/weapons/baseball_hit.ogg', 50, 1, -1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(get_edge_target_turf(owner, pick(cardinal)), rand(8,10), 14, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return TRUE
/obj/item/melee/baseball_bat/attack_self(mob/user)
if(!homerun_able)
if(!deflectmode && world.time >= lastdeflect)
to_chat(user, "<span class='notice'>You prepare to deflect objects thrown at you. You cannot attack during this time.</span>")
deflectmode = TRUE
else if(deflectmode && world.time >= lastdeflect)
to_chat(user, "<span class='notice'>You no longer deflect objects thrown at you. You can attack during this time</span>")
deflectmode = FALSE
else
to_chat(user, "<span class='warning'>You need to wait until you can deflect again. The ability will be ready in [time2text(lastdeflect - world.time, "m:ss")]</span>")
return ..()
if(homerun_ready)
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
return ..()
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
if(do_after(user, 90, target = user))
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
homerun_ready = 1
..()
/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user)
if(deflectmode)
to_chat(user, "<span class='warning'>You cannot attack in deflect mode!</span>")
return
. = ..()
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(homerun_ready)
user.visible_message("<span class='userdanger'>It's a home run!</span>")
target.throw_at(throw_target, rand(8,10), 14, user)
target.ex_act(2)
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
homerun_ready = 0
return
else if(!target.anchored)
target.throw_at(throw_target, rand(1,2), 7, user)
/obj/item/melee/baseball_bat/ablative
name = "metal baseball bat"
desc = "This bat is made of highly reflective, highly armored material."
icon_state = "baseball_bat_metal"
item_state = "baseball_bat_metal"
force = 12
throwforce = 15
/obj/item/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers
var/picksound = rand(1,2)
var/turf = get_turf(src)
if(picksound == 1)
playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1)
if(picksound == 2)
playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1)
return 1
/obj/item/banhammer
desc = "A banhammer"
name = "banhammer"
icon = 'icons/obj/items.dmi'
icon_state = "toyhammer"
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 7
throw_range = 15
attack_verb = list("banned")
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
/obj/item/banhammer/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.</span>")
return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS
/obj/item/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 = WEIGHT_CLASS_NORMAL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/sord/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.</span>", \
"<span class='suicide'>You try to impale yourself with [src], but it's USELESS...</span>")
return SHAME
/obj/item/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = CONDUCT
hitsound = 'sound/weapons/bladeslice.ogg'
slot_flags = SLOT_BELT
force = 40
throwforce = 10
sharp = 1
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
/obj/item/claymore/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
return BRUTELOSS
/obj/item/claymore/ceremonial
name = "ceremonial claymore"
desc = "An engraved and fancy version of the claymore. It appears to be less sharp than it's more functional cousin."
force = 20
/obj/item/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
sharp = 1
w_class = WEIGHT_CLASS_NORMAL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
/obj/item/katana/cursed
slot_flags = null
/obj/item/katana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.</span>")
return BRUTELOSS
/obj/item/harpoon
name = "harpoon"
sharp = 1
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/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 = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=1150, MAT_GLASS=75)
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/shard))
var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear
if(istype(I, /obj/item/shard/plasma))
S.force_wielded = 19
S.force_unwielded = 11
S.throwforce = 21
S.icon_prefix = "spearplasma"
S.update_icon()
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(S)
to_chat(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/assembly/igniter) && !(I.flags & NODROP))
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You fasten [I] to the top of the rod with the cable.</span>")
qdel(I)
qdel(src)
/obj/item/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 = WEIGHT_CLASS_SMALL
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
sharp = 1
materials = list(MAT_METAL=500, MAT_GLASS=500)
resistance_flags = FIRE_PROOF
/obj/item/spear/kidan
icon_state = "kidanspear"
name = "Kidan spear"
desc = "A one-handed spear brought over from the Kidan homeworld."
icon_state = "kidanspear"
item_state = "kidanspear"
force = 10
throwforce = 15
/obj/item/melee/baseball_bat
name = "baseball bat"
desc = "There ain't a skull in the league that can withstand a swatter."
icon = 'icons/obj/items.dmi'
icon_state = "baseball_bat"
item_state = "baseball_bat"
var/deflectmode = FALSE // deflect small/medium thrown objects
var/lastdeflect
force = 10
throwforce = 12
attack_verb = list("beat", "smacked")
w_class = WEIGHT_CLASS_HUGE
var/homerun_ready = 0
var/homerun_able = 0
/obj/item/melee/baseball_bat/homerun
name = "home run bat"
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
homerun_able = 1
/obj/item/melee/baseball_bat/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
. = ..()
if(!isitem(hitby) || attack_type != THROWN_PROJECTILE_ATTACK)
return FALSE
var/obj/item/I = hitby
if(I.w_class <= WEIGHT_CLASS_NORMAL || istype(I, /obj/item/beach_ball)) // baseball bat deflecting
if(deflectmode)
if(prob(10))
visible_message("<span class='boldwarning'>[owner] Deflects [I] directly back at the thrower! It's a home run!</span>", "<span class='boldwarning'>You deflect the [I] directly back at the thrower! It's a home run!</span>")
playsound(get_turf(owner), 'sound/weapons/homerun.ogg', 100, 1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(I.thrownby, 20, 20, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return TRUE
else if(prob(30))
visible_message("<span class='warning'>[owner] swings! And [p_they()] miss[p_es()]! How embarassing.</span>", "<span class='warning'>You swing! You miss! Oh no!</span>")
playsound(get_turf(owner), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
do_attack_animation(get_step(owner, pick(alldirs)), ATTACK_EFFECT_DISARM)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return FALSE
else
visible_message("<span class='warning'>[owner] swings and deflects [I]!</span>", "<span class='warning'>You swing and deflect the [I]!</span>")
playsound(get_turf(owner), 'sound/weapons/baseball_hit.ogg', 50, 1, -1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(get_edge_target_turf(owner, pick(cardinal)), rand(8,10), 14, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
return TRUE
/obj/item/melee/baseball_bat/attack_self(mob/user)
if(!homerun_able)
if(!deflectmode && world.time >= lastdeflect)
to_chat(user, "<span class='notice'>You prepare to deflect objects thrown at you. You cannot attack during this time.</span>")
deflectmode = TRUE
else if(deflectmode && world.time >= lastdeflect)
to_chat(user, "<span class='notice'>You no longer deflect objects thrown at you. You can attack during this time</span>")
deflectmode = FALSE
else
to_chat(user, "<span class='warning'>You need to wait until you can deflect again. The ability will be ready in [time2text(lastdeflect - world.time, "m:ss")]</span>")
return ..()
if(homerun_ready)
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
return ..()
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
if(do_after(user, 90, target = user))
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
homerun_ready = 1
..()
/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user)
if(deflectmode)
to_chat(user, "<span class='warning'>You cannot attack in deflect mode!</span>")
return
. = ..()
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(homerun_ready)
user.visible_message("<span class='userdanger'>It's a home run!</span>")
target.throw_at(throw_target, rand(8,10), 14, user)
target.ex_act(2)
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
homerun_ready = 0
return
else if(!target.anchored)
target.throw_at(throw_target, rand(1,2), 7, user)
/obj/item/melee/baseball_bat/ablative
name = "metal baseball bat"
desc = "This bat is made of highly reflective, highly armored material."
icon_state = "baseball_bat_metal"
item_state = "baseball_bat_metal"
force = 12
throwforce = 15
/obj/item/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers
var/picksound = rand(1,2)
var/turf = get_turf(src)
if(picksound == 1)
playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1)
if(picksound == 2)
playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1)
return 1