From 42873d424e8f9a1b099b4f802baf13eca944b65e Mon Sep 17 00:00:00 2001 From: L Date: Fri, 25 Oct 2019 04:26:09 -0300 Subject: [PATCH] Cleanup --- code/_onclick/drag_drop.dm | 6 ------ code/_onclick/hud/alert.dm | 3 --- code/_onclick/hud/fullscreen.dm | 4 ---- code/_onclick/hud/hud.dm | 3 --- code/datums/soullink.dm | 20 ------------------- code/datums/wires/_wires.dm | 3 --- code/game/alternate_appearance.dm | 4 ---- code/game/atoms.dm | 3 +++ code/game/gamemodes/sandbox/h_sandbox.dm | 4 ---- code/game/objects/items.dm | 2 ++ code/modules/client/client_colour.dm | 5 ----- .../detectivework/footprints_and_rag.dm | 3 --- code/modules/keybindings/focus.dm | 3 --- code/modules/mob/living/carbon/carbon.dm | 3 --- .../mob/living/carbon/carbon_defines.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 7 ------- .../mob/living/carbon/human/human_defines.dm | 5 +++++ code/modules/mob/living/living.dm | 10 ++++++++++ code/modules/mob/living/living_defines.dm | 3 +++ code/modules/mob/mob_defines.dm | 11 ++++++++++ code/modules/projectiles/gun.dm | 2 ++ 21 files changed, 37 insertions(+), 68 deletions(-) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index b048fa224c9..9d48918772b 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -84,12 +84,6 @@ /obj/item/proc/onMouseUp(object, location, params, mob) return -/obj/item - var/canMouseDown = FALSE - -/obj/item/gun - var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds - /obj/item/gun/CanItemAutoclick(object, location, params) . = automatic diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index f0b5b6523ab..0374a855652 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -607,9 +607,6 @@ so as to remain in compliance with the most up-to-date laws." mymob.client.screen |= alert return 1 -/mob - var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly - /obj/screen/alert/Click(location, control, params) if(!usr || !usr.client) return diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 81dbcf28761..34149fd6f0d 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -1,7 +1,3 @@ - -/mob - var/list/screens = list() - /mob/proc/overlay_fullscreen(category, type, severity) var/obj/screen/fullscreen/screen = screens[category] if (!screen || screen.type != type) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index aaf5fee4d2e..0e687f188f4 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -114,9 +114,6 @@ GLOBAL_LIST_INIT(available_ui_styles, sortList(list( return ..() -/mob - var/hud_type = /datum/hud - /mob/proc/create_mob_hud() if(!client || hud_used) return diff --git a/code/datums/soullink.dm b/code/datums/soullink.dm index b5520b50db5..43dfe591e0b 100644 --- a/code/datums/soullink.dm +++ b/code/datums/soullink.dm @@ -1,24 +1,4 @@ - -/mob/living - var/list/ownedSoullinks //soullinks we are the owner of - var/list/sharedSoullinks //soullinks we are a/the sharer of - -/mob/living/Destroy() - for(var/s in ownedSoullinks) - var/datum/soullink/S = s - S.ownerDies(FALSE) - qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d - ownedSoullinks = null - for(var/s in sharedSoullinks) - var/datum/soullink/S = s - S.sharerDies(FALSE) - S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed - sharedSoullinks = null - return ..() - - - //Keeps track of a Mob->Mob (potentially Player->Player) connection //Can be used to trigger actions on one party when events happen to another //Eg: shared deaths diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 8204e98653b..0bde71fa847 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -11,9 +11,6 @@ if(A.attachable) return TRUE -/atom - var/datum/wires/wires = null - /atom/proc/attempt_wire_interaction(mob/user) if(!wires) return WIRE_INTERACTION_FAIL diff --git a/code/game/alternate_appearance.dm b/code/game/alternate_appearance.dm index 04f52f148c3..7c46833517c 100644 --- a/code/game/alternate_appearance.dm +++ b/code/game/alternate_appearance.dm @@ -1,9 +1,5 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances) - -/atom - var/list/alternate_appearances - /atom/proc/remove_alt_appearance(key) if(alternate_appearances) for(var/K in alternate_appearances) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 30d9844aed8..359883b9029 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -77,6 +77,9 @@ ///Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines. var/material_modifier = 1 + var/datum/wires/wires = null + + var/list/alternate_appearances /** * Called when an atom is created in byond (built in engine proc) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index a83ebfaae05..c30ab23fce7 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -1,9 +1,5 @@ - - GLOBAL_VAR_INIT(hsboxspawn, TRUE) -/mob - var/datum/hSB/sandbox = null /mob/proc/CanBuild() sandbox = new/datum/hSB sandbox.owner = src.ckey diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b2e083b3333..0823b4cee05 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -124,6 +124,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder! + var/canMouseDown = FALSE + /obj/item/Initialize() diff --git a/code/modules/client/client_colour.dm b/code/modules/client/client_colour.dm index b9716934237..309f7c2ba64 100644 --- a/code/modules/client/client_colour.dm +++ b/code/modules/client/client_colour.dm @@ -17,11 +17,6 @@ //eg: "Bloody screen" > "goggles colour" as the former is much more important -/mob - var/list/client_colours = list() - - - /* Adds an instance of colour_type to the mob's client_colours list colour_type - a typepath (subtyped from /datum/client_colour) diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 7514cece595..552d9c59bb5 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -1,7 +1,4 @@ -/mob - var/bloody_hands = 0 - /obj/item/clothing/gloves var/transfer_blood = 0 diff --git a/code/modules/keybindings/focus.dm b/code/modules/keybindings/focus.dm index 205b293e9a1..d542b492670 100644 --- a/code/modules/keybindings/focus.dm +++ b/code/modules/keybindings/focus.dm @@ -1,6 +1,3 @@ -/mob - var/datum/focus //What receives our keyboard inputs. src by default - /mob/proc/set_focus(datum/new_focus) if(focus == new_focus) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 938a0d86b11..2534d8d5f4c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,6 +1,3 @@ -/mob/living/carbon - blood_volume = BLOOD_VOLUME_NORMAL - /mob/living/carbon/Initialize() . = ..() create_reagents(1000) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 6b2fdc770b0..6862d7ce05d 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,4 +1,5 @@ /mob/living/carbon + blood_volume = BLOOD_VOLUME_NORMAL gender = MALE pressure_resistance = 15 possible_a_intents = list(INTENT_HELP, INTENT_HARM) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8b0c3c8c09f..4c707030d60 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1,10 +1,3 @@ -/mob/living/carbon/human - name = "Unknown" - real_name = "Unknown" - icon = 'icons/mob/human.dmi' - icon_state = "human_basic" - appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE - /mob/living/carbon/human/Initialize() verbs += /mob/living/proc/mob_sleep verbs += /mob/living/proc/lay_down diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index a399b1599b6..3d0a12d6215 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -1,4 +1,9 @@ /mob/living/carbon/human + name = "Unknown" + real_name = "Unknown" + icon = 'icons/mob/human.dmi' + icon_state = "human_basic" + appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD, NANITE_HUD, DIAG_NANITE_FULL_HUD,ANTAG_HUD,GLAND_HUD,SENTIENT_DISEASE_HUD) hud_type = /datum/hud/human possible_a_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7faa6904d60..69a6b580b32 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -34,6 +34,16 @@ remove_from_all_data_huds() GLOB.mob_living_list -= src QDEL_LIST(diseases) + for(var/s in ownedSoullinks) + var/datum/soullink/S = s + S.ownerDies(FALSE) + qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d + ownedSoullinks = null + for(var/s in sharedSoullinks) + var/datum/soullink/S = s + S.sharerDies(FALSE) + S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed + sharedSoullinks = null return ..() /mob/living/onZImpact(turf/T, levels) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 122a73e6252..79e63245df1 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -118,3 +118,6 @@ var/list/disease_resistances = list() var/slowed_by_drag = TRUE //Whether the mob is slowed down when dragging another prone mob + + var/list/ownedSoullinks //soullinks we are the owner of + var/list/sharedSoullinks //soullinks we are a/the sharer of diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index d96426c5406..1e75acd5da9 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -194,3 +194,14 @@ var/registered_z = null var/memory_throttle_time = 0 + + var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly + var/list/screens = list() + var/list/client_colours = list() + var/hud_type = /datum/hud + + var/datum/hSB/sandbox = null + + var/bloody_hands = 0 + + var/datum/focus //What receives our keyboard inputs. src by default diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 101b4a25ad2..fdfc4c84da0 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -69,6 +69,8 @@ var/zoom_out_amt = 0 var/datum/action/toggle_scope_zoom/azoom + var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds + /obj/item/gun/Initialize() . = ..() if(pin)