Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-02-21 23:29:25 -07:00
279 changed files with 4174 additions and 1928 deletions
+2 -2
View File
@@ -218,7 +218,7 @@
density = FALSE
anchored = TRUE
max_integrity = 100
integrity_failure = 5
integrity_failure = 0.05
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
layer = MOB_LAYER
var/obj/item/clothing/mask/facehugger/child
@@ -232,7 +232,7 @@
addtimer(CALLBACK(src, .proc/Grow), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
proximity_monitor = new(src, status == GROWN ? 1 : 0)
if(status == BURST)
obj_integrity = integrity_failure
obj_integrity = integrity_failure * max_integrity
/obj/structure/alien/egg/update_icon()
..()
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "empty"
req_access = list(ACCESS_BAR)
max_integrity = 500
integrity_failure = 250
integrity_failure = 0.5
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
buildable_sign = 0
var/list/barsigns=list()
@@ -17,7 +17,7 @@
buckle_lying = TRUE
resistance_flags = FLAMMABLE
max_integrity = 100
integrity_failure = 30
integrity_failure = 0.35
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 2
var/bolts = TRUE
@@ -8,7 +8,8 @@
buckle_lying = 0 //you sit in a chair, not lay
resistance_flags = NONE
max_integrity = 250
integrity_failure = 25
integrity_failure = 0.1
custom_materials = list(/datum/material/iron = 2000)
var/buildstacktype = /obj/item/stack/sheet/metal
var/buildstackamount = 1
var/item_chair = /obj/item/chair // if null it can't be picked up
@@ -53,8 +54,13 @@
/obj/structure/chair/deconstruct()
// If we have materials, and don't have the NOCONSTRUCT flag
if(buildstacktype && (!(flags_1 & NODECONSTRUCT_1)))
new buildstacktype(loc,buildstackamount)
if(!(flags_1 & NODECONSTRUCT_1))
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
else
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(loc, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
..()
/obj/structure/chair/attack_paw(mob/user)
@@ -142,6 +148,15 @@
handle_rotation(newdir)
// Chair types
///Material chair
/obj/structure/chair/greyscale
icon_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
item_chair = /obj/item/chair/greyscale
buildstacktype = null //Custom mats handle this
/obj/structure/chair/wood
icon_state = "wooden_chair"
name = "wooden chair"
@@ -271,7 +286,8 @@
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
return
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
var/C = new item_chair(loc)
var/obj/item/C = new item_chair(loc)
C.set_custom_materials(custom_materials)
TransferComponents(C)
usr.put_in_hands(C)
qdel(src)
@@ -296,7 +312,7 @@
throw_range = 3
hitsound = 'sound/items/trayhit1.ogg'
hit_reaction_chance = 50
materials = list(MAT_METAL = 2000)
custom_materials = list(/datum/material/iron = 2000)
var/break_chance = 5 //Likely hood of smashing the chair.
var/obj/structure/chair/origin_type = /obj/structure/chair
@@ -324,6 +340,7 @@
user.visible_message("<span class='notice'>[user] rights \the [src.name].</span>", "<span class='notice'>You right \the [name].</span>")
var/obj/structure/chair/C = new origin_type(get_turf(loc))
C.set_custom_materials(custom_materials)
TransferComponents(C)
C.setDir(dir)
qdel(src)
@@ -357,6 +374,12 @@
C.DefaultCombatKnockdown(20)
smash(user)
/obj/item/chair/greyscale
icon_state = "chair_greyscale_toppled"
item_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
origin_type = /obj/structure/chair/greyscale
/obj/item/chair/stool
name = "stool"
icon_state = "stool_toppled"
@@ -482,7 +505,7 @@
max_integrity = 70
hitsound = 'sound/weapons/genhit1.ogg'
origin_type = /obj/structure/chair/wood
materials = null
custom_materials = null
break_chance = 50
/obj/item/chair/wood/narsie_act()
@@ -13,7 +13,7 @@
var/large = TRUE
var/wall_mounted = 0 //never solid (You can always pass over it)
max_integrity = 200
integrity_failure = 50
integrity_failure = 0.25
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
var/breakout_time = 1200
var/message_cooldown
+1 -1
View File
@@ -8,7 +8,7 @@
resistance_flags = ACID_PROOF
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
max_integrity = 200
integrity_failure = 50
integrity_failure = 0.25
var/obj/item/showpiece = null
var/alert = TRUE
var/open = FALSE
+1 -1
View File
@@ -6,7 +6,7 @@
anchored = TRUE
density = FALSE
max_integrity = 200
integrity_failure = 50
integrity_failure = 0.25
var/obj/item/extinguisher/stored_extinguisher
var/opened = FALSE
+1 -1
View File
@@ -7,7 +7,7 @@
density = FALSE
armor = list("melee" = 50, "bullet" = 20, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
max_integrity = 150
integrity_failure = 50
integrity_failure = 0.33
var/locked = TRUE
var/open = FALSE
var/obj/item/twohanded/fireaxe/fireaxe
+1 -1
View File
@@ -10,7 +10,7 @@
layer = BELOW_OBJ_LAYER
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
max_integrity = 50
integrity_failure = 20
integrity_failure = 0.4
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
var/rods_broken = TRUE
+1 -1
View File
@@ -7,7 +7,7 @@
density = FALSE
anchored = TRUE
max_integrity = 200
integrity_failure = 100
integrity_failure = 0.5
/obj/structure/mirror/Initialize(mapload)
. = ..()
+21 -8
View File
@@ -31,21 +31,34 @@
return
var/obj/item/stack/material = I
if (istype(I, /obj/item/stack) && material?.tableVariant)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(material.tableVariant)
if (istype(I, /obj/item/stack))
if(material?.tableVariant)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(material.tableVariant)
else
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
if(do_after(user, 20, target = src) && material.use(1))
var/list/material_list = list()
if(material.material_type)
material_list[material.material_type] = MINERAL_MATERIAL_AMOUNT
make_new_table(/obj/structure/table/greyscale, material_list)
else
return ..()
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
/obj/structure/table_frame/proc/make_new_table(table_type, custom_materials) //makes sure the new table made retains what we had as a frame
var/obj/structure/table/T = new table_type(loc)
T.frame = type
T.framestack = framestack
T.framestackamount = framestackamount
if(custom_materials)
T.set_custom_materials(custom_materials)
qdel(src)
/obj/structure/table_frame/deconstruct(disassembled = TRUE)
+15 -6
View File
@@ -31,9 +31,9 @@
var/framestackamount = 2
var/deconstruction_ready = 1
max_integrity = 100
integrity_failure = 30
integrity_failure = 0.33
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced, /obj/structure/table/greyscale)
/obj/structure/table/examine(mob/user)
. = ..()
@@ -196,13 +196,23 @@
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
if(!(flags_1 & NODECONSTRUCT_1))
var/turf/T = get_turf(src)
new buildstack(T, buildstackamount)
if(buildstack)
new buildstack(T, buildstackamount)
else
for(var/i in custom_materials)
var/datum/material/M = i
new M.sheet_type(T, FLOOR(custom_materials[M] / MINERAL_MATERIAL_AMOUNT, 1))
if(!wrench_disassembly)
new frame(T)
else
new framestack(T, framestackamount)
qdel(src)
/obj/structure/table/greyscale
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
icon_state = "table"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstack = null //No buildstack, so generate from mat datums
/*
* Glass tables
@@ -455,9 +465,8 @@
icon_state = "r_table"
deconstruction_ready = 0
buildstack = /obj/item/stack/sheet/plasteel
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
max_integrity = 200
integrity_failure = 50
integrity_failure = 0.25
armor = list("melee" = 10, "bullet" = 30, "laser" = 30, "energy" = 100, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
@@ -670,7 +679,7 @@
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "rack_parts"
flags_1 = CONDUCT_1
materials = list(MAT_METAL=2000)
custom_materials = list(/datum/material/iron=2000)
var/building = FALSE
/obj/item/rack_parts/attackby(obj/item/W, mob/user, params)
+13 -1
View File
@@ -135,7 +135,19 @@
density = TRUE
time_between_triggers = 1200 //Exists for 2 minutes
/obj/structure/trap/ward/New()
..()
QDEL_IN(src, time_between_triggers)
/obj/structure/trap/cult
name = "unholy trap"
desc = "A trap that rings with unholy energy. You think you hear... chittering?"
icon_state = "trap-cult"
/obj/structure/trap/cult/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
L.Knockdown(20)
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
QDEL_IN(src, 30)