mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
committed by
CitadelStationBot
parent
c579d81f4c
commit
febcc648af
@@ -20,8 +20,10 @@
|
|||||||
|
|
||||||
/obj/machinery/recycler/Initialize()
|
/obj/machinery/recycler/Initialize()
|
||||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM))
|
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM))
|
||||||
|
AddComponent(/datum/component/butchering, 1, amount_produced,amount_produced/5)
|
||||||
. = ..()
|
. = ..()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
req_one_access = get_all_accesses() + get_all_centcom_access()
|
||||||
|
|
||||||
/obj/machinery/recycler/RefreshParts()
|
/obj/machinery/recycler/RefreshParts()
|
||||||
var/amt_made = 0
|
var/amt_made = 0
|
||||||
@@ -34,6 +36,9 @@
|
|||||||
GET_COMPONENT(materials, /datum/component/material_container)
|
GET_COMPONENT(materials, /datum/component/material_container)
|
||||||
materials.max_amount = mat_mod
|
materials.max_amount = mat_mod
|
||||||
amount_produced = min(50, amt_made) + 50
|
amount_produced = min(50, amt_made) + 50
|
||||||
|
GET_COMPONENT(butchering, /datum/component/butchering)
|
||||||
|
butchering.effectiveness = amount_produced
|
||||||
|
butchering.bonus_modifier = amount_produced/5
|
||||||
|
|
||||||
/obj/machinery/recycler/examine(mob/user)
|
/obj/machinery/recycler/examine(mob/user)
|
||||||
..()
|
..()
|
||||||
@@ -110,7 +115,7 @@
|
|||||||
if(brain_holder)
|
if(brain_holder)
|
||||||
emergency_stop(AM)
|
emergency_stop(AM)
|
||||||
else if(isliving(AM))
|
else if(isliving(AM))
|
||||||
if(obj_flags & EMAGGED)
|
if((obj_flags & EMAGGED)||((!allowed(AM))&&(!ishuman(AM))))
|
||||||
crush_living(AM)
|
crush_living(AM)
|
||||||
else
|
else
|
||||||
emergency_stop(AM)
|
emergency_stop(AM)
|
||||||
@@ -125,8 +130,17 @@
|
|||||||
playsound(src, item_recycle_sound, 50, 1)
|
playsound(src, item_recycle_sound, 50, 1)
|
||||||
|
|
||||||
/obj/machinery/recycler/proc/recycle_item(obj/item/I)
|
/obj/machinery/recycler/proc/recycle_item(obj/item/I)
|
||||||
I.forceMove(loc)
|
|
||||||
|
|
||||||
|
I.forceMove(loc)
|
||||||
|
var/obj/item/grown/log/L = I
|
||||||
|
if(istype(L))
|
||||||
|
var/seed_modifier = 0
|
||||||
|
if(L.seed)
|
||||||
|
seed_modifier = round(L.seed.potency / 25)
|
||||||
|
new L.plank_type(src.loc, 1 + seed_modifier)
|
||||||
|
qdel(L)
|
||||||
|
return
|
||||||
|
else
|
||||||
GET_COMPONENT(materials, /datum/component/material_container)
|
GET_COMPONENT(materials, /datum/component/material_container)
|
||||||
var/material_amount = materials.get_item_material_amount(I)
|
var/material_amount = materials.get_item_material_amount(I)
|
||||||
if(!material_amount)
|
if(!material_amount)
|
||||||
@@ -158,10 +172,8 @@
|
|||||||
else
|
else
|
||||||
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
||||||
|
|
||||||
var/gib = TRUE
|
|
||||||
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
|
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
|
||||||
if(iscarbon(L))
|
if(iscarbon(L))
|
||||||
gib = FALSE
|
|
||||||
if(L.stat == CONSCIOUS)
|
if(L.stat == CONSCIOUS)
|
||||||
L.say("ARRRRRRRRRRRGH!!!")
|
L.say("ARRRRRRRRRRRGH!!!")
|
||||||
add_mob_blood(L)
|
add_mob_blood(L)
|
||||||
@@ -178,12 +190,10 @@
|
|||||||
|
|
||||||
// Instantly lie down, also go unconscious from the pain, before you die.
|
// Instantly lie down, also go unconscious from the pain, before you die.
|
||||||
L.Unconscious(100)
|
L.Unconscious(100)
|
||||||
|
|
||||||
// For admin fun, var edit emagged to 2.
|
|
||||||
if(gib)
|
|
||||||
L.gib()
|
|
||||||
else if(obj_flags & EMAGGED)
|
|
||||||
L.adjustBruteLoss(crush_damage)
|
L.adjustBruteLoss(crush_damage)
|
||||||
|
if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results))
|
||||||
|
GET_COMPONENT(butchering, /datum/component/butchering)
|
||||||
|
butchering.Butcher(src,L)
|
||||||
|
|
||||||
/obj/machinery/recycler/deathtrap
|
/obj/machinery/recycler/deathtrap
|
||||||
name = "dangerous old crusher"
|
name = "dangerous old crusher"
|
||||||
|
|||||||
Reference in New Issue
Block a user