This commit is contained in:
zerothebigboy
2021-09-01 05:14:27 -04:00
56 changed files with 1254 additions and 108 deletions
@@ -191,6 +191,7 @@
var/x2 = x1
work_squares(y2, x2) //Work squares while in this loop so there's less load
reset_board = FALSE
CHECK_TICK
web += "<table>" //Start setting up the html table
web += "<tbody>"
@@ -235,6 +236,7 @@
web += "<td>[MINESWEEPERIMG(7)]</td>"
if(19)
web += "<td>[MINESWEEPERIMG(8)]</td>"
CHECK_TICK
web += "</tr>"
web += "</table>"
web += "</tbody>"
+18 -9
View File
@@ -1,7 +1,7 @@
/obj/machinery/recharger
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
icon_state = "recharger"
base_icon_state = "recharger"
desc = "A charging dock for energy based weaponry."
use_power = IDLE_POWER_USE
@@ -12,6 +12,8 @@
var/obj/item/charging = null
var/recharge_coeff = 1
var/using_power = FALSE //Did we put power into "charging" last process()?
///Did we finish recharging the currently inserted item?
var/finished_recharging = FALSE
var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy,
@@ -48,13 +50,14 @@
charging = new_charging
if (new_charging)
START_PROCESSING(SSmachines, src)
finished_recharging = FALSE
use_power = ACTIVE_POWER_USE
using_power = TRUE
update_icon()
update_appearance()
else
use_power = IDLE_POWER_USE
using_power = FALSE
update_icon()
update_appearance()
/obj/machinery/recharger/Exited(atom/movable/M, atom/newloc)
. = ..()
@@ -100,7 +103,8 @@
return 1
if(anchored && !charging)
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
if(default_deconstruction_screwdriver(user, "recharger", "recharger", G))
update_appearance()
return
if(panel_open && G.tool_behaviour == TOOL_CROWBAR)
@@ -133,7 +137,7 @@
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
using_power = TRUE
update_icon()
update_appearance()
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging
@@ -141,7 +145,7 @@
R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff)
using_power = TRUE
update_icon()
update_appearance()
return
if(istype(charging, /obj/item/ammo_casing/mws_batt))
@@ -152,7 +156,7 @@
using_power = 1
if(R.BB == null)
R.chargeshot()
update_icon(using_power)
update_appearance()
if(istype(charging, /obj/item/ammo_box/magazine/mws_mag))
var/obj/item/ammo_box/magazine/mws_mag/R = charging
@@ -164,14 +168,19 @@
using_power = 1
if(batt.BB == null)
batt.chargeshot()
update_icon(using_power)
update_appearance()
if(!using_power && !finished_recharging) //Inserted thing is at max charge/ammo, notify those around us
finished_recharging = TRUE
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
say("[charging] has finished recharging!")
else
return PROCESS_KILL
/obj/machinery/recharger/power_change()
..()
update_icon()
update_appearance()
/obj/machinery/recharger/emp_act(severity)
. = ..()
+45 -3
View File
@@ -146,6 +146,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
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!
//the outline filter on hover
var/outline_filter
/* Our block parry data. Should be set in init, or something if you are using it.
* This won't be accessed without ITEM_CAN_BLOCK or ITEM_CAN_PARRY so do not set it unless you have to to save memory.
* If you decide it's a good idea to leave this unset while turning the flags on, you will runtime. Enjoy.
@@ -175,6 +178,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
if(force_string)
item_flags |= FORCE_STRING_OVERRIDE
if(istype(loc, /obj/item/storage))
item_flags |= IN_STORAGE
if(istype(loc, /obj/item/robot_module))
item_flags |= IN_INVENTORY
if(!hitsound)
if(damtype == "fire")
hitsound = 'sound/items/welder.ogg'
@@ -373,6 +382,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
if(!allow_attack_hand_drop(user) || !user.temporarilyRemoveItemFromInventory(src))
return
remove_outline()
pickup(user)
add_fingerprint(user)
if(!user.put_in_active_hand(src, FALSE, FALSE))
@@ -443,6 +453,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
qdel(src)
item_flags &= ~IN_INVENTORY
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
remove_outline()
// if(!silent)
// playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
user?.update_equipment_speed_mods()
@@ -867,18 +878,49 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
/obj/item/MouseEntered(location, control, params)
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips && !QDELETED(src))
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_ENTER, location, control, params)
if((item_flags & IN_INVENTORY || item_flags & IN_STORAGE) && usr.client.prefs.enable_tips && !QDELETED(src) || isobserver(usr))
var/timedelay = usr.client.prefs.tip_delay/100
var/user = usr
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
var/mob/living/L = usr
if(istype(L) && L.incapacitated())
apply_outline(COLOR_RED_GRAY)
else
apply_outline()
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
. = ..()
remove_outline()
/obj/item/MouseExited(location,control,params)
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_EXIT, location, control, params)
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
closeToolTip(usr)
remove_outline()
/obj/item/MouseEntered(location,control,params)
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_ENTER, location, control, params)
/obj/item/proc/apply_outline(colour = null)
if(!(item_flags & IN_INVENTORY || item_flags & IN_STORAGE) || QDELETED(src))
return
if(usr.client)
if(!usr.client.prefs.outline_enabled)
return
if(!colour)
if(usr.client)
colour = usr.client.prefs.outline_color
if(!colour)
colour = COLOR_BLUE_GRAY
else
colour = COLOR_BLUE_GRAY
if(outline_filter)
filters -= outline_filter
outline_filter = filter(type="outline", size=1, color=colour)
filters += outline_filter
/obj/item/proc/remove_outline()
if(outline_filter)
filters -= outline_filter
outline_filter = null
// Called when a mob tries to use the item as a tool.
// Handles most checks.
+1
View File
@@ -3,6 +3,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
new/datum/stack_recipe("railing", /obj/structure/railing, 3, time = 18, window_checks = TRUE), \
new/datum/stack_recipe("catwalk tile", /obj/item/stack/tile/catwalk, 1, 4, 20), \
))
/obj/item/stack/rods
@@ -555,3 +555,10 @@
color = "#92661A"
turf_type = /turf/open/floor/bronze
custom_materials = list(/datum/material/bronze = 250)
/obj/item/stack/tile/catwalk
name = "catwalk tile"
singular_name = "catwalk floor tile"
desc = "Flooring that shows its contents underneath. Engineers love it!"
icon_state = "catwalk_tile"
turf_type = /turf/open/floor/plating/catwalk_floor
@@ -0,0 +1,44 @@
/**
* ## catwalk flooring
*
* They show what's underneath their catwalk flooring (pipes and the like)
* you can crowbar it to interact with the underneath stuff without destroying the tile...
* unless you want to!
*/
/turf/open/floor/plating/catwalk_floor
icon = 'icons/turf/floors/catwalk_plating.dmi'
icon_state = "catwalk_below"
floor_tile = /obj/item/stack/tile/catwalk
name = "catwalk floor"
desc = "Flooring that shows its contents underneath. Engineers love it!"
baseturfs = /turf/open/floor/plating
footstep = FOOTSTEP_CATWALK
barefootstep = FOOTSTEP_CATWALK
clawfootstep = FOOTSTEP_CATWALK
heavyfootstep = FOOTSTEP_CATWALK
var/covered = TRUE
/turf/open/floor/plating/catwalk_floor/Initialize()
. = ..()
layer = CATWALK_LAYER
update_icon(UPDATE_OVERLAYS)
/turf/open/floor/plating/catwalk_floor/update_overlays()
. = ..()
var/static/catwalk_overlay
if(isnull(catwalk_overlay))
catwalk_overlay = iconstate2appearance(icon, "catwalk_above")
if(covered)
. += catwalk_overlay
/turf/open/floor/plating/catwalk_floor/screwdriver_act(mob/living/user, obj/item/tool)
. = ..()
covered = !covered
to_chat(user, span_notice("[!covered ? "You removed the cover!" : "You added the cover!"]"))
update_icon(UPDATE_OVERLAYS)
/turf/open/floor/plating/catwalk_floor/pry_tile(obj/item/crowbar, mob/user, silent)
if(covered)
to_chat(user, span_notice("You need to remove the cover first!"))
return FALSE
. = ..()