Merge pull request #5389 from Kurfursten/fixnewscaster

Fixes #5301
This commit is contained in:
clusterfack
2015-07-17 15:35:38 -05:00
4 changed files with 19 additions and 6 deletions

View File

@@ -132,6 +132,16 @@ var/list/all_supply_groups = list("Supplies","Clothing","Security","Hospitality"
containername = "High efficiency lights"
group = "Supplies"
/datum/supply_packs/newscaster
name = "Newscaster crate"
contains = list(/obj/item/mounted/frame/newscaster,
/obj/item/mounted/frame/newscaster,
/obj/item/mounted/frame/newscaster)
cost = 10
containertype = /obj/structure/closet/crate
containername = "Newscaster crate"
group = "Supplies"
/datum/supply_packs/mule
name = "MULEbot Crate"
contains = list(/obj/machinery/bot/mulebot)

View File

@@ -130,13 +130,19 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
name = "Security Newscaster"
securityCaster = 1
/obj/machinery/newscaster/New() //Constructor, ho~
/obj/machinery/newscaster/New(turf/loc, var/ndir=0)
if(ndir)
dir=ndir
else
dir = reverse_direction(dir) //Unfucks all maps
pixel_x = (dir & 3)? 0 : (dir == 4 ? 28 : -28)
pixel_y = (dir & 3)? (dir ==1 ? 33 : -28) : 0
allCasters += src
src.paper_remaining = 15 // Will probably change this to something better
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) // Let's give it an appropriate unit number
src.unit_no++
src.update_icon() //for any custom ones on the map...
..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that
..()
/obj/machinery/newscaster/Destroy()
allCasters -= src

View File

@@ -1507,7 +1507,6 @@
/obj/item/weapon/circuitboard/air_alarm = 10,
/obj/item/weapon/intercom_electronics = 10,
/obj/item/weapon/cell/high = 10,
/obj/item/mounted/frame/newscaster = 10,
/obj/item/weapon/reagent_containers/glass/fuelcan = 5,
)
contraband = list(
@@ -2035,4 +2034,4 @@
prices = list(/obj/item/weapon/reagent_containers/food/drinks/soda_cans/nuka = 20, /obj/item/weapon/reagent_containers/food/drinks/soda_cans/quantum = 50)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/soda_cans/quantum = 5)
pack = /obj/structure/vendomatpack/nuka
pack = /obj/structure/vendomatpack/nuka

View File

@@ -68,8 +68,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2 ), \
new/datum/stack_recipe("lightswitch frame", /obj/item/mounted/frame/light_switch, 2 ), \
new/datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2 ), \
new/datum/stack_recipe("requests console", /obj/machinery/requests_console, 2 ), \
new/datum/stack_recipe("ATM", /obj/machinery/atm/, 2 ), \
new/datum/stack_recipe("nanomed frame", /obj/item/mounted/frame/wallmed, 3, time = 25, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2 ), \
new/datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1 ), \