diff --git a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm
index fd263fc53bd..7b0896218eb 100644
--- a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm
+++ b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm
@@ -41,42 +41,51 @@
/obj/item/stack/rods/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
if(get_amount() >= 10)
var/sheets_to_make = round(get_amount() * 0.1)
- var/remainder = get_amount() - (sheets_to_make * 10)
- if(remainder)
- new type(loc, remainder)
- return list("operation_time" = 0, "new_obj_type" = /obj/item/stack/sheet/brass, "alloy_cost" = 0, "spawn_dir" = sheets_to_make, "dir_in_new" = TRUE)
+ var/used = sheets_to_make * 10
+ user.visible_message("[user]'s [proselytizer.name] rips into [src], converting it to brass!", \
+ "You convert [get_amount() - used > 0 ? "part of ":""][src] into brass...")
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ new /obj/item/stack/sheet/brass(get_turf(src), sheets_to_make)
+ use(used)
else
user << "You need at least 10 rods to convert into brass."
- return TRUE
+ return TRUE
/obj/item/stack/sheet/metal/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
- if(src.get_amount() >= 5)
- var/sheets_to_make = round(src.get_amount() * 0.2)
- var/remainder = src.get_amount() - (sheets_to_make * 5)
- if(remainder)
- new type(loc, remainder)
- return list("operation_time" = 0, "new_obj_type" = /obj/item/stack/sheet/brass, "alloy_cost" = 0, "spawn_dir" = sheets_to_make, "dir_in_new" = TRUE)
+ if(get_amount() >= 5)
+ var/sheets_to_make = round(get_amount() * 0.2)
+ var/used = sheets_to_make * 5
+ user.visible_message("[user]'s [proselytizer.name] rips into [src], converting it to brass!", \
+ "You convert [get_amount() - used > 0 ? "part of ":""][src] into brass...")
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ new /obj/item/stack/sheet/brass(get_turf(src), sheets_to_make)
+ use(used)
else
user << "You need at least 5 sheets of metal to convert into brass."
- return TRUE
+ return TRUE
/obj/item/stack/sheet/plasteel/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
- if(get_amount() >= 10)
- var/sheets_to_make = round(get_amount() * 0.4)
- var/remainder = get_amount() - (sheets_to_make * 2.5)
- if(remainder)
- new type(loc, remainder)
- return list("operation_time" = 0, "new_obj_type" = /obj/item/stack/sheet/brass, "alloy_cost" = 0, "spawn_dir" = sheets_to_make, "dir_in_new" = TRUE)
+ if(get_amount() >= 2)
+ var/sheets_to_make = round(get_amount() * 0.5)
+ var/used = sheets_to_make * 2
+ user.visible_message("[user]'s [proselytizer.name] rips into [src], converting it to brass!", \
+ "You convert [get_amount() - used > 0 ? "part of ":""][src] into brass...")
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ new /obj/item/stack/sheet/brass(get_turf(src), sheets_to_make)
+ use(used)
else
- user << "You need at least 10 sheets of plasteel to convert into brass."
- return TRUE
+ user << "You need at least 2 sheets of plasteel to convert into brass."
+ return TRUE
//Brass directly to alloy; scarab only
/obj/item/stack/sheet/brass/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
if(!proselytizer.metal_to_alloy)
return FALSE
- var/prosel_cost = -amount*10
- var/prosel_time = -amount*1
+ var/prosel_cost = -amount*REPLICANT_FLOOR
+ var/prosel_time = -amount
return list("operation_time" = -prosel_time, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = prosel_cost, "spawn_dir" = SOUTH)
//Airlock conversion
@@ -124,23 +133,25 @@
/obj/structure/grille/ratvar/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
return FALSE
+//Girder conversion
+/obj/structure/girder/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
+ return list("operation_time" = 20, "new_obj_type" = /obj/structure/destructible/clockwork/wall_gear, "alloy_cost" = REPLICANT_GEAR, "spawn_dir" = SOUTH)
+
//Hitting a clockwork structure will try to repair it.
/obj/structure/destructible/clockwork/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
. = TRUE
- if(proselytizer.repairing) //no spamclicking for fast repairs, bucko
- user << "You are already repairing [proselytizer.repairing] with [proselytizer]!"
- return
if(!can_be_repaired)
user << "[src] cannot be repaired with a proselytizer!"
return
- if(obj_integrity == max_integrity)
+ if(obj_integrity >= max_integrity)
user << "[src] is at maximum integrity!"
return
var/amount_to_heal = max_integrity - obj_integrity
var/healing_for_cycle = min(amount_to_heal, repair_amount)
+ var/proselytizer_cost = 0
if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK))
- healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
- var/proselytizer_cost = healing_for_cycle*2
+ healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy * 0.5)
+ proselytizer_cost = healing_for_cycle * 2
if(!proselytizer.can_use_alloy(proselytizer_cost))
user << "You need more liquified alloy to repair [src]!"
return
@@ -150,24 +161,30 @@
proselytizer.repairing = src
while(proselytizer && user && src && obj_integrity != max_integrity)
amount_to_heal = max_integrity - obj_integrity
- if(!amount_to_heal)
+ if(amount_to_heal <= 0)
break
healing_for_cycle = min(amount_to_heal, repair_amount)
if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK))
- healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
- proselytizer_cost = healing_for_cycle*2
+ healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy * 0.5)
+ proselytizer_cost = healing_for_cycle * 2
+ if(!proselytizer.can_use_alloy(proselytizer_cost))
+ break
+ else
+ proselytizer_cost = 0
if(!proselytizer.can_use_alloy(proselytizer_cost) || !do_after(user, proselytizer_cost, target = src) || !proselytizer || !proselytizer.can_use_alloy(proselytizer_cost))
break
amount_to_heal = max_integrity - obj_integrity
- if(!amount_to_heal)
+ if(amount_to_heal <= 0)
break
healing_for_cycle = min(amount_to_heal, repair_amount)
if(!proselytizer.can_use_alloy(RATVAR_ALLOY_CHECK))
- healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy)
- proselytizer_cost = healing_for_cycle*2
- if(!proselytizer.can_use_alloy(proselytizer_cost))
- break
- obj_integrity += healing_for_cycle
+ healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy * 0.5)
+ proselytizer_cost = healing_for_cycle * 2
+ if(!proselytizer.can_use_alloy(proselytizer_cost))
+ break
+ else
+ proselytizer_cost = 0
+ obj_integrity = Clamp(obj_integrity + healing_for_cycle, 0, max_integrity)
proselytizer.modify_stored_alloy(-proselytizer_cost)
playsound(src, 'sound/machines/click.ogg', 50, 1)
@@ -187,6 +204,7 @@
if(!clockwork_component_cache["replicant_alloy"])
user << "There is no Replicant Alloy in the global component cache!"
return
+ proselytizer.refueling = TRUE
user.visible_message("[user] places the end of [proselytizer] in the hole in [src]...", \
"You start filling [proselytizer] with liquified alloy...")
//hugeass check because we need to re-check after the do_after
@@ -196,15 +214,18 @@
proselytizer.modify_stored_alloy(REPLICANT_ALLOY_UNIT)
clockwork_component_cache["replicant_alloy"]--
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- if(proselytizer && user)
- user.visible_message("[user] removes [proselytizer] from the hole in [src], apparently satisfied.", \
+ if(proselytizer)
+ proselytizer.refueling = FALSE
+ if(user)
+ user.visible_message("[user] removes [proselytizer] from the hole in [src], apparently satisfied.", \
"You finish filling [proselytizer] with liquified alloy. It now contains [proselytizer.stored_alloy]/[proselytizer.max_alloy] units of liquified alloy.")
return
-//Convert shards, wall gears, and replicant alloy directly to liquid alloy
+//convert wall gears back to brass sheets
/obj/structure/destructible/clockwork/wall_gear/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
- return list("operation_time" = 10, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = -REPLICANT_GEAR, "spawn_dir" = SOUTH)
+ return list("operation_time" = 10, "new_obj_type" = /obj/item/stack/sheet/brass, "alloy_cost" = 0, "spawn_dir" = 3, "dir_in_new" = TRUE)
+//Convert shards and replicant alloy directly to liquid alloy
/obj/item/clockwork/alloy_shards/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
return list("operation_time" = 5, "new_obj_type" = /obj/effect/overlay/temp/ratvar/beam/itemconsume, "alloy_cost" = -REPLICANT_STANDARD, "spawn_dir" = SOUTH)
diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm
index 554966eec32..522551e1eba 100644
--- a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm
@@ -1,5 +1,5 @@
-
-/obj/item/clockwork/clockwork_proselytizer //Clockwork proselytizer (yes, that's a real word): Converts applicable objects to Ratvarian variants.
+//Clockwork proselytizer (yes, that's a real word): Converts applicable objects to Ratvarian variants.
+/obj/item/clockwork/clockwork_proselytizer
name = "clockwork proselytizer"
desc = "An odd, L-shaped device that hums with energy."
clockwork_desc = "A device that allows the replacing of mundane objects with Ratvarian variants. It requires liquified Replicant Alloy to function."
@@ -12,6 +12,7 @@
var/uses_alloy = TRUE
var/metal_to_alloy = FALSE
var/repairing = null //what we're currently repairing, if anything
+ var/refueling = FALSE //if we're currently refueling from a cache
/obj/item/clockwork/clockwork_proselytizer/preloaded
stored_alloy = REPLICANT_WALL_MINUS_FLOOR+REPLICANT_WALL_TOTAL
@@ -38,9 +39,9 @@
..()
if(is_servant_of_ratvar(user) || isobserver(user))
user << "Can be used to convert walls, floors, windows, airlocks, windoors, and grilles to clockwork variants."
- user << "Can also form some objects into Replicant Alloy, as well as reform Clockwork Walls into Clockwork Floors, and vice versa."
+ user << "Can also form some objects into Brass sheets, as well as reform Clockwork Walls into Clockwork Floors, and vice versa."
if(metal_to_alloy)
- user << "It can convert rods, metal, and plasteel to liquified replicant alloy at a low rate."
+ user << "It can convert Brass sheets to liquified replicant alloy at a rate of 1 sheet to [REPLICANT_FLOOR] alloy."
if(uses_alloy)
user << "It has [stored_alloy]/[max_alloy] units of liquified alloy stored."
user << "Use it on a Tinkerer's Cache, strike it with Replicant Alloy, or attack Replicant Alloy with it to add additional liquified alloy."
@@ -80,10 +81,8 @@
proselytize(target, user)
/obj/item/clockwork/clockwork_proselytizer/proc/modify_stored_alloy(amount)
- if(can_use_alloy(RATVAR_ALLOY_CHECK)) //Ratvar makes it free
- amount = 0
stored_alloy = Clamp(stored_alloy + amount, 0, max_alloy)
- return 1
+ return TRUE
/obj/item/clockwork/clockwork_proselytizer/proc/can_use_alloy(amount)
if(amount == RATVAR_ALLOY_CHECK)
@@ -99,17 +98,23 @@
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize(atom/target, mob/living/user)
if(!target || !user)
- return 0
+ return FALSE
+ if(repairing)
+ user << "You are currently repairing [repairing] with [src]!"
+ return FALSE
+ if(refueling)
+ user << "You are currently refueling [src]!"
+ return FALSE
var/target_type = target.type
var/list/proselytize_values = target.proselytize_vals(user, src) //relevant values for proselytizing stuff, given as an associated list
if(!islist(proselytize_values))
if(proselytize_values != TRUE) //if we get true, fail, but don't send a message for whatever reason
user << "[target] cannot be proselytized!"
- return 0
- if(repairing)
- user << "You are currently repairing [repairing] with [src]!"
- return 0
- if(!uses_alloy)
+ return FALSE
+ if(can_use_alloy(RATVAR_ALLOY_CHECK))
+ if(proselytize_values["alloy_cost"] < 0) //if it's less than 0, it's trying to refuel from whatever this is, and we don't need to refuel right now!
+ user << "[target] cannot be proselytized!"
+ return FALSE
proselytize_values["alloy_cost"] = 0
if(!can_use_alloy(proselytize_values["alloy_cost"]))
@@ -117,7 +122,7 @@
user << "You need [proselytize_values["alloy_cost"]] liquified alloy to proselytize [target]!"
else if(stored_alloy - proselytize_values["alloy_cost"] > max_alloy)
user << "You have too much liquified alloy stored to proselytize [target]!"
- return 0
+ return FALSE
if(can_use_alloy(RATVAR_ALLOY_CHECK)) //Ratvar makes it faster
proselytize_values["operation_time"] *= 0.5
@@ -125,13 +130,9 @@
user.visible_message("[user]'s [name] begins tearing apart [target]!", "You begin proselytizing [target]...")
playsound(target, 'sound/machines/click.ogg', 50, 1)
if(proselytize_values["operation_time"] && !do_after(user, proselytize_values["operation_time"], target = target))
- return 0
- if(!can_use_alloy(proselytize_values["alloy_cost"])) //Check again to prevent bypassing via spamclick
- return 0
- if(!target || target.type != target_type)
- return 0
- if(repairing)
- return 0
+ return FALSE
+ if(repairing || refueling || !can_use_alloy(proselytize_values["alloy_cost"]) || !target || target.type != target_type) //Check again to prevent bypassing via spamclick
+ return FALSE
user.visible_message("[user]'s [name] disgorges a chunk of metal and shapes it over what's left of [target]!", \
"You proselytize [target].")
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
@@ -147,4 +148,4 @@
A.setDir(proselytize_values["spawn_dir"])
qdel(target)
modify_stored_alloy(-proselytize_values["alloy_cost"])
- return 1
+ return TRUE
diff --git a/code/game/gamemodes/clock_cult/clock_structures/wall_gear.dm b/code/game/gamemodes/clock_cult/clock_structures/wall_gear.dm
index 85b35bd2eb4..3e9068bff1d 100644
--- a/code/game/gamemodes/clock_cult/clock_structures/wall_gear.dm
+++ b/code/game/gamemodes/clock_cult/clock_structures/wall_gear.dm
@@ -5,8 +5,10 @@
climbable = TRUE
max_integrity = 50
obj_integrity = 50
+ layer = BELOW_OBJ_LAYER
+ construction_value = 3
desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, or just climb over it."
- clockwork_desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, just climb over it, or proselytize it into replicant alloy."
+ clockwork_desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, just climb over it, or proselytize it into brass sheets."
break_message = "The gear breaks apart into shards of alloy!"
debris = list(/obj/item/clockwork/alloy_shards/large = 1, \
/obj/item/clockwork/alloy_shards/medium = 4, \
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index d792c486c9e..a46a22fad70 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -355,14 +355,11 @@
/obj/machinery/door/airlock/cult/allowed(mob/M)
if(!density)
return 1
- if(friendly || \
- iscultist(M) || \
- istype(M, /mob/living/simple_animal/shade) || \
- istype(M, /mob/living/simple_animal/hostile/construct))
- PoolOrNew(openingoverlaytype, src.loc)
+ if(friendly || iscultist(M) || istype(M, /mob/living/simple_animal/shade) || isconstruct(M))
+ PoolOrNew(openingoverlaytype, loc)
return 1
else
- PoolOrNew(/obj/effect/overlay/temp/cult/sac, src.loc)
+ PoolOrNew(/obj/effect/overlay/temp/cult/sac, loc)
var/atom/throwtarget
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(M, src)))
M << pick(sound('sound/hallucinations/turn_around1.ogg',0,1,50), sound('sound/hallucinations/turn_around2.ogg',0,1,50))
@@ -417,6 +414,9 @@
aiControlDisabled = TRUE
use_power = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
+ damage_deflection = 30
+ obj_integrity = 400
+ max_integrity = 400
var/construction_state = GEAR_SECURE //Pinion airlocks have custom deconstruction
/obj/machinery/door/airlock/clockwork/New()
@@ -424,12 +424,24 @@
var/turf/T = get_turf(src)
PoolOrNew(/obj/effect/overlay/temp/ratvar/door, T)
PoolOrNew(/obj/effect/overlay/temp/ratvar/beam/door, T)
- change_construction_value(3)
+ change_construction_value(5)
/obj/machinery/door/airlock/clockwork/Destroy()
- change_construction_value(-3)
+ change_construction_value(-5)
return ..()
+/obj/machinery/door/airlock/clockwork/examine(mob/user)
+ ..()
+ var/gear_text = "The cogwheel is flickering and twisting wildly. Report this to a coder."
+ switch(construction_state)
+ if(GEAR_SECURE)
+ gear_text = "The cogwheel is solidly secured to the brass around it."
+ if(GEAR_UNFASTENED)
+ gear_text = "The cogwheel is slightly raised, enough to see a thin gap between it and the brass."
+ if(GEAR_LOOSE)
+ gear_text = "There is a wide gap between the cogwheel and the door!"
+ user << gear_text
+
/obj/machinery/door/airlock/clockwork/canAIControl(mob/user)
return (is_servant_of_ratvar(user) && !isAllPowerCut())
@@ -455,24 +467,38 @@
/obj/machinery/door/airlock/clockwork/hasPower()
return TRUE //yes we do have power
+/obj/machinery/door/airlock/clockwork/obj_break(damage_flag)
+ return
+
+/obj/machinery/door/airlock/clockwork/deconstruct(disassembled = TRUE)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ if(!(flags & NODECONSTRUCT))
+ var/turf/T = get_turf(src)
+ if(disassembled)
+ new/obj/item/stack/sheet/brass(T, 4)
+ else
+ new/obj/item/clockwork/alloy_shards(T)
+ new/obj/item/clockwork/component/vanguard_cogwheel/pinion_lock(T)
+ qdel(src)
+
/obj/machinery/door/airlock/clockwork/proc/attempt_construction(obj/item/I, mob/living/user)
if(!I || !user || !user.canUseTopic(src))
return 0
if(istype(I, /obj/item/weapon/screwdriver))
if(construction_state == GEAR_SECURE)
- user.visible_message("[user] begins unfastening [src]'s gear...", "You begin unfastening [src]'s gear...")
+ user.visible_message("[user] begins unfastening [src]'s cogwheel...", "You begin unfastening [src]'s cogwheel...")
playsound(src, I.usesound, 50, 1)
- if(!do_after(user, 75 / I.toolspeed, target = src))
+ if(!do_after(user, 100 / I.toolspeed, target = src))
return 1 //Returns 1 so as not to have extra interactions with the tools used (i.e. prying open)
- user.visible_message("[user] unfastens [src]'s gear!", "[src]'s gear shifts slightly with a pop.")
+ user.visible_message("[user] unfastens [src]'s cogwheel!", "[src]'s cogwheel shifts slightly with a pop.")
playsound(src, 'sound/items/Screwdriver2.ogg', 50, 1)
construction_state = GEAR_UNFASTENED
else if(construction_state == GEAR_UNFASTENED)
- user.visible_message("[user] begins fastening [src]'s gear...", "You begin fastening [src]'s gear...")
+ user.visible_message("[user] begins fastening [src]'s cogwheel...", "You begin fastening [src]'s cogwheel...")
playsound(src, I.usesound, 50, 1)
if(!do_after(user, 75 / I.toolspeed, target = src))
return 1
- user.visible_message("[user] fastens [src]'s gear!", "[src]'s gear shifts back into place.")
+ user.visible_message("[user] fastens [src]'s cogwheel!", "[src]'s cogwheel shifts back into place.")
playsound(src, 'sound/items/Screwdriver2.ogg', 50, 1)
construction_state = GEAR_SECURE
else if(construction_state == GEAR_LOOSE)
@@ -480,40 +506,37 @@
return 1
else if(istype(I, /obj/item/weapon/wrench))
if(construction_state == GEAR_SECURE)
- user << "[src] is too tightly secured! Your [I.name] can't get a solid grip!"
+ user << "[src]'s cogwheel is too tightly secured! Your [I.name] can't get a solid grip!"
return 0
else if(construction_state == GEAR_UNFASTENED)
- user.visible_message("[user] begins loosening [src]'s gear...", "You begin loosening [src]'s gear...")
+ user.visible_message("[user] begins loosening [src]'s cogwheel...", "You begin loosening [src]'s cogwheel...")
playsound(src, I.usesound, 50, 1)
- if(!do_after(user, 80 / I.toolspeed, target = src))
+ if(!do_after(user, 100 / I.toolspeed, target = src))
return 1
- user.visible_message("[user] loosens [src]'s gear!", "[src]'s gear pops off and dangles loosely.")
+ user.visible_message("[user] loosens [src]'s cogwheel!", "[src]'s cogwheel pops off and dangles loosely.")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
construction_state = GEAR_LOOSE
else if(construction_state == GEAR_LOOSE)
- user.visible_message("[user] begins tightening [src]'s gear...", "You begin tightening [src]'s gear into place...")
+ user.visible_message("[user] begins tightening [src]'s cogwheel...", "You begin tightening [src]'s cogwheel into place...")
playsound(src, I.usesound, 50, 1)
- if(!do_after(user, 80 / I.toolspeed, target = src))
+ if(!do_after(user, 75 / I.toolspeed, target = src))
return 1
- user.visible_message("[user] tightens [src]'s gear!", "You firmly tighten [src]'s gear into place.")
+ user.visible_message("[user] tightens [src]'s cogwheel!", "You firmly tighten [src]'s cogwheel into place.")
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
construction_state = GEAR_UNFASTENED
return 1
else if(istype(I, /obj/item/weapon/crowbar))
if(construction_state == GEAR_SECURE || construction_state == GEAR_UNFASTENED)
- user << "[src]'s gear is too tightly secured! Your [I.name] can't reach under it!"
+ user << "[src]'s cogwheel is too tightly secured! Your [I.name] can't reach under it!"
return 1
else if(construction_state == GEAR_LOOSE)
- user.visible_message("[user] begins slowly lifting off [src]'s gear...", "You slowly begin lifting off [src]'s gear...")
+ user.visible_message("[user] begins slowly lifting off [src]'s cogwheel...", "You slowly begin lifting off [src]'s cogwheel...")
playsound(src, I.usesound, 50, 1)
- if(!do_after(user, 85 / I.toolspeed, target = src))
+ if(!do_after(user, 100 / I.toolspeed, target = src))
return 1
- user.visible_message("[user] lifts off [src]'s gear, causing it to fall apart!", "You lift off [src]'s gear, causing it to fall \
- apart!")
- playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
- new/obj/item/clockwork/alloy_shards(get_turf(src))
- new/obj/item/clockwork/component/vanguard_cogwheel/pinion_lock(get_turf(src))
- qdel(src)
+ user.visible_message("[user] lifts off [src]'s cogwheel, causing it to fall apart!", \
+ "You lift off [src]'s cogwheel, causing it to fall apart!")
+ deconstruct(TRUE)
return 1
return 0
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 103ecef6bd3..901455f7bc0 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -17,6 +17,7 @@
origin_tech = "materials=1"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 100)
resistance_flags = ACID_PROOF
+ merge_type = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/cyborg
materials = list()
@@ -141,6 +142,7 @@
origin_tech = "materials=2"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 100)
resistance_flags = ACID_PROOF
+ merge_type = /obj/item/stack/sheet/rglass
/obj/item/stack/sheet/rglass/cyborg
materials = list()
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 1955aea257f..fdd8be114a0 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -62,6 +62,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
flags = CONDUCT
origin_tech = "materials=1"
resistance_flags = FIRE_PROOF
+ merge_type = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/ratvar_act()
new /obj/item/stack/sheet/brass(loc, amount)
@@ -107,6 +108,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
origin_tech = "materials=2"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 80)
resistance_flags = FIRE_PROOF
+ merge_type = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
@@ -152,6 +154,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
sheettype = "wood"
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0)
resistance_flags = FLAMMABLE
+ merge_type = /obj/item/stack/sheet/mineral/wood
/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
@@ -194,6 +197,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
resistance_flags = FLAMMABLE
force = 0
throwforce = 0
+ merge_type = /obj/item/stack/sheet/cloth
/obj/item/stack/sheet/cloth/New(var/loc, var/amount=null)
recipes = cloth_recipes
@@ -225,6 +229,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
icon_state = "sheet-card"
origin_tech = "materials=1"
resistance_flags = FLAMMABLE
+ merge_type = /obj/item/stack/sheet/cardboard
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
@@ -253,6 +258,7 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
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/sheet/brass(loc, amount)
@@ -282,13 +288,15 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
*/
var/global/list/datum/stack_recipe/brass_recipes = list ( \
new/datum/stack_recipe("wall gear", /obj/structure/destructible/clockwork/wall_gear, 3, time = 30, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("brass floor tile", /obj/item/stack/tile/brass, 1, 1, 50), \
+ null,
new/datum/stack_recipe("pinion airlock", /obj/machinery/door/airlock/clockwork, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brass pinion airlock", /obj/machinery/door/airlock/clockwork/brass, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, one_per_turf = 1, on_floor = 1), \
+ null,
new/datum/stack_recipe("directional brass window", /obj/structure/window/reinforced/clockwork, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brass window", /obj/structure/window/reinforced/clockwork/fulltile, 2, time = 30, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("brass floor tile", /obj/item/stack/tile/brass, 1, 1, 50) \
+ new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = 1, on_floor = 1) \
)
/obj/item/stack/sheet/brass
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index d3ce33d194a..c56b52f0115 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -110,6 +110,7 @@
icon_state = "tile_space"
turf_type = /turf/open/floor/fakespace
resistance_flags = FLAMMABLE
+ merge_type = /obj/item/stack/tile/fakespace
/obj/item/stack/tile/fakespace/loaded
amount = 30
@@ -122,6 +123,7 @@
icon_state = "tile_noslip"
turf_type = /turf/open/floor/noslip
origin_tech = "materials=3"
+ merge_type = /obj/item/stack/tile/noslip
/obj/item/stack/tile/noslip/thirty
amount = 30
diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm
index e517111a8c9..8bdf192e704 100644
--- a/code/game/objects/structures/table_frames.dm
+++ b/code/game/objects/structures/table_frames.dm
@@ -133,6 +133,14 @@
framestack = /obj/item/stack/sheet/brass
framestackamount = 1
+/obj/structure/table_frame/brass/New()
+ change_construction_value(1)
+ ..()
+
+/obj/structure/table_frame/brass/Destroy()
+ change_construction_value(-1)
+ return ..()
+
/obj/structure/table_frame/brass/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/sheet/brass))
var/obj/item/stack/sheet/brass/W = I
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 66423e31913..995bd280d75 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -330,6 +330,15 @@
buildstackamount = 1
canSmoothWith = list(/obj/structure/table/reinforced/brass)
+/obj/structure/table/reinforced/brass/New()
+ change_construction_value(2)
+ ..()
+
+/obj/structure/table/reinforced/brass/Destroy()
+ change_construction_value(-2)
+ return ..()
+
+
/obj/structure/table/reinforced/brass/narsie_act()
take_damage(rand(15, 45), BRUTE)
if(src) //do we still exist?
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index f75063aa86f..db48108b7fd 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -14,8 +14,8 @@
var/reinf = 0
var/wtype = "glass"
var/fulltile = 0
-// var/silicate = 0 // number of units of silicate
-// var/icon/silicateIcon = null // the silicated icon
+ var/glass_type = /obj/item/stack/sheet/glass
+ var/glass_amount = 1
var/image/crack_overlay
var/list/debris = list()
can_be_unanchored = 1
@@ -182,19 +182,8 @@
if(qdeleted(src))
return
- if(reinf)
- var/obj/item/stack/sheet/rglass/RG = new (user.loc)
- RG.add_fingerprint(user)
- if(fulltile) //fulltiles drop two panes
- RG = new (user.loc)
- RG.add_fingerprint(user)
-
- else
- var/obj/item/stack/sheet/glass/G = new (user.loc)
- G.add_fingerprint(user)
- if(fulltile)
- G = new (user.loc)
- G.add_fingerprint(user)
+ var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
+ G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "You successfully disassemble [src]."
@@ -297,21 +286,6 @@
else
revrotate()
-/*
-/obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon?
- if(silicateIcon && silicate)
- icon = initial(icon)
-
- var/icon/I = icon(icon,icon_state,dir)
-
- var/r = (silicate / 100) + 1
- var/g = (silicate / 70) + 1
- var/b = (silicate / 50) + 1
- I.SetIntensity(r,g,b)
- icon = I
- silicateIcon = I
-*/
-
/obj/structure/window/Destroy()
density = 0
air_update_turf(1)
@@ -379,6 +353,7 @@
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100)
max_integrity = 50
explosion_block = 1
+ glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/tinted
name = "tinted window"
@@ -400,6 +375,7 @@
fulltile = 1
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
+ glass_amount = 2
/obj/structure/window/reinforced/fulltile
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
@@ -410,6 +386,7 @@
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
level = 3
+ glass_amount = 2
/obj/structure/window/reinforced/tinted/fulltile
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
@@ -419,6 +396,7 @@
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile/)
level = 3
+ glass_amount = 2
/obj/structure/window/reinforced/fulltile/ice
icon = 'icons/obj/smooth_structures/rice_window.dmi'
@@ -426,6 +404,7 @@
max_integrity = 150
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice)
level = 3
+ glass_amount = 2
/obj/structure/window/shuttle
name = "shuttle window"
@@ -442,6 +421,8 @@
canSmoothWith = null
explosion_block = 1
level = 3
+ glass_type = /obj/item/stack/sheet/rglass
+ glass_amount = 2
/obj/structure/window/shuttle/narsie_act()
color = "#3C3434"
@@ -457,6 +438,8 @@
resistance_flags = FIRE_PROOF | ACID_PROOF
max_integrity = 100
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
+ glass_type = /obj/item/stack/sheet/brass
+ glass_amount = 1
var/made_glow = FALSE
/obj/structure/window/reinforced/clockwork/New(loc, direct)
@@ -475,7 +458,7 @@
PoolOrNew(/obj/effect/overlay/temp/ratvar/window, get_turf(src))
made_glow = TRUE
debris += new/obj/item/stack/sheet/brass(src, 2)
- change_construction_value(fulltile ? 3 : 2)
+ change_construction_value(fulltile ? 2 : 1)
/obj/structure/window/reinforced/clockwork/setDir(direct)
if(!made_glow)
@@ -485,7 +468,7 @@
..()
/obj/structure/window/reinforced/clockwork/Destroy()
- change_construction_value(fulltile ? -3 : -2)
+ change_construction_value(fulltile ? -2 : -1)
return ..()
/obj/structure/window/reinforced/clockwork/ratvar_act()
@@ -507,3 +490,4 @@
fulltile = 1
dir = NORTHEAST
max_integrity = 150
+ glass_amount = 2