Skip to content

Commit

Permalink
Merge branch 'master220' into patch-15
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhEugene authored Oct 6, 2023
2 parents 99d1b34 + bea6a9f commit 0a5ee03
Show file tree
Hide file tree
Showing 60 changed files with 220 additions and 227 deletions.
4 changes: 2 additions & 2 deletions code/__defines/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
#define COLOR_DARKMODE_TEXT "#a4bad6"

#define COLOR_INPUT_DISABLED "#F0F0F0"
#define COLOR_INPUT_ENABLED "#D3B5B5"
#define COLOR_INPUT_DISABLED "#f0f0f0"
#define COLOR_INPUT_ENABLED "#d3b5b5"
2 changes: 1 addition & 1 deletion code/_helpers/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ var/list/html_allowed_tags = list(
)
var/list/html_allowed_attrs = list(
"style", "class", // Everything
"color", "size", "face" // <font>
"color", "size", "face" // <font></font>
)

// It's not perfect, but will work in most cases
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,6 @@ SUBSYSTEM_DEF(garbage)

else if (islist(I))
var/list/Xlist = X
DoSearchVar(I, "[Xname]\[[Xlist.Find(I)]\] -> list", recursive_limit-1)
DoSearchVar(I, "[Xname]\[[list_find(Xlist, I)]\] -> list", recursive_limit-1)

#endif
4 changes: 2 additions & 2 deletions code/controllers/subsystems/timer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* Handles creation, callbacks, and destruction of timed events.
*
* It is important to understand the buckets used in the timer subsystem are just a series of doubly-linked
* It is important to understand the buckets used in the timer subsystem are just a series of doubly-linked
* lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a list, which has prev
* and next references for the respective elements in that bucket's list.
*/
Expand Down Expand Up @@ -303,7 +303,7 @@ SUBSYSTEM_DEF(timer)
// Check that timer has a valid callback and hasn't been invoked
if (!timer.callBack || timer.spent)
WARNING("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], \
head_offset: [head_offset], practical_offset: [practical_offset]")
head_offset: [head_offset], practical_offset: [practical_offset]")
if (timer.callBack)
qdel(timer)
continue
Expand Down
3 changes: 2 additions & 1 deletion code/datums/communication/channel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*/
/decl/communication_channel/proc/communicate(var/datum/communicator, var/message)
if(can_communicate(arglist(args)))
call(log_proc)(message, communicator.get_client().mob)
var/client/C = communicator.get_client()
call(log_proc)(message, C.mob)
return do_communicate(arglist(args))
return FALSE

Expand Down
84 changes: 42 additions & 42 deletions code/game/antagonist/station/traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,48 @@ GLOBAL_DATUM_INIT(traitors, /datum/antagonist/traitor, new)
return 1

/datum/antagonist/traitor/create_objectives(var/datum/mind/traitor)
if(!..())
return
var/objectives_count = round(count_living()/config.traitor_objectives_scaling) + 1
var/datum/objective/objective = null
for (var/count in 1 to objectives_count)
switch(rand(1,100))
if(1 to 10)
objective = new /datum/objective/assassinate()
if(11 to 20)
objective = new /datum/objective/debrain()
if(21 to 40)
objective = new /datum/objective/brig()
if(41 to 80)
objective = new /datum/objective/harm()
else
objective = new /datum/objective/steal()

objective.owner = traitor

if(istype(objective, /datum/objective/steal))
objective.find_target(traitor.objectives)

else if (!objective.find_target())
qdel(objective)
objective = new /datum/objective/steal()
objective.owner = traitor
objective.find_target(traitor.objectives)

traitor.objectives += objective

switch(rand(1,10))
if(1 to 4)
if (!(locate(/datum/objective/escape) in traitor.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = traitor
traitor.objectives += escape_objective
else
if (!(locate(/datum/objective/survive) in traitor.objectives))
var/datum/objective/survive/survive_objective = new
survive_objective.owner = traitor
traitor.objectives += survive_objective
return
if(!..())
return
var/objectives_count = round(count_living()/config.traitor_objectives_scaling) + 1
var/datum/objective/objective = null
for (var/count in 1 to objectives_count)
switch(rand(1,100))
if(1 to 10)
objective = new /datum/objective/assassinate()
if(11 to 20)
objective = new /datum/objective/debrain()
if(21 to 40)
objective = new /datum/objective/brig()
if(41 to 80)
objective = new /datum/objective/harm()
else
objective = new /datum/objective/steal()

objective.owner = traitor

if(istype(objective, /datum/objective/steal))
objective.find_target(traitor.objectives)

else if (!objective.find_target())
qdel(objective)
objective = new /datum/objective/steal()
objective.owner = traitor
objective.find_target(traitor.objectives)

traitor.objectives += objective

switch(rand(1,10))
if(1 to 4)
if (!(locate(/datum/objective/escape) in traitor.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = traitor
traitor.objectives += escape_objective
else
if (!(locate(/datum/objective/survive) in traitor.objectives))
var/datum/objective/survive/survive_objective = new
survive_objective.owner = traitor
traitor.objectives += survive_objective
return

/* original
/datum/antagonist/traitor/create_objectives(var/datum/mind/traitor)
Expand Down
12 changes: 6 additions & 6 deletions code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ var/global/list/all_objectives = list()


/datum/objective/steal/find_target(var/list/used_objectives)
var/list/used_items = list()
for (var/datum/objective/steal/steal_objective in used_objectives)
if (istype(steal_objective))
used_items += steal_objective.target_name
var/list/used_items = list()
for (var/datum/objective/steal/steal_objective in used_objectives)
if (istype(steal_objective))
used_items += steal_objective.target_name

var/list/currently_possible_items = possible_items - used_items
return set_target(pick(currently_possible_items))
var/list/currently_possible_items = possible_items - used_items
return set_target(pick(currently_possible_items))


/datum/objective/steal/proc/select_target()
Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/buttons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
overlay.icon_state = "doorctrl[operating]-overlay"
overlays += overlay
switch(operating)
if(0) set_light(0.3, 0.1, 1, 2, "#F2FF00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1FF00")
if(0) set_light(0.3, 0.1, 1, 2, "#f2ff00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1ff00")
else set_light(0.3, 0.1, 1, 2,"#f86060")

//Toggle button determines icon state from active, not operating
Expand Down Expand Up @@ -182,12 +182,12 @@
icon_state = "blastctrl-active"
overlay.icon_state = "big-switch-green-ol"
overlays += overlay
set_light(0.3, 0.1, 1, 2,"#a1FF00")
set_light(0.3, 0.1, 1, 2,"#a1ff00")
else
icon_state = "blastctrl-nonactive"
overlay.icon_state = "big-switch-red-ol"
overlays += overlay
set_light(0.3, 0.1, 1, 2,"#C50022")
set_light(0.3, 0.1, 1, 2,"#c50022")


//-------------------------------
Expand Down Expand Up @@ -221,8 +221,8 @@
overlay.icon_state = "doorctrl[operating]-overlay"
overlays += overlay
switch(operating)
if(0) set_light(0.3, 0.1, 1, 2, "#F2FF00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1FF00")
if(0) set_light(0.3, 0.1, 1, 2, "#f2ff00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1ff00")
else set_light(0.3, 0.1, 1, 2,"#f86060")

/decl/stock_part_preset/radio/basic_transmitter/button/door
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/guestpass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
else
overlay.icon_state = "pass"
overlays += overlay
set_light(0.8, 0.1, 1, 2,"#0099FF")
set_light(0.8, 0.1, 1, 2,"#0099ff")

/obj/machinery/computer/guestpass/New()
..()
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/doors/blast_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@
icon_state = "blastctrl-p"
overlay.icon_state = "blastctrl-p-overlay"
overlays += overlay
set_light(0.3, 0.1, 1, 2,"#C50022")
set_light(0.3, 0.1, 1, 2,"#c50022")
else
icon_state = "blastctrl[operating]"
overlay.icon_state = "blastctrl[operating]-overlay"
overlays += overlay
switch(operating)
if(0) set_light(0.3, 0.1, 1, 2, "#F2FF00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1FF00")
if(0) set_light(0.3, 0.1, 1, 2, "#f2ff00")
if(1) set_light(0.3, 0.1, 1, 2, "#a1ff00")
else set_light(0.3, 0.1, 1, 2,"#f86060")

// SUBTYPE: Regular
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/hologram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
hologram.mouse_opacity = 0//So you can't click on it.
// hologram.plane = ABOVE_HUMAN_PLANE
hologram.layer = ABOVE_HUMAN_LAYER //Above all the other objects/mobs. Or the vast majority of them.
hologram.anchored = 1//So space wind cannot drag it.
hologram.anchored = TRUE//So space wind cannot drag it.
hologram.SetName("[user.name] (Hologram)")
masters[user] = hologram
hologram.set_light(1, 0.1, 2) //hologram lighting
Expand Down Expand Up @@ -463,7 +463,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
*/

/obj/machinery/hologram
anchored = 1
anchored = TRUE
idle_power_usage = 5
active_power_usage = 100

Expand Down
11 changes: 5 additions & 6 deletions code/game/machinery/syndicatebeacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
src.updateUsrDialog()
return
charges -= 1
switch(rand(1,2))
if(1)
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
if(prob(50))
temptext = "<font color=red><i><b>Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind.</b></i></font>"
src.updateUsrDialog()
spawn(rand(50,200)) selfdestruct()
return
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
to_chat(M, "<B>You have joined the ranks of the Syndicate and become a traitor to the station!</B>")
Expand Down
14 changes: 7 additions & 7 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/machinery/vending/powered()
return anchored && ..()

/obj/machinery/vending/update_icon()
/obj/machinery/vending/on_update_icon()
overlays.Cut()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
Expand Down Expand Up @@ -790,7 +790,7 @@ GLOBAL_LIST_EMPTY(vending_products)

restockable = FALSE

/obj/machinery/vending/coffee/update_icon()
/obj/machinery/vending/coffee/on_update_icon()
..()
if(stat & BROKEN && prob(20))
icon_state = "[initial(icon_state)]-hellfire"
Expand Down Expand Up @@ -960,7 +960,7 @@ GLOBAL_LIST_EMPTY(vending_products)

restockable = FALSE

/obj/machinery/vending/fitness/update_icon()
/obj/machinery/vending/fitness/on_update_icon()
..()
if(!(stat & NOPOWER))
overlays += image(icon, "[initial(icon_state)]-overlay")
Expand Down Expand Up @@ -1622,7 +1622,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/item/toy/katana = 2
)

/obj/machinery/vending/props/update_icon()
/obj/machinery/vending/props/on_update_icon()
..()
if(!(stat & NOPOWER))
overlays += image(icon, "[initial(icon_state)]-overlay")
Expand Down Expand Up @@ -1810,7 +1810,7 @@ GLOBAL_LIST_EMPTY(vending_products)

restockable = FALSE

/obj/machinery/vending/snix/update_icon()
/obj/machinery/vending/snix/on_update_icon()
..()
if(!(stat & NOPOWER))
overlays += image(icon, "[initial(icon_state)]-fan")
Expand Down Expand Up @@ -1878,7 +1878,7 @@ GLOBAL_LIST_EMPTY(vending_products)

restockable = FALSE

/obj/machinery/vending/weeb/update_icon()
/obj/machinery/vending/weeb/on_update_icon()
..()
if(!(stat & NOPOWER))
overlays += image(icon, "[initial(icon_state)]-fan")
Expand All @@ -1903,7 +1903,7 @@ GLOBAL_LIST_EMPTY(vending_products)

restockable = FALSE

/obj/machinery/vending/hotfood/update_icon()
/obj/machinery/vending/hotfood/on_update_icon()
..()
if(!(stat & NOPOWER))
overlays += image(icon, "[initial(icon_state)]-heater")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
src.update_icon()
return

/obj/structure/closet/body_bag/update_icon()
/obj/structure/closet/body_bag/on_update_icon()
icon_state = "[initial(icon_state)][opened ? "_open" : "[contains_body ? "_occupied" : ""]"]"
//src.overlays.Cut()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/cryobag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
STOP_PROCESSING(SSobj, src)
. = ..()

/obj/structure/closet/body_bag/cryobag/update_icon()
/obj/structure/closet/body_bag/cryobag/on_update_icon()
..()
icon_state = "[initial(icon_state)][opened ? "_open" : "[contains_body ? "_occupied" : ""]"]"
overlays.Cut()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/rescuebag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
airtank.forceMove(null)
update_icon()

/obj/structure/closet/body_bag/rescue/update_icon()
/obj/structure/closet/body_bag/rescue/on_update_icon()
icon_state = "[initial(icon_state)][opened ? "_open" : "[contains_body ? "_occupied" : ""]"]"
//src.overlays.Cut()

Expand Down
Loading

0 comments on commit 0a5ee03

Please sign in to comment.