Skip to content

Commit

Permalink
Merge branch 'master220' into plasmamen_sprite_bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
oi98 authored Jan 11, 2025
2 parents 09c0dfc + 240753f commit e46711c
Show file tree
Hide file tree
Showing 63 changed files with 504 additions and 359 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,8 @@
#define COMSIG_HUMAN_CHECK_SHIELDS "human_check_shields"
#define SHIELD_BLOCK (1<<0)

#define COMSIG_HUMAN_DESTROYED "human_destroyed"

// /datum/species signals
///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species)
#define COMSIG_SPECIES_GAIN "species_gain"
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

GLOB.gear_tgui_info[gear.sort_category] += list(
"[gear]" = list(
"name" = ((gear.display_name == /datum/gear::display_name)? gear_item.name : gear.display_name) ,
"name" = gear.get_display_name() ,
"index_name" = gear.index_name,
"desc" = gear.description,
"icon" = gear_item.icon,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/blob_minion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
RegisterSignal(parent, COMSIG_MOVABLE_SPACEMOVE, PROC_REF(on_space_move))
RegisterSignal(parent, COMSIG_MOB_TRY_SPEECH, PROC_REF(on_try_speech))
RegisterSignal(parent, COMSIG_MOB_CHANGED_TYPE, PROC_REF(on_transformed))
living_parent.update_appearance(UPDATE_ICON)
living_parent.update_appearance(UPDATE_ICON | UPDATE_OVERLAYS)
GLOB.blob_telepathy_mobs |= parent

/datum/component/blob_minion/UnregisterFromParent()
Expand Down
4 changes: 3 additions & 1 deletion code/datums/components/ghost_direct_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@
add_game_logs("took control of [new_body].", harbinger)
// doesn't transfer mind because that transfers antag datum as well
new_body.key = harbinger.key

if(isanimal(new_body))
var/mob/living/simple_animal/animal_body = new_body
animal_body.toggle_ai(AI_OFF)
// Already qdels due to below proc but just in case
qdel(src)

Expand Down
3 changes: 2 additions & 1 deletion code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@
var/key = "[item.icon],[item.icon_state]"
if(!(key in base64_cache))
base64_cache[key] = icon2base64(icon(item.icon, item.icon_state, dir = SOUTH, frame = 1, moving = FALSE))
result["icon"] = base64_cache[key]
result["icon"] = item.icon
result["icon_state"] = item.icon_state
result["name"] = item.name

var/real_alts = item_data.get_alternate_actions(owner, user)
Expand Down
3 changes: 2 additions & 1 deletion code/game/gamemodes/clockwork/clockwork_workshop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"brass" = design.brass_cost,
"power" = design.power_cost,
"requirements" = matreq,
"image" = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]"
"icon" = initial(I.icon),
"icon_state" = initial(I.icon_state),
)
static_data["items"][cat] = cat_items

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/miniantags/guardian/types/standard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/mob/living/simple_animal/hostile/guardian/punch/AttackingTarget()
. = ..()
if(iscarbon(target) && target != summoner)
if(length(battlecry) > 8)//no more then 8 letters in a battle cry.
if(length_char(battlecry) > 8)//no more then 8 letters in a battle cry.
visible_message("<span class='danger'>[src] punches [target]!</span>")
else
say("[battlecry]", TRUE)
Expand Down
11 changes: 6 additions & 5 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@
if(G.implantable) //only works for organ-implants
var/obj/item/organ/internal/I = new G.path
I.insert(H)
to_chat(H, span_notice("Implanting you with [G.display_name]!"))
to_chat(H, span_notice("Implanting you with [I.name]!"))
continue

if(G.slot)
if(H.equip_to_slot_or_del(G.spawn_item(H, H.client.prefs.get_gear_metadata(G)), G.slot, TRUE))
to_chat(H, "<span class='notice'>Equipping you with [G.display_name]!</span>")
var/obj/item/placed_in = G.spawn_item(H, H.client.prefs.get_gear_metadata(G))
if(H.equip_to_slot_or_del(placed_in, G.slot, TRUE))
to_chat(H, span_notice("Equipping you with [placed_in.name]!"))
else
gear_leftovers += G
else
Expand All @@ -241,10 +242,10 @@
for(var/datum/gear/G in gear_leftovers)
var/obj/item/placed_in = G.spawn_item(null, H.client.prefs.get_gear_metadata(G))
if(placed_in.equip_to_best_slot(H))
to_chat(H, span_notice("Placing [G.display_name] in your inventory!"))
to_chat(H, span_notice("Placing [placed_in.name] in your inventory!"))
continue
if(H.put_in_hands(placed_in))
to_chat(H, span_notice("Placing [G.display_name] in your hands!"))
to_chat(H, span_notice("Placing [placed_in.name] in your hands!"))
continue
to_chat(H, span_danger("Failed to locate a storage object on your mob, either you spawned with no hands free and no backpack or this is a bug."))
qdel(placed_in)
Expand Down
9 changes: 5 additions & 4 deletions code/game/machinery/PDApainter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
// Get Base64 version of an icon for our TGUI needs.
// Always try to get first frame as it can be animation resulting in all frames in single image.
// pda-library as an example has 4 frames
var/base64icon = "[icon2base64(icon(initial(pda.icon), initial(pda.icon_state), frame = 1))]"
new_color_list[initial(pda.icon_state)] = list(base64icon, initial(pda.desc))
new_color_list[initial(pda.icon_state)] = list(initial(pda.icon), initial(pda.desc))

new_color_list = sortAssoc(new_color_list)
colorlist = new_color_list
Expand Down Expand Up @@ -152,12 +151,13 @@

if(storedpda)
data["hasPDA"] = TRUE
data["pdaIcon"] = storedpda.base64icon
data["pdaIconState"] = storedpda.icon_state
data["pdaOwnerName"] = storedpda.owner
data["pdaJobName"] = storedpda.ownjob
else
data["hasPDA"] = FALSE
data["pdaIcon"] = null
data["pdaIconState"] = null
data["pdaOwnerName"] = null
data["pdaJobName"] = null

Expand All @@ -171,6 +171,7 @@
/obj/machinery/pdapainter/ui_static_data(mob/user)
var/data = list()
data["pdaTypes"] = colorlist
data["pdaIcon"] = icon
data["allowErasePda"] = allowErasePda
return data

Expand All @@ -189,7 +190,7 @@
if(storedpda)
storedpda.remove_pda_case()
var/new_icon = params["selectedPda"]
storedpda.current_painting = list("icon" = new_icon, "base64" = colorlist[new_icon][1], "desc" = colorlist[new_icon][2])
storedpda.current_painting = list("icon" = new_icon, "desc" = colorlist[new_icon][2])
storedpda.update_appearance(UPDATE_ICON_STATE|UPDATE_DESC)
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 15, TRUE)
statusLabel = "Покраска завершена"
Expand Down
3 changes: 2 additions & 1 deletion code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
"requirements" = matreq,
"hacked" = ("hacked" in categories) ? TRUE : FALSE,
"max_multiplier" = maxmult,
"image" = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]"
"icon" = initial(I.icon),
"icon_state" = initial(I.icon_state),
)))
recipiecache = recipes
data["recipes"] = recipiecache
Expand Down
8 changes: 6 additions & 2 deletions code/game/machinery/customat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
var/price = 0
///Icon in tgui
var/icon = ""
///Icon_state in tgui
var/icon_state = ""

/datum/data/customat_product/New(obj/item/I)
name = I.name
amount = 0
containtment = list()
price = 0
icon = icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1, FALSE))
icon = icon(initial(I.icon))
icon_state = initial(I.icon_state)


/obj/machinery/customat
Expand Down Expand Up @@ -565,7 +568,8 @@
price = product.price,
stock = product.amount,
icon = product.icon,
Key = product.key
icon_state = product.icon_state,
Key = product.key,
)
data["products"] += list(data_pr)

Expand Down
19 changes: 12 additions & 7 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@
build_inventory(products, product_records)
build_inventory(contraband, hidden_records)
build_inventory(premium, coin_records)
for(var/datum/data/vending_product/R in (product_records + coin_records + hidden_records))
var/obj/item/I = R.product_path
var/pp = path2assetID(R.product_path)
imagelist[pp] = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1, FALSE))]"
if(LAZYLEN(slogan_list))
// So not all machines speak at the exact same time.
// The first time this machine says something will be at slogantime + this random value,
Expand Down Expand Up @@ -802,10 +798,13 @@
data["product_records"] = list()
var/i = 1
for (var/datum/data/vending_product/R in product_records)
var/obj/item = R.product_path
var/list/data_pr = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = (R.product_path in prices) ? prices[R.product_path] : 0,
price = (item in prices) ? prices[item] : 0,
icon = item.icon,
icon_state = item.icon_state,
max_amount = R.max_amount,
req_coin = FALSE,
is_hidden = FALSE,
Expand All @@ -815,10 +814,13 @@
i++
data["coin_records"] = list()
for (var/datum/data/vending_product/R in coin_records)
var/obj/item = R.product_path
var/list/data_cr = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = (R.product_path in prices) ? prices[R.product_path] : 0,
price = (item in prices) ? prices[item] : 0,
icon = item.icon,
icon_state = item.icon_state,
max_amount = R.max_amount,
req_coin = TRUE,
is_hidden = FALSE,
Expand All @@ -829,10 +831,13 @@
i++
data["hidden_records"] = list()
for (var/datum/data/vending_product/R in hidden_records)
var/obj/item = R.product_path
var/list/data_hr = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = (R.product_path in prices) ? prices[R.product_path] : 0,
price = (item in prices) ? prices[item] : 0,
icon = item.icon,
icon_state = item.icon_state,
max_amount = R.max_amount,
req_coin = FALSE,
is_hidden = TRUE,
Expand Down
2 changes: 1 addition & 1 deletion code/game/mecha/mech_fabricator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
* Attempts to build the first item in the queue.
*/
/obj/machinery/mecha_part_fabricator/proc/process_queue()
if(!processing_queue || being_built || !length(build_queue))
if(!processing_queue || being_built || !length(build_queue) || !is_operational())
return
var/datum/design/D = build_queue[1]
if(build_design(D))
Expand Down
19 changes: 5 additions & 14 deletions code/game/objects/items/devices/floor_painter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
item_state = "floor_painter"
usesound = 'sound/effects/spray2.ogg'

var/floor_icon
var/floor_icon = 'icons/turf/floors.dmi'
var/floor_state = "floor"
var/floor_dir = SOUTH

Expand Down Expand Up @@ -70,33 +70,24 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "FloorPainter", name)
// Disable automatic updates, because:
// 1) we are the only user of the item, and don't expect to observe external changes
// 2) generating and sending the icon each tick is a bit expensive, and creates small but noticeable lag
// Disable automatic updates, because we are the only user of the item, and don't expect to observe external changes
ui.set_autoupdate(FALSE)
ui.open()

/obj/item/floor_painter/ui_data(mob/user)
var/list/data = list()
data["availableStyles"] = allowed_states
data["selectedStyle"] = floor_state
data["selectedDir"] = dir2text(floor_dir)

data["directionsPreview"] = list()
for(var/dir in GLOB.alldirs)
var/icon/floor_icon = icon('icons/turf/floors.dmi', floor_state, dir)
data["directionsPreview"][dir2text(dir)] = icon2base64(floor_icon)
data["selectedDir"] = floor_dir

return data


/obj/item/floor_painter/ui_static_data(mob/user)
var/list/data = list()

data["allStylesPreview"] = list()
for (var/style in allowed_states)
var/icon/floor_icon = icon('icons/turf/floors.dmi', style, SOUTH)
data["allStylesPreview"][style] = icon2base64(floor_icon)
data["icon"] = floor_icon
data["availableStyles"] = allowed_states

return data

Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/implants/implantpad.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"life" = implant_data.life,
"notes" = implant_data.notes,
"function" = implant_data.function,
"image" = "[icon2base64(icon(initial(case.imp.icon), initial(case.imp.icon_state), SOUTH, 1))]",
"icon" = initial(case.imp.icon),
"icon_state" = initial(case.imp.icon_state),
)
var/obj/item/implant/tracking/tracking_imp = case.imp
data["tag"] = istype(tracking_imp) ? tracking_imp.gps_tag : null
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/items/weapons/welder_sword.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
icon = 'icons/obj/items.dmi'
icon_state = "fuelsword"
item_state = "fuelsword"
lefthand_file = 'icons/mob/inhands/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/melee_righthand.dmi'
needs_permit = 1
belt_icon = null
force_enabled = 30
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ GLOBAL_LIST_EMPTY(closets)
if(!opened && user.loc == src)
to_chat(user, "<span class='warning'>You can't weld [src] from inside!</span>")
return
if(!can_weld_shut)
return
if(!I.tool_use_check(user, 0))
return
if(opened)
Expand All @@ -298,6 +296,8 @@ GLOBAL_LIST_EMPTY(closets)
deconstruct(TRUE)
return
else
if(!can_weld_shut)
return
var/adjective = welded ? "open" : "shut"
user.visible_message("<span class='notice'>[user] begins welding [src] [adjective]...</span>", "<span class='notice'>You begin welding [src] [adjective]...</span>", "<span class='warning'>You hear welding.</span>")
if(I.use_tool(src, user, 15, volume = I.tool_volume))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/blob/blob_infected_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
if(!blob_talk_action)
blob_talk_action = new
blob_talk_action.Grant(antag_mob)
GLOB.blob_telepathy_mobs += antag_mob
GLOB.blob_telepathy_mobs |= antag_mob
if(!blob_burst_action)
blob_burst_action = new
blob_burst_action.Grant(antag_mob)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/antagonists/blob/blob_minion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@
/datum/antagonist/blob_minion/give_objectives()
var/datum/objective/blob_minion/objective = new
objective.owner = owner
objective.overmind = overmind
objectives += objective
objective.overmind = overmind?.resolve()
objectives |= objective

/datum/antagonist/blob_minion/blobernaut
name = "\improper Blobernaut"


/datum/antagonist/blob_minion/blobernaut/greet()
. = ..()
var/mob/camera/blob/blob = overmind
var/mob/camera/blob/blob = overmind?.resolve()
var/datum/blobstrain/blobstrain = blob.blobstrain
. += span_dangerbigger("Вы блобернаут! Вы должны помогать всем формам блоба в их миссии по уничтожению всего!")
. += span_info("Вы сильны, крепки, и медленно регенерируете в пределах плиток блоба, [span_cultlarge("но вы будете медленно умирать, если их рядом нету")] или если фабрика, создавшая вас, будет разрушена.")
Expand Down
3 changes: 2 additions & 1 deletion code/modules/antagonists/blob/blob_minions/blob_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
. = ..()


/mob/living/simple_animal/hostile/blob_minion/
/mob/living/simple_animal/hostile/blob_minion/regenerate_icons()
update_icon()

/// Associates this mob with a specific blob factory node
/mob/living/simple_animal/hostile/blob_minion/proc/link_to_factory(obj/structure/blob/special/factory/factory)
Expand Down
7 changes: 5 additions & 2 deletions code/modules/antagonists/blob/blob_minions/blob_spore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@
/mob/living/simple_animal/hostile/blob_minion/spore/AttackingTarget()
. = ..()
var/mob/living/carbon/human/human_target = target
if(!istype(human_target) || human_target.stat != DEAD)
return
if(!target || !istype(human_target) || human_target.stat != DEAD)
return .

if(HAS_TRAIT(human_target, TRAIT_BLOB_ZOMBIFIED))
return .
zombify(human_target)

/// Become a zombie
Expand Down
Loading

0 comments on commit e46711c

Please sign in to comment.