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

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
/obj/item/stack/spacecash
name = "space cash"
desc = "It's worth 1 credit."
singular_name = "bill"
icon = 'icons/obj/economy.dmi'
icon_state = "spacecash"
amount = 1
max_amount = 20
throwforce = 0
throw_speed = 2
throw_range = 2
w_class = 1
burn_state = FLAMMABLE
var/value = 1
/obj/item/stack/spacecash/c10
icon_state = "spacecash10"
desc = "It's worth 10 credits."
value = 10
/obj/item/stack/spacecash/c20
icon_state = "spacecash20"
desc = "It's worth 20 credits."
value = 20
/obj/item/stack/spacecash/c50
icon_state = "spacecash50"
desc = "It's worth 50 credits."
value = 50
/obj/item/stack/spacecash/c100
icon_state = "spacecash100"
desc = "It's worth 100 credits."
value = 100
/obj/item/stack/spacecash/c200
icon_state = "spacecash200"
desc = "It's worth 200 credits."
value = 200
/obj/item/stack/spacecash/c500
icon_state = "spacecash500"
desc = "It's worth 500 credits."
value = 500
/obj/item/stack/spacecash/c1000
icon_state = "spacecash1000"
desc = "It's worth 1000 credits."
value = 1000
+139
View File
@@ -0,0 +1,139 @@
/obj/item/stack/medical
name = "medical pack"
singular_name = "medical pack"
icon = 'icons/obj/items.dmi'
amount = 6
max_amount = 6
w_class = 1
throw_speed = 3
throw_range = 7
burn_state = FLAMMABLE
burntime = 5
var/heal_brute = 0
var/heal_burn = 0
var/stop_bleeding = 0
var/self_delay = 50
/obj/item/stack/medical/attack(mob/living/M, mob/user)
if(M.stat == 2)
var/t_him = "it"
if(M.gender == MALE)
t_him = "him"
else if(M.gender == FEMALE)
t_him = "her"
user << "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>"
return
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
user << "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>"
return 1
var/obj/item/bodypart/affecting
if(ishuman(M))
var/mob/living/carbon/human/H = M
affecting = H.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[H] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
return
if(stop_bleeding)
if(H.bleedsuppress)
user << "<span class='warning'>[H]'s bleeding is already bandaged!</span>"
return
else if(!H.bleed_rate)
user << "<span class='warning'>[H] isn't bleeding!</span>"
return
if(isliving(M))
if(!M.can_inject(user, 1))
return
if(user)
if (M != user)
if (istype(M, /mob/living/simple_animal))
var/mob/living/simple_animal/critter = M
if (!(critter.healable))
user << "<span class='notice'> You cannot use [src] on [M]!</span>"
return
else if (critter.health == critter.maxHealth)
user << "<span class='notice'> [M] is at full health.</span>"
return
else if(src.heal_brute < 1)
user << "<span class='notice'> [src] won't help [M] at all.</span>"
return
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
else
var/t_himself = "itself"
if(user.gender == MALE)
t_himself = "himself"
else if(user.gender == FEMALE)
t_himself = "herself"
user.visible_message("<span class='notice'>[user] starts to apply [src] on [t_himself]...</span>", "<span class='notice'>You begin applying [src] on yourself...</span>")
if(!do_mob(user, M, self_delay))
return
user.visible_message("<span class='green'>[user] applies [src] on [t_himself].</span>", "<span class='green'>You apply [src] on yourself.</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
affecting = H.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[H] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
return
if(stop_bleeding)
if(!H.bleedsuppress) //so you can't stack bleed suppression
H.suppress_bloodloss(stop_bleeding)
if(affecting.status == ORGAN_ORGANIC) //Limb must be organic to be healed - RR
if(affecting.heal_damage(src.heal_brute, src.heal_burn, 0))
H.update_damage_overlays(0)
M.updatehealth()
else
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
/obj/item/stack/medical/bruise_pack
name = "bruise pack"
singular_name = "bruise pack"
desc = "A theraputic gel pack and bandages designed to treat blunt-force trauma."
icon_state = "brutepack"
heal_brute = 40
origin_tech = "biotech=2"
self_delay = 20
/obj/item/stack/medical/gauze
name = "medical gauze"
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
gender = PLURAL
singular_name = "medical gauze"
icon_state = "gauze"
stop_bleeding = 1800
self_delay = 20
/obj/item/stack/medical/gauze/improvised
name = "improvised gauze"
singular_name = "improvised gauze"
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
stop_bleeding = 900
/obj/item/stack/medical/gauze/cyborg/
materials = list()
is_cyborg = 1
cost = 250
/obj/item/stack/medical/ointment
name = "ointment"
desc = "Used to treat those nasty burn wounds."
gender = PLURAL
singular_name = "ointment"
icon_state = "ointment"
heal_burn = 40
origin_tech = "biotech=2"
self_delay = 20
+75
View File
@@ -0,0 +1,75 @@
var/global/list/datum/stack_recipe/rod_recipes = list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
)
/obj/item/stack/rods
name = "metal rod"
desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod"
icon_state = "rods"
item_state = "rods"
flags = CONDUCT
w_class = 3
force = 9
throwforce = 10
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=1000)
max_amount = 50
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
/obj/item/stack/rods/New(var/loc, var/amount=null)
..()
recipes = rod_recipes
update_icon()
/obj/item/stack/rods/update_icon()
var/amount = get_amount()
if((amount <= 5) && (amount > 0))
icon_state = "rods-[amount]"
else
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
user << "<span class='warning'>You need at least two rods to do this!</span>"
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
R.use(2)
if (!R && replace)
user.put_in_hands(new_item)
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/S = W
if(amount != 1)
user << "<span class='warning'>You must use a single rod!</span>"
else if(S.w_class > 2)
user << "<span class='warning'>The ingredient is too big for [src]!</span>"
else
var/obj/item/weapon/reagent_containers/food/snacks/customizable/A = new/obj/item/weapon/reagent_containers/food/snacks/customizable/kebab(get_turf(src))
A.initialize_custom_food(src, S, user)
else
return ..()
/obj/item/stack/rods/cyborg/
materials = list()
is_cyborg = 1
cost = 250
/obj/item/stack/rods/cyborg/update_icon()
return
@@ -0,0 +1,362 @@
/* Glass stack types
* Contains:
* Glass sheets
* Reinforced glass sheets
* Glass shards - TODO: Move this into code/game/object/item/weapons
*/
/*
* Glass sheets
*/
/obj/item/stack/sheet/glass
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
origin_tech = "materials=1"
/obj/item/stack/sheet/glass/cyborg
materials = list()
is_cyborg = 1
cost = 500
/obj/item/stack/sheet/glass/fifty
amount = 50
/obj/item/stack/sheet/glass/attack_self(mob/user)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if (get_amount() < 1 || CC.get_amount() < 5)
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>"
return
CC.use(5)
use(1)
user << "<span class='notice'>You attach wire to the [name].</span>"
var/obj/item/stack/light_w/new_tile = new(user.loc)
new_tile.add_fingerprint(user)
else if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/rods/V = W
if (V.get_amount() >= 1 && src.get_amount() >= 1)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
var/obj/item/stack/sheet/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
V.use(1)
G.use(1)
if (!G && replace)
user.put_in_hands(RG)
else
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>"
return
else
return ..()
/obj/item/stack/sheet/glass/proc/construct_window(mob/user)
if(!user || !src)
return 0
if(!istype(user.loc,/turf))
return 0
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 0
if(zero_amount())
return 0
var/title = "Sheet-Glass"
title += " ([src.get_amount()] sheet\s left)"
switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
if("One Direction")
if(!src)
return 1
if(src.loc != user)
return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
user << "<span class='warning'>There are too many windows in this location.</span>"
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "<span class='danger'>Can't let you do that.</span>"
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window( user.loc, 0 )
W.setDir(dir_to_set)
W.ini_dir = W.dir
W.anchored = 0
W.air_update_turf(1)
src.use(1)
W.add_fingerprint(user)
if("Full Window")
if(!src)
return 1
if(src.loc != user)
return 1
if(src.get_amount() < 2)
user << "<span class='warning'>You need more glass to do that!</span>"
return 1
if(locate(/obj/structure/window) in user.loc)
user << "<span class='warning'>There is a window in the way!</span>"
return 1
var/obj/structure/window/W
W = new /obj/structure/window/fulltile( user.loc, 0 )
W.anchored = 0
W.air_update_turf(1)
W.add_fingerprint(user)
src.use(2)
return 0
/*
* Reinforced glass sheets
*/
/obj/item/stack/sheet/rglass
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
origin_tech = "materials=2"
/obj/item/stack/sheet/rglass/cyborg
materials = list()
var/datum/robot_energy_storage/metsource
var/datum/robot_energy_storage/glasource
var/metcost = 250
var/glacost = 500
/obj/item/stack/sheet/rglass/cyborg/get_amount()
return min(round(metsource.energy / metcost), round(glasource.energy / glacost))
/obj/item/stack/sheet/rglass/cyborg/use(amount) // Requires special checks, because it uses two storages
metsource.use_charge(amount * metcost)
glasource.use_charge(amount * glacost)
return
/obj/item/stack/sheet/rglass/cyborg/add(amount)
metsource.add_charge(amount * metcost)
glasource.add_charge(amount * glacost)
return
/obj/item/stack/sheet/rglass/attack_self(mob/user)
construct_window(user)
/obj/item/stack/sheet/rglass/proc/construct_window(mob/user)
if(!user || !src)
return 0
if(!istype(user.loc,/turf))
return 0
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 0
var/title = "Sheet Reinf. Glass"
title += " ([src.get_amount()] sheet\s left)"
switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel"))
if("One Direction")
if(!src)
return 1
if(src.loc != user)
return 1
var/list/directions = new/list(cardinal)
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
if(i >= 4)
user << "<span class='danger'>There are too many windows in this location.</span>"
return 1
directions-=win.dir
if(!(win.ini_dir in cardinal))
user << "<span class='danger'>Can't let you do that.</span>"
return 1
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
var/dir_to_set = 2
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
var/found = 0
for(var/obj/structure/window/WT in user.loc)
if(WT.dir == direction)
found = 1
if(!found)
dir_to_set = direction
break
var/obj/structure/window/W
W = new /obj/structure/window/reinforced( user.loc, 1 )
W.state = 0
W.setDir(dir_to_set)
W.ini_dir = W.dir
W.anchored = 0
W.add_fingerprint(user)
src.use(1)
if("Full Window")
if(!src)
return 1
if(src.loc != user)
return 1
if(src.get_amount() < 2)
user << "<span class='warning'>You need more glass to do that!</span>"
return 1
if(locate(/obj/structure/window) in user.loc)
user << "<span class='warning'>There is a window in the way!</span>"
return 1
var/obj/structure/window/W
W = new /obj/structure/window/reinforced/fulltile(user.loc, 1)
W.state = 0
W.anchored = 0
W.add_fingerprint(user)
src.use(2)
if("Windoor")
if(!src || src.loc != user || !isturf(user.loc))
return 1
for(var/obj/structure/windoor_assembly/WA in user.loc)
if(WA.dir == user.dir)
user << "<span class='warning'>There is already a windoor assembly in that location!</span>"
return 1
for(var/obj/machinery/door/window/W in user.loc)
if(W.dir == user.dir)
user << "<span class='warning'>There is already a windoor in that location!</span>"
return 1
if(src.get_amount() < 5)
user << "<span class='warning'>You need more glass to do that!</span>"
return 1
var/obj/structure/windoor_assembly/WD = new(user.loc)
WD.state = "01"
WD.anchored = 0
WD.add_fingerprint(user)
src.use(5)
switch(user.dir)
if(SOUTH)
WD.setDir(SOUTH)
WD.ini_dir = SOUTH
if(EAST)
WD.setDir(EAST)
WD.ini_dir = EAST
if(WEST)
WD.setDir(WEST)
WD.ini_dir = WEST
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
WD.setDir(NORTH)
WD.ini_dir = NORTH
else
return 1
return 0
/obj/item/weapon/shard
name = "shard"
desc = "A nasty looking shard of glass."
icon = 'icons/obj/shards.dmi'
icon_state = "large"
w_class = 1
force = 5
throwforce = 10
item_state = "shard-glass"
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
attack_verb = list("stabbed", "slashed", "sliced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
var/cooldown = 0
sharpness = IS_SHARP
/obj/item/weapon/shard/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting \his wrists with the shard of glass! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting \his throat with the shard of glass! It looks like \he's trying to commit suicide.</span>"))
return (BRUTELOSS)
/obj/item/weapon/shard/New()
icon_state = pick("large", "medium", "small")
switch(icon_state)
if("small")
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
if("medium")
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
if("large")
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity || !(src in user))
return
if(isturf(A))
return
if(istype(A, /obj/item/weapon/storage))
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.specflags)) // golems, etc
H << "<span class='warning'>[src] cuts into your hand!</span>"
var/organ = (H.hand ? "l_" : "r_") + "arm"
var/obj/item/bodypart/affecting = H.get_bodypart(organ)
if(affecting && affecting.take_damage(force / 2))
H.update_damage_overlays(0)
else if(ismonkey(user))
var/mob/living/carbon/monkey/M = user
M << "<span class='warning'>[src] cuts into your hand!</span>"
M.adjustBruteLoss(force / 2)
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for(var/obj/item/stack/sheet/glass/G in user.loc)
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
qdel(src)
else
return ..()
/obj/item/weapon/shard/Crossed(mob/AM)
if(istype(AM) && has_gravity(loc))
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(PIERCEIMMUNE in H.dna.species.specflags)
return
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O))
return
if(!H.shoes)
H.apply_damage(5, BRUTE, picked_def_zone)
H.Weaken(3)
if(cooldown < world.time - 10) //cooldown to avoid message spam.
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
"<span class='userdanger'>You step in the broken glass!</span>")
cooldown = world.time
@@ -0,0 +1,210 @@
/obj/item/stack/sheet/animalhide
name = "hide"
desc = "Something went wrong."
origin_tech = "biotech=3"
/obj/item/stack/sheet/animalhide/human
name = "human skin"
desc = "The by-product of human farming."
singular_name = "human skin piece"
icon_state = "sheet-hide"
var/global/list/datum/stack_recipe/human_recipes = list( \
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/human/New(var/loc, var/amount=null)
recipes = human_recipes
return ..()
/obj/item/stack/sheet/animalhide/generic
name = "generic skin"
desc = "A piece of generic skin."
singular_name = "generic skin piece"
icon_state = "sheet-hide"
/obj/item/stack/sheet/animalhide/corgi
name = "corgi hide"
desc = "The by-product of corgi farming."
singular_name = "corgi hide piece"
icon_state = "sheet-corgi"
var/global/list/datum/stack_recipe/corgi_recipes = list ( \
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/corgi/New(var/loc, var/amount=null)
recipes = corgi_recipes
return ..()
/obj/item/stack/sheet/animalhide/cat
name = "cat hide"
desc = "The by-product of cat farming."
singular_name = "cat hide piece"
icon_state = "sheet-cat"
/obj/item/stack/sheet/animalhide/monkey
name = "monkey hide"
desc = "The by-product of monkey farming."
singular_name = "monkey hide piece"
icon_state = "sheet-monkey"
var/global/list/datum/stack_recipe/monkey_recipes = list ( \
new/datum/stack_recipe("monkey mask", /obj/item/clothing/mask/gas/monkeymask, 1, on_floor = 1), \
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/monkey/New(var/loc, var/amount=null)
recipes = monkey_recipes
return ..()
/obj/item/stack/sheet/animalhide/lizard
name = "lizard skin"
desc = "Sssssss..."
singular_name = "lizard skin piece"
icon_state = "sheet-lizard"
/obj/item/stack/sheet/animalhide/xeno
name = "alien hide"
desc = "The skin of a terrible creature."
singular_name = "alien hide piece"
icon_state = "sheet-xeno"
var/global/list/datum/stack_recipe/xeno_recipes = list ( \
new/datum/stack_recipe("alien helmet", /obj/item/clothing/head/xenos, 1, on_floor = 1), \
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/xeno/New(var/loc, var/amount=null)
recipes = xeno_recipes
return ..()
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
/obj/item/stack/sheet/xenochitin
name = "alien chitin"
desc = "A piece of the hide of a terrible creature."
singular_name = "alien hide piece"
icon = 'icons/mob/alien.dmi'
icon_state = "chitin"
origin_tech = null
/obj/item/xenos_claw
name = "alien claw"
desc = "The claw of a terrible creature."
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
origin_tech = null
/obj/item/weed_extract
name = "weed extract"
desc = "A piece of slimy, purplish weed."
icon = 'icons/mob/alien.dmi'
icon_state = "weed_extract"
origin_tech = null
/obj/item/stack/sheet/hairlesshide
name = "hairless hide"
desc = "This hide was stripped of it's hair, but still needs tanning."
singular_name = "hairless hide piece"
icon_state = "sheet-hairlesshide"
origin_tech = null
/obj/item/stack/sheet/wetleather
name = "wet leather"
desc = "This leather has been cleaned but still needs to be dried."
singular_name = "wet leather piece"
icon_state = "sheet-wetleather"
origin_tech = null
var/wetness = 30 //Reduced when exposed to high temperautres
var/drying_threshold_temperature = 500 //Kelvin to start drying
/obj/item/stack/sheet/leather
name = "leather"
desc = "The by-product of mob grinding."
singular_name = "leather piece"
icon_state = "sheet-leather"
origin_tech = "materials=2"
/obj/item/stack/sheet/sinew
name = "watcher sinew"
icon = 'icons/obj/mining.dmi'
desc = "Long stringy filaments which presumably came from a watcher's wings."
singular_name = "watcher sinew"
icon_state = "sinew"
origin_tech = "biotech=4"
var/global/list/datum/stack_recipe/sinew_recipes = list ( \
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
)
/obj/item/stack/sheet/sinew/New(var/loc, var/amount=null)
recipes = sinew_recipes
return ..()
/*
* Plates
*/
/obj/item/stack/sheet/animalhide/goliath_hide
name = "goliath hide plates"
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
icon = 'icons/obj/mining.dmi'
icon_state = "goliath_hide"
singular_name = "hide plate"
flags = NOBLUDGEON
w_class = 3
layer = MOB_LAYER
/obj/item/stack/sheet/animalhide/ashdrake
name = "ash drake hide"
desc = "The strong, scaled hide of an ash drake."
icon = 'icons/obj/mining.dmi'
icon_state = "dragon_hide"
singular_name = "drake plate"
flags = NOBLUDGEON
w_class = 3
layer = MOB_LAYER
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W, mob/user, params)
if(is_sharp(W))
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
if(do_after(user,50, target = src))
user << "<span class='notice'>You cut the hair from this [src.singular_name].</span>"
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in user.loc)
if(HS.amount < 50)
HS.amount++
use(1)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/hairlesshide/HS = new(user.loc)
HS.amount = 1
use(1)
else
return ..()
//Step two - washing..... it's actually in washing machine code.
//Step three - drying
/obj/item/stack/sheet/wetleather/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature >= drying_threshold_temperature)
wetness--
if(wetness == 0)
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/leather/HS in src.loc)
if(HS.amount < 50)
HS.amount++
src.use(1)
wetness = initial(wetness)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/leather/HS = new(src.loc)
HS.amount = 1
wetness = initial(wetness)
src.use(1)
@@ -0,0 +1,38 @@
/obj/item/stack/light_w
name = "wired glass tile"
singular_name = "wired glass floor tile"
desc = "A glass tile, which is wired, somehow."
icon = 'icons/obj/tiles.dmi'
icon_state = "glass_wire"
w_class = 3
force = 3
throwforce = 5
throw_speed = 3
throw_range = 7
flags = CONDUCT
max_amount = 60
/obj/item/stack/light_w/attackby(obj/item/O, mob/user, params)
if(istype(O,/obj/item/weapon/wirecutters))
var/obj/item/stack/cable_coil/CC = new (user.loc)
CC.amount = 5
CC.add_fingerprint(user)
amount--
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
if(amount <= 0)
user.unEquip(src, 1)
qdel(src)
else if(istype(O, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if (M.use(1))
use(1)
var/obj/item/stack/tile/light/L = new (user.loc)
user << "<span class='notice'>You make a light tile.</span>"
L.add_fingerprint(user)
else
user << "<span class='warning'>You need one metal sheet to finish the light tile!</span>"
else
return ..()
@@ -0,0 +1,320 @@
/*
Mineral Sheets
Contains:
- Sandstone
- Sandbags
- Diamond
- Snow
- Uranium
- Plasma
- Gold
- Silver
- Clown
Others:
- Adamantine
- Mythril
- Enriched Uranium
- Abductor
*/
/obj/item/stack/sheet/mineral
icon = 'icons/obj/mining.dmi'
/*
* Sandstone
*/
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Assistant Statue", /obj/structure/statue/sandstone/assistant, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Breakdown into sand", /obj/item/weapon/ore/glass, 1, one_per_turf = 0, on_floor = 1), \
/* new/datum/stack_recipe("sandstone wall", ???), \
new/datum/stack_recipe("sandstone floor", ???),\ */
)
/obj/item/stack/sheet/mineral/sandstone
name = "sandstone brick"
desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
throw_speed = 3
throw_range = 5
origin_tech = "materials=1"
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
sheettype = "sandstone"
/obj/item/stack/sheet/mineral/sandstone/New(var/loc, var/amount=null)
recipes = sandstone_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/obj/item/stack/sheet/mineral/sandstone/thirty
amount = 30
/*
* Sandbags
*/
/obj/item/stack/sheet/mineral/sandbags
name = "sandbags"
icon = 'icons/obj/items.dmi'
icon_state = "sandbags"
singular_name = "sandbag"
layer = LOW_ITEM_LAYER
origin_tech = "materials=2"
var/global/list/datum/stack_recipe/sandbag_recipes = list ( \
new/datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, time = 25, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/sandbags/New(var/loc, var/amount=null)
recipes = sandbag_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Diamond
*/
/obj/item/stack/sheet/mineral/diamond
name = "diamond"
icon_state = "sheet-diamond"
singular_name = "diamond"
origin_tech = "materials=6"
sheettype = "diamond"
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("diamond tile", /obj/item/stack/tile/mineral/diamond, 1, 4, 20), \
new/datum/stack_recipe("Captain Statue", /obj/structure/statue/diamond/captain, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Hologram Statue", /obj/structure/statue/diamond/ai1, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/diamond/New(var/loc, var/amount=null)
recipes = diamond_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Uranium
*/
/obj/item/stack/sheet/mineral/uranium
name = "uranium"
icon_state = "sheet-uranium"
singular_name = "uranium sheet"
origin_tech = "materials=5"
sheettype = "uranium"
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("uranium tile", /obj/item/stack/tile/mineral/uranium, 1, 4, 20), \
new/datum/stack_recipe("Nuke Statue", /obj/structure/statue/uranium/nuke, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Engineer Statue", /obj/structure/statue/uranium/eng, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/uranium/New(var/loc, var/amount=null)
recipes = uranium_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Plasma
*/
/obj/item/stack/sheet/mineral/plasma
name = "solid plasma"
icon_state = "sheet-plasma"
singular_name = "plasma sheet"
origin_tech = "plasmatech=2;materials=2"
sheettype = "plasma"
burn_state = FLAMMABLE
burntime = 5
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/plasma_recipes = list ( \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plasma tile", /obj/item/stack/tile/mineral/plasma, 1, 4, 20), \
new/datum/stack_recipe("Scientist Statue", /obj/structure/statue/plasma/scientist, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/plasma/New(var/loc, var/amount=null)
recipes = plasma_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma sheets ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
fire_act()
else
return ..()
/obj/item/stack/sheet/mineral/plasma/fire_act()
atmos_spawn_air("plasma=[amount*10];TEMP=1000")
qdel(src)
/*
* Gold
*/
/obj/item/stack/sheet/mineral/gold
name = "gold"
icon_state = "sheet-gold"
singular_name = "gold bar"
origin_tech = "materials=4"
sheettype = "gold"
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("gold tile", /obj/item/stack/tile/mineral/gold, 1, 4, 20), \
new/datum/stack_recipe("HoS Statue", /obj/structure/statue/gold/hos, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("HoP Statue", /obj/structure/statue/gold/hop, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("CE Statue", /obj/structure/statue/gold/ce, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("RD Statue", /obj/structure/statue/gold/rd, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("CMO Statue", /obj/structure/statue/gold/cmo, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/gold/New(var/loc, var/amount=null)
recipes = gold_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Silver
*/
/obj/item/stack/sheet/mineral/silver
name = "silver"
icon_state = "sheet-silver"
singular_name = "silver bar"
origin_tech = "materials=4"
sheettype = "silver"
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("silver tile", /obj/item/stack/tile/mineral/silver, 1, 4, 20), \
new/datum/stack_recipe("Med Officer Statue", /obj/structure/statue/silver/md, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Janitor Statue", /obj/structure/statue/silver/janitor, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Sec Officer Statue", /obj/structure/statue/silver/sec, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Sec Borg Statue", /obj/structure/statue/silver/secborg, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Med Borg Statue", /obj/structure/statue/silver/medborg, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/silver/New(var/loc, var/amount=null)
recipes = silver_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Clown
*/
/obj/item/stack/sheet/mineral/bananium
name = "bananium"
icon_state = "sheet-clown"
singular_name = "bananium sheet"
origin_tech = "materials=4"
sheettype = "clown"
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
var/global/list/datum/stack_recipe/clown_recipes = list ( \
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/bananium/New(var/loc, var/amount=null)
recipes = clown_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/*
* Snow
*/
/obj/item/stack/sheet/mineral/snow
name = "snow"
icon_state = "sheet-snow"
singular_name = "snow block"
force = 1
throwforce = 2
origin_tech = "materials=1"
sheettype = "snow"
var/global/list/datum/stack_recipe/snow_recipes = list ( \
new/datum/stack_recipe("Snow Wall",/turf/closed/wall/mineral/snow, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Snowman", /obj/structure/statue/snow/snowman, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Snowball", /obj/item/toy/snowball, 1), \
)
/obj/item/stack/sheet/mineral/snow/New(var/loc, var/amount=null)
recipes = snow_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
..()
/****************************** Others ****************************/
/*
* Enriched Uranium
*/
/obj/item/stack/sheet/mineral/enruranium
name = "enriched uranium"
icon_state = "sheet-enruranium"
singular_name = "enriched uranium sheet"
origin_tech = "materials=6"
materials = list(MAT_URANIUM=3000)
/*
* Adamantine
*/
/obj/item/stack/sheet/mineral/adamantine
name = "adamantine"
icon_state = "sheet-adamantine"
singular_name = "adamantine sheet"
origin_tech = "materials=4"
/*
* Mythril
*/
/obj/item/stack/sheet/mineral/mythril
name = "mythril"
icon_state = "sheet-mythril"
singular_name = "mythril sheet"
origin_tech = "materials=4"
/*
* Alien Alloy
*/
/obj/item/stack/sheet/mineral/abductor
name = "alien alloy"
icon = 'icons/obj/abductor.dmi'
icon_state = "sheet-abductor"
singular_name = "alien alloy sheet"
origin_tech = "materials=6;abductor=1"
sheettype = "abductor"
var/global/list/datum/stack_recipe/abductor_recipes = list ( \
/* new/datum/stack_recipe("alien chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien locker", /obj/structure/closet/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien table frame", /obj/structure/table_frame/abductor, 1, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("alien airlock assembly", /obj/structure/door_assembly/door_assembly_abductor, 4, time = 20, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("alien floor tile", /obj/item/stack/tile/mineral/abductor, 1, 4, 20), \
/* null, \
new/datum/stack_recipe("Abductor Agent Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("Abductor Sciencist Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1)*/
)
/obj/item/stack/sheet/mineral/abductor/New(var/loc, var/amount=null)
recipes = abductor_recipes
..()
@@ -0,0 +1,290 @@
/* Diffrent misc types of sheets
* Contains:
* Metal
* Plasteel
* Wood
* Cloth
* Cardboard
* Runed Metal (cult)
*/
/*
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("swivel chair", /obj/structure/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 40, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/frame/computer, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/structure/frame/machine, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \*/
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/wallframe/light_fixture/small, 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/wallframe/apc, 2), \
new/datum/stack_recipe("air alarm frame", /obj/item/wallframe/airalarm, 2), \
new/datum/stack_recipe("fire alarm frame", /obj/item/wallframe/firealarm, 2), \
new/datum/stack_recipe("extinguisher cabinet frame", /obj/item/wallframe/extinguisher_cabinet, 2), \
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
null, \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/metal
name = "metal"
desc = "Sheets made out of metal."
singular_name = "metal sheet"
icon_state = "sheet-metal"
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
throwforce = 10
flags = CONDUCT
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/narsie_act()
if(prob(20))
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/sheet/metal/fifty
amount = 50
/obj/item/stack/sheet/metal/five
amount = 5
/obj/item/stack/sheet/metal/cyborg
materials = list()
is_cyborg = 1
cost = 500
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
return ..()
/*
* Plasteel
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50), \
)
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
desc = "This sheet is an alloy of iron and plasma."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
materials = list(MAT_METAL=6000, MAT_PLASMA=6000)
throwforce = 10
flags = CONDUCT
origin_tech = "materials=2"
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
/obj/item/stack/sheet/plasteel/twenty
amount = 20
/obj/item/stack/sheet/plasteel/fifty
amount = 50
/*
* Wood
*/
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40), \
new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = 1, on_floor = 1),\
)
/obj/item/stack/sheet/mineral/wood
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
icon = 'icons/obj/items.dmi'
origin_tech = "materials=1;biotech=1"
sheettype = "wood"
burn_state = FLAMMABLE
/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
/obj/item/stack/sheet/mineral/wood/fifty
amount = 50
/*
* Cloth
*/
var/global/list/datum/stack_recipe/cloth_recipes = list ( \
new/datum/stack_recipe("grey jumpsuit", /obj/item/clothing/under/color/grey, 3), \
null, \
new/datum/stack_recipe("backpack", /obj/item/weapon/storage/backpack, 4), \
new/datum/stack_recipe("dufflebag", /obj/item/weapon/storage/backpack/dufflebag, 6), \
null, \
new/datum/stack_recipe("plant bag", /obj/item/weapon/storage/bag/plants, 4), \
new/datum/stack_recipe("book bag", /obj/item/weapon/storage/bag/books, 4), \
new/datum/stack_recipe("mining satchel", /obj/item/weapon/storage/bag/ore, 4), \
new/datum/stack_recipe("chemistry bag", /obj/item/weapon/storage/bag/chemistry, 4), \
new/datum/stack_recipe("bio bag", /obj/item/weapon/storage/bag/bio, 4), \
null, \
new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 6), \
new/datum/stack_recipe("rag", /obj/item/weapon/reagent_containers/glass/rag, 1), \
new/datum/stack_recipe("black shoes", /obj/item/clothing/shoes/sneakers/black, 2), \
new/datum/stack_recipe("bedsheet", /obj/item/weapon/bedsheet, 3), \
new/datum/stack_recipe("empty sandbag", /obj/item/weapon/emptysandbag, 4), \
)
/obj/item/stack/sheet/cloth
name = "cloth"
desc = "Is it cotton? Linen? Denim? Burlap? Canvas? You can't tell."
singular_name = "cloth roll"
icon_state = "sheet-cloth"
origin_tech = "materials=2"
burn_state = FLAMMABLE
force = 0
throwforce = 0
/obj/item/stack/sheet/cloth/New(var/loc, var/amount=null)
recipes = cloth_recipes
return ..()
/obj/item/stack/sheet/cloth/ten
amount = 10
/*
* Cardboard
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
new/datum/stack_recipe("folder", /obj/item/weapon/folder), \
new/datum/stack_recipe("large box", /obj/structure/closet/cardboard, 4), \
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5), \
)
/obj/item/stack/sheet/cardboard //BubbleWrap //it's cardboard you fuck
name = "cardboard"
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
origin_tech = "materials=1"
burn_state = FLAMMABLE
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
return ..()
/obj/item/stack/sheet/cardboard/fifty
amount = 50
/*
* Runed Metal
*/
var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 3, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("pylon", /obj/structure/cult/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("forge", /obj/structure/cult/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("archives", /obj/structure/cult/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("altar", /obj/structure/cult/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/runed_metal
name = "runed metal"
desc = "Sheets of cold metal with shifting inscriptions writ upon them."
singular_name = "runed metal"
icon_state = "sheet-runed"
icon = 'icons/obj/items.dmi'
sheettype = "runed"
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
if(!iscultist(user))
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
return
return ..()
/obj/item/stack/sheet/runed_metal/attack(atom/target, mob/living/user)
if(!iscultist(user))
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
return
..()
/obj/item/stack/sheet/runed_metal/fifty
amount = 50
/obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null)
recipes = runed_metal_recipes
return ..()
/obj/item/stack/sheet/lessergem
name = "lesser gems"
desc = "Rare kind of gems which are only gained by blood sacrifice to minor deities. They are needed in crafting powerful objects."
singular_name = "lesser gem"
icon_state = "sheet-lessergem"
origin_tech = "materials=4"
/obj/item/stack/sheet/greatergem
name = "greater gems"
desc = "Rare kind of gems which are only gained by blood sacrifice to minor deities. They are needed in crafting powerful objects."
singular_name = "greater gem"
icon_state = "sheet-greatergem"
origin_tech = "materials=7"
/*
* Bones
*/
/obj/item/stack/sheet/bone
name = "bones"
icon = 'icons/obj/mining.dmi'
icon_state = "bone"
singular_name = "bone"
desc = "Someone's been drinking their milk."
force = 7
throwforce = 5
w_class = 3
throw_speed = 1
throw_range = 3
origin_tech = "materials=2;biotech=2"
@@ -0,0 +1,11 @@
/obj/item/stack/sheet
name = "sheet"
w_class = 3
force = 5
throwforce = 5
max_amount = 50
throw_speed = 1
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = MINERAL_MATERIAL_AMOUNT
var/sheettype = null //this is used for girders in the creation of walls/false walls
+277
View File
@@ -0,0 +1,277 @@
/* Stack type objects!
* Contains:
* Stacks
* Recipe datum
*/
/*
* Stacks
*/
/obj/item/stack
origin_tech = "materials=1"
gender = PLURAL
var/list/datum/stack_recipe/recipes
var/singular_name
var/amount = 1
var/max_amount = 50 //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/is_cyborg = 0 // It's 1 if module is used by a cyborg, and uses its storage
var/datum/robot_energy_storage/source
var/cost = 1 // How much energy from storage it costs
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
/obj/item/stack/New(var/loc, var/amount=null)
..()
if (amount)
src.amount = amount
if(!merge_type)
merge_type = src.type
return
/obj/item/stack/Destroy()
if (usr && usr.machine==src)
usr << browse(null, "window=stack")
return ..()
/obj/item/stack/examine(mob/user)
..()
if (is_cyborg)
if(src.singular_name)
user << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
else
user << "There is enough energy for [src.get_amount()]."
return
if(src.singular_name)
if(src.get_amount()>1)
user << "There are [src.get_amount()] [src.singular_name]\s in the stack."
else
user << "There is [src.get_amount()] [src.singular_name] in the stack."
else if(src.get_amount()>1)
user << "There are [src.get_amount()] in the stack."
else
user << "There is [src.get_amount()] in the stack."
/obj/item/stack/proc/get_amount()
if (is_cyborg)
return round(source.energy / cost)
else
return (amount)
/obj/item/stack/attack_self(mob/user)
interact(user)
/obj/item/stack/interact(mob/user)
if (!recipes)
return
if (!src || get_amount() <= 0)
user << browse(null, "window=stack")
return
user.set_machine(src) //for correct work of onclose
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
for(var/i=1;i<=recipes.len,i++)
var/datum/stack_recipe/R = recipes[i]
if (isnull(R))
t1 += "<hr>"
continue
if (i>1 && !isnull(recipes[i-1]))
t1+="<br>"
var/max_multiplier = round(src.get_amount() / R.req_amount)
var/title as text
var/can_build = 1
can_build = can_build && (max_multiplier>0)
/*
if (R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if (R.on_floor)
can_build = can_build && istype(usr.loc, /turf/open/floor)
*/
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
title+= "[R.title]"
title+= " ([R.req_amount] [src.singular_name]\s)"
if (can_build)
t1 += text("<A href='?src=\ref[];make=[];multiplier=1'>[]</A> ", src, i, title)
else
t1 += text("[]", title)
continue
if (R.max_res_amount>1 && max_multiplier>1)
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for (var/n in multipliers)
if (max_multiplier>=n)
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
if (!(max_multiplier in multipliers))
t1 += " <A href='?src=\ref[src];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
t1 += "</TT></body></HTML>"
user << browse(t1, "window=stack")
onclose(user, "stack")
return
/obj/item/stack/Topic(href, href_list)
..()
if ((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
if (href_list["make"])
if (src.get_amount() < 1) qdel(src) //Never should happen
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier ||(multiplier <= 0)) //href protection
return
if(!building_checks(R, multiplier))
return
if (R.time)
usr.visible_message("<span class='notice'>[usr] starts building [R.title].</span>", "<span class='notice'>You start building [R.title]...</span>")
if (!do_after(usr, R.time, target = usr))
return
if(!building_checks(R, multiplier))
return
var/atom/O = new R.result_type( usr.loc )
O.setDir(usr.dir)
use(R.req_amount * multiplier)
//is it a stack ?
if (R.max_res_amount > 1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount*multiplier
if(new_item.amount <= 0)//if the stack is empty, i.e it has been merged with an existing stack and has been garbage collected
return
if (istype(O,/obj/item))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if ( istype(O, /obj/item/weapon/storage) )
for (var/obj/item/I in O)
qdel(I)
//BubbleWrap END
if (src && usr.machine==src) //do not reopen closed window
spawn( 0 )
src.interact(usr)
return
return
/obj/item/stack/proc/building_checks(datum/stack_recipe/R, multiplier)
if (src.get_amount() < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>"
else
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>"
return 0
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "<span class='warning'>There is another [R.title] here!</span>"
return 0
if (R.on_floor && !istype(usr.loc, /turf/open/floor))
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
return 0
return 1
/obj/item/stack/proc/use(var/used) // return 0 = borked; return 1 = had enough
if(zero_amount())
return 0
if (is_cyborg)
return source.use_charge(used * cost)
if (amount < used)
return 0
amount -= used
zero_amount()
update_icon()
return 1
/obj/item/stack/proc/zero_amount()
if(is_cyborg)
return source.energy < cost
if(amount < 1)
qdel(src)
return 1
return 0
/obj/item/stack/proc/add(amount)
if (is_cyborg)
source.add_charge(amount * cost)
else
src.amount += amount
update_icon()
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
var/transfer = get_amount()
if(S.is_cyborg)
transfer = min(transfer, round((S.source.max_energy - S.source.energy) / S.cost))
else
transfer = min(transfer, S.max_amount - S.amount)
if(pulledby)
pulledby.start_pulling(S)
S.copy_evidences(src)
use(transfer)
S.add(transfer)
/obj/item/stack/Crossed(obj/o)
if(istype(o, merge_type) && !o.throwing)
merge(o)
return ..()
/obj/item/stack/hitby(atom/movable/AM, skip, hitpush)
if(istype(AM, merge_type))
merge(AM)
return ..()
/obj/item/stack/attack_hand(mob/user)
if (user.get_inactive_hand() == src)
if(zero_amount())
return
var/obj/item/stack/F = new src.type(user, 1)
. = F
F.copy_evidences(src)
user.put_in_hands(F)
src.add_fingerprint(user)
F.add_fingerprint(user)
use(1)
if (src && usr.machine==src)
spawn(0) src.interact(usr)
else
..()
return
/obj/item/stack/attackby(obj/item/W, mob/user, params)
if(istype(W, merge_type))
var/obj/item/stack/S = W
merge(S)
user << "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>"
else
return ..()
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
src.blood_DNA = from.blood_DNA
src.fingerprints = from.fingerprints
src.fingerprintshidden = from.fingerprintshidden
src.fingerprintslast = from.fingerprintslast
//TODO bloody overlay
/*
* Recipe datum
*/
/datum/stack_recipe
var/title = "ERROR"
var/result_type
var/req_amount = 1
var/res_amount = 1
var/max_res_amount = 1
var/time = 0
var/one_per_turf = 0
var/on_floor = 0
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
src.res_amount = res_amount
src.max_res_amount = max_res_amount
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
@@ -0,0 +1,31 @@
/obj/item/stack/tile/light
name = "light tile"
singular_name = "light floor tile"
desc = "A floor tile, made out of glass. It produces light."
icon_state = "tile_e"
flags = CONDUCT
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
turf_type = /turf/open/floor/light
var/state = 0
/obj/item/stack/tile/light/New(var/loc, var/amount=null)
..()
if(prob(5))
state = 3 //broken
else if(prob(5))
state = 2 //breaking
else if(prob(10))
state = 1 //flickering occasionally
else
state = 0 //fine
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, params)
if(istype(O,/obj/item/weapon/crowbar))
new/obj/item/stack/sheet/metal(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)
user.unEquip(src, 1)
qdel(src)
else
return ..()
@@ -0,0 +1,65 @@
/obj/item/stack/tile/mineral/plasma
name = "plasma tile"
singular_name = "plasma floor tile"
desc = "A tile made out of highly flammable plasma. This can only end well."
icon_state = "tile_plasma"
origin_tech = "plasmatech=1"
turf_type = /turf/open/floor/mineral/plasma
mineralType = "plasma"
materials = list(MAT_PLASMA=500)
/obj/item/stack/tile/mineral/uranium
name = "uranium tile"
singular_name = "uranium floor tile"
desc = "A tile made out of uranium. You feel a bit woozy."
icon_state = "tile_uranium"
turf_type = /turf/open/floor/mineral/uranium
mineralType = "uranium"
materials = list(MAT_URANIUM=500)
/obj/item/stack/tile/mineral/gold
name = "gold tile"
singular_name = "gold floor tile"
desc = "A tile made out of gold, the swag seems strong here."
icon_state = "tile_gold"
turf_type = /turf/open/floor/mineral/gold
mineralType = "gold"
materials = list(MAT_GOLD=500)
/obj/item/stack/tile/mineral/silver
name = "silver tile"
singular_name = "silver floor tile"
desc = "A tile made out of silver, the light shining from it is blinding."
icon_state = "tile_silver"
turf_type = /turf/open/floor/mineral/silver
mineralType = "silver"
materials = list(MAT_SILVER=500)
/obj/item/stack/tile/mineral/diamond
name = "diamond tile"
singular_name = "diamond floor tile"
desc = "A tile made out of diamond. Wow, just, wow."
icon_state = "tile_diamond"
origin_tech = "materials=2"
turf_type = /turf/open/floor/mineral/diamond
mineralType = "diamond"
materials = list(MAT_DIAMOND=500)
/obj/item/stack/tile/mineral/bananium
name = "bananium tile"
singular_name = "bananium floor tile"
desc = "A tile made out of bananium, HOOOOOOOOONK!"
icon_state = "tile_bananium"
turf_type = /turf/open/floor/mineral/bananium
mineralType = "bananium"
materials = list(MAT_BANANIUM=500)
/obj/item/stack/tile/mineral/abductor
name = "alien floor tile"
singular_name = "alien floor tile"
desc = "A tile made out of alien alloy."
icon = 'icons/obj/abductor.dmi'
icon_state = "tile_abductor"
origin_tech = "materials=6;abductor=1"
turf_type = /turf/open/floor/mineral/abductor
mineralType = "abductor"
@@ -0,0 +1,164 @@
/obj/item/stack/tile
name = "broken tile"
singular_name = "broken tile"
desc = "A broken tile. This should not exist."
icon = 'icons/obj/tiles.dmi'
w_class = 3
force = 1
throwforce = 1
throw_speed = 3
throw_range = 7
max_amount = 60
origin_tech = "materials=1"
var/turf_type = null
var/mineralType = null
/obj/item/stack/tile/New(loc, amount)
..()
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3) //randomize a little
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 4)
user << "<span class='warning'>You need at least four tiles to do this!</span>"
return
if(WT.is_hot() && !mineralType)
user << "<span class='warning'>You can not reform this!</span>"
return
if(WT.remove_fuel(0,user))
if(mineralType == "plasma")
atmos_spawn_air("plasma=5;TEMP=1000")
user.visible_message("<span class='warning'>[user.name] sets the plasma tiles on fire!</span>", \
"<span class='warning'>You set the plasma tiles on fire!</span>")
qdel(src)
return
if (mineralType == "metal")
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
"<span class='notice'>You shaped [src] into metal with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
R.use(4)
if (!R && replace)
user.put_in_hands(new_item)
else
var/sheet_type = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
var/obj/item/stack/sheet/mineral/new_item = new sheet_type(user.loc)
user.visible_message("[user.name] shaped [src] into a sheet with the welding tool.", \
"<span class='notice'>You shaped [src] into a sheet with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
R.use(4)
if (!R && replace)
user.put_in_hands(new_item)
else
return ..()
//Grass
/obj/item/stack/tile/grass
name = "grass tile"
singular_name = "grass floor tile"
desc = "A patch of grass like they use on space golf courses."
icon_state = "tile_grass"
origin_tech = "biotech=1"
turf_type = /turf/open/floor/grass
burn_state = FLAMMABLE
//Wood
/obj/item/stack/tile/wood
name = "wood floor tile"
singular_name = "wood floor tile"
desc = "An easy to fit wood floor tile."
icon_state = "tile-wood"
origin_tech = "biotech=1"
turf_type = /turf/open/floor/wood
burn_state = FLAMMABLE
//Carpets
/obj/item/stack/tile/carpet
name = "carpet"
singular_name = "carpet"
desc = "A piece of carpet. It is the same size as a floor tile."
icon_state = "tile-carpet"
turf_type = /turf/open/floor/carpet
burn_state = FLAMMABLE
/obj/item/stack/tile/fakespace
name = "astral carpet"
singular_name = "astral carpet"
desc = "A piece of carpet with a convincing star pattern."
icon_state = "tile_space"
turf_type = /turf/open/floor/fakespace
burn_state = FLAMMABLE
/obj/item/stack/tile/fakespace/loaded
amount = 30
//High-traction
/obj/item/stack/tile/noslip
name = "high-traction floor tile"
singular_name = "high-traction floor tile"
desc = "A high-traction floor tile. It feels rubbery in your hand."
icon_state = "tile_noslip"
turf_type = /turf/open/floor/noslip
origin_tech = "materials=3"
/obj/item/stack/tile/noslip/thirty
amount = 30
//Pod floor
/obj/item/stack/tile/pod
name = "pod floor tile"
singular_name = "pod floor tile"
desc = "A grooved floor tile."
icon_state = "tile_pod"
turf_type = /turf/open/floor/pod
/obj/item/stack/tile/pod/light
name = "light pod floor tile"
singular_name = "light pod floor tile"
desc = "A lightly colored grooved floor tile."
icon_state = "tile_podlight"
turf_type = /turf/open/floor/pod/light
/obj/item/stack/tile/pod/dark
name = "dark pod floor tile"
singular_name = "dark pod floor tile"
desc = "A darkly colored grooved floor tile."
icon_state = "tile_poddark"
turf_type = /turf/open/floor/pod/dark
//Plasteel (normal)
/obj/item/stack/tile/plasteel
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon."
icon_state = "tile"
force = 6
materials = list(MAT_METAL=500)
throwforce = 10
flags = CONDUCT
turf_type = /turf/open/floor/plasteel
mineralType = "metal"
/obj/item/stack/tile/plasteel/cyborg
desc = "The ground you walk on." //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
materials = list() // All other Borg versions of items have no Metal or Glass - RR
is_cyborg = 1
cost = 125
+115
View File
@@ -0,0 +1,115 @@
/*
* Wrapping Paper
*/
/obj/item/stack/wrapping_paper
name = "wrapping paper"
desc = "Wrap packages with this festive paper to make gifts."
icon = 'icons/obj/items.dmi'
icon_state = "wrap_paper"
flags = NOBLUDGEON
amount = 25
max_amount = 25
burn_state = FLAMMABLE
/obj/item/stack/wrapping_paper/Destroy()
if(!amount)
new /obj/item/weapon/c_tube(get_turf(src))
return ..()
/*
* Package Wrap
*/
/obj/item/stack/packageWrap
name = "package wrapper"
desc = "You can use this to wrap items in."
icon = 'icons/obj/items.dmi'
icon_state = "deliveryPaper"
flags = NOBLUDGEON
amount = 25
max_amount = 25
burn_state = FLAMMABLE
/obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package
return 1
/obj/item/weapon/storage/can_be_package_wrapped()
return 0
/obj/item/weapon/storage/box/can_be_package_wrapped()
return 1
/obj/item/smallDelivery/can_be_package_wrapped()
return 0
/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)
if(!proximity)
return
if(!istype(target))
return
if(target.anchored)
return
if(istype(target, /obj/item))
var/obj/item/I = target
if(!I.can_be_package_wrapped())
return
if(user.r_hand == I || user.l_hand == I)
if(!user.unEquip(I))
return
else if(!isturf(I.loc))
return
if(use(1))
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(I.loc))
if(user.Adjacent(I))
P.add_fingerprint(user)
I.add_fingerprint(user)
user.put_in_hands(P)
I.forceMove(P)
var/size = round(I.w_class)
P.w_class = size
size = min(size, 5)
P.icon_state = "deliverypackage[size]"
else if(istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if(O.opened)
return
if(!O.density) //can't wrap non dense closets (e.g. body bags)
user << "<span class='warning'>You can't wrap this!</span>"
return
if(use(3))
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
if(O.horizontal)
P.icon_state = "deliverycrate"
O.loc = P
P.add_fingerprint(user)
O.add_fingerprint(user)
else
user << "<span class='warning'>You need more paper!</span>"
return
else
user << "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>"
return
user.visible_message("<span class='notice'>[user] wraps [target].</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on [target]</font>")
/obj/item/stack/packageWrap/Destroy()
if(!amount)
new /obj/item/weapon/c_tube(get_turf(src))
return ..()
/obj/item/weapon/c_tube
name = "cardboard tube"
desc = "A tube... of cardboard."
icon = 'icons/obj/items.dmi'
icon_state = "c_tube"
throwforce = 0
w_class = 1
throw_speed = 3
throw_range = 5