Skip to content

Commit

Permalink
New newscaster sprites (ParadiseSS13#19251)
Browse files Browse the repository at this point in the history
  • Loading branch information
S34NW authored Oct 8, 2022
1 parent c59330f commit 7b5a60e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 48 deletions.
9 changes: 6 additions & 3 deletions code/game/objects/items/mountable_frames/newscaster_frame.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/obj/item/mounted/frame/newscaster_frame
name = "newscaster frame"
desc = "Used to build newscasters, just secure to the wall."
icon = 'icons/obj/terminals.dmi'
icon_state = "newscaster"
item_state = "syringe_kit"
item_state = "syringe_kit" //no, I have no idea either

materials = list(MAT_METAL=14000, MAT_GLASS=8000)
mount_requirements = MOUNTED_FRAME_SIMFLOOR | MOUNTED_FRAME_NOSPACE
Expand All @@ -11,6 +12,8 @@

/obj/item/mounted/frame/newscaster_frame/do_build(turf/on_wall, mob/user)
var/obj/machinery/newscaster/N = new /obj/machinery/newscaster(get_turf(src), get_dir(on_wall, user), 1)
N.pixel_y -= (loc.y - on_wall.y) * 32
N.pixel_x -= (loc.x - on_wall.x) * 32
N.pixel_y -= (loc.y - on_wall.y) * 28
N.pixel_x -= (loc.x - on_wall.x) * 28
var/constrdir = user.dir
N.dir = turn(constrdir, 180)
qdel(src)
33 changes: 16 additions & 17 deletions code/modules/newscaster/obj/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
name = "newscaster"
desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!"
icon = 'icons/obj/terminals.dmi'
icon_state = "newscaster_normal"
icon_state = "newscaster_off"
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 30)
max_integrity = 200
integrity_failure = 50
Expand Down Expand Up @@ -61,7 +61,7 @@

GLOB.allNewscasters += src
unit_number = length(GLOB.allNewscasters)
update_icon() //for any custom ones on the map...
update_icon(UPDATE_OVERLAYS) //for any custom ones on the map...
if(!last_views)
last_views = list()

Expand Down Expand Up @@ -92,24 +92,23 @@
QDEL_NULL(photo)
return ..()

/obj/machinery/newscaster/update_icon_state()
if(inoperable())
icon_state = "newscaster_off"
return
if(GLOB.news_network.wanted_issue)
icon_state = "newscaster_wanted"
else
icon_state = "newscaster_normal"

/obj/machinery/newscaster/update_overlays()
. = ..()
underlays.Cut()
if(inoperable())
return

if(!(stat & NOPOWER))
underlays += emissive_appearance(icon, "newscaster_lightmask")

if(!GLOB.news_network.wanted_issue && alert) //wanted icon state, there can be no overlays on it as it's a priority message
. += "newscaster_alert"

if(GLOB.news_network.wanted_issue)
. += "newscaster_wanted"
else
. += "newscaster_normal"

var/hp_percent = obj_integrity * 100 / max_integrity
switch(hp_percent)
if(75 to 200)
Expand All @@ -127,11 +126,11 @@
set_light(0)
else
set_light(1, LIGHTING_MINIMUM_POWER)
update_icon()
update_icon(UPDATE_OVERLAYS)

/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = TRUE, attack_dir)
. = ..()
update_icon()
update_icon(UPDATE_OVERLAYS)

/obj/machinery/newscaster/wrench_act(mob/user, obj/item/I)
. = TRUE
Expand Down Expand Up @@ -178,7 +177,7 @@
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
stat |= BROKEN
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
update_icon()
update_icon(UPDATE_OVERLAYS)

/obj/machinery/newscaster/attack_ghost(mob/user)
ui_interact(user)
Expand Down Expand Up @@ -433,7 +432,7 @@
GLOB.news_network.wanted_issue = null
set_temp("Wanted notice cleared.", update_now = TRUE)
for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
NC.update_icon()
NC.update_icon(UPDATE_OVERLAYS)
return FALSE
if("toggle_mute")
is_silent = !is_silent
Expand Down Expand Up @@ -705,14 +704,14 @@
return
alert = TRUE
addtimer(CALLBACK(src, .proc/alert_timer_finish), 30 SECONDS)
update_icon()
update_icon(UPDATE_OVERLAYS)

/**
* Called when the timer following a call to [/obj/machinery/newscaster/proc/alert_news] finishes.
*/
/obj/machinery/newscaster/proc/alert_timer_finish()
alert = FALSE
update_icon()
update_icon(UPDATE_OVERLAYS)

/**
* Ejects the currently loaded photo if there is one.
Expand Down
27 changes: 0 additions & 27 deletions code/modules/shuttle/emergency.dm
Original file line number Diff line number Diff line change
Expand Up @@ -447,33 +447,6 @@
/obj/docking_port/mobile/pod/cancel()
return

/*
findTransitDock()
. = SSshuttle.getDock("[id]_transit")
if(.) return .
return ..()
*/

/obj/machinery/computer/shuttle/pod
name = "pod control computer"
admin_controlled = 1
shuttleId = "pod"
possible_destinations = "pod_asteroid"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
density = FALSE

/obj/machinery/computer/shuttle/pod/update_icon_state()
return

/obj/machinery/computer/shuttle/pod/update_overlays()
return list()

/obj/machinery/computer/shuttle/pod/emag_act(mob/user as mob)
to_chat(user, "<span class='warning'> Access requirements overridden. The pod may now be launched manually at any time.</span>")
admin_controlled = 0
icon_state = "dorm_emag"

/obj/docking_port/stationary/random
name = "escape pod"
id = "pod"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/shuttle/syndicate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/obj/machinery/computer/shuttle/syndicate/drop_pod
name = "syndicate assault pod control"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
icon_state = "syndie_assault_pod"
req_access = list(ACCESS_SYNDICATE)
circuit = /obj/item/circuitboard/shuttle/syndicate/drop_pod
shuttleId = "steel_rain"
Expand Down
Binary file modified icons/obj/terminals.dmi
Binary file not shown.

0 comments on commit 7b5a60e

Please sign in to comment.