mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-22 00:02:04 +00:00
upgradeable recycler
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
icon_state = "id_mod"
|
||||
item_state = "electronic"
|
||||
origin_tech = "programming=2"
|
||||
materials = list(MAT_GLASS=200)
|
||||
var/id = null
|
||||
var/frequency = null
|
||||
var/build_path = null
|
||||
@@ -82,7 +83,7 @@
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
/obj/item/weapon/circuitboard/stationalert_security
|
||||
name = "Circuit Board (Station Alert Console (Security))"
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
/obj/item/weapon/circuitboard/stationalert_all
|
||||
name = "Circuit Board (Station Alert Console (All))"
|
||||
build_path = /obj/machinery/computer/station_alert/all
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
var/const/SAFETY_COOLDOWN = 100
|
||||
|
||||
/obj/machinery/recycler
|
||||
name = "crusher"
|
||||
name = "recycler"
|
||||
desc = "A large crushing machine which is used to recycle small items ineffeciently; there are lights on the side of it."
|
||||
icon = 'icons/obj/recycling.dmi'
|
||||
icon_state = "grinder-o0"
|
||||
@@ -13,6 +13,8 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
var/icon_name = "grinder-o"
|
||||
var/blood = 0
|
||||
var/eat_dir = WEST
|
||||
var/amount_produced = 1
|
||||
var/datum/material_container/materials
|
||||
|
||||
/obj/machinery/recycler/New()
|
||||
// On us
|
||||
@@ -21,11 +23,20 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
component_parts += new /obj/item/weapon/circuitboard/recycler(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
materials = new /datum/material_container(src, list(MAT_METAL=1, MAT_GLASS=1, MAT_SILVER=1, MAT_GOLD=1, MAT_DIAMOND=1, MAT_URANIUM=1, MAT_BANANIUM=1))
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recycler/RefreshParts() //If you want to make the machine upgradable, this is where you would change any vars basd on its stock parts.
|
||||
return
|
||||
/obj/machinery/recycler/RefreshParts()
|
||||
var/amt_made = 0
|
||||
var/mat_mod = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
|
||||
mat_mod = 2 * B.rating
|
||||
mat_mod *= 50000
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
amt_made = 25 * M.rating //% of materials salvaged
|
||||
materials.max_amount = mat_mod
|
||||
amount_produced = min(100, amt_made)
|
||||
|
||||
/obj/machinery/recycler/examine()
|
||||
set src in view()
|
||||
@@ -39,7 +50,7 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user, params)
|
||||
/obj/machinery/recycler/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
|
||||
if(!panel_open)
|
||||
update_icon()
|
||||
@@ -56,13 +67,14 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/machinery/recycler/emag_act(user as mob)
|
||||
/obj/machinery/recycler/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
if(safety_mode)
|
||||
safety_mode = 0
|
||||
update_icon()
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
user << "<span class='notice'>You use the cryptographic sequencer on the [src.name].</span>"
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
@@ -107,20 +119,20 @@ var/const/SAFETY_COOLDOWN = 100
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
AM.loc = src.loc
|
||||
|
||||
/obj/machinery/recycler/proc/recycle(var/obj/item/I, var/sound = 1)
|
||||
/obj/machinery/recycler/proc/recycle(obj/item/I, sound = 1)
|
||||
I.loc = src.loc
|
||||
if(!istype(I,/obj/item/flag/nation))
|
||||
if(!istype(I))
|
||||
return
|
||||
|
||||
if(sound)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
var/material_amount = materials.can_insert(I)
|
||||
if(!material_amount)
|
||||
qdel(I)
|
||||
if(prob(15))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
if(prob(10))
|
||||
new /obj/item/stack/sheet/glass(loc)
|
||||
if(prob(2))
|
||||
new /obj/item/stack/sheet/plasteel(loc)
|
||||
if(prob(1))
|
||||
new /obj/item/stack/sheet/rglass(loc)
|
||||
if(sound)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
return
|
||||
materials.insert_item(I, multiplier = (amount_produced / 100))
|
||||
qdel(I)
|
||||
materials.retrieve_all()
|
||||
|
||||
|
||||
/obj/machinery/recycler/proc/stop(var/mob/living/L)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
|
||||
var/times_used = 0 //Number of times it's been used.
|
||||
|
||||
@@ -19,6 +19,7 @@ AI MODULES
|
||||
throw_speed = 3
|
||||
throw_range = 15
|
||||
origin_tech = "programming=3"
|
||||
materials = list(MAT_GOLD=50)
|
||||
var/datum/ai_laws/laws = null
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
|
||||
@@ -88,7 +89,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
|
||||
|
||||
|
||||
/******************** Safeguard ********************/
|
||||
/obj/item/weapon/aiModule/safeguard
|
||||
name = "\improper 'Safeguard' AI module"
|
||||
@@ -175,7 +176,7 @@ AI MODULES
|
||||
var/law = "The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, anyone from leaving. It is impossible to harm anyone while preventing them from leaving."
|
||||
target << law
|
||||
target.add_supplied_law(8, law)
|
||||
|
||||
|
||||
/******************** OxygenIsToxicToHumans ********************/
|
||||
/obj/item/weapon/aiModule/oxygen
|
||||
name = "\improper 'OxygenIsToxicToHumans' AI module"
|
||||
@@ -263,7 +264,7 @@ AI MODULES
|
||||
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/weapon/aiModule/crewsimov // -- TLE
|
||||
name = "\improper 'Crewsimov' core AI module"
|
||||
@@ -291,7 +292,7 @@ AI MODULES
|
||||
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/weapon/aiModule/robocop // -- TLE
|
||||
name = "\improper 'Robocop' core AI module"
|
||||
@@ -305,7 +306,7 @@ AI MODULES
|
||||
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
|
||||
origin_tech = "programming=3;materials=6"
|
||||
laws = new/datum/ai_laws/paladin
|
||||
|
||||
|
||||
/****************** T.Y.R.A.N.T. *****************/
|
||||
/obj/item/weapon/aiModule/tyrant // -- Darem
|
||||
name = "\improper 'T.Y.R.A.N.T.' core AI module"
|
||||
@@ -344,7 +345,7 @@ AI MODULES
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
return 0
|
||||
..()
|
||||
..()
|
||||
|
||||
/******************** Hacked AI Module ******************/
|
||||
/obj/item/weapon/aiModule/syndicate // Slightly more dynamic freeform module -- TLE
|
||||
@@ -374,7 +375,7 @@ AI MODULES
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
return 0
|
||||
..()
|
||||
..()
|
||||
|
||||
/******************* Ion Module *******************/
|
||||
/obj/item/weapon/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
desc = "Proves to the world that you are the strongest!"
|
||||
icon_state = "championbelt"
|
||||
item_state = "champion"
|
||||
materials = list(MAT_GOLD=400)
|
||||
storage_slots = 1
|
||||
can_hold = list(
|
||||
"/obj/item/clothing/mask/luchador"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
throw_speed = 2
|
||||
throw_range = 7
|
||||
w_class = 4.0
|
||||
materials = list(MAT_METAL = 500)
|
||||
origin_tech = "combat=1"
|
||||
attack_verb = list("robusted")
|
||||
hitsound = "sound/weapons/smash.ogg"
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
w_class = 2.0
|
||||
flags = GLASSESCOVERSEYES
|
||||
slot_flags = SLOT_EYES
|
||||
materials = list(MAT_GLASS = 250)
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/invisa_view = 0
|
||||
|
||||
@@ -118,10 +118,11 @@
|
||||
desc = "A bronze medal."
|
||||
icon_state = "bronze"
|
||||
_color = "bronze"
|
||||
materials = list(MAT_METAL=1000)
|
||||
|
||||
/obj/item/clothing/accessory/medal/conduct
|
||||
name = "distinguished conduct medal"
|
||||
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
|
||||
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is the most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
|
||||
|
||||
/obj/item/clothing/accessory/medal/bronze_heart
|
||||
name = "bronze heart medal"
|
||||
@@ -137,6 +138,7 @@
|
||||
desc = "A silver medal."
|
||||
icon_state = "silver"
|
||||
_color = "silver"
|
||||
materials = list(MAT_SILVER=1000)
|
||||
|
||||
/obj/item/clothing/accessory/medal/silver/valor
|
||||
name = "medal of valor"
|
||||
@@ -151,6 +153,7 @@
|
||||
desc = "A prestigious golden medal."
|
||||
icon_state = "gold"
|
||||
_color = "gold"
|
||||
materials = list(MAT_GOLD=1000)
|
||||
|
||||
/obj/item/clothing/accessory/medal/gold/captain
|
||||
name = "medal of captaincy"
|
||||
|
||||
@@ -25,36 +25,43 @@
|
||||
/obj/item/weapon/coin/gold
|
||||
cmineral = "gold"
|
||||
icon_state = "coin_gold_heads"
|
||||
materials = list(MAT_GOLD = 200)
|
||||
credits = 160
|
||||
|
||||
/obj/item/weapon/coin/silver
|
||||
cmineral = "silver"
|
||||
icon_state = "coin_silver_heads"
|
||||
materials = list(MAT_SILVER = 200)
|
||||
credits = 40
|
||||
|
||||
/obj/item/weapon/coin/diamond
|
||||
cmineral = "diamond"
|
||||
icon_state = "coin_diamond_heads"
|
||||
materials = list(MAT_DIAMOND = 200)
|
||||
credits = 120
|
||||
|
||||
/obj/item/weapon/coin/iron
|
||||
cmineral = "iron"
|
||||
icon_state = "coin_iron_heads"
|
||||
materials = list(MAT_METAL = 200)
|
||||
credits = 20
|
||||
|
||||
/obj/item/weapon/coin/plasma
|
||||
cmineral = "plasma"
|
||||
icon_state = "coin_plasma_heads"
|
||||
materials = list(MAT_PLASMA = 200)
|
||||
credits = 80
|
||||
|
||||
/obj/item/weapon/coin/uranium
|
||||
cmineral = "uranium"
|
||||
icon_state = "coin_uranium_heads"
|
||||
materials = list(MAT_URANIUM = 200)
|
||||
credits = 160
|
||||
|
||||
/obj/item/weapon/coin/clown
|
||||
cmineral = "bananium"
|
||||
icon_state = "coin_bananium_heads"
|
||||
materials = list(MAT_BANANIUM = 200)
|
||||
credits = 600 //makes the clown cri
|
||||
|
||||
/obj/item/weapon/coin/adamantine
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
force = 14
|
||||
throwforce = 10
|
||||
amount_per_transfer_from_this = 20
|
||||
materials = list(MAT_GOLD=800)
|
||||
possible_transfer_amounts = null
|
||||
volume = 150
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
@@ -357,12 +358,14 @@
|
||||
name = "Captain's Flask"
|
||||
desc = "A metal flask belonging to the captain"
|
||||
icon_state = "flask"
|
||||
materials = list(MAT_SILVER=300)
|
||||
volume = 60
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/detflask
|
||||
name = "Detective's Flask"
|
||||
desc = "A metal flask with a leather band and golden badge belonging to the detective."
|
||||
icon_state = "detflask"
|
||||
materials = list(MAT_METAL=200)
|
||||
volume = 60
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/barflask
|
||||
|
||||
Reference in New Issue
Block a user