Port TG updating appearances (#17943)

* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
This commit is contained in:
Vi3trice
2022-07-21 08:11:59 +02:00
committed by GitHub
parent aa06a09f5f
commit f4b37b4177
429 changed files with 3487 additions and 3296 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
var/iscopy = 0
/obj/item/paper/carbon/update_icon()
/obj/item/paper/carbon/update_icon_state()
if(iscopy)
if(info)
icon_state = "cpaper_words"
+6 -7
View File
@@ -70,15 +70,14 @@
popup.set_content(dat)
popup.open()
/obj/item/clipboard/update_icon()
overlays.Cut()
/obj/item/clipboard/update_overlays()
. = ..()
if(toppaper)
overlays += toppaper.icon_state
overlays += toppaper.overlays
. += toppaper.icon_state
. += toppaper.overlays
if(containedpen)
overlays += "clipboard_pen"
overlays += "clipboard_over"
..()
. += "clipboard_pen"
. += "clipboard_over"
/obj/item/clipboard/attackby(obj/item/W, mob/user)
if(isPaperwork(W)) //If it's a photo, paper bundle, or piece of paper, place it on the clipboard.
+10 -11
View File
@@ -29,18 +29,17 @@
desc = "A white folder."
icon_state = "folder_white"
/obj/item/folder/update_icon()
overlays.Cut()
/obj/item/folder/update_overlays()
. = ..()
if(contents.len)
overlays += "folder_paper"
..()
. += "folder_paper"
/obj/item/folder/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo) || istype(W, /obj/item/paper_bundle) || istype(W, /obj/item/documents))
user.drop_item()
W.loc = src
to_chat(user, "<span class='notice'>You put [W] into [src].</span>")
update_icon()
update_icon(UPDATE_OVERLAYS)
else if(istype(W, /obj/item/pen))
rename_interactive(user, W)
else
@@ -91,7 +90,7 @@
//Update everything
attack_self(usr)
update_icon()
update_icon(UPDATE_OVERLAYS)
return
/obj/item/folder/documents
@@ -101,7 +100,7 @@
/obj/item/folder/documents/New()
..()
new /obj/item/documents/nanotrasen(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/folder/syndicate
name = "folder- 'TOP SECRET'"
@@ -113,7 +112,7 @@
/obj/item/folder/syndicate/red/New()
..()
new /obj/item/documents/syndicate/red(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/folder/syndicate/blue
icon_state = "folder_sblue"
@@ -121,7 +120,7 @@
/obj/item/folder/syndicate/blue/New()
..()
new /obj/item/documents/syndicate/blue(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/folder/syndicate/yellow
icon_state = "folder_syellow"
@@ -129,11 +128,11 @@
/obj/item/folder/syndicate/yellow/full/New()
..()
new /obj/item/documents/syndicate/yellow(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
/obj/item/folder/syndicate/mining/New()
. = ..()
new /obj/item/documents/syndicate/mining(src)
update_icon()
update_icon(UPDATE_OVERLAYS)
+12 -10
View File
@@ -25,12 +25,7 @@
qdel(A)
return ..()
/obj/item/picture_frame/update_icon()
overlays.Cut()
if(displayed)
overlays |= getFlatIcon(displayed)
/obj/item/picture_frame/update_icon_state()
if(istype(displayed, /obj/item/photo))
icon_state = "[icon_base]-photo"
else if(istype(displayed, /obj/structure/sign/poster))
@@ -38,7 +33,11 @@
else
icon_state = "[icon_base]-paper"
overlays |= icon_state
/obj/item/picture_frame/update_overlays()
. = ..()
if(displayed)
. |= getFlatIcon(displayed)
. |= icon_state
/obj/item/picture_frame/proc/insert(obj/D)
if(istype(D, /obj/item/poster))
@@ -199,16 +198,19 @@
QDEL_NULL(frame)
return ..()
/obj/structure/sign/picture_frame/update_icon()
overlays.Cut()
/obj/structure/sign/picture_frame/update_icon_state()
if(frame)
icon = null
icon_state = null
overlays |= getFlatIcon(frame)
else
icon = initial(icon)
icon_state = initial(icon_state)
/obj/structure/sign/picture_frame/update_overlays()
. += ..()
if(frame)
overlays |= getFlatIcon(frame)
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/screwdriver))
playsound(src, I.usesound, 100, 1)
+12 -8
View File
@@ -19,6 +19,7 @@
body_parts_covered = HEAD
resistance_flags = FLAMMABLE
max_integrity = 50
blocks_emissive = null
attack_verb = list("bapped")
dog_fashion = /datum/dog_fashion/head
drop_sound = 'sound/items/handling/paper_drop.ogg'
@@ -28,6 +29,7 @@
var/footer //The bottom stuff before the stamp but after the body
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/list/stamp_overlays = list()
var/fields //Amount of user created fields
var/list/stamped
var/ico[0] //Icons and
@@ -56,8 +58,7 @@
update_icon()
updateinfolinks()
/obj/item/paper/update_icon()
..()
/obj/item/paper/update_icon_state()
if(info)
icon_state = "paper_words"
return
@@ -260,11 +261,10 @@
info = null
stamps = null
stamped = list()
overlays.Cut()
stamp_overlays = list()
updateinfolinks()
update_icon()
/obj/item/paper/proc/parsepencode(t, obj/item/pen/P, mob/user as mob)
t = pencode_to_html(html_encode(t), usr, P, TRUE, TRUE, TRUE, deffont, signfont, crayonfont)
return t
@@ -484,7 +484,11 @@
if(!stamped)
stamped = new
stamped += S.type
overlays += stampoverlay
stamp_overlays += stampoverlay
update_icon(UPDATE_OVERLAYS)
/obj/item/paper/update_overlays()
return stamp_overlays
/*
* Premade paper
@@ -531,7 +535,7 @@
name = "paper scrap"
icon_state = "scrap"
/obj/item/paper/crumpled/update_icon()
/obj/item/paper/crumpled/update_icon_state()
if(info)
icon_state = "scrap_words"
@@ -549,9 +553,9 @@
info = "<p style='text-align:center;font-family:[deffont];font-size:120%;font-weight:bold;'>[fortunemessage]</p>"
info += "<p style='text-align:center;'><strong>Lucky numbers</strong>: [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)]</p>"
/obj/item/paper/fortune/update_icon()
..()
/obj/item/paper/fortune/update_icon_state()
icon_state = initial(icon_state)
/*
* Premade paper
*/
+30 -30
View File
@@ -218,36 +218,36 @@
qdel(src)
return
/obj/item/paper_bundle/update_icon()
..()
if(contents.len)
var/obj/item/paper/P = src[1]
icon_state = P.icon_state
overlays = P.overlays
underlays = 0
var/i = 0
var/photo
for(var/obj/O in src)
var/image/img = image('icons/obj/bureaucracy.dmi')
if(istype(O, /obj/item/paper))
img.icon_state = O.icon_state
img.pixel_x -= min(1*i, 2)
img.pixel_y -= min(1*i, 2)
pixel_x = min(0.5*i, 1)
pixel_y = min( 1*i, 2)
underlays += img
i++
else if(istype(O, /obj/item/photo))
var/obj/item/photo/Ph = O
img = Ph.tiny
photo = 1
overlays += img
if(i>1)
desc = "[i] papers clipped to each other."
/obj/item/paper_bundle/update_desc()
. = ..()
if(amount > 1)
desc = "[amount] papers clipped to each other."
else
desc = "A single sheet of paper."
if(photo)
if(locate(/obj/item/photo) in src)
desc += "\nThere is a photo attached to it."
overlays += image('icons/obj/bureaucracy.dmi', "clip")
return
/obj/item/paper_bundle/update_icon_state()
if(contents.len)
var/obj/item/paper/P = src[1]
icon_state = P.overlays
/obj/item/paper_bundle/update_overlays()
. = ..()
underlays.Cut()
if(contents.len)
var/obj/item/paper/P = src[1]
. += P.overlays
for(var/obj/O in src)
var/image/sheet = image('icons/obj/bureaucracy.dmi')
if(istype(O, /obj/item/paper))
sheet.icon_state = O.icon_state
sheet.pixel_x -= min(1 * amount, 2)
sheet.pixel_y -= min(1 * amount, 2)
pixel_x = min(0.5 * amount, 1)
pixel_y = min(1 * amount, 2)
underlays += sheet
else if(istype(O, /obj/item/photo))
var/obj/item/photo/picture = O
. += picture.tiny
. += "clip"
+1 -2
View File
@@ -113,12 +113,11 @@
. += "<span class='notice'>There are no papers in the bin.</span>"
/obj/item/paper_bin/update_icon()
/obj/item/paper_bin/update_icon_state()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"
..()
/obj/item/paper_bin/carbon
name = "carbonless paper bin"
+3 -4
View File
@@ -41,16 +41,15 @@
sleep(10)
return BRUTELOSS
/obj/item/paperplane/update_icon()
overlays.Cut()
/obj/item/paperplane/update_overlays()
. = ..()
var/list/stamped = internal_paper.stamped
if(!stamped)
stamped = new
else if(stamped)
for(var/S in stamped)
var/obj/item/stamp = S
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi', "paperplane_[initial(stamp.icon_state)]")
overlays += stampoverlay
. += "paperplane_[initial(stamp.icon_state)]"
/obj/item/paperplane/attack_self(mob/user) // Unfold the paper plane
to_chat(user, "<span class='notice'>You unfold [src].</span>")
+13 -13
View File
@@ -61,8 +61,8 @@
"green" = list(0, 1, 0),
"blue" = list(0.5, 0.5, 1),
"yellow" = list(1, 1, 0))
var/pen_color_iconstate = "pencolor"
var/pen_color_shift = 3
var/pen_colour_iconstate = "pencolor"
var/pen_colour_shift = 3
/obj/item/pen/multi/Initialize(mapload)
..()
@@ -78,14 +78,14 @@
/obj/item/pen/multi/attack_self(mob/living/user as mob)
select_colour(user)
/obj/item/pen/multi/update_icon()
overlays.Cut()
var/icon/o = new(icon, pen_color_iconstate)
var/list/c = colour_choices[colour]
o.SetIntensity(c[1], c[2], c[3])
if(pen_color_shift)
o.Shift(SOUTH, pen_color_shift)
overlays += o
/obj/item/pen/multi/update_overlays()
. = ..()
var/icon/colour_overlay = new(icon, pen_colour_iconstate)
var/list/colours = colour_choices[colour]
colour_overlay.SetIntensity(colours[1], colours[2], colours[3])
if(pen_colour_shift)
colour_overlay.Shift(SOUTH, pen_colour_shift)
. += colour_overlay
/obj/item/pen/fancy
name = "fancy pen"
@@ -96,13 +96,13 @@
name = "Gilded Pen"
desc = "A golden pen that is gilded with a meager amount of gold material. The word 'Nanotrasen' is etched on the clip of the pen."
icon_state = "goldpen"
pen_color_shift = 0
pen_colour_shift = 0
/obj/item/pen/multi/fountain
name = "Engraved Fountain Pen"
desc = "An expensive looking pen."
icon_state = "fountainpen"
pen_color_shift = 0
pen_colour_shift = 0
/*
* Sleepypens
@@ -171,7 +171,7 @@
set_light(brightness_on, 1)
update_icon()
/obj/item/pen/edagger/update_icon()
/obj/item/pen/edagger/update_icon_state()
if(on)
icon_state = "edagger"
item_state = "edagger"
+2 -2
View File
@@ -83,7 +83,7 @@
c.ico = copy.ico
c.offset_x = copy.offset_x
c.offset_y = copy.offset_y
var/list/temp_overlays = copy.overlays //Iterates through stamps
var/list/temp_overlays = copy.stamp_overlays //Iterates through stamps
var/image/img //and puts a matching
for(var/j = 1, j <= temp_overlays.len, j++) //gray overlay onto the copy
if(copy.ico.len)
@@ -95,7 +95,7 @@
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-dots")
img.pixel_x = copy.offset_x[j]
img.pixel_y = copy.offset_y[j]
c.overlays += img
c.stamp_overlays += img
c.updateinfolinks()
return c
+3 -3
View File
@@ -77,7 +77,7 @@
/obj/machinery/door_control/ticket_machine_button/attack_hand(mob/user)
if(allowed(usr) || user.can_advanced_admin_interact())
icon_state = "doorctrl1"
addtimer(CALLBACK(src, /obj/machinery/door_control/ticket_machine_button/.proc/update_icon), 15)
addtimer(CALLBACK(src, /atom/.proc/update_icon), 15)
for(var/obj/machinery/ticket_machine/M in GLOB.machines)
if(M.id == id)
if(cooldown)
@@ -89,11 +89,11 @@
to_chat(usr, "<span class='warning'>Access denied.</span>")
flick("doorctrl-denied", src)
/obj/machinery/door_control/ticket_machine_button/update_icon()
/obj/machinery/door_control/ticket_machine_button/update_icon_state()
if(!(stat & NOPOWER))
icon_state = "doorctrl0"
/obj/machinery/ticket_machine/update_icon()
/obj/machinery/ticket_machine/update_icon_state()
switch(ticket_number) //Gives you an idea of how many tickets are left
if(0 to 49)
icon_state = "ticketmachine_100"