From 594625cf81523e99f75b30e81deb10e35ff0b7bd Mon Sep 17 00:00:00 2001 From: Belsima <31827220+Belsima@users.noreply.github.com> Date: Sun, 19 Nov 2017 03:52:56 -0500 Subject: [PATCH] Adds force to a pair of items that were lacking for some reason, and standardizes light replacer file. (#4280) * Adds force to lamps. * Standardization. * Standardizes a few things. * Grammar that I missed. * Some more missed grammar. --- code/game/objects/items/devices/flashlight.dm | 1 + .../objects/items/devices/lightreplacer.dm | 28 +++++++++---------- .../objects/items/weapons/storage/storage.dm | 14 +++++----- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index dd10e80859..083f83c1c9 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -290,6 +290,7 @@ name = "desk lamp" desc = "A desk lamp with an adjustable mount." icon_state = "lamp" + force = 10 brightness_on = 5 w_class = ITEMSIZE_LARGE flags = CONDUCT diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 35f41730df..8fd96981fc 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -42,7 +42,7 @@ name = "light replacer" desc = "A device to automatically replace lights. Refill with working lightbulbs or sheets of glass." - + force = 8 icon = 'icons/obj/janitor.dmi' icon_state = "lightreplacer0" flags = CONDUCT @@ -61,32 +61,32 @@ /obj/item/device/lightreplacer/examine(mob/user) if(..(user, 2)) - user << "It has [uses] lights remaining." + to_chat(user, "It has [uses] lights remaining.") /obj/item/device/lightreplacer/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass") var/obj/item/stack/G = W if(uses >= max_uses) - user << "[src.name] is full." + to_chat(user, "[src.name] is full.") return else if(G.use(1)) - AddUses(16) //Autolathe converts 1 sheet into 16 lights. - user << "You insert a piece of glass into \the [src.name]. You have [uses] light\s remaining." + add_uses(16) //Autolathe converts 1 sheet into 16 lights. + to_chat(user, "You insert a piece of glass into \the [src.name]. You have [uses] light\s remaining.") return else - user << "You need one sheet of glass to replace lights." + to_chat(user, "You need one sheet of glass to replace lights.") if(istype(W, /obj/item/weapon/light)) var/obj/item/weapon/light/L = W if(L.status == 0) // LIGHT OKAY if(uses < max_uses) - AddUses(1) - user << "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining." + add_uses(1) + to_chat(user, "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining.") user.drop_item() qdel(L) return else - user << "You need a working light." + to_chat(user, "You need a working light.") return /obj/item/device/lightreplacer/attack_self(mob/user) @@ -95,10 +95,10 @@ var/mob/living/silicon/robot/R = user if(R.emagged) src.Emag() - usr << "You shortcircuit the [src]." + to_chat(usr, You short circuit the [src].") return */ - usr << "It has [uses] lights remaining." + to_chat(usr, "It has [uses] lights remaining.") /obj/item/device/lightreplacer/update_icon() icon_state = "lightreplacer[emagged]" @@ -107,17 +107,17 @@ /obj/item/device/lightreplacer/proc/Use(var/mob/user) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - AddUses(-1) + add_uses(-1) return 1 // Negative numbers will subtract -/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1) +/obj/item/device/lightreplacer/proc/add_uses(var/amount = 1) uses = min(max(uses + amount, 0), max_uses) /obj/item/device/lightreplacer/proc/Charge(var/mob/user, var/amount = 1) charge += amount if(charge > 6) - AddUses(1) + add_uses(1) charge = 0 /obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index db55e95b44..a3ca9a4601 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -426,12 +426,12 @@ for(var/obj/item/weapon/light/L in src.contents) if(L.status == 0) if(LP.uses < LP.max_uses) - LP.AddUses(1) + LP.add_uses(1) amt_inserted++ remove_from_storage(L, T) qdel(L) if(amt_inserted) - user << "You inserted [amt_inserted] light\s into \the [LP.name]. You have [LP.uses] light\s remaining." + to_chat(user, "You inserted [amt_inserted] light\s into \the [LP.name]. You have [LP.uses] light\s remaining.") return if(!can_be_inserted(W)) @@ -441,14 +441,14 @@ var/obj/item/weapon/tray/T = W if(T.calc_carry() > 0) if(prob(85)) - user << "The tray won't fit in [src]." + to_chat(user, "The tray won't fit in [src].") return else W.forceMove(get_turf(user)) if ((user.client && user.s_active != src)) user.client.screen -= W W.dropped(user) - user << "God damnit!" + to_chat(user, "God damn it!") W.add_fingerprint(user) return handle_item_insertion(W) @@ -506,9 +506,9 @@ collection_mode = !collection_mode switch (collection_mode) if(1) - usr << "[src] now picks up all items in a tile at once." + to_chat(usr, "[src] now picks up all items on a tile at once.") if(0) - usr << "[src] now picks up one item at a time." + to_chat(usr, "[src] now picks up one item at a time.") /obj/item/weapon/storage/verb/quick_empty() @@ -539,7 +539,7 @@ var/total_storage_space = 0 for(var/obj/item/I in contents) total_storage_space += I.get_storage_cost() - max_storage_space = max(total_storage_space,max_storage_space) //prevents spawned containers from being too small for their contents + max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents. src.boxes = new /obj/screen/storage( ) src.boxes.name = "storage"