diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index d99823a0a12..d5c57c930b5 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -426,7 +426,7 @@ client /client/proc/view_var_Topic(href, href_list, hsrc) //This should all be moved over to datum/admins/Topic() or something ~Carn - if( (usr.client != src) || !src.holder ) + if(!check_rights(R_ADMIN|R_MOD)) return if(href_list["Vars"]) debug_variables(locate(href_list["Vars"])) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index ab594b30ba1..a9b2677aa89 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -201,7 +201,7 @@ a = get_area(src.loc) else var/error = dist_y/2 - dist_x - while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) + while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up if(error < 0) var/atom/step = get_step(src, dx) diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 449d15fc1bc..8ee532de4db 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -12,7 +12,7 @@ desc = "Completely shuts down the speech center of the subject's brain." activation_message = "You feel unable to express yourself at all." deactivation_message = "You feel able to speak freely again." - sdisability = 1 + sdisability = MUTE New() ..() diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm index 57a1e29c36e..2f3b19f0dcc 100644 --- a/code/game/gamemodes/meteor/meteor.dm +++ b/code/game/gamemodes/meteor/meteor.dm @@ -32,12 +32,13 @@ /datum/game_mode/meteor/proc/sendmeteors() nometeors = 1 - var/waveduration = world.timeofday + rand(3000,9000) - var/waitduration = rand(3000,9000) - while(waveduration - world.timeofday > 0) - sleep(20) - spawn() spawn_meteors(6) - spawn(waitduration) + spawn() + var/waveduration = world.time + rand(3000,9000) + var/waitduration = rand(3000,9000) + while(waveduration - world.time > 0) + sleep(20) + spawn() spawn_meteors(6) + sleep(waitduration) nometeors = 0 /datum/game_mode/meteor/declare_completion() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 9f0a05974e3..0c4703843c7 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -86,6 +86,8 @@ return /obj/machinery/bodyscanner/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) + if(!istype(O)) + return if(O.loc == user) //no you can't pull things out of your ass return if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other diff --git a/code/game/objects/items/mountable_frames/intercom.dm b/code/game/objects/items/mountable_frames/intercom.dm index e6e2cd3a6bd..c088c8c30a1 100644 --- a/code/game/objects/items/mountable_frames/intercom.dm +++ b/code/game/objects/items/mountable_frames/intercom.dm @@ -6,5 +6,5 @@ mount_reqs = list("simfloor", "nospace") /obj/item/mounted/frame/intercom/do_build(turf/on_wall, mob/user) - new /obj/item/device/radio/intercom(get_turf(src), get_dir(on_wall, user), 0) + new /obj/item/device/radio/intercom(get_turf(src), get_dir(user, on_wall), 0) qdel(src) \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index e9f67a3b060..d65a4d33383 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -31,10 +31,6 @@ g_amt = 0 created_window = /obj/structure/window/basic -/obj/item/stack/sheet/glass/full/New() - ..() - amount = 50 - /obj/item/stack/sheet/glass/attack_self(mob/user as mob) construct_window(user) diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index 7b2b30660ec..8bb97f4f256 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -1,5 +1,6 @@ /obj/item/stack/light_w name = "wired glass tiles" + gender = PLURAL singular_name = "wired glass floor tile" desc = "A glass tile, which is wired, somehow." icon_state = "glass_wire" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 3f7190e90e2..af8ac8cc04f 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -90,10 +90,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ flags = CONDUCT origin_tech = "materials=1" -/obj/item/stack/sheet/metal/full/New() - ..() - amount = 50 - /obj/item/stack/sheet/metal/cyborg name = "metal" desc = "Sheets made out off metal. It has been dubbed Metal Sheets." @@ -136,10 +132,6 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ recipes = plasteel_recipes return ..() -/obj/item/stack/sheet/plasteel/full/New(var/loc, var/amount=null) - amount = 50 - ..(loc, amount) - /* * Wood */ @@ -161,6 +153,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ /obj/item/stack/sheet/wood name = "wooden planks" desc = "One can only guess that this is a bunch of wood." + gender = PLURAL singular_name = "wood plank" icon_state = "sheet-wood" origin_tech = "materials=1;biotech=1" diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index f7e53bde3ab..3db6ae018f8 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -142,11 +142,11 @@ new_item.amount = R.res_amount*multiplier //new_item.add_to_stacks(usr) src.amount-=R.req_amount*multiplier - if (src.amount<=0) + if (src.amount < 1) // Just in case a stack's amount ends up fractional somehow var/oldsrc = src src = null //dont kill proc after del() usr.unEquip(oldsrc, 1) - del(oldsrc) + del(oldsrc) // Not qdel, because qdel'd stacks act strange for cyborgs if (istype(O,/obj/item)) usr.put_in_hands(O) O.add_fingerprint(usr) @@ -165,10 +165,11 @@ if (amount < used) return 0 amount -= used - if (amount <= 0) + if (amount < 1) // Just in case a stack's amount ends up fractional somehow if(usr) usr.unEquip(src, 1) - qdel(src) + spawn() + del(src) // Not qdel, because qdel'd stacks act strange for cyborgs update_icon() return 1 diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm index 3931aa8f444..943e593183e 100644 --- a/code/game/objects/items/stacks/tiles/light.dm +++ b/code/game/objects/items/stacks/tiles/light.dm @@ -8,6 +8,7 @@ /obj/item/stack/tile/light name = "light tiles" + gender = PLURAL singular_name = "light floor tile" desc = "A floor tile, made out off glass. Use a multitool on it to change its color." icon_state = "tile_light blue" diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm index ee9c5832f72..33e55268d6f 100644 --- a/code/game/objects/items/stacks/tiles/plasteel.dm +++ b/code/game/objects/items/stacks/tiles/plasteel.dm @@ -1,5 +1,6 @@ /obj/item/stack/tile/plasteel name = "floor tiles" + gender = PLURAL singular_name = "floor tile" desc = "Those could work as a pretty decent throwing weapon" icon_state = "tile" diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index b6ae03aa271..f54f2481bb6 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -10,6 +10,7 @@ */ /obj/item/stack/tile/grass name = "grass tiles" + gender = PLURAL singular_name = "grass floor tile" desc = "A patch of grass like they often use on golf courses" icon_state = "tile_grass" @@ -27,6 +28,7 @@ */ /obj/item/stack/tile/wood name = "wood floor tiles" + gender = PLURAL singular_name = "wood floor tile" desc = "an easy to fit wood floor tile" icon_state = "tile-wood" diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index dd03d48cec8..91479c961a7 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -41,10 +41,10 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] flick("e_flash", M.flash) - E.damage += rand(1, 3) + if (E) E.damage += rand(1, 3) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - if (E.damage >= E.min_bruised_damage) + if (E && E.damage >= E.min_bruised_damage) M << "Your eyes start to burn badly!" if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang))) if (E.damage >= E.min_broken_damage) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 7fa7ebe40e0..a3eb2af3c68 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -424,9 +424,9 @@ var/can_call_ert M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/full(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass/full(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal(M, amount=50), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass(M, amount=50), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel(M, amount=50), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/inflatable(M), slot_r_hand) @@ -560,9 +560,9 @@ var/can_call_ert M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/full(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass/full(M), slot_in_backpack) - M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal(M, amount=50), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass(M, amount=50), slot_in_backpack) + M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel(M, amount=50), slot_in_backpack) M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 81086f3b3ef..9cd97ddcb42 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -38,6 +38,7 @@ var/global/nologevent = 0 if (!istype(src,/datum/admins)) usr << "Error: you are not an admin!" return + if(!check_rights(R_ADMIN|R_MOD)) return var/body = "