Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into I-killed-bubblegu…
Browse files Browse the repository at this point in the history
…m-on-hard-mode-and-all-I-got-was-this-stupid-medal
  • Loading branch information
Qwertytoforty committed Oct 9, 2023
2 parents 62aadae + 3b618d4 commit 8fff82b
Show file tree
Hide file tree
Showing 61 changed files with 304 additions and 106 deletions.
6 changes: 6 additions & 0 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER"

/obj/screen/click_catcher/MouseEntered(location, control, params)
return

/obj/screen/click_catcher/MouseExited(location, control, params)
return

#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.

Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@

/obj/screen/alert/MouseExited()
closeToolTip(usr)
return ..()

/obj/screen/alert/proc/do_timeout(mob/M, category)
if(!M || !M.alerts)
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/blob_overmind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/obj/screen/blob/MouseExited()
closeToolTip(usr)
return ..()

/obj/screen/blob/BlobHelp
icon_state = "ui_help"
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
if(!isobserver(usr) && hovering)
cut_overlay(hover_overlays_cache[hovering])
hovering = null
return ..()

/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y)
Expand Down
15 changes: 0 additions & 15 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1253,21 +1253,6 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
appearance_flags |= PIXEL_SCALE
transform = M

//Update the screentip to reflect what we're hovering over
/atom/MouseEntered(location, control, params)
if(!usr || !usr.client)
return
var/datum/hud/active_hud = usr.hud_used
if(!active_hud)
return
var/screentip_mode = usr.client.prefs.screentip_mode
if(screentip_mode == 0 || (flags & NO_SCREENTIPS))
active_hud.screentip_text.maptext = ""
return
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
var/screentip_color = usr.client.prefs.screentip_color
active_hud.screentip_text.maptext = "<span class='maptext' style='font-family: sans-serif; text-align: center; font-size: [screentip_mode]px; color: [screentip_color]'>[name]</span>"

/*
Setter for the `density` variable.
Arguments:
Expand Down
13 changes: 13 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -649,3 +649,16 @@
else
.["Remove deadchat control"] = "?_src_=vars;removedeadchatcontrol=[UID()]"


//Update the screentip to reflect what we're hovering over
/atom/movable/MouseEntered(location, control, params)
var/datum/hud/active_hud = usr.hud_used // Don't nullcheck this stuff, if it breaks we wanna know it breaks
var/screentip_mode = usr.client.prefs.screentip_mode
if(screentip_mode == 0 || (flags & NO_SCREENTIPS))
active_hud.screentip_text.maptext = ""
return
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
active_hud.screentip_text.maptext = "<span class='maptext' style='font-family: sans-serif; text-align: center; font-size: [screentip_mode]px; color: [usr.client.prefs.screentip_color]'>[name]</span>"

/atom/movable/MouseExited(location, control, params)
usr.hud_used.screentip_text.maptext = ""
1 change: 1 addition & 0 deletions code/game/machinery/vendors/departmental_vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
category = VENDOR_TYPE_DEPARTMENTAL
req_one_access_txt = "11;24" // Engineers and atmos techs can use this
products = list(/obj/item/clothing/glasses/meson/engine = 2,
/obj/item/clothing/glasses/meson/engine/tray = 4,
/obj/item/multitool = 4,
/obj/item/geiger_counter = 5,
/obj/item/airlock_electronics = 10,
Expand Down
6 changes: 4 additions & 2 deletions code/game/machinery/vendors/wardrobe_vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
contraband = list(/obj/item/clothing/head/helmet/street_judge = 1,
/obj/item/clothing/suit/armor/vest/street_judge = 1,
/obj/item/toy/figure/crew/hos = 1,
/obj/item/toy/figure/crew/secofficer = 1)
/obj/item/toy/figure/crew/secofficer = 1,
/obj/item/clothing/shoes/jackboots/noisy = 3)

prices = list(/obj/item/clothing/under/rank/security/officer/corporate = 50,
/obj/item/clothing/under/rank/security/officer/skirt/corporate = 50,
Expand Down Expand Up @@ -76,7 +77,8 @@
/obj/item/storage/backpack/security = 50,
/obj/item/storage/backpack/satchel_sec = 50,
/obj/item/clothing/gloves/color/black = 20,
/obj/item/clothing/accessory/armband/sec = 20)
/obj/item/clothing/accessory/armband/sec = 20,
/obj/item/clothing/shoes/jackboots/noisy = 200)

refill_canister = /obj/item/vending_refill/secdrobe

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/spawners/lootdrop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
/obj/item/storage/bag/plasticbag = 20,
/obj/item/storage/wallet = 20,
/obj/item/storage/wallet/random = 5,
/obj/item/scratch = 10,
/obj/item/caution = 10,
/obj/item/mod/construction/broken_core = 4,
/obj/effect/spawner/random_spawners/mod/maint = 10,
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
deltimer(tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
closeToolTip(usr)
remove_outline()
return ..()

/obj/item/MouseDrop_T(obj/item/I, mob/user)
if(!user || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || src == I)
Expand Down
50 changes: 50 additions & 0 deletions code/game/objects/items/scratch_card.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/obj/item/scratch
name = "scratch card"
desc = "Scratch this with a card or coin to discover if you are the winner!"
icon = 'icons/obj/economy.dmi'
icon_state = "scard"
w_class = WEIGHT_CLASS_TINY
/// Has this been scratched yet?
var/scratched = FALSE
/// The prob chance for it to be the winner card
var/winning_chance = 1
/// Is this the winner card?
var/winner = FALSE

/obj/item/scratch/attackby(obj/item/I, mob/user, params)
. = ..()
if(scratched)
return
if(!(istype(I, /obj/item/card) || istype(I, /obj/item/coin))) // We scratch with cards or coins!
return

if(prob(winning_chance))
to_chat(user, "<span class='notice'>Congratulations! Redeem your prize at the nearest ATM!</span>")
icon_state = "scard_winner"
winner = TRUE
else
to_chat(user, "Good luck next time.")
icon_state = "scard_loser"
playsound(user, 'sound/items/scratching.ogg', 25, TRUE)
scratched = TRUE
update_icon_state()

/obj/item/scratch/attack_obj(obj/O, mob/living/user, params)
if(winner && istype(O, /obj/machinery/economy/atm))
playsound(user, 'sound/machines/ping.ogg', 50, TRUE)
O.atom_say("Congratulations for winning the lottery!")
var/obj/item/reward = new /obj/item/stack/spacecash/c1000
qdel(src)
user.put_in_hands(reward)
return
..()

/obj/item/storage/box/scratch_cards
name = "scratch cards box"
desc = "Try your luck with five scratch cards!"
w_class = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/scratch)

/obj/item/storage/box/scratch_cards/populate_contents()
for(var/i in 1 to 5)
new /obj/item/scratch(src)
2 changes: 1 addition & 1 deletion code/game/objects/items/stacks/nanopaste.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "nanopaste"
singular_name = "nanite swarm"
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
icon = 'icons/obj/nanopaste.dmi'
icon = 'icons/obj/surgery.dmi'
icon_state = "tube"
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=2;engineering=3"
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/stacks/sheets/mineral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list(
GLOBAL_LIST_INIT(plastitanium_recipes, list(
new /datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20),
new /datum/stack_recipe("Kidan Warrior Statue", /obj/structure/statue/plastitanium/kidanstatue, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("reinforced wheelchair", /obj/structure/chair/wheelchair/plastitanium, 15, time = 7 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
))

/obj/item/stack/sheet/mineral/plastitanium/New(loc, amount=null)
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ GLOBAL_LIST_INIT(metal_recipes, list(
new /datum/stack_recipe("bench (right)", /obj/structure/chair/sofa/bench/right, 1, one_per_turf = TRUE, on_floor = TRUE),
)),
new /datum/stack_recipe("barber chair", /obj/structure/chair/barber, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("wheelchair", /obj/structure/chair/wheelchair, 15, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("wheelchair", /obj/structure/chair/wheelchair, 15, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("psychiatrist bed", /obj/structure/bed/psych, 5, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("bronze ashtray", /obj/item/ashtray/bronze, 1, time = 1 SECONDS),
Expand Down Expand Up @@ -163,6 +163,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list(
new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 5 SECONDS, one_per_turf = TRUE),
new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 5 SECONDS, one_per_turf = TRUE),
new /datum/stack_recipe("hardened wheelchair", /obj/structure/chair/wheelchair/plasteel, 15, time = 6 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
null,
new /datum/stack_recipe_list("airlock assemblies", list(
new /datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 6, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
Expand Down
Loading

0 comments on commit 8fff82b

Please sign in to comment.