Lohikar's bugfixes (#6364)

This commit is contained in:
Mykhailo Bykhovtsev
2019-05-05 14:06:48 -07:00
committed by Werner
parent edebe4c72f
commit 15640f0286
50 changed files with 124 additions and 72 deletions

View File

@@ -13,6 +13,6 @@
#define TICKS *world.tick_lag
#define DS2TICKS(DS) (DS/world.tick_lag)
#define DS2TICKS(DS) ((DS)/world.tick_lag)
#define TICKS2DS(T) (T TICKS)
#define TICKS2DS(T) ((T) TICKS)

View File

@@ -1159,6 +1159,9 @@ var/list/wall_items = typecacheof(list(
to_chat(user, "<span class='notice'>You need to be holding [src] to do that.</span>")
return USE_FAIL_NOT_IN_USER
/atom/proc/use_check_and_message(mob/user, use_flags = 0)
. = use_check(user, use_flags, TRUE)
/obj/proc/iswrench()
return FALSE

View File

@@ -207,7 +207,6 @@
/obj/machinery/computer/scan_consolenew
name = "DNA Modifier Access Console"
desc = "Scand DNA."
icon = 'icons/obj/computer.dmi'
icon_screen = "dna"
density = 1
circuit = /obj/item/weapon/circuitboard/scan_consolenew

View File

@@ -75,7 +75,6 @@ obj/machinery/air_sensor/Destroy()
return ..()
/obj/machinery/computer/general_air_control
icon = 'icons/obj/computer.dmi'
icon_screen = "tank"
light_color = LIGHT_COLOR_CYAN
@@ -134,7 +133,6 @@ obj/machinery/computer/general_air_control/Destroy()
/obj/machinery/computer/general_air_control/large_tank_control
icon = 'icons/obj/computer.dmi'
frequency = 1441
var/input_tag
@@ -307,7 +305,6 @@ obj/machinery/computer/general_air_control/Destroy()
addtimer(CALLBACK(SSvueui, /datum/controller/subsystem/processing/vueui/proc/check_uis_for_change, src), 5) //Just in case we get no new data
/obj/machinery/computer/general_air_control/fuel_injection
icon = 'icons/obj/computer.dmi'
icon_screen = "alert:0"
var/device_tag

View File

@@ -4,7 +4,6 @@
/obj/machinery/computer/atmoscontrol
name = "\improper Central Atmospherics Computer"
icon = 'icons/obj/computer.dmi'
icon_screen = "comm_logs"
light_color = "#00b000"

View File

@@ -1,6 +1,5 @@
/obj/machinery/computer/cloning
name = "cloning control console"
icon = 'icons/obj/computer.dmi'
icon_screen = "dna"
light_color = "#315ab4"

View File

@@ -62,11 +62,14 @@
else
set_light(light_range_on, light_power_on)
icon_state = initial(icon_state)
if(stat & BROKEN)
icon_state = "computer-broken"
if (overlay_layer != layer)
add_overlay(image(icon,"[icon_state]_broken", overlay_layer))
add_overlay(image(icon, "broken", overlay_layer))
else
add_overlay("[icon_state]_broken")
add_overlay("broken")
else if (icon_screen)
if (is_holographic)
holographic_overlay(src, src.icon, icon_screen)

View File

@@ -2,7 +2,6 @@
/obj/machinery/computer/prisoner
name = "prisoner management console"
icon = 'icons/obj/computer.dmi'
icon_screen = "explosive"
light_color = LIGHT_COLOR_ORANGE

View File

@@ -12,7 +12,6 @@ var/prison_shuttle_timeleft = 0
/obj/machinery/computer/prison_shuttle
name = "prison shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_screen = "syndishuttle"
light_color = "#00ffff"

View File

@@ -13,7 +13,6 @@ var/specops_shuttle_timeleft = 0
/obj/machinery/computer/specops_shuttle
name = "special operations shuttle control console"
icon = 'icons/obj/computer.dmi'
icon_screen = "syndishuttle"
light_color = "#00ffff"

View File

@@ -3,7 +3,6 @@
/obj/machinery/computer/mecha
name = "Exosuit Control"
icon = 'icons/obj/computer.dmi'
icon_screen = "mecha"
light_color = "#a97faa"

View File

@@ -20,7 +20,7 @@
var/const/ROOM_ERR_TOOLARGE = -2
/obj/item/blueprints/attack_self(mob/user as mob)
if (use_check(user, USE_DISALLOW_SILICONS))
if (use_check_and_message(user, USE_DISALLOW_SILICONS))
return
add_fingerprint(user)
interact()

View File

@@ -595,7 +595,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one.)
if(use_check(usr)) // Need to allow silicons here.
if(use_check_and_message(usr)) // Need to allow silicons here.
U.unset_machine()
if(ui)
ui.close()
@@ -1024,7 +1024,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (last_text && world.time < last_text + 5)
return
if(use_check(U))
if(use_check_and_message(U))
return
last_text = world.time

View File

@@ -80,7 +80,7 @@
set src in view(usr, 1)
set name = "Print Data"
if(use_check(usr))
if(use_check_and_message(usr))
return
var/scan_data = ""

View File

@@ -20,7 +20,7 @@
set name = "Hide"
set category = "Object"
if(use_check(usr, USE_DISALLOW_SILICONS))
if(use_check_and_message(usr, USE_DISALLOW_SILICONS))
return
layer = TURF_LAYER+0.2

View File

@@ -36,7 +36,7 @@
if (user.back!= src)
to_chat(user, "<span class='warning'>The watertank must be worn properly to use!</span>")
return
if(use_check(user))
if(use_check_and_message(user))
return
on = !on
if(on)

View File

@@ -214,7 +214,7 @@
return 1
/obj/item/weapon/tray/AltClick(var/mob/user)
if (use_check(user, show_messages = FALSE)) return
if (use_check(user)) return
unload(user)
/obj/item/weapon/tray/proc/attempt_load_item(var/obj/item/I, var/mob/user, var/messages = 1)

View File

@@ -49,12 +49,12 @@
set category = "Obsidian Relics"
set src in usr
if (use_check(usr, USE_FORCE_SRC_IN_USER))
if (use_check_and_message(usr, USE_FORCE_SRC_IN_USER))
return
var/picked = input("What form would you like your obsidian relic to take?", "Reassembling your obsidian relic") as null|anything in nullchoices
if (use_check(usr, USE_FORCE_SRC_IN_USER))
if (use_check_and_message(usr, USE_FORCE_SRC_IN_USER))
return
if(!ispath(nullchoices[picked]))

View File

@@ -95,7 +95,7 @@
set name = "Change Deck Type"
set src in view(1)
if (use_check(usr, USE_DISALLOW_SILICONS))
if (use_check_and_message(usr, USE_DISALLOW_SILICONS))
return
if(icon_state == "hand")
@@ -118,7 +118,7 @@
set name = "Shuffle Deck"
set src in view(1)
if (use_check(usr, USE_DISALLOW_SILICONS))
if (use_check_and_message(usr, USE_DISALLOW_SILICONS))
return
usr.visible_message(\

View File

@@ -597,7 +597,7 @@
/obj/item/clothing/mask/proc/adjust_mask(mob/user)
if(!adjustable)
return
if(use_check(user))
if(use_check_and_message(user))
return
hanging = !hanging

View File

@@ -72,7 +72,7 @@
action_button_name = "Toggle Visor"
/obj/item/clothing/head/helmet/riot/attack_self(mob/user as mob)
if (use_check(user))
if (use_check_and_message(user))
return
if(src.icon_state == initial(icon_state))
@@ -124,7 +124,7 @@
action_button_name = "Toggle Visor"
/obj/item/clothing/head/helmet/swat/peacekeeper/attack_self(mob/user as mob)
if (use_check(user))
if (use_check_and_message(user))
return
if(src.icon_state == initial(icon_state))

View File

@@ -9,7 +9,7 @@
action_button_name = "Toggle Face Concealing"
/obj/item/clothing/mask/balaclava/attack_self(mob/user as mob)
if (use_check(user))
if (use_check_and_message(user))
return
if(src.icon_state == initial(icon_state))

View File

@@ -51,7 +51,7 @@
set category = "Object"
set src in usr
if(use_check(usr))
if(use_check_and_message(usr))
return 0
if(!suittoggled)
@@ -193,7 +193,7 @@
set name = "Toggle Coat Buttons"
set category = "Object"
set src in usr
if(use_check(usr))
if(use_check_and_message(usr))
return 0
if(icon_state == icon_open)
icon_state = icon_closed
@@ -213,7 +213,7 @@
set category = "Object"
set src in usr
if(use_check(usr))
if(use_check_and_message(usr))
return 0
if(!suittoggled)

View File

@@ -228,7 +228,7 @@
installed_cell.stored_charge -= cost_increase
var/obj/item/projectile/shot_projectile
var/obj/item/projectile/kinetic/shot_projectile
//Send fire events
if(installed_cell)
installed_cell.on_fire(src)
@@ -241,6 +241,7 @@
shot_projectile.damage = damage_increase
shot_projectile.range = range_increase
shot_projectile.aoe = aoe_increase
shot_projectile.base_damage = damage_increase
return shot_projectile
/obj/item/weapon/gun/custom_ka/Initialize()

View File

@@ -7,8 +7,8 @@
check_armour = "bomb"
range = 5
var/pressure_decrease = 0.25
var/aoe_s = 1 // aoe scale
var/base_damage = 0
/obj/item/projectile/kinetic/mech
damage = 40
@@ -40,13 +40,13 @@
var/turf/target_turf = get_turf(target)
if(istype(target_turf, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.kinetic_hit(damage, dir)
M.kinetic_hit(base_damage, dir)
new /obj/effect/overlay/temp/kinetic_blast(target_turf)
if(new_aoe > 0)
for(var/new_target in orange(new_aoe, target_turf))
aoe_s = 0
damage = max(initial(damage) - initial(damage) * get_dist(new_target, target_turf) * 0.25, 0)
damage = max(base_damage - base_damage * get_dist(new_target, target_turf) * 0.25, 0)
src.Collide(new_target)
CHECK_TICK

View File

@@ -1332,7 +1332,7 @@ All custom items with worn sprites must follow the contained sprite system: http
set category = "Object"
set src in usr
if (use_check(usr)) return
if (use_check_and_message(usr)) return
var/style = input("You change the shirt to;","Change the shirt style") as null|anything in list("Eiffel Tower Diner","Pyramids of Giza Café","Phoenixport","New Parthenon")
switch(style)
@@ -1424,7 +1424,7 @@ All custom items with worn sprites must follow the contained sprite system: http
item_state = "syringe_kit"
/obj/item/fluff/jennifer_wardrobe_kit/attack_self(mob/user as mob)
if (use_check(user, USE_DISALLOW_SILICONS))
if (use_check_and_message(user, USE_DISALLOW_SILICONS))
return
var/list/outfits = list(
@@ -1574,7 +1574,7 @@ All custom items with worn sprites must follow the contained sprite system: http
set category = "Object"
set src in usr
if(use_check(usr)) return
if(use_check_and_message(usr)) return
if(src.separated)
return
@@ -1678,7 +1678,7 @@ All custom items with worn sprites must follow the contained sprite system: http
var/picture = null
/obj/item/fluff/raymond_tablet/attack_self(mob/user as mob)
if (use_check(user, USE_DISALLOW_SILICONS))
if (use_check_and_message(user, USE_DISALLOW_SILICONS))
return
var/list/pictures = list("22-01-2460", "07-11-2459", "03-08-2459", "08-03-2452", "18-06-2437", "01-01-2434")
@@ -2088,7 +2088,7 @@ All custom items with worn sprites must follow the contained sprite system: http
set category = "Object"
set src in usr
if (use_check(usr)) return
if (use_check_and_message(usr)) return
if(!lit)
usr.visible_message("<span class='notice'>With a snap of \the [usr]'s fingers, a small lighter flame sparks from \his index fingers!</span>")
@@ -2545,7 +2545,7 @@ All custom items with worn sprites must follow the contained sprite system: http
set category = "Object"
set src in usr
if (use_check(usr, USE_DISALLOW_SILICONS))
if (use_check_and_message(usr, USE_DISALLOW_SILICONS))
return
if(rolled_sleeves)
@@ -2566,7 +2566,7 @@ All custom items with worn sprites must follow the contained sprite system: http
set category = "Object"
set src in usr
if (use_check(usr, USE_DISALLOW_SILICONS))
if (use_check_and_message(usr, USE_DISALLOW_SILICONS))
return
if(rolled_down)

View File

@@ -79,7 +79,7 @@
if(QDELETED(src))
return 0
if(use_check(user,USE_FORCE_SRC_IN_USER))
if(use_check_and_message(user,USE_FORCE_SRC_IN_USER))
return 0
amount = round(Clamp(amount, 0, src.worth))

View File

@@ -1099,7 +1099,7 @@ var/list/total_extraction_beacons = list()
origin_tech = list(TECH_MAGNET = 4, TECH_ENGINEERING = 3)
/obj/item/weapon/oremagnet/attack_self(mob/user)
if (use_check(user))
if (use_check_and_message(user))
return
toggle_on(user)

View File

@@ -1,7 +1,6 @@
/obj/machinery/computer/drone_control
name = "Maintenance Drone Control"
desc = "Used to monitor the station's drone population and the assembler that services them."
icon = 'icons/obj/computer.dmi'
light_color = LIGHT_COLOR_ORANGE
icon_screen = "power"

View File

@@ -85,6 +85,12 @@
icon_state = icon_state_unpowered
cut_overlays()
if(damage >= broken_damage)
icon_state = icon_state_broken
add_overlay("broken")
return
else
icon_state = initial(icon_state)
if(!enabled)
if(icon_state_screensaver && working)
if (is_holographic)

View File

@@ -33,11 +33,12 @@
if(damage >= max_damage)
break_apart()
update_icon()
// Stronger explosions cause serious damage to internal components
// Minor explosions are mostly mitigitated by casing.
/obj/item/modular_computer/ex_act(var/severity)
take_damage(rand(100,200) / severity, 30 / severity)
take_damage(rand(125, 200) / severity, 30 / severity)
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
/obj/item/modular_computer/emp_act(var/severity)

View File

@@ -181,6 +181,7 @@
if(WT.remove_fuel(round(damage/75)) && do_after(usr, damage/10))
damage = 0
to_chat(user, "You repair \the [src].")
update_icon()
return
if(W.isscrewdriver())

View File

@@ -30,6 +30,7 @@
var/icon_state_unpowered = null // Icon state when the computer is turned off
var/icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
var/icon_state_screensaver = null
var/icon_state_broken = null
var/screensaver_light_range = 0
var/screensaver_light_color = null
var/menu_light_color = null

View File

@@ -6,6 +6,7 @@
icon_state_unpowered = "console"
icon_state_screensaver = "standby-light"
icon_state_menu = "menu-light"
icon_state_broken = "console-broken"
menu_light_color = LIGHT_COLOR_BLUE
hardware_flag = PROGRAM_CONSOLE
anchored = TRUE
@@ -15,8 +16,6 @@
max_hardware_size = 3
steel_sheet_cost = 20
light_strength = 2
max_damage = 300
broken_damage = 150
screensaver_light_range = 1.4
screensaver_light_color = "#0099ff"
is_holographic = TRUE

View File

@@ -6,17 +6,18 @@
icon_state_unpowered = "laptop-open"
icon = 'icons/obj/modular_laptop.dmi'
icon_state = "laptop-open"
icon_state_broken = "laptop-broken"
base_idle_power_usage = 25
base_active_power_usage = 200
max_hardware_size = 2
light_strength = 3
max_damage = 200
broken_damage = 100
max_damage = 50
broken_damage = 25
w_class = 3
var/icon_state_closed = "laptop-closed"
/obj/item/modular_computer/laptop/AltClick()
if (use_check(usr, show_messages = FALSE)) return
if (use_check(usr)) return
// Prevents carrying of open laptops inhand.
// While they work inhand, i feel it'd make tablets lose some of their high-mobility advantage they have over laptops now.
if(!istype(loc, /turf/))
@@ -31,4 +32,7 @@
..()
else
cut_overlays()
if(damage >= broken_damage)
icon_state = icon_state_broken + "-closed"
else
icon_state = icon_state_closed

View File

@@ -13,3 +13,4 @@
/obj/item/modular_computer/tablet/Initialize()
. = ..()
icon_state += pick("", "-blue", "-green", "-red", "-brown")
icon_state_broken = icon_state

View File

@@ -5,6 +5,7 @@
icon_state = "telescreen"
icon_state_unpowered = "telescreen"
icon_state_menu = "menu"
icon_state_broken = "telescreen-broken"
hardware_flag = PROGRAM_TELESCREEN
anchored = TRUE
density = 0
@@ -13,8 +14,6 @@
max_hardware_size = 2
steel_sheet_cost = 10
light_strength = 4
max_damage = 300
broken_damage = 150
w_class = 5
is_holographic = TRUE

View File

@@ -28,7 +28,7 @@
return // no, bad
/obj/effect/hoist_hook/MouseDrop_T(atom/movable/AM,mob/user)
if (use_check(user, USE_DISALLOW_SILICONS))
if (use_check_and_message(user, USE_DISALLOW_SILICONS))
return
if (!AM.simulated || AM.anchored)

View File

@@ -84,7 +84,7 @@
. = ..()
setup_parts()
middle.add_overlay("activated")
update_list()
update_list(TRUE)
addtimer(CALLBACK(src, .proc/round_startset), 100)
/obj/machinery/gravity_generator/main/station/proc/round_startset()
@@ -100,8 +100,6 @@
. = ..()
round_start = 1
//
// Main Generator with the main code
//
@@ -131,7 +129,7 @@
log_debug("Gravity Generator Destroyed")
investigate_log("was destroyed!", "gravity")
on = 0
update_list()
update_list(TRUE)
for(var/obj/machinery/gravity_generator/part/O in parts)
O.main_part = null
qdel(O)
@@ -146,6 +144,10 @@
charging_state = POWER_UP
set_power()
eventon = !eventon
addtimer(CALLBACK(src, .proc/reset_event), 100) // Because it takes 100 seconds for it to recharge. And we need to make sure we resen this var
/obj/machinery/gravity_generator/main/proc/reset_event()
eventon = !eventon
/obj/machinery/gravity_generator/main/proc/setup_parts()
var/turf/our_turf = get_turf(src)

View File

@@ -274,7 +274,7 @@
name = "solar panel control"
desc = "A controller for solar panel arrays."
icon = 'icons/obj/computer.dmi'
icon_state = "solar_control"
icon_state = "computer"
anchored = 1
density = 1
use_power = 1
@@ -349,16 +349,16 @@
set_panels(cdir)
/obj/machinery/power/solar_control/update_icon()
if(stat & BROKEN)
icon_state = "broken"
icon_state = initial(icon_state)
cut_overlays()
if(stat & BROKEN)
icon_state = "computer-broken"
add_overlay("broken")
return
if(stat & NOPOWER)
icon_state = "computer"
cut_overlays()
return
icon_state = "solar_control"
cut_overlays()
add_overlay("solar")
if(cdir > -1)
add_overlay(image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir)))
return

View File

@@ -56,7 +56,7 @@
to_chat(user, "<span class='warning'>\The [src] must be worn to deploy \the [gun]!</span>")
return
if(use_check(user))
if(use_check_and_message(user))
return
if(!gun)

View File

@@ -815,7 +815,7 @@
set category = "Object"
set name = "Eject contents"
if(use_check(usr))
if(use_check_and_message(usr))
return
usr.visible_message(
"<span class='notice'>[usr] opens [src] and has removed [english_list(holdingitems)].</span>"

View File

@@ -1,6 +1,5 @@
/obj/machinery/computer/shuttle_control
name = "shuttle control console"
icon = 'icons/obj/computer.dmi'
light_color = LIGHT_COLOR_CYAN
icon_screen = "shuttle"

View File

@@ -1,6 +1,5 @@
/obj/machinery/computer/curer
name = "cure research machine"
icon = 'icons/obj/computer.dmi'
icon_screen = "dna"
circuit = /obj/item/weapon/circuitboard/curefab

View File

@@ -1,6 +1,5 @@
/obj/machinery/computer/diseasesplicer
name = "disease splicer"
icon = 'icons/obj/computer.dmi'
icon_screen = "crew"

View File

@@ -0,0 +1,45 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: PoZe
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Modular computers and laptops health values have been reduced drastically to work properly. Now shootign computer with shotgun will break its screen. And explosions will blow them up."
- imageadd: "Modular computers/laptops/telescreens/tablets now have broken icon states with animations."
- backend: "Timer SS update is fixed."
- bugfix: "KAs AOE now damage rocks as it used to. With full damage no matter the distance from epicenter."
- bugfix: "Fixes gravity failure error. Also fixes gravity generator UI being stuck in malfunction state. By making sure gravity generator is added to the SSmachinery.gravity_generators list during initialization."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB