The last batch of linter fixes (#27039)

* Added arguments to all gib() implementations

* Fixed ai/login.dm

* add arguments to remaining gib() impls

* i forgot this motherfucker's gib() arguments

* added type hint to global_runesets

* fixed weird for loop

* fixed blisterol not doing anything

* added a bunch of type hints

* wipe from the face of the earth the fuckery with the buckle verbs

* added type hints to the cmc

* Fixed arguments to apply_damage
This commit is contained in:
DamianX
2020-07-08 15:02:16 +02:00
committed by GitHub
parent b40cccbee5
commit e811ce6a21
22 changed files with 90 additions and 102 deletions

View File

@@ -475,10 +475,10 @@ datum/gas_mixture/proc/calculate_firelevel(var/turf/T)
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
apply_damage(2.5*mx*head_exposure, BURN, LIMB_HEAD, 0, 0, "Fire")
apply_damage(2.5*mx*chest_exposure, BURN, LIMB_CHEST, 0, 0, "Fire")
apply_damage(2.0*mx*groin_exposure, BURN, LIMB_GROIN, 0, 0, "Fire")
apply_damage(0.6*mx*legs_exposure, BURN, LIMB_LEFT_LEG, 0, 0, "Fire")
apply_damage(0.6*mx*legs_exposure, BURN, LIMB_RIGHT_LEG, 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, LIMB_LEFT_ARM, 0, 0, "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, LIMB_RIGHT_ARM, 0, 0, "Fire")
apply_damage(2.5*mx*head_exposure, BURN, LIMB_HEAD, 0, 0, used_weapon = "Fire")
apply_damage(2.5*mx*chest_exposure, BURN, LIMB_CHEST, 0, 0, used_weapon ="Fire")
apply_damage(2.0*mx*groin_exposure, BURN, LIMB_GROIN, 0, 0, used_weapon ="Fire")
apply_damage(0.6*mx*legs_exposure, BURN, LIMB_LEFT_LEG, 0, 0, used_weapon = "Fire")
apply_damage(0.6*mx*legs_exposure, BURN, LIMB_RIGHT_LEG, 0, 0, used_weapon = "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, LIMB_LEFT_ARM, 0, 0, used_weapon = "Fire")
apply_damage(0.4*mx*arms_exposure, BURN, LIMB_RIGHT_ARM, 0, 0, used_weapon = "Fire")

View File

@@ -1,5 +1,5 @@
var/runesets_initialized = 0
var/list/global_runesets = list()
var/list/datum/runeset/global_runesets = list()
/datum/runeset //Abstract base class
var/identifier //Key mapped to this runeset in runesets. Also used to sync runewords and runesets

View File

@@ -78,8 +78,8 @@
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H=M
H.apply_damage(3, BURN, LIMB_LEFT_LEG, 0, 0, "Slag")
H.apply_damage(3, BURN, LIMB_RIGHT_LEG, 0, 0, "Slag")
H.apply_damage(3, BURN, LIMB_LEFT_LEG, 0, 0, used_weapon = "Slag")
H.apply_damage(3, BURN, LIMB_RIGHT_LEG, 0, 0, used_weapon = "Slag")
else if(istype(M,/mob/living))
var/mob/living/L=M
L.apply_damage(125, BURN)

View File

@@ -10,12 +10,12 @@
sheet_type = /obj/item/stack/sheet/metal
sheet_amt = 1
var/mob_lock_type = /datum/locking_category/buckle/bed
var/buckle_range = 0 // The distance a spessman needs to be within in order
// to be able to use the buckle_in_out verb
/obj/structure/bed/New()
..()
if(material_type)
sheet_type = material_type.sheettype
verbs -= /obj/structure/bed/verb/buckle_out
/obj/structure/bed/cultify()
var/obj/structure/bed/chair/wood/wings/I = new /obj/structure/bed/chair/wood/wings(loc)
@@ -51,17 +51,19 @@
/obj/structure/bed/AltClick(mob/user as mob)
buckle_mob(user, user)
/obj/structure/bed/verb/buckle_in()
set name = "Buckle In"
/obj/structure/bed/verb/buckle_in_out()
set name = "Buckle In/Out"
set category = "Object"
set src in range(0)
buckle_mob(usr, usr)
set src in range(1)
/obj/structure/bed/verb/buckle_out()
set name = "Buckle Out"
set category = "Object"
set src in range(0)
manual_unbuckle(usr)
var/list/locked_mobs = get_locked(mob_lock_type)
if(usr in locked_mobs)
manual_unbuckle(usr)
else
if(get_dist(usr, src) > buckle_range)
to_chat(usr, "<span class='warning'>You're too far away.</span>")
return
buckle_mob(usr, usr)
/obj/structure/bed/proc/manual_unbuckle(var/mob/user)
if(user.isStunned())
@@ -97,8 +99,6 @@
"You hear metal clanking.")
playsound(src, 'sound/misc/buckle_unclick.ogg', 50, 1)
M.clear_alert(SCREEN_ALARM_BUCKLE)
verbs += /obj/structure/bed/verb/buckle_in
verbs -= /obj/structure/bed/verb/buckle_out
return TRUE
/obj/structure/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
@@ -144,8 +144,6 @@
lock_atom(M, mob_lock_type)
M.throw_alert(SCREEN_ALARM_BUCKLE, /obj/abstract/screen/alert/object/buckled, new_master = src)
verbs -= /obj/structure/bed/verb/buckle_in
verbs += /obj/structure/bed/verb/buckle_out
if(M.pulledby)
M.pulledby.start_pulling(src)

View File

@@ -360,7 +360,7 @@
if(!ishigherbeing(user) || !Adjacent(user) || user.incapacitated() || user.lying) // Doesn't work if you're not dragging yourself, not a human, not in range or incapacitated
return
var/mob/living/carbon/M = user
M.apply_damage(2, BRUTE, LIMB_HEAD, used_weapon = "[src]")
M.apply_damage(2, BRUTE, LIMB_HEAD, used_weapon = name)
M.adjustBrainLoss(5)
M.Knockdown(1)
M.Stun(1)

View File

@@ -22,7 +22,7 @@
anchored = 1
density = 1
noghostspin = 1 //You guys are no fun
buckle_range = 1
var/empstun = 0
var/health = 100
var/max_health = 100
@@ -82,8 +82,6 @@
make_offsets()
if(headlights)
new /datum/action/vehicle/toggle_headlights(src)
verbs -= /obj/structure/bed/verb/buckle_in //idk how to do this properly
verbs -= /obj/structure/bed/chair/vehicle/buckle_out
/obj/structure/bed/chair/vehicle/Destroy()
vehicle_list.Remove(src)
@@ -231,13 +229,6 @@
return 0
return 1
/obj/structure/bed/chair/vehicle/buckle_in()
set src in range(1)
buckle_mob(usr, usr)
/obj/structure/bed/chair/vehicle/buckle_out()
manual_unbuckle(usr)
/obj/structure/bed/chair/vehicle/buckle_mob(mob/M, mob/user)
if(!can_buckle(M,user))
return
@@ -255,16 +246,11 @@
if (action.owner && action.owner != user)
action.Remove(action.owner)
action.Grant(user)
verbs -= /obj/structure/bed/chair/vehicle/buckle_in
verbs += /obj/structure/bed/chair/vehicle/buckle_out
/obj/structure/bed/chair/vehicle/manual_unbuckle(user)
..()
for (var/datum/action/action in vehicle_actions)
action.Remove(user)
verbs += /obj/structure/bed/chair/vehicle/buckle_in
verbs -= /obj/structure/bed/verb/buckle_in //here too
verbs -= /obj/structure/bed/chair/vehicle/buckle_out
/obj/structure/bed/chair/vehicle/handle_layer()
if(dir == SOUTH)

View File

@@ -1646,7 +1646,7 @@
return alert(usr, "The game has already started.", null, null, null, null)
if(master_mode != "Dynamic Mode")
return alert(usr, "The game mode has to be Dynamic Mode!", null, null, null, null)
var/roundstart_rules = list()
var/list/datum/dynamic_ruleset/roundstart/roundstart_rules = list()
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
roundstart_rules[newrule.name] = newrule
@@ -1687,7 +1687,7 @@
return alert(usr, "The game must start first.", null, null, null, null)
if(master_mode != "Dynamic Mode")
return alert(usr, "The game mode has to be Dynamic Mode!", null, null, null, null)
var/latejoin_rules = list()
var/list/datum/dynamic_ruleset/latejoin/latejoin_rules = list()
for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
var/datum/dynamic_ruleset/latejoin/newrule = new rule()
latejoin_rules[newrule.name] = newrule
@@ -3588,7 +3588,7 @@
lavaturfs += F
spawn(0)
for(var/i = i, i < length, i++) // 180 = 3 minutes
for(var/i = 0, i < length, i++) // 180 = 3 minutes
if(damage)
for(var/mob/living/carbon/L in living_mob_list)
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!

View File

@@ -1,4 +1,4 @@
var/list/cmc_holomap_cache = list()
var/list/obj/abstract/screen/interface/tooltip/CrewIcon/cmc_holomap_cache = list()
#define ENTRY_SEE_X 1
#define ENTRY_SEE_Y 2
#define ENTRY_MOB 3
@@ -35,11 +35,11 @@ Crew Monitor by Paul, based on the holomaps by Deity
Holomap stuff
*/
//DONT touch, integral to the inner workings
var/list/holomap_images = list() //list of lists of images for the people using the console
var/list/list/holomap_images = list() //list of lists of images for the people using the console
var/list/holomap_z = list() //list of _using selected z_levels
var/list/holomap_tooltips = list() //list of lists of markers for the people using the console
var/list/list/holomap_tooltips = list() //list of lists of markers for the people using the console
var/list/freeze = list() //list of _using set freeze
var/list/entries = list() //list of all crew, which has sensors >= 1
var/list/list/entries = list() //list of all crew, which has sensors >= 1
var/list/textview_updatequeued = list() //list of _using set textviewupdate setting
var/list/holomap = list() //list of _using set holomap-enable setting
var/list/jobs = list( //needed for formatting, stolen from the old cmc
@@ -149,9 +149,11 @@ GENERAL PROCS
deactivate(user)
return
if(!(holomap_z[uid] in (holomap_z_levels_mapped | holomap_z_levels_unmapped))) //catching some more unwanted behaviours
if((holomap_z_levels_mapped | holomap_z_levels_unmapped).len > 0)
holomap_z[uid] = (holomap_z_levels_mapped | holomap_z_levels_unmapped)[1]
var/list/mapped_and_unmapped = holomap_z_levels_mapped | holomap_z_levels_unmapped
if(!(holomap_z[uid] in mapped_and_unmapped)) //catching some more unwanted behaviours
if(mapped_and_unmapped.len > 0)
holomap_z[uid] = mapped_and_unmapped[1]
else
deactivate(user)

View File

@@ -1,6 +1,6 @@
//This is the proc for gibbing a mob. Cannot gib ghosts.
//added different sort of gibs and animations. N
/mob/proc/gib()
/mob/proc/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/alien/gib()
/mob/living/carbon/alien/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -16,7 +16,7 @@
return ..(gibbed)
/mob/living/carbon/brain/gib()
/mob/living/carbon/brain/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -86,7 +86,7 @@
playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
user.delayNextMove(10) //no just holding the key for an instant gib
/mob/living/carbon/gib()
/mob/living/carbon/gib(animation = FALSE, meat = TRUE)
dropBorers(1)
if(stomach_contents && stomach_contents.len)
drop_stomach_contents()

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/human/gib()
/mob/living/carbon/human/gib(animation = FALSE, meat = TRUE)
if(species)
species.gib(src)
return

View File

@@ -303,6 +303,7 @@ This function restores all organs.
/mob/living/carbon/human/get_organ(var/zone)
RETURN_TYPE(/datum/organ/external)
if(!zone)
zone = LIMB_CHEST
if (zone in list( "eyes", "mouth" ))

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/monkey/gib()
/mob/living/carbon/monkey/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null, ignore_events = 0)
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, sharp, edge, var/used_weapon = null, ignore_events = 0)
if(!damage)
return 0
var/damage_done = (damage/100)*(100-blocked)

View File

@@ -11,7 +11,7 @@
handle_symptom_on_death()
..()
/mob/living/gib()
/mob/living/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -10,7 +10,8 @@
if(ismalf(src))
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
for(var/obj/effect/rune/rune in global_runesets["blood_cult"].rune_list) //HOLY FUCK WHO THOUGHT LOOPING THROUGH THE WORLD WAS A GOOD IDEA
var/datum/runeset/rune_set = global_runesets["blood_cult"]
for(var/obj/effect/rune/rune in rune_set.rune_list) //HOLY FUCK WHO THOUGHT LOOPING THROUGH THE WORLD WAS A GOOD IDEA
client.images += rune.blood_image
regenerate_icons()

View File

@@ -1,4 +1,4 @@
/mob/living/silicon/gib()
/mob/living/silicon/gib(animation = FALSE, meat = TRUE)
death(1)
monkeyizing = 1
canmove = 0

View File

@@ -1,4 +1,4 @@
/mob/living/silicon/robot/gib()
/mob/living/silicon/robot/gib(animation = FALSE, meat = TRUE)
//robots don't die when gibbed. instead they drop their MMI'd brain
disconnect_AI()
monkeyizing = TRUE

View File

@@ -78,8 +78,8 @@
W.time_inflicted = world.time
/mob/living/carbon/human/var/list/organs = list()
/mob/living/carbon/human/var/list/organs_by_name = list() //Map organ names to organs
/mob/living/carbon/human/var/list/internal_organs_by_name = list() //So internal organs have less ickiness too
/mob/living/carbon/human/var/list/datum/organ/external/organs_by_name = list() //Map organ names to organs
/mob/living/carbon/human/var/list/datum/organ/internal/internal_organs_by_name = list() //So internal organs have less ickiness too
/mob/living/carbon/human/var/list/grasp_organs = list()
/mob/living/carbon/human/proc/can_use_hand(var/this_hand = active_hand)

View File

@@ -2911,7 +2911,7 @@
if(..())
return 1
M.heal_organ_damage(4 * REM, -1 * REM) //heal 2 brute, cause 0.5 burn
M.heal_organ_damage(4 * REM, -1 * REM) //heal 2 brute, cause 0.5 burn
/datum/reagent/hyperzine
name = "Hyperzine"