mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
Gets rid of hasvar usage and moves up some vars (#18262)
* Gets rid of hasvar usage * thiiis * moves damtype to /obj/item * throwing * Move vars moved * matter as well Pretty much only used for the robot lathe and when crafting...When you could only smelt down obj/item for its materials * Update floor_light.dm * exploitable * this can be moved up... * move persist to /item you can't ever place /obj in storage anyway...It would imply you can store the supermatter, which I think we don't want. * gets rid of being_used I added this for xenoarch, that was a mistake * move these * move these to the base file * Makes floorlight autolathe recipe not shit * Update floor_light.dm * Update floor_light.dm * Mechs no longer gib when hitting things --------- Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
This commit is contained in:
@@ -3,9 +3,6 @@
|
||||
var/turf/T = get_turf(src.mob)
|
||||
explosion(T, power)
|
||||
|
||||
/obj
|
||||
var/explosion_resistance
|
||||
|
||||
/turf
|
||||
var/explosion_resistance
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -115,6 +122,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)
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user