Skip to content

Commit

Permalink
Merge branch 'dev-sierra' into dev-sierra-fax
Browse files Browse the repository at this point in the history
  • Loading branch information
UEDCommander authored Jan 12, 2025
2 parents 6ff3693 + d627b1f commit eab8b66
Show file tree
Hide file tree
Showing 196 changed files with 65,422 additions and 10,846 deletions.
3 changes: 2 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,6 @@
#include "code\game\objects\effects\decals\decal.dm"
#include "code\game\objects\effects\decals\misc.dm"
#include "code\game\objects\effects\decals\remains.dm"
#include "code\game\objects\effects\decals\warning_stripes.dm"
#include "code\game\objects\effects\decals\Cleanable\aliens.dm"
#include "code\game\objects\effects\decals\Cleanable\fuel.dm"
#include "code\game\objects\effects\decals\Cleanable\humans.dm"
Expand Down Expand Up @@ -1205,6 +1204,7 @@
#include "code\game\objects\items\weapons\material\urn.dm"
#include "code\game\objects\items\weapons\melee\energy.dm"
#include "code\game\objects\items\weapons\melee\misc.dm"
#include "code\game\objects\items\weapons\storage\ammobox.dm"
#include "code\game\objects\items\weapons\storage\backpack.dm"
#include "code\game\objects\items\weapons\storage\bags.dm"
#include "code\game\objects\items\weapons\storage\belt.dm"
Expand Down Expand Up @@ -3008,6 +3008,7 @@
#include "code\modules\reagents\reagent_containers\food\snacks\bugmeat.dm"
#include "code\modules\reagents\reagent_containers\food\snacks\cheese.dm"
#include "code\modules\reagents\reagent_containers\food\snacks\donkpocket.dm"
#include "code\modules\reagents\reagent_containers\food\snacks\fortunecookie.dm"
#include "code\modules\reagents\reagent_containers\food\snacks\meat.dm"
#include "code\modules\reagents\reagent_containers\food\snacks\shellfish.dm"
#include "code\modules\reagents\reagent_containers\glass\bottle.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#define COLOR_PURPLE_GRAY "#a2819e"
#define COLOR_BLUE_LIGHT "#33ccff"
#define COLOR_RED_LIGHT "#ff3333"
#define COLOR_GREEN_LIGHT "#33ff33"
#define COLOR_ORANGE_LIGHT "#ffcc33"
#define COLOR_BEIGE "#ceb689"
#define COLOR_BABY_BLUE "#89cff0"
#define COLOR_PALE_GREEN_GRAY "#aed18b"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/~mods/expanded_culture_descriptor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define FACTION_MORPHEUS "Morpheus Cyberkinetics"
#define FACTION_ZPCI "Zone Protection Control Inc."
#define FACTION_SEPTENERGO "SeptEnergo"
#define FACTION_SIBI "Solar Investigation Bureau Inc."

#define CULTURE_HUMAN_PLUTO "Plutonian"
#define CULTURE_HUMAN_LORRIMAN "Lorrimanian"
Expand Down
2 changes: 2 additions & 0 deletions code/_global_vars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ GLOBAL_DATUM_INIT(universe, /datum/universal_state, new)
GLOBAL_LIST_INIT(full_alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"))

GLOBAL_LIST_EMPTY(meteor_list)

GLOBAL_LIST_EMPTY(shield_generators) // All shield generators
17 changes: 6 additions & 11 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,21 +527,16 @@ GLOBAL_LIST_INIT(click_catchers, create_click_catcher())
. = 1

/client/MouseDown(object, location, control, params)
var/delay = mob.CanMobAutoclick(object, location, params)
if(delay)
selected_target[1] = object
selected_target[2] = params
while(selected_target[1])
Click(selected_target[1], location, control, selected_target[2])
sleep(delay)
var/datum/click_handler/click_handler = usr.GetClickHandler()
click_handler.OnMouseDown(object, location, params)

/client/MouseUp(object, location, control, params)
selected_target[1] = null
var/datum/click_handler/click_handler = usr.GetClickHandler()
click_handler.OnMouseUp(object, location, params)

/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
if(selected_target[1] && over_object.IsAutoclickable())
selected_target[1] = over_object
selected_target[2] = params
var/datum/click_handler/click_handler = usr.GetClickHandler()
click_handler.OnMouseDrag(over_object, params)

/mob/proc/CanMobAutoclick(object, location, params)
return
Expand Down
65 changes: 65 additions & 0 deletions code/_onclick/click_handling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,77 @@ var/global/const/CLICK_HANDLER_REMOVE_IF_NOT_TOP = FLAG(1)
/datum/click_handler/proc/OnDblClick(atom/A, params)
return

/**
* Called on MouseDown by `/client/MouseDown()` when this is the mob's currently active click handler.
*
* **Parameters**:
* - `object` - The atom mouse is underneath.
* - `location` - the turf, stat panel, grid cell, etc. containing the object where it was clicked
* - `params` (list of strings) - List of click parameters. See BYOND's `CLick()` documentation.
*
* Has no return value.
*/
/datum/click_handler/proc/OnMouseDown(object, location, params)
return

/**
* Called on MouseUp by `/client/MouseUp()` when this is the mob's currently active click handler.
*
* **Parameters**:
* - `object` - The atom underneath mouse.
* - `location` - the turf, stat panel, grid cell, etc. containing the object where it was clicked
* - `params` (list of strings) - List of click parameters. See BYOND's `CLick()` documentation.
*
* Has no return value.
*/
/datum/click_handler/proc/OnMouseUp(object, location, params)
return

/**
* Called on MouseUp by `/client/MouseDrag()` when this is the mob's currently active click handler.
*
* **Parameters**:
* - `over_object` - The new atom underneath mouse.
* - `params` (list of strings) - List of click parameters. See BYOND's `CLick()` documentation.
*
* Has no return value.
*/
/datum/click_handler/proc/OnMouseDrag(atom/over_object, params)
return

/datum/click_handler/proc/CanAutoClick(object, location, params)
return

/datum/click_handler/default
/// Holds click params [2] and a reference [1] to the atom under the cursor on MouseDown/Drag
var/list/selected_target = list(null, null)

/datum/click_handler/default/OnClick(atom/A, params)
user.ClickOn(A, params)

/datum/click_handler/default/OnDblClick(atom/A, params)
user.DblClickOn(A, params)

/datum/click_handler/default/OnMouseDown(object, location, params)
var/delay = CanAutoClick(object, location, params)
if(delay)
selected_target[1] = object
selected_target[2] = params
while(selected_target[1])
OnClick(selected_target[1], selected_target[2])
sleep(delay)

/datum/click_handler/default/OnMouseUp(object, location, params)
selected_target[1] = null

/datum/click_handler/default/OnMouseDrag(atom/over_object, params)
if(selected_target[1] && over_object && over_object.IsAutoclickable()) //Over object could be null, for example if dragging over darkness
selected_target[1] = over_object
selected_target[2] = params

/datum/click_handler/default/CanAutoClick(object, location, params)
return user.CanMobAutoclick(object, location, params)

/**
* Returns the mob's currently active click handler.
*
Expand Down
12 changes: 12 additions & 0 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define AB_CHECK_LYING 4
#define AB_CHECK_ALIVE 8
#define AB_CHECK_INSIDE 16
#define AB_CHECK_INSIDE_ACCESSORY 32


/datum/action
Expand Down Expand Up @@ -112,6 +113,11 @@
if(check_flags & AB_CHECK_INSIDE)
if(!(target in owner))
return 0
if(check_flags & AB_CHECK_INSIDE_ACCESSORY)
if(!(target in owner))
var/obj/item/clothing/C = target.loc
if (!(istype(C) && (C in owner) && (target in C.accessories)))
return 0
return 1

/datum/action/proc/UpdateName()
Expand Down Expand Up @@ -237,6 +243,12 @@
/datum/action/item_action/CheckRemoval(mob/living/user)
return !(target in user)

/datum/action/item_action/accessory
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_ALIVE|AB_CHECK_INSIDE_ACCESSORY

/datum/action/item_action/accessory/CheckRemoval(mob/living/user)
return !(target in user || (target.loc && (target.loc in user)))

/datum/action/item_action/hands_free
check_flags = AB_CHECK_ALIVE|AB_CHECK_INSIDE

Expand Down
9 changes: 2 additions & 7 deletions code/datums/extensions/support_lattice.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@

if(isCoil(C))
var/obj/item/stack/cable_coil/coil = C
var/obj/structure/lattice/L = locate(/obj/structure/lattice, T)
if(L)
coil.PlaceCableOnTurf(T, user)
return TRUE
else
to_chat(user, SPAN_WARNING("The cable needs something to be secured to."))
return TRUE
coil.PlaceCableOnTurf(T, user)
return TRUE

return FALSE
7 changes: 5 additions & 2 deletions code/datums/recipe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
var/antag_text


/datum/microwave_recipe/proc/CreateResult(obj/machinery/microwave/microwave)
var/atom/movable/result = new result_path (microwave)
/datum/microwave_recipe/proc/CreateResult(obj/machinery/microwave/microwave, ...)
var/list/result_args = list(microwave)
if (length(args) > 1)
result_args += args.Copy(2)
var/atom/movable/result = new result_path (arglist(result_args))
microwave.reagents.clear_reagents()
if (!length(microwave.ingredients))
return result
Expand Down
8 changes: 2 additions & 6 deletions code/datums/trading/food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,8 @@
/datum/trader/ship/chinese/trade_quantity(quantity, list/offers, num, turf/location)
. = ..()
quantity = 1
if(.)
var/obj/item/reagent_containers/food/snacks/fortunecookie/cookie = new(location)
var/obj/item/paper/paper = new(cookie)
cookie.trash = paper
paper.SetName("Fortune")
paper.info = pick(fortunes)
if (.)
new /obj/item/reagent_containers/food/snacks/fortunecookie (location)

/datum/trader/grocery
name = "Grocer"
Expand Down
4 changes: 2 additions & 2 deletions code/game/antagonist/station/changeling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ GLOBAL_DATUM_INIT(changelings, /datum/antagonist/changeling, new)
var/mob/living/carbon/human/H = player.current
if(H.isSynthetic() || H.isFBP())
return 0
if(H.species.species_flags & SPECIES_FLAG_NO_SCAN)
if(H.species.species_flags & (SPECIES_FLAG_NO_SCAN|SPECIES_FLAG_NEED_DIRECT_ABSORB))
return 0
return 1
else if(isnewplayer(player.current))
if(player.current.client && player.current.client.prefs)
var/datum/species/S = all_species[player.current.client.prefs.species]
if(S && (S.species_flags & SPECIES_FLAG_NO_SCAN))
if(S?.species_flags & SPECIES_FLAG_NO_SCAN|SPECIES_FLAG_NEED_DIRECT_ABSORB)
return 0
if(player.current.client.prefs.organ_data[BP_CHEST] == "cyborg") // Full synthetic.
return 0
Expand Down
2 changes: 1 addition & 1 deletion code/game/antagonist/station/loyalist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GLOBAL_DATUM_INIT(loyalists, /datum/antagonist/loyalists, new)
faction_descriptor = "COMPANY"
faction_verb = /mob/living/proc/convert_to_loyalist
faction_indicator = "hud_loyal"
faction_invisible = 1
//faction_invisible = 1
blacklisted_jobs = list(/datum/job/ai, /datum/job/cyborg, /datum/job/submap)
skill_setter = /datum/antag_skill_setter/station

Expand Down
2 changes: 1 addition & 1 deletion code/game/antagonist/station/revolutionary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GLOBAL_DATUM_INIT(revs, /datum/antagonist/revolutionary, new)
faction_verb = /mob/living/proc/convert_to_rev
faction_welcome = "Help the cause overturn the ruling class. Do not harm your fellow freedom fighters."
faction_indicator = "hud_rev"
faction_invisible = 1
//faction_invisible = 1
faction = "revolutionary"

blacklisted_jobs = list(/datum/job/ai, /datum/job/cyborg)
Expand Down
3 changes: 2 additions & 1 deletion code/game/machinery/vending/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
/obj/item/stack/medical/advanced/bruise_pack = 3,
/obj/item/stack/medical/advanced/ointment = 3,
/obj/item/stack/medical/splint = 2,
/obj/item/reagent_containers/hypospray/autoinjector/pain = 4
/obj/item/reagent_containers/hypospray/autoinjector/pain = 4,
/obj/item/reagent_containers/hypospray/autoinjector/pouch_auto/allergy = 12
)
rare_products = list(
/obj/item/device/cosmetic_surgery_kit = 75,
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/wallmed1.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/obj/item/stack/medical/bruise_pack = 3,
/obj/item/stack/medical/ointment = 3,
/obj/item/reagent_containers/pill/paracetamol = 4,
/obj/item/reagent_containers/hypospray/autoinjector/pouch_auto/allergy = 3,
/obj/item/storage/med_pouch/trauma,
/obj/item/storage/med_pouch/burn,
/obj/item/storage/med_pouch/oxyloss,
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/wallmed2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"}
products = list(
/obj/item/reagent_containers/hypospray/autoinjector/inaprovaline = 5,
/obj/item/reagent_containers/hypospray/autoinjector/pouch_auto/allergy = 4,
/obj/item/stack/medical/bruise_pack = 4,
/obj/item/stack/medical/ointment = 4,
/obj/item/storage/med_pouch/trauma,
Expand Down
11 changes: 0 additions & 11 deletions code/game/objects/effects/decals/warning_stripes.dm

This file was deleted.

6 changes: 6 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,12 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/equip_delay_after(mob/user, slot, equip_flags)
return


/// Proc called when when the item has been equipped. Unlike `equip_delay_*`, this is always called.
/obj/item/proc/post_equip_item(mob/user, slot, equip_flags)
return


/obj/item/OnTopic(href, href_list, datum/topic_state/state)
. = ..()

Expand Down
16 changes: 16 additions & 0 deletions code/game/objects/items/weapons/lighter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var/max_fuel = 5
var/random_colour = FALSE
var/available_colors = list(COLOR_WHITE, COLOR_BLUE_GRAY, COLOR_GREEN_GRAY, COLOR_BOTTLE_GREEN, COLOR_DARK_GRAY, COLOR_RED_GRAY, COLOR_GUNMETAL, COLOR_RED, COLOR_YELLOW, COLOR_CYAN, COLOR_GREEN, COLOR_VIOLET, COLOR_NAVY_BLUE, COLOR_PINK)
var/fail_chance = 25

/obj/item/flame/lighter/Initialize()
. = ..()
Expand All @@ -26,12 +27,27 @@
if(submerged())
to_chat(user, SPAN_WARNING("You cannot light \the [src] underwater."))
return
if (fail_light(user))
return
lit = 1
update_icon()
light_effects(user)
set_light(2, l_color = COLOR_PALE_ORANGE)
START_PROCESSING(SSobj, src)

/obj/item/flame/lighter/proc/fail_light(mob/user)
if (prob(fail_chance))
user.visible_message(
SPAN_ITALIC("\The [user] fails to light \the [src]."),
SPAN_WARNING("You have failed to light \the [src]. Try again!")
)

playsound(src.loc, "light_bic", 70, TRUE, -4)

return TRUE

return FALSE

/obj/item/flame/lighter/proc/light_effects(mob/living/carbon/user)
if(prob(95))
user.visible_message(SPAN_NOTICE("After a few attempts, [user] manages to light \the [src]."))
Expand Down
Loading

0 comments on commit eab8b66

Please sign in to comment.