diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 2ecbc3dcdc..0d041757a1 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -640,11 +640,13 @@ Turf and target are seperate in case you want to teleport some distance from a t cant_pass = 1 return cant_pass +/* //If you uncomment and use this I will assimilate you. -C.L. //Takes: Anything that could possibly have variables and a varname to check. //Returns: 1 if found, 0 if not. /proc/hasvar(var/datum/A, var/varname) if(A.vars.Find(lowertext(varname))) return 1 else return 0 +*/ //Returns: all the areas in the world /proc/return_areas() @@ -1101,8 +1103,8 @@ GLOBAL_LIST_INIT(common_tools, list( return 0 //Whether or not the given item counts as sharp in terms of dealing damage -/proc/is_sharp(obj/O as obj) - if(!O) +/proc/is_sharp(obj/item/O) + if(!isitem(O)) return FALSE if(O.sharp) return TRUE @@ -1111,8 +1113,8 @@ GLOBAL_LIST_INIT(common_tools, list( return FALSE //Whether or not the given item counts as cutting with an edge in terms of removing limbs -/proc/has_edge(obj/O as obj) - if(!O) +/proc/has_edge(obj/item/O) + if(!isitem(O)) return FALSE if(O.edge) return TRUE @@ -1663,7 +1665,7 @@ GLOBAL_REAL_VAR(list/stack_trace_storage) * * multiplier - multiplier passed to set_custom_materials * * [target_object][atom] - the target object who's custom materials we are trying to modify */ -/proc/split_materials_uniformly(list/custom_materials, multiplier, obj/target_object) +/proc/split_materials_uniformly(list/custom_materials, multiplier, obj/item/target_object) target_object.set_custom_materials(custom_materials) // if(!length(target_object.contents)) //most common case where the object is just 1 thing diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm index a586c83454..6684c9404d 100644 --- a/code/datums/autolathe/autolathe.dm +++ b/code/datums/autolathe/autolathe.dm @@ -4,8 +4,8 @@ if(path) I = new path() - if(!I) // Something has gone horribly wrong, or right. - log_debug("[name] created an Autolathe design without an assigned path.") + if(!isitem(I)) // Something has gone horribly wrong, or right. + log_debug("[name] created an Autolathe design without an assigned path or illegal item. Item = [I]") return if(I.matter && !resources) diff --git a/code/datums/autolathe/general.dm b/code/datums/autolathe/general.dm index 610a27bc98..68240f10b0 100644 --- a/code/datums/autolathe/general.dm +++ b/code/datums/autolathe/general.dm @@ -55,7 +55,7 @@ /datum/category_item/autolathe/general/floor_light name = "floor light" - path =/obj/machinery/floor_light + path =/obj/item/floor_light /datum/category_item/autolathe/general/extinguisher name = "extinguisher" diff --git a/code/datums/components/crafting/tool_quality.dm b/code/datums/components/crafting/tool_quality.dm index 5950cf72f4..e36fd5b3e8 100644 --- a/code/datums/components/crafting/tool_quality.dm +++ b/code/datums/components/crafting/tool_quality.dm @@ -1,6 +1,3 @@ -/obj/item - var/list/tool_qualities - /// Used to check for a specific tool quality on an item. /// Returns TRUE or FALSE depending on whether `tool_quality` is found. /obj/item/proc/has_tool_quality(tool_quality) diff --git a/code/datums/vending/stored_item.dm b/code/datums/vending/stored_item.dm index 7704801b8b..3d6a9b7a8a 100644 --- a/code/datums/vending/stored_item.dm +++ b/code/datums/vending/stored_item.dm @@ -42,11 +42,9 @@ var/atom/movable/product = instances[instances.len] // Remove the last added product instances -= product product.forceMove(product_location) - //VOREStation Addition Start - if(istype(product, /obj)) - var/obj/item = product - item.persist_storable = FALSE - //VOREStation Addition End + if(istype(product, /obj/item)) + var/obj/item/our_item = product + our_item.persist_storable = FALSE return product /datum/stored_item/proc/add_product(var/atom/movable/product) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9d0b7939e2..9eb9dea09f 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -124,8 +124,8 @@ /obj/machinery/camera/hitby(AM as mob|obj) ..() if (istype(AM, /obj)) - var/obj/O = AM - if (O.throwforce >= src.toughness) + var/obj/item/O = AM + if(O.throwforce >= src.toughness) visible_message(span_boldwarning("[src] was hit by [O].")) take_damage(O.throwforce) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index b7f8ed5eb3..c3848234ff 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -61,9 +61,9 @@ Deployable items return else switch(W.damtype) - if("fire") + if(BURN) health -= W.force * 0.75 - if("brute") + if(BRUTE) health -= W.force * 0.5 playsound(src, 'sound/weapons/smash.ogg', 50, 1) CheckHealth() diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 9768de95c0..c1bde9ad35 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -1,5 +1,20 @@ var/list/floor_light_cache = list() +/obj/item/floor_light + name = "floor light kit" + desc = "A backlit floor panel, ready for installation!" + icon = 'icons/obj/machines/floor_light.dmi' + icon_state = "item" + matter = list(MAT_STEEL = 2500, MAT_GLASS = 2750) + +/obj/item/floor_light/attack_self(mob/user) + var/turf/T = get_turf(user) + if(!T) + to_chat(user, span_warning("You need to be on a floor to install this.")) + return + new /obj/machinery/floor_light(T) + qdel(src) + /obj/machinery/floor_light name = "floor light" icon = 'icons/obj/machines/floor_light.dmi' @@ -11,7 +26,6 @@ var/list/floor_light_cache = list() idle_power_usage = 2 active_power_usage = 20 power_channel = LIGHT - matter = list(MAT_STEEL = 2500, MAT_GLASS = 2750) var/on var/damaged diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index cc573d188e..138378519b 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -196,7 +196,7 @@ /obj/machinery/partslathe/proc/build(var/datum/category_item/partslathe/D) for(var/M in D.resources) materials[M] = max(0, materials[M] - CEILING((D.resources[M] * mat_efficiency), 1)) - var/obj/new_item = D.build(loc); + var/obj/item/new_item = D.build(loc); if(new_item) new_item.loc = loc if(mat_efficiency < 1) // No matter out of nowhere diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 4632df4101..4f0d724943 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -44,7 +44,7 @@ var/mob/living/M = T if(src.occupant.a_intent == I_HURT || istype(src.occupant, /mob/living/carbon/brain)) //Brains cannot change intents; Exo-piloting brains lack any form of physical feedback for control, limiting the ability to 'play nice'. playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1) - if(damtype == "brute") + if(damage_type == BRUTE) step_away(M,src,15) /* if(M.stat>1) @@ -61,19 +61,19 @@ var/obj/item/organ/external/temp = H.get_organ(pick(BP_TORSO, BP_TORSO, BP_TORSO, BP_HEAD)) if(temp) var/update = 0 - switch(damtype) - if("brute") + switch(damage_type) + if(BRUTE) H.Paralyse(1) update |= temp.take_damage(rand(force/2, force), 0) - if("fire") + if(BURN) update |= temp.take_damage(0, rand(force/2, force)) - if("tox") + if(TOX) if(H.reagents) if(H.reagents.get_reagent_amount(REAGENT_ID_CARPOTOXIN) + force < force*2) H.reagents.add_reagent(REAGENT_ID_CARPOTOXIN, force) if(H.reagents.get_reagent_amount(REAGENT_ID_CRYPTOBIOLIN) + force < force*2) H.reagents.add_reagent(REAGENT_ID_CRYPTOBIOLIN, force) - if("halloss") + if(HALLOSS) H.stun_effect_act(1, force / 2, BP_TORSO, src) else return @@ -81,13 +81,13 @@ H.updatehealth() else - switch(damtype) - if("brute") + switch(damage_type) + if(BRUTE) M.Paralyse(1) M.take_overall_damage(rand(force/2, force)) - if("fire") + if(BURN) M.take_overall_damage(0, rand(force/2, force)) - if("tox") + if(TOX) if(M.reagents) if(M.reagents.get_reagent_amount(REAGENT_ID_CARPOTOXIN) + force < force*2) M.reagents.add_reagent(REAGENT_ID_CARPOTOXIN, force) @@ -112,15 +112,15 @@ if(istype(T, /obj/machinery/disposal)) // Stops mechs from climbing into disposals return if(src.occupant.a_intent == I_HURT || istype(src.occupant, /mob/living/carbon/brain)) // Don't smash unless we mean it - if(damtype == "brute") + if(damage_type == BRUTE) src.occupant_message("You hit [T].") src.visible_message(span_bolddanger("[src.name] hits [T]")) playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1) if(istype(T, /obj/structure/girder)) - T:take_damage(force * 3) //Girders have 200 health by default. Steel, non-reinforced walls take four punches, girders take (with this value-mod) two, girders took five without. + T.take_damage(force * 3) //Girders have 200 health by default. Steel, non-reinforced walls take four punches, girders take (with this value-mod) two, girders took five without. else - T:take_damage(force) + T.take_damage(force) melee_can_hit = 0 diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm index b5c18a088f..10339ae0ec 100644 --- a/code/game/mecha/combat/fighter.dm +++ b/code/game/mecha/combat/fighter.dm @@ -183,7 +183,7 @@ stop_hover() else if(moved && gravity && !ground_capable) occupant_message("Collision alert! Vehicle not rated for use in gravity!") - take_damage(NOGRAV_FIGHTER_DAMAGE, "brute") + take_damage(NOGRAV_FIGHTER_DAMAGE, BRUTE) playsound(src, 'sound/effects/grillehit.ogg', 50, 1) /obj/mecha/combat/fighter/get_step_delay() @@ -239,7 +239,7 @@ . = ..() if(istype(obstacle, /obj) || istype(obstacle, /turf)) occupant_message(span_bolddanger(span_large("COLLISION ALERT!"))) - take_damage(20, "brute") + take_damage(20, BRUTE) playsound(src, 'sound/mecha/fighter/fighter_collision.ogg', 50) ////////////// Gunpod ////////////// diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index 4f6af481af..6e1fef403d 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -149,12 +149,12 @@ return switch(new_damtype) if("Force") - damtype = "brute" + damage_type = BRUTE if("Energy") - damtype = "fire" + damage_type = BURN if("Stun") - damtype = "halloss" - src.occupant_message("Melee damage type switched to [new_damtype]") + damage_type = HALLOSS + occupant_message("Melee damage type switched to [new_damtype]") return //Meant for random spawns. diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index edca2da381..cb06f152fa 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -44,6 +44,7 @@ var/lights = 0 var/lights_power = 6 var/force = 0 + var/damage_type = BRUTE var/mech_faction = null var/firstactivation = 0 //It's simple. If it's 0, no one entered it yet. Otherwise someone entered it at least once. @@ -1001,7 +1002,7 @@ //////// Health related procs //////// //////////////////////////////////////// -/obj/mecha/take_damage(amount, type="brute") +/obj/mecha/take_damage(amount, type=BRUTE) update_damage_alerts() if(amount) var/damage = absorbDamage(amount,type) @@ -1150,10 +1151,9 @@ if(isliving(A)) var/mob/living/M = A M.take_organ_damage(10) - else if(istype(A, /obj)) - var/obj/O = A + else if(istype(A, /obj/item)) + var/obj/item/O = A if(O.throwforce) - var/pass_damage = O.throwforce var/pass_damage_reduc_mod if(pass_damage <= damage_minimum)//Too little to go through. //CHOMPedit temp_damage_mininum -> damage_minimum diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index d3d5b1bd72..3e69b9af18 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -230,9 +230,7 @@ /datum/action/innate/mecha/mech_switch_damtype/Activate() - - - button_icon_state = "mech_damtype_[chassis.damtype]" + button_icon_state = "mech_damtype_[chassis.damage_type]" playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1) build_all_button_icons() chassis.query_damtype() @@ -416,15 +414,15 @@ return switch(new_damtype) if("Brute") - damtype = "brute" - src.occupant_message("Your exosuit's hands form into fists.") + damage_type = BRUTE + occupant_message("Your exosuit's hands form into fists.") if("Fire") - damtype = "fire" - src.occupant_message("A torch tip extends from your exosuit's hand, glowing red.") + damage_type = BURN + occupant_message("A torch tip extends from your exosuit's hand, glowing red.") if("Toxic") - damtype = "tox" - src.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.") - src.occupant_message("Melee damage type switched to [new_damtype]") + damage_type = TOX + occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.") + occupant_message("Melee damage type switched to [new_damtype]") return diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm index 95950320c6..445589a203 100644 --- a/code/game/mecha/micro/micro.dm +++ b/code/game/mecha/micro/micro.dm @@ -30,7 +30,7 @@ var/mob/living/M = target if(src.occupant.a_intent == I_HURT) playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - if(damtype == "brute") + if(damage_type == BRUTE) step_away(M,src,15) if(ishuman(target)) @@ -40,12 +40,12 @@ var/obj/item/organ/external/temp = H.get_organ(pick(BP_TORSO, BP_TORSO, BP_TORSO, BP_HEAD)) if(temp) var/update = 0 - switch(damtype) - if("brute") + switch(damage_type) + if(BRUTE) update |= temp.take_damage(rand(force/2, force), 0) - if("fire") + if(BURN) update |= temp.take_damage(0, rand(force/2, force)) - if("tox") + if(TOX) if(H.reagents) if(H.reagents.get_reagent_amount(REAGENT_ID_CARPOTOXIN) + force < force*2) H.reagents.add_reagent(REAGENT_ID_CARPOTOXIN, force) @@ -57,13 +57,13 @@ H.updatehealth() else - switch(damtype) - if("brute") + switch(damage_type) + if(BRUTE) M.Paralyse(1) M.take_overall_damage(rand(force/2, force)) - if("fire") + if(BURN) M.take_overall_damage(0, rand(force/2, force)) - if("tox") + if(TOX) if(M.reagents) if(M.reagents.get_reagent_amount(REAGENT_ID_CARPOTOXIN) + force < force*2) M.reagents.add_reagent(REAGENT_ID_CARPOTOXIN, force) @@ -85,7 +85,7 @@ return else - if(damtype == "brute") + if(damage_type == BRUTE) for(var/target_type in src.destroyable_obj) if(istype(target, target_type) && hascall(target, "attackby")) src.occupant_message(span_attack("You hit [target].")) diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm index 3b9d2ebc31..5d72e6e79f 100644 --- a/code/game/objects/explosion_recursive.dm +++ b/code/game/objects/explosion_recursive.dm @@ -3,9 +3,6 @@ var/turf/T = get_turf(src.mob) explosion(T, power) -/obj - var/explosion_resistance - /turf var/explosion_resistance diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index fe6c2ff6de..4ea201df8d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1,6 +1,6 @@ /obj/item name = "item" - icon = 'icons/obj/items.dmi' + icon = 'icons/obj/weapons.dmi' //'icons/obj/items.dmi' //It was accidentally set to weapons.dmi 11 months ago...leaving it as is until further analysis w_class = ITEMSIZE_NORMAL blocks_emissive = EMISSIVE_BLOCK_GENERIC @@ -13,7 +13,7 @@ var/health = null var/burn_point = null var/burning = null - var/hitsound = null + var/hitsound = "swing_hit" var/usesound = null // Like hitsound, but for when used properly and not to kill someone. var/storage_cost = null var/slot_flags = 0 //This is used to determine on which slots an item can fit. @@ -25,8 +25,15 @@ var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/force = 0 + var/damtype = BRUTE + var/throwforce = 0 + var/sharp = FALSE // whether this object cuts + var/edge = FALSE // whether this object is more likely to dismember + var/armor_penetration = 0 + var/catchable = TRUE var/can_cleave = FALSE // If true, a 'cleaving' attack will occur. - + var/pry = 0 //Used in attackby() to open doors + var/list/matter var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags @@ -113,6 +120,32 @@ var/digestable = TRUE var/item_tf_spawn_allowed = FALSE var/list/ckeys_allowed_itemspawn = null + var/datum/weakref/exploit_for //if this obj is an exploit for somebody, this points to them + var/preserve_item = 0 //whether this object is preserved when its owner goes into cryo-storage, gateway, etc + var/persist_storable = TRUE //If this is true, this item can be stored in the item bank. + //This is automatically set to false when an item is removed from storage + + var/list/possessed_voice //Allows for items to be possessed/inhabited by voices. + var/list/warned_of_possession //Checks to see who has been informed this item is possessed. + var/cleaving = FALSE // Used to avoid infinite cleaving. + var/list/tool_qualities + var/destroy_on_drop = FALSE // Used by augments to determine if the item should destroy itself when dropped, or return to its master. + var/obj/item/organ/my_augment = null // Used to reference the object's host organ. + var/datum/identification/identity = null + var/identity_type = /datum/identification + var/init_hide_identity = FALSE // Set to true to automatically obscure the object on initialization. + + //Vorestuff + var/trash_eatable = TRUE + var/digest_stage = null + var/d_mult_old = 1 //digest stage descriptions + var/d_mult = 1 //digest stage descriptions + var/d_stage_overlay //digest stage effects + var/gurgled = FALSE + var/oldname + var/cleanname + var/cleandesc + var/gurgled_color /obj/item/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 50775731c0..f1f2b42e5d 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -448,14 +448,14 @@ if(.) user.visible_message(span_notice("[user] activates the flare."), span_notice("You pull the cord on the flare, activating it!")) src.force = on_damage - src.damtype = "fire" + src.damtype = BURN START_PROCESSING(SSobj, src) /obj/item/flashlight/flare/proc/ignite() //Used for flare launchers. on = !on update_brightness() force = on_damage - damtype = "fire" + damtype = BURN START_PROCESSING(SSobj, src) return 1 diff --git a/code/game/objects/items/stacks/sandbags.dm b/code/game/objects/items/stacks/sandbags.dm index 37e8c82bac..aa370dc766 100644 --- a/code/game/objects/items/stacks/sandbags.dm +++ b/code/game/objects/items/stacks/sandbags.dm @@ -75,8 +75,8 @@ if (use(required)) var/atom/O = new recipe.result_type(user.loc, bag_material) - if(istype(O, /obj)) - var/obj/Ob = O + if(istype(O, /obj/item)) + var/obj/item/Ob = O if(LAZYLEN(Ob.matter)) // Law of equivalent exchange. Ob.matter.Cut() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index c95ce80c2e..ff61bf820e 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -196,8 +196,8 @@ if(recipe.use_material) O = new recipe.result_type(user.loc, recipe.use_material) - if(istype(O, /obj)) - var/obj/Ob = O + if(istype(O, /obj/item)) + var/obj/item/Ob = O if(LAZYLEN(Ob.matter)) // Law of equivalent exchange. Ob.matter.Cut() @@ -213,8 +213,8 @@ O = new recipe.result_type(user.loc) if(recipe.matter_material) - if(istype(O, /obj)) - var/obj/Ob = O + if(istype(O, /obj/item)) + var/obj/item/Ob = O if(LAZYLEN(Ob.matter)) // Law of equivalent exchange. Ob.matter.Cut() @@ -228,16 +228,13 @@ O.set_dir(user.dir) O.add_fingerprint(user) - //VOREStation Addition Start - Let's not store things that get crafted with materials like this, they won't spawn correctly when retrieved. - if (isobj(O)) - var/obj/P = O - P.persist_storable = FALSE - //VOREStation Addition End if (istype(O, /obj/item/stack)) var/obj/item/stack/S = O S.amount = produced S.add_to_stacks(user) - + if (isitem(O)) + var/obj/item/P = O + P.persist_storable = FALSE if (istype(O, /obj/item/storage)) //BubbleWrap - so newly formed boxes are empty for (var/obj/item/I in O) qdel(I) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index a7d434c810..152c72ffb2 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -71,7 +71,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/flame/match/proc/burn_out() lit = 0 burnt = 1 - damtype = "brute" + damtype = BRUTE icon_state = "match_burnt" item_state = "cigoff" name = "burnt match" @@ -168,7 +168,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(!src.lit) src.lit = 1 playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1) - damtype = "fire" + damtype = BURN if(reagents.get_reagent_amount(REAGENT_ID_PHORON)) // the phoron explodes when exposed to fire var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount(REAGENT_ID_PHORON) / 2.5, 1), get_turf(src), 0, 0) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 2227038ea0..9f7c316422 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -117,7 +117,7 @@ name = "laser scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved." icon_state = "scalpel_laser1" - damtype = "fire" + damtype = BURN hitsound = 'sound/weapons/blade1.ogg' clamp_chance = 75 @@ -125,7 +125,7 @@ name = "laser scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks somewhat advanced." icon_state = "scalpel_laser2" - damtype = "fire" + damtype = BURN hitsound = 'sound/weapons/blade1.ogg' force = 12.0 clamp_chance = 85 @@ -134,7 +134,7 @@ name = "laser scalpel" desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks to be the pinnacle of precision energy cutlery!" icon_state = "scalpel_laser3" - damtype = "fire" + damtype = BURN hitsound = 'sound/weapons/blade1.ogg' force = 15.0 clamp_chance = 95 diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index aed34e4a80..5b7b3c2866 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -276,7 +276,7 @@ T.visible_message(span_danger("\The [src] turns on.")) playsound(src, acti_sound, 50, 1) src.force = 15 - src.damtype = "fire" + src.damtype = BURN src.w_class = ITEMSIZE_LARGE src.hitsound = 'sound/items/welder.ogg' welding = 1 @@ -298,7 +298,7 @@ T.visible_message(span_warning("\The [src] turns off.")) playsound(src, deac_sound, 50, 1) src.force = 3 - src.damtype = "brute" + src.damtype = BRUTE src.w_class = initial(src.w_class) src.welding = 0 src.hitsound = initial(src.hitsound) diff --git a/code/game/objects/items_vr.dm b/code/game/objects/items_vr.dm index bd63c6b2dd..b209640768 100644 --- a/code/game/objects/items_vr.dm +++ b/code/game/objects/items_vr.dm @@ -1,8 +1,3 @@ -/obj/item - var/list/possessed_voice //Allows for items to be possessed/inhabited by voices. - var/list/warned_of_possession //Checks to see who has been informed this item is possessed. - - /obj/item/proc/inhabit_item(var/mob/candidate, var/candidate_name, var/mob/living/candidate_original_form, var/is_item_tf = FALSE) //This makes it so that any object in the game can have something put in it like the cursed sword! //This means the proc can also be manually called by admin commands. diff --git a/code/game/objects/micro_structures.dm b/code/game/objects/micro_structures.dm index 5c9adeb874..de5e07bc74 100644 --- a/code/game/objects/micro_structures.dm +++ b/code/game/objects/micro_structures.dm @@ -278,10 +278,6 @@ GLOBAL_LIST_EMPTY(micro_tunnels) /obj/structure/micro_tunnel/magic magic = TRUE -/obj - var/micro_accepted_scale = 0.5 - var/micro_target = FALSE - /obj/Initialize(mapload) . = ..() if(micro_target) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 2ad93bd7b9..69316c4902 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -3,26 +3,21 @@ plane = OBJ_PLANE vis_flags = VIS_INHERIT_PLANE //when this be added to vis_contents of something it inherit something.plane, important for visualisation of obj in openspace. //Used to store information about the contents of the object. - var/list/matter var/w_class // Size of the object. var/unacidable = FALSE //universal "unacidabliness" var, here so you can use it in any obj. animate_movement = 2 - var/throwforce = 1 - var/catchable = 1 // can it be caught on throws/flying? - var/sharp = FALSE // whether this object cuts - var/edge = FALSE // whether this object is more likely to dismember - var/pry = 0 //Used in attackby() to open doors var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! - var/damtype = "brute" - var/armor_penetration = 0 var/show_messages - var/preserve_item = 0 //whether this object is preserved when its owner goes into cryo-storage, gateway, etc var/can_speak = 0 //For MMIs and admin trickery. If an object has a brainmob in its contents, set this to 1 to allow it to speak. var/show_examine = TRUE // Does this pop up on a mob when the mob is examined? var/redgate_allowed = TRUE //can we be taken through the redgate, in either direction? - var/being_used = 0 + var/rad_resistance = 0 // Allow overriding rad resistance + var/being_shocked = FALSE + var/micro_accepted_scale = 0.5 + var/micro_target = FALSE + var/explosion_resistance /obj/Destroy() STOP_PROCESSING(SSobj, src) diff --git a/code/game/objects/structures/barricades.dm b/code/game/objects/structures/barricades.dm index 209cc0cf79..46ff726786 100644 --- a/code/game/objects/structures/barricades.dm +++ b/code/game/objects/structures/barricades.dm @@ -45,9 +45,9 @@ return else switch(W.damtype) - if("fire") + if(BURN) health -= W.force * 1 - if("brute") + if(BRUTE) health -= W.force * 0.75 if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD))) playsound(src, 'sound/effects/woodcutting.ogg', 100, 1) diff --git a/code/game/objects/structures/ghost_pods/antagonist.dm b/code/game/objects/structures/ghost_pods/antagonist.dm index 226826c659..c5b9e73f26 100644 --- a/code/game/objects/structures/ghost_pods/antagonist.dm +++ b/code/game/objects/structures/ghost_pods/antagonist.dm @@ -36,9 +36,9 @@ /obj/structure/ghost_pod/automatic/xenomorph_egg/attackby(obj/item/W as obj, mob/user as mob) user.setClickCooldown(user.get_attack_speed(W)) switch(W.damtype) - if("fire") + if(BURN) health -= W.force * 1.25 //It really doesn't like fire - if("brute") + if(BRUTE) health -= W.force * 0.75 //Bit hard to cut playsound(src, 'sound/effects/attackblob.ogg', 50, 1) healthcheck() @@ -46,10 +46,10 @@ return /obj/structure/ghost_pod/automatic/xenomorph_egg/bullet_act(var/obj/item/projectile/Proj) - switch(damtype) - if("fire") + switch(Proj.damtype) + if(BURN) health -= Proj.damage * 1.5 //It burns! - if("brute") + if(BRUTE) health -= Proj.damage //It hurts a bit more then a sharp stick healthcheck() ..() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 7b70ae9f2c..5dfd1fb905 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -155,9 +155,9 @@ user.do_attack_animation(src) playsound(src, 'sound/effects/grillehit.ogg', 80, 1) switch(W.damtype) - if("fire") + if(BURN) health -= W.force - if("brute") + if(BRUTE) health -= W.force * 0.1 healthcheck() ..() diff --git a/code/game/objects/structures/low_wall.dm b/code/game/objects/structures/low_wall.dm index bdc9814b37..3a974c52f1 100644 --- a/code/game/objects/structures/low_wall.dm +++ b/code/game/objects/structures/low_wall.dm @@ -263,8 +263,8 @@ if(ismob(AM)) // All mobs have a multiplier and a size according to mob_defines.dm var/mob/I = AM tforce = I.mob_size * (speed/THROWFORCE_SPEED_DIVISOR) - else - var/obj/O = AM + else if(isitem(AM)) + var/obj/item/O = AM tforce = O.throwforce * (speed/THROWFORCE_SPEED_DIVISOR) if (tforce < 15) return diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 536ce05cbf..22a47955b9 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -1,9 +1,3 @@ -/obj/item - name = "weapon" - icon = 'icons/obj/weapons.dmi' - hitsound = "swing_hit" - var/cleaving = FALSE // Used to avoid infinite cleaving. - /obj/item/Bump(mob/M as mob) spawn(0) ..() diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm index 879a4db6e7..5b19deb456 100644 --- a/code/modules/blob/blob.dm +++ b/code/modules/blob/blob.dm @@ -139,11 +139,11 @@ visible_message(span_danger("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")) var/damage = 0 switch(W.damtype) - if("fire") + if(BURN) damage = (W.force / fire_resist) if(istype(W, /obj/item/weldingtool)) playsound(src, W.usesound, 100, 1) - if("brute") + if(BRUTE) damage = (W.force / brute_resist) take_damage(damage) diff --git a/code/modules/client/stored_item.dm b/code/modules/client/stored_item.dm index a71ead9163..d38d5d56a5 100644 --- a/code/modules/client/stored_item.dm +++ b/code/modules/client/stored_item.dm @@ -100,7 +100,7 @@ busy_bank = FALSE icon_state = "item_bank" return - var/obj/N = new I(get_turf(src)) + var/obj/item/N = new I(get_turf(src)) log_admin("[key_name_admin(user)] retrieved [N] from the item bank.") visible_message(span_notice("\The [src] dispenses the [N] to \the [user].")) user.put_in_hands(N) @@ -138,7 +138,7 @@ if(!choice || choice == "Cancel" || !Adjacent(user) || inoperable() || panel_open) busy_bank = FALSE return - for(var/obj/check in O.contents) + for(var/obj/item/check in O.contents) if(!check.persist_storable) to_chat(user, span_warning("\The [src] buzzes. \The [O] contains [check], which cannot be stored. Please remove this item before attempting to store \the [O]. As a reminder, any contents of \the [O] will be lost if you store it with contents.")) busy_bank = FALSE @@ -162,12 +162,6 @@ /////STORABLE ITEMS AND ALL THAT JAZZ///// //I am only really intending this to be used for single items. Mostly stuff you got right now, but can't/don't want to use right now. //It is not at all intended to be a thing that just lets you hold on to stuff forever, but just until it's the right time to use it. - -/obj - - var/persist_storable = TRUE //If this is true, this item can be stored in the item bank. - //This is automatically set to false when an item is removed from storage - /////LIST OF STUFF WE DON'T WANT PEOPLE STORING///// /obj/item/pda diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index e348f26627..c5f0020185 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -147,12 +147,12 @@ onfire = !(onfire) if (onfire) force = 3 - damtype = "fire" + damtype = BURN icon_state = "cake1" START_PROCESSING(SSobj, src) else force = null - damtype = "brute" + damtype = BRUTE icon_state = "cake0" return diff --git a/code/modules/identification/item_procs.dm b/code/modules/identification/item_procs.dm index 16ac7fd4b0..c6472989b2 100644 --- a/code/modules/identification/item_procs.dm +++ b/code/modules/identification/item_procs.dm @@ -1,9 +1,3 @@ -// This is on the base /item so badmins can play with it by calling hide_identity(). -/obj/item - var/datum/identification/identity = null - var/identity_type = /datum/identification - var/init_hide_identity = FALSE // Set to true to automatically obscure the object on initialization. - /obj/item/Initialize(mapload) if(init_hide_identity) identity = new identity_type(src) diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index 022cf6a765..d4de8e8ff7 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -61,7 +61,7 @@ var/list/name_to_material * Arguments: * - breakdown_flags: A set of flags determining how exactly the materials are broken down. (unused) */ -/obj/proc/get_material_composition(breakdown_flags=NONE) +/obj/item/proc/get_material_composition(breakdown_flags=NONE) . = list() for(var/mat in matter) var/datum/material/M = GET_MATERIAL_REF(mat) @@ -78,7 +78,7 @@ var/list/name_to_material else .[M] = matter[mat] -/obj/proc/set_custom_materials(list/materials, multiplier = 1) +/obj/item/proc/set_custom_materials(list/materials, multiplier = 1) SHOULD_NOT_OVERRIDE(TRUE) if(!LAZYLEN(materials)) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 191b563c84..e3984fda42 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -120,7 +120,7 @@ icon_state = "plasmacutter" item_state = "plasmacutter" w_class = ITEMSIZE_NORMAL //it is smaller than the pickaxe - damtype = "fire" + damtype = BURN digspeed = 18 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/light thermite on fire origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3) matter = list(MAT_STEEL = 3000, MAT_PLASTEEL = 1500, MAT_DIAMONDS = 500, MAT_PHORON = 500) diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm index c4765459eb..3c44ff4ffd 100644 --- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm +++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm @@ -263,7 +263,7 @@ return remove_points(inserted_id, prize.cost) - var/obj/I = new prize.equipment_path(loc) + var/obj/item/I = new prize.equipment_path(loc) I.persist_storable = FALSE flick(icon_vend, src) else diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 956022867f..530e26db4a 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -240,24 +240,31 @@ var/list/slot_equipment_priority = list( \ //Outdated but still in use apparently. This should at least be a human proc. /mob/proc/get_equipped_items() - var/list/items = new/list() + var/list/items = list() - if(hasvar(src,"back")) if(src:back) items += src:back - if(hasvar(src,"belt")) if(src:belt) items += src:belt - if(hasvar(src,"l_ear")) if(src:l_ear) items += src:l_ear - if(hasvar(src,"r_ear")) if(src:r_ear) items += src:r_ear - if(hasvar(src,"glasses")) if(src:glasses) items += src:glasses - if(hasvar(src,"gloves")) if(src:gloves) items += src:gloves - if(hasvar(src,"head")) if(src:head) items += src:head - if(hasvar(src,"shoes")) if(src:shoes) items += src:shoes - if(hasvar(src,"wear_id")) if(src:wear_id) items += src:wear_id - if(hasvar(src,"wear_mask")) if(src:wear_mask) items += src:wear_mask - if(hasvar(src,"wear_suit")) if(src:wear_suit) items += src:wear_suit - if(hasvar(src,"w_uniform")) if(src:w_uniform) items += src:w_uniform + return items - if(hasvar(src,"l_hand")) if(src:l_hand) items += src:l_hand - if(hasvar(src,"r_hand")) if(src:r_hand) items += src:r_hand +/mob/living/get_equipped_items() + var/list/items = ..() + if(back) items += back + if(l_hand) items += l_hand + if(r_hand) items += r_hand + if(wear_mask) items += wear_mask + return items +/mob/living/carbon/human/get_equipped_items() + var/list/items = ..() + + if(belt) items += belt + if(l_ear) items += l_ear + if(r_ear) items += r_ear + if(glasses) items += glasses + if(gloves) items += gloves + if(head) items += head + if(shoes) items += shoes + if(wear_id) items += wear_id + if(wear_suit) items += wear_suit + if(w_uniform) items += w_uniform return items /mob/proc/delete_inventory() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e0ec041f4d..f173b1b56d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -423,14 +423,13 @@ emp_act return //VORESTATION EDIT END - Allows for thrown vore! - if(istype(AM,/obj/)) - var/obj/O = AM - if(stat != DEAD && istype(O,/obj/item) && trash_catching && vore_selected) //Ported from chompstation - var/obj/item/I = O - if(adminbus_trash || is_type_in_list(I, GLOB.edible_trash) && I.trash_eatable && !is_type_in_list(I, GLOB.item_vore_blacklist)) - visible_message(span_vwarning("[I] is thrown directly into [src]'s [lowertext(vore_selected.name)]!")) - I.throwing = 0 - I.forceMove(vore_selected) + if(istype(AM,/obj/item)) + var/obj/item/O = AM + if(stat != DEAD && trash_catching && vore_selected) + if(adminbus_trash || is_type_in_list(O, GLOB.edible_trash) && O.trash_eatable && !is_type_in_list(O, GLOB.item_vore_blacklist)) + visible_message(span_vwarning("[O] is thrown directly into [src]'s [lowertext(vore_selected.name)]!")) + O.throwing = 0 + O.forceMove(vore_selected) return if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode if(canmove && !restrained() && !src.is_incorporeal()) @@ -441,7 +440,6 @@ emp_act throw_mode_off() return - var/dtype = O.damtype var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR) if(species && species.throwforce_absorb_threshold >= throw_damage) @@ -491,34 +489,30 @@ emp_act var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here if(armor < 100) - apply_damage(throw_damage, dtype, zone, armor, soaked, is_sharp(O), has_edge(O), O) + apply_damage(throw_damage, O.damtype, zone, armor, soaked, is_sharp(O), has_edge(O), O) //thrown weapon embedded object code. - if(dtype == BRUTE && istype(O,/obj/item)) - var/obj/item/I = O - if (!is_robot_module(I)) - var/sharp = is_sharp(I) + if(O.damtype == BRUTE) + if (!is_robot_module(O)) + var/sharp = is_sharp(O) var/damage = throw_damage - if (soaked) + if(soaked) damage -= soaked - if (armor) + if(armor) damage /= armor+1 //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class + var/embed_chance = sharp? damage/O.w_class : damage/(O.w_class*3) + var/embed_threshold = sharp? 5*O.w_class : 15*O.w_class //Sharp objects will always embed if they do enough damage. //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold - if((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) - affecting.embed(I) + if((sharp && prob(damage/(10*O.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) + affecting.embed(O) // Begin BS12 momentum-transfer code. - var/mass = 1.5 - if(istype(O, /obj/item)) - var/obj/item/I = O - mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR + var/mass = O.w_class/THROWNOBJ_KNOCKBACK_DIVISOR var/momentum = speed*mass if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED && !buckled) @@ -539,7 +533,9 @@ emp_act src.pinned += O // This does a prob check to catch the thing flying at you, with a minimum of 1% -/mob/living/carbon/human/proc/can_catch(var/obj/O) +/mob/living/carbon/human/proc/can_catch(var/obj/item/O) + if(!isitem(O)) + return FALSE if(!get_active_hand()) // If active hand is empty var/obj/item/organ/external/temp = organs_by_name[BP_R_HAND] if (hand) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 2d31fb3da9..1ea39c7c50 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -271,14 +271,13 @@ /mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve if(is_incorporeal()) return - if(istype(AM,/obj/)) - var/obj/O = AM - if(stat != DEAD && istype(O,/obj/item) && trash_catching && vore_selected) //ported from chompstation - var/obj/item/I = O - if(adminbus_trash || is_type_in_list(I, GLOB.edible_trash) && I.trash_eatable && !is_type_in_list(I, GLOB.item_vore_blacklist)) - visible_message(span_vwarning("[I] is thrown directly into [src]'s [lowertext(vore_selected.name)]!")) - I.throwing = 0 - I.forceMove(vore_selected) + if(istype(AM,/obj/item)) + var/obj/item/O = AM + if(stat != DEAD && trash_catching && vore_selected) + if(adminbus_trash || is_type_in_list(O, GLOB.edible_trash) && O.trash_eatable && !is_type_in_list(O, GLOB.item_vore_blacklist)) + visible_message(span_vwarning("[O] is thrown directly into [src]'s [lowertext(vore_selected.name)]!")) + O.throwing = 0 + O.forceMove(vore_selected) return var/dtype = O.damtype var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR) @@ -310,10 +309,7 @@ ai_holder.react_to_attack(O.thrower) // Begin BS12 momentum-transfer code. - var/mass = 1.5 - if(istype(O, /obj/item)) - var/obj/item/I = O - mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR + var/mass = O.w_class/THROWNOBJ_KNOCKBACK_DIVISOR var/momentum = speed*mass if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm index d4e080fe14..64a1117fc7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/rakshasa_trap.dm @@ -8,9 +8,7 @@ icon_state = "mfloor1" var/basecolor="#030303" desc = "" - throwforce = 0 w_class = ITEMSIZE_NORMAL - matter = list(DEFAULT_WALL_MATERIAL = 18750) var/deployed = 1 anchored = 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 456a4edd25..a3b4942024 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1166,10 +1166,6 @@ /mob/proc/is_muzzled() return 0 -//Exploitable Info Update -/obj - var/datum/weakref/exploit_for //if this obj is an exploit for somebody, this points to them - /mob/proc/amend_exploitable(var/obj/item/I) if(istype(I)) exploit_addons |= I @@ -1178,8 +1174,7 @@ I.exploit_for = WEAKREF(src) -/obj/Destroy() - // CHOMPEdit Start +/obj/item/Destroy() if(exploit_for) var/mob/exploited = exploit_for.resolve() exploited?.exploit_addons -= src diff --git a/code/modules/organs/internal/augment.dm b/code/modules/organs/internal/augment.dm index e64506bd30..e856df7294 100644 --- a/code/modules/organs/internal/augment.dm +++ b/code/modules/organs/internal/augment.dm @@ -84,11 +84,6 @@ */ // Attaches to the end of dropped items' code. - -/obj/item - var/destroy_on_drop = FALSE // Used by augments to determine if the item should destroy itself when dropped, or return to its master. - var/obj/item/organ/my_augment = null // Used to reference the object's host organ. - /obj/item/dropped(mob/user) . = ..(user) if(src) diff --git a/code/modules/overmap/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm index ae3f38eb42..662ddca800 100644 --- a/code/modules/overmap/disperser/disperser_console.dm +++ b/code/modules/overmap/disperser/disperser_console.dm @@ -199,7 +199,7 @@ middle.update_idle_power_usage(strength * range * 100) . = TRUE - if("fire") + if(BURN) fire(ui.user) . = TRUE diff --git a/code/modules/power/tesla/tesla_act.dm b/code/modules/power/tesla/tesla_act.dm index ede7a52a75..16a5669ac2 100644 --- a/code/modules/power/tesla/tesla_act.dm +++ b/code/modules/power/tesla/tesla_act.dm @@ -2,9 +2,6 @@ // Vars and Default tesla_act behavior //////////////////////////////////////// -/obj - var/being_shocked = FALSE - /obj/proc/tesla_act(var/power) being_shocked = TRUE var/power_bounced = power / 2 diff --git a/code/modules/radiation/radiation.dm b/code/modules/radiation/radiation.dm index f0f38ae54e..32db1b7a69 100644 --- a/code/modules/radiation/radiation.dm +++ b/code/modules/radiation/radiation.dm @@ -59,9 +59,6 @@ cached_rad_resistance = 60 //Three times that of a steel wall. Rock is less dense than steel, but this is assuming that a normal wall isn't just solid steel all the way through like rock turfs are. return -/obj - var/rad_resistance = 0 // Allow overriding rad resistance - // If people expand the system, this may be useful. Here as a placeholder until then /atom/proc/rad_act(var/severity) return 1 diff --git a/code/modules/reagents/reactions/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index 205ef3ac47..2f19ce1b41 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -784,16 +784,18 @@ for(var/mob/living/carbon/M in viewers(world.view, location)) switch(get_dist(M, location)) if(0 to 3) - if(hasvar(M, "glasses")) - if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) + if(ishuman(M)) + var/mob/living/carbon/human/target = M + if(istype(target.glasses, /obj/item/clothing/glasses/sunglasses)) continue M.flash_eyes() M.Weaken(15) if(4 to 5) - if(hasvar(M, "glasses")) - if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) + if(ishuman(M)) + var/mob/living/carbon/human/target = M + if(istype(target.glasses, /obj/item/clothing/glasses/sunglasses)) continue M.flash_eyes() diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 0cabe6b44f..a0a00181e4 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -10,7 +10,6 @@ anchored = FALSE density = FALSE pressure_resistance = 5*ONE_ATMOSPHERE - matter = list(MAT_STEEL = 1850) level = 2 var/sortType = "" var/ptype = 0 diff --git a/code/modules/tools/tool_quality.dm b/code/modules/tools/tool_quality.dm index b1de248fac..baaf7fdb1f 100644 --- a/code/modules/tools/tool_quality.dm +++ b/code/modules/tools/tool_quality.dm @@ -1,6 +1,3 @@ -/obj/item - var/list/tool_qualities = list() - /obj/item/examine(mob/user) . = ..() for(var/qual in tool_qualities) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 70a53e10b1..0812b356b6 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -132,12 +132,12 @@ else to_chat(user, span_notice("Unable to repair while [src] is off.")) - else if(hasvar(W,"force") && hasvar(W,"damtype")) + else if(W.force && W.damtype) user.setClickCooldown(user.get_attack_speed(W)) switch(W.damtype) - if("fire") + if(BURN) health -= W.force * fire_dam_coeff - if("brute") + if(BRUTE) health -= W.force * brute_dam_coeff ..() healthcheck() diff --git a/code/modules/vore/eating/contaminate_vr.dm b/code/modules/vore/eating/contaminate_vr.dm index 8788fb4061..5b85791ee1 100644 --- a/code/modules/vore/eating/contaminate_vr.dm +++ b/code/modules/vore/eating/contaminate_vr.dm @@ -16,13 +16,6 @@ var/list/gurgled_overlays = list( "pink" = image('icons/effects/sludgeoverlay_vr.dmi', icon_state = "pink") ) -/obj/item - var/gurgled = FALSE - var/oldname - var/cleanname - var/cleandesc - var/gurgled_color - /obj/item/proc/gurgle_contaminate(atom/movable/item_storage = null, contamination_flavor = "Generic", contamination_color = "green") if(!can_gurgle()) return FALSE diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index e4429a3619..5c424e7bd3 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -241,10 +241,3 @@ return FALSE //moved prot organ digest to their appropriate file - -// Gradual damage measurement -/obj/item - var/digest_stage = null - var/d_mult_old = 1 //digest stage descriptions - var/d_mult = 1 //digest stage descriptions - var/d_stage_overlay //digest stage effects diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 0bff4cf8c7..ef558cc44e 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -785,9 +785,6 @@ if(new_color) glow_color = new_color -/obj/item - var/trash_eatable = TRUE - /mob/living/proc/get_digestion_nutrition_modifier() return 1 diff --git a/code/modules/xenoarcheaology/tools/artifact_analyser.dm b/code/modules/xenoarcheaology/tools/artifact_analyser.dm index 96708cf548..15acbdccff 100644 --- a/code/modules/xenoarcheaology/tools/artifact_analyser.dm +++ b/code/modules/xenoarcheaology/tools/artifact_analyser.dm @@ -80,11 +80,11 @@ continue if(istype(O, /obj/machinery/artifact)) var/obj/machinery/artifact/A = O - if(A.being_used) + if(A.in_use) artifact_in_use = 1 else A.anchored = TRUE - A.being_used = 1 + A.in_use = 1 if(artifact_in_use) atom_say("Cannot scan. Too much interference.") @@ -134,7 +134,7 @@ if(scanned_object && istype(scanned_object, /obj/machinery/artifact)) var/obj/machinery/artifact/A = scanned_object A.anchored = FALSE - A.being_used = 0 + A.in_use = 0 scanned_object = null //hardcoded responses, oh well diff --git a/code/modules/xenoarcheaology/tools/artifact_harvester.dm b/code/modules/xenoarcheaology/tools/artifact_harvester.dm index 12dfc81c0c..2ceb69d098 100644 --- a/code/modules/xenoarcheaology/tools/artifact_harvester.dm +++ b/code/modules/xenoarcheaology/tools/artifact_harvester.dm @@ -123,7 +123,7 @@ inserted_battery.battery_effect.ToggleActivate() harvesting = 0 cur_artifact.anchored = FALSE - cur_artifact.being_used = 0 + cur_artifact.in_use = 0 cur_artifact = null atom_say("Energy harvesting interrupted.") icon_state = "incubator" @@ -173,7 +173,7 @@ atom_say("Cannot harvest. No noteworthy energy signature isolated.") return - if(analysed && analysed.being_used) + if(analysed && analysed.in_use) atom_say("Cannot harvest. Source already being harvested.") return @@ -236,7 +236,7 @@ harvesting = 1 update_use_power(USE_POWER_ACTIVE) cur_artifact.anchored = TRUE - cur_artifact.being_used = 1 + cur_artifact.in_use = 1 icon_state = "incubator_on" atom_say("Beginning energy harvesting.") @@ -268,7 +268,7 @@ update_use_power(USE_POWER_IDLE) harvesting = 0 cur_artifact.anchored = FALSE - cur_artifact.being_used = 0 + cur_artifact.in_use = 0 cur_artifact = null src.visible_message(span_bold("[name]") + " states, \"Battery is full.\"") icon_state = "incubator" diff --git a/icons/obj/machines/floor_light.dmi b/icons/obj/machines/floor_light.dmi index c238649280..31cb03e203 100644 Binary files a/icons/obj/machines/floor_light.dmi and b/icons/obj/machines/floor_light.dmi differ