mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Further clean up code, remove some arg defaults, fix some bugs
This commit is contained in:
+22
-22
@@ -16,34 +16,34 @@
|
||||
var/fire
|
||||
var/acid
|
||||
|
||||
/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
/datum/armor/New(melee_value = 0, bullet_value = 0, laser_value = 0, energy_value = 0, bomb_value = 0, bio_value = 0, rad_value = 0, fire_value = 0, acid_value = 0)
|
||||
melee = melee_value
|
||||
bullet = bullet_value
|
||||
laser = laser_value
|
||||
energy = energy_value
|
||||
bomb = bomb_value
|
||||
bio = bio_value
|
||||
rad = rad_value
|
||||
fire = fire_value
|
||||
acid = acid_value
|
||||
tag = ARMORID
|
||||
|
||||
/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
return getArmor(src.melee + melee, src.bullet + bullet, src.laser + laser, src.energy + energy, src.bomb + bomb, src.bio + bio, src.rad + rad, src.fire + fire, src.acid + acid)
|
||||
/datum/armor/proc/modifyRating(melee_value = 0, bullet_value = 0, laser_value = 0, energy_value = 0, bomb_value = 0, bio_value = 0, rad_value = 0, fire_value = 0, acid_value = 0)
|
||||
return getArmor(melee + melee_value, bullet + bullet_value, laser + laser_value, energy + energy_value, bomb + bomb_value, bio + bio_value, rad + rad_value, fire + fire_value, acid + acid_value)
|
||||
|
||||
/datum/armor/proc/modifyAllRatings(modifier = 0)
|
||||
return getArmor(melee + modifier, bullet + modifier, laser + modifier, energy + modifier, bomb + modifier, bio + modifier, rad + modifier, fire + modifier, acid + modifier)
|
||||
|
||||
/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid)
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid))
|
||||
/datum/armor/proc/setRating(melee_value, bullet_value, laser_value, energy_value, bomb_value, bio_value, rad_value, fire_value, acid_value)
|
||||
return getArmor((isnull(melee_value) ? melee : melee_value),\
|
||||
(isnull(bullet_value) ? bullet : bullet_value),\
|
||||
(isnull(laser_value) ? laser : laser_value),\
|
||||
(isnull(energy_value) ? energy : energy_value),\
|
||||
(isnull(bomb_value) ? bomb : bomb_value),\
|
||||
(isnull(bio_value) ? bio : bio_value),\
|
||||
(isnull(rad_value) ? rad : rad_value),\
|
||||
(isnull(fire_value) ? fire : fire_value),\
|
||||
(isnull(acid_value) ? acid : acid_value))
|
||||
|
||||
/datum/armor/proc/getRating(rating)
|
||||
return vars[rating]
|
||||
|
||||
+4
-4
@@ -231,10 +231,10 @@
|
||||
/atom/proc/HasProximity(atom/movable/AM as mob|obj)
|
||||
return
|
||||
|
||||
/atom/proc/emp_act(severity = 0)
|
||||
/atom/proc/emp_act(severity)
|
||||
return
|
||||
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone = "")
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
|
||||
. = P.on_hit(src, 0, def_zone)
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
/atom/proc/blob_act(obj/structure/blob/B)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B)
|
||||
|
||||
/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature = 0, exposed_volume = 0, global_overlay = TRUE)
|
||||
/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume)
|
||||
if(reagents)
|
||||
reagents.temperature_reagents(exposed_temperature)
|
||||
@@ -378,7 +378,7 @@
|
||||
// Atoms that return TRUE prevent RPDs placing any kind of pipes on their turf.
|
||||
return FALSE
|
||||
|
||||
/atom/proc/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = FALSE, blocked = FALSE, datum/thrownthing/throwingdatum)
|
||||
/atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(density && !has_gravity(AM)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...).
|
||||
addtimer(CALLBACK(src, .proc/hitby_react, AM), 2)
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
if(VEST_STEALTH)
|
||||
mode = VEST_COMBAT
|
||||
DeactivateStealth()
|
||||
armor = combat_armor
|
||||
armor = getArmor(combat_armor)
|
||||
icon_state = "vest_combat"
|
||||
if(VEST_COMBAT)// TO STEALTH
|
||||
mode = VEST_STEALTH
|
||||
armor = stealth_armor
|
||||
armor = getArmor(stealth_armor)
|
||||
icon_state = "vest_stealth"
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
|
||||
@@ -19,6 +19,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
can_be_hit = FALSE
|
||||
suicidal_hands = TRUE
|
||||
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
var/throwhitsound
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
var/sharp = FALSE // whether this object cuts
|
||||
var/in_use = FALSE // 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!
|
||||
@@ -42,8 +41,8 @@
|
||||
else
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/Initialize()
|
||||
..()
|
||||
/obj/Initialize(mapload)
|
||||
. = ..()
|
||||
if (islist(armor))
|
||||
armor = getArmor(arglist(armor))
|
||||
else if (!armor)
|
||||
@@ -100,7 +99,7 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air(amount = 0)
|
||||
/obj/remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
@@ -112,7 +111,7 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request = 0)
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
@@ -187,7 +186,7 @@
|
||||
if(istype(M) && M.client && M.machine == src)
|
||||
src.attack_self(M)
|
||||
|
||||
/obj/proc/hide(h = FALSE)
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
/obj/proc/hear_talk(mob/M, list/message_pieces)
|
||||
@@ -219,7 +218,7 @@
|
||||
dat += " <a href='?src=[UID()];link=1'>\[Link\]</a> "
|
||||
return dat
|
||||
|
||||
/obj/proc/format_tag(label = "", varname = "", act = "set_tag")
|
||||
/obj/proc/format_tag(label, varname, act = "set_tag")
|
||||
var/value = vars[varname]
|
||||
if(!value || value == "")
|
||||
value = "-----"
|
||||
@@ -308,12 +307,12 @@ a {
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/water_act(volume = 0, temperature = 0, source, method = REAGENT_TOUCH)
|
||||
/obj/water_act(volume, temperature, source, method = REAGENT_TOUCH)
|
||||
. = ..()
|
||||
extinguish()
|
||||
acid_level = 0
|
||||
|
||||
/obj/singularity_pull(S, current_size = 0)
|
||||
/obj/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src, S)
|
||||
|
||||
@@ -306,9 +306,9 @@
|
||||
for(var/mob/living/M in src)
|
||||
if(M == U)
|
||||
continue//Will not harm U. Since null != M, can be excluded to kill everyone.
|
||||
addtimer(CALLBACK(M, /mob/.proc/gib), 0)
|
||||
INVOKE_ASYNC(M, /mob/.proc/gib)
|
||||
for(var/obj/mecha/M in src)//Mecha are not gibbed but are damaged.
|
||||
addtimer(CALLBACK(M, /obj/mecha/.proc/take_damage, 100, "brute"), 0)
|
||||
INVOKE_ASYNC(M, /obj/mecha/.proc/take_damage, 100, "brute")
|
||||
|
||||
/turf/proc/Bless()
|
||||
flags |= NOJAUNT
|
||||
|
||||
@@ -155,9 +155,8 @@
|
||||
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
if(islist(armor))
|
||||
var/list/L = armor
|
||||
piece.armor = L.Copy()
|
||||
if(armor)
|
||||
piece.armor = armor
|
||||
|
||||
update_icon(1)
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
wires = new(src)
|
||||
connected_parts = list()
|
||||
update_icon()
|
||||
use_log = list()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/Destroy()
|
||||
if(active)
|
||||
|
||||
Reference in New Issue
Block a user