adds ratvar_act() and adds ratvar_act()'s for a few things

adds brass, clockwork floor, brass tables and table frames
This commit is contained in:
uraniummeltdown
2018-01-18 18:28:41 +05:00
parent 4e63e4ce28
commit 900bfd5e3b
12 changed files with 168 additions and 17 deletions
@@ -1,12 +1,13 @@
/* Diffrent misc types of sheets
/* Different misc types of sheets
* Contains:
* Metal
* Plasteel
* Wood
* Cloth
* Plastic
* Cardboard
* Runed Metal (cult)
* Metal
* Plasteel
* Wood
* Cloth
* Plastic
* Cardboard
* Runed Metal (cult)
* Brass (clockwork cult)
*/
/*
@@ -107,10 +108,13 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
/obj/item/stack/sheet/metal/fifty
amount = 50
/obj/item/stack/sheet/metal/ratvar_act()
new /obj/item/stack/tile/brass(loc, amount)
qdel(src)
/obj/item/stack/sheet/metal/narsie_act()
if(prob(20))
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
@@ -273,12 +277,15 @@ var/global/list/datum/stack_recipe/cult = list ( \
/obj/item/stack/sheet/runed_metal
name = "runed metal"
desc = "Sheets of cold metal with shifting inscriptions writ upon them."
singular_name = "runed metal"
singular_name = "runed metal sheet"
icon_state = "sheet-runed"
icon = 'icons/obj/items.dmi'
sheettype = "runed"
merge_type = /obj/item/stack/sheet/runed_metal
/obj/item/stack/sheet/runed_metal/ratvar_act()
new /obj/item/stack/tile/brass(loc, amount)
qdel(src)
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
if(!iscultist(user))
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
@@ -306,6 +313,39 @@ var/global/list/datum/stack_recipe/cult = list ( \
recipes = cult
return ..()
/*
* Brass
*/
var/global/list/datum/stack_recipe/brass_recipes = list ( \
new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \
)
/obj/item/stack/tile/brass
name = "brass"
desc = "Sheets made out of brass."
singular_name = "brass sheet"
icon_state = "sheet-brass"
icon = 'icons/obj/items.dmi'
burn_state = FIRE_PROOF
throwforce = 10
max_amount = 50
throw_speed = 1
throw_range = 3
turf_type = /turf/simulated/floor/clockwork
/obj/item/stack/tile/brass/narsie_act()
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/tile/brass/New(loc, amount=null)
recipes = brass_recipes
. = ..()
pixel_x = 0
pixel_y = 0
/obj/item/stack/tile/brass/fifty
amount = 50
/*
* Bones
*/
@@ -86,6 +86,10 @@
new /obj/structure/table_frame/wood(loc)
qdel(src)
/obj/structure/table_frame/ratvar_act()
new /obj/structure/table_frame/brass(loc)
qdel(src)
/*
* Wooden Frames
*/
@@ -118,3 +122,30 @@
make_new_table(/obj/structure/table/wood/poker)
else
return ..()
/obj/structure/table_frame/brass
name = "brass table frame"
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
icon_state = "brass_frame"
burn_state = FIRE_PROOF
framestack = /obj/item/stack/tile/brass
framestackamount = 1
/obj/structure/table_frame/brass/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/tile/brass))
var/obj/item/stack/tile/brass/W = I
if(W.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one brass sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
if(do_after(user, 20, target = src) && W.use(1))
make_new_table(/obj/structure/table/reinforced/brass)
else
return ..()
/obj/structure/table_frame/brass/narsie_act()
..()
if(src) //do we still exist?
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
+31 -4
View File
@@ -78,6 +78,10 @@
new /obj/structure/table/wood(loc)
qdel(src)
/obj/structure/table/ratvar_act()
new /obj/structure/table/reinforced/brass(loc)
qdel(src)
/obj/structure/table/ex_act(severity)
switch(severity)
if(1)
@@ -477,8 +481,9 @@
burn_state = FLAMMABLE
burntime = 20
/obj/structure/table/wood/narsie_act()
return
/obj/structure/table/wood/narsie_act(total_override = TRUE)
if(!total_override)
..()
/obj/structure/table/wood/poker //No specialties, Just a mapping object.
name = "gambling table"
@@ -488,8 +493,7 @@
buildstack = /obj/item/stack/tile/carpet
/obj/structure/table/wood/poker/narsie_act()
new /obj/structure/table/wood(loc)
qdel(src)
..(FALSE)
/*
* Fancy Tables
@@ -565,6 +569,29 @@
else
. = ..()
/obj/structure/table/reinforced/brass
name = "brass table"
desc = "A solid, slightly beveled brass table."
icon = 'icons/obj/smooth_structures/brass_table.dmi'
icon_state = "brass_table"
burn_state = FIRE_PROOF
frame = /obj/structure/table_frame/brass
framestack = /obj/item/stack/tile/brass
buildstack = /obj/item/stack/tile/brass
framestackamount = 1
buildstackamount = 1
canSmoothWith = list(/obj/structure/table/reinforced/brass)
/obj/structure/table/reinforced/brass/narsie_act()
take_damage(rand(15, 45), BRUTE)
if(src) //do we still exist?
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
/obj/structure/table/reinforced/brass/ratvar_act()
obj_integrity = max_integrity
/*
* Racks
*/