Hopefully fixes conflicts.

This commit is contained in:
Neerti
2020-04-05 17:07:37 -04:00
188 changed files with 2624 additions and 1761 deletions
@@ -78,8 +78,8 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Parameters: None
// Description: Adds the new communicator to the global list of all communicators, sorts the list, obtains a reference to the Exonet node, then tries to
// assign the device to the holder's name automatically in a spectacularly shitty way.
/obj/item/device/communicator/New()
..()
/obj/item/device/communicator/Initialize()
. = ..()
all_communicators += src
all_communicators = sortAtom(all_communicators)
node = get_exonet_node()
@@ -87,16 +87,22 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
camera = new(src)
camera.name = "[src] #[rand(100,999)]"
camera.c_tag = camera.name
//This is a pretty terrible way of doing this.
spawn(5 SECONDS) //Wait for our mob to finish spawning.
if(ismob(loc))
register_device(loc.name)
initialize_exonet(loc)
else if(istype(loc, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = loc
if(ismob(S.loc))
register_device(S.loc.name)
initialize_exonet(S.loc)
addtimer(CALLBACK(src, .proc/register_to_holder), 5 SECONDS)
// Proc: register_to_holder()
// Parameters: None
// Description: Tries to register ourselves to the mob that we've presumably spawned in. Not the most amazing way of doing this.
/obj/item/device/communicator/proc/register_to_holder()
if(ismob(loc))
register_device(loc.name)
initialize_exonet(loc)
else if(istype(loc, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = loc
if(ismob(S.loc))
register_device(S.loc.name)
initialize_exonet(S.loc)
// Proc: examine()
// Parameters: user - the user doing the examining
@@ -275,14 +281,13 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Proc: New()
// Parameters: None
// Description: Gives ghosts an exonet address based on their key and ghost name.
/mob/observer/dead/New()
/mob/observer/dead/Initialize()
. = ..()
spawn(20)
exonet = new(src)
if(client)
exonet.make_address("communicator-[src.client]-[src.client.prefs.real_name]")
else
exonet.make_address("communicator-[key]-[src.real_name]")
exonet = new(src)
if(client)
exonet.make_address("communicator-[src.client]-[src.client.prefs.real_name]")
else
exonet.make_address("communicator-[key]-[src.real_name]")
// Proc: Destroy()
// Parameters: None
+1 -3
View File
@@ -99,9 +99,7 @@ var/list/GPS_list = list()
gps_data["gps_tag"] = G.gps_tag
var/area/A = get_area(G)
gps_data["area_name"] = A.name
if(istype(A, /area/submap))
gps_data["area_name"] = "Unknown Area" // Avoid spoilers.
gps_data["area_name"] = A.get_name()
gps_data["z_name"] = using_map.get_zlevel_name(T.z)
gps_data["direction"] = get_adir(curr, T)
+21 -23
View File
@@ -1,3 +1,5 @@
GLOBAL_LIST_BOILERPLATE(world_uplinks, /obj/item/device/uplink)
/obj/item/device/uplink
var/welcome = "Welcome, Operative" // Welcoming menu message
var/uses // Numbers of crystals
@@ -12,32 +14,29 @@
var/datum/mind/uplink_owner = null
var/used_TC = 0
var/offer_time = 10 MINUTES //The time increment per discount offered
var/next_offer_time //The time a discount will next be offered
var/next_offer_time
var/datum/uplink_item/discount_item //The item to be discounted
var/discount_amount //The amount as a percent the item will be discounted by
/obj/item/device/uplink/nano_host()
return loc
/obj/item/device/uplink/New(var/location, var/datum/mind/owner = null, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
..()
src.uplink_owner = owner
/obj/item/device/uplink/Initialize(var/mapload, var/datum/mind/owner = null, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
. = ..()
uplink_owner = owner
purchase_log = list()
world_uplinks += src
if(owner)
uses = owner.tcrystals
else
uses = telecrystals
START_PROCESSING(SSobj, src)
/obj/item/device/uplink/Destroy()
world_uplinks -= src
STOP_PROCESSING(SSobj, src)
return ..()
addtimer(CALLBACK(src, .proc/next_offer), offer_time) //It seems like only the /hidden type actually makes use of this...
/obj/item/device/uplink/get_item_cost(var/item_type, var/item_cost)
return (discount_item && (item_type == discount_item)) ? max(1, round(item_cost*discount_amount)) : item_cost
/obj/item/device/uplink/proc/next_offer()
return //Stub, used on children.
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
@@ -58,21 +57,20 @@
var/exploit_id // Id of the current exploit record we are viewing
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
spawn(2)
if(!istype(src.loc, /obj/item))
qdel(src)
..()
/obj/item/device/uplink/hidden/Initialize()
. = ..()
if(!isitem(loc))
return INITIALIZE_HINT_QDEL
nanoui_data = list()
update_nano_data()
/obj/item/device/uplink/hidden/process()
if(world.time > next_offer_time)
discount_item = default_uplink_selection.get_random_item(INFINITY)
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
next_offer_time = world.time + offer_time
update_nano_data()
SSnanoui.update_uis(src)
/obj/item/device/uplink/hidden/next_offer()
discount_item = default_uplink_selection.get_random_item(INFINITY)
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
update_nano_data()
SSnanoui.update_uis(src)
next_offer_time = world.time + offer_time
addtimer(CALLBACK(src, .proc/next_offer), offer_time)
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
@@ -4,21 +4,15 @@
desc = "This item spawns stack of 50 of a given material."
icon = 'icons/misc/mark.dmi'
icon_state = "x4"
// var/material = ""
var/obj/item/stack/type_to_spawn = null
/obj/fiftyspawner/New()
spawn()
//spawns the 50-stack and qdels self
..()
if(istype(src.loc, /obj/structure/loot_pile)) //Spawning from a lootpile is weird, need to wait until we're out of it to do our work.
while(istype(src.loc, /obj/structure/loot_pile))
sleep(1)
// var/obj_path = text2path("/obj/item/stack/[material]")
var/obj/item/stack/M = new type_to_spawn(src.loc)
M.amount = M.max_amount //some stuff spawns with 60, we're still calling it fifty
M.update_icon() // Some stacks have different sprites depending on how full they are.
qdel(src)
/obj/fiftyspawner/Initialize()
..() //We're not returning . because we're going to ask to be deleted.
var/obj/item/stack/M = new type_to_spawn(get_turf(src))
M.amount = M.max_amount //some stuff spawns with 60, we're still calling it fifty
M.update_icon() // Some stacks have different sprites depending on how full they are.
return INITIALIZE_HINT_QDEL //Bye!
/obj/fiftyspawner/rods
name = "stack of rods" //this needs to be defined for cargo
@@ -60,6 +60,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
burn_out()
return ..()
/obj/item/weapon/flame/match/proc/light(var/mob/user)
playsound(src, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
lit = 1
damtype = "burn"
icon_state = "match_lit"
name = "burning match"
desc = "A match. This one is presently on fire."
START_PROCESSING(SSobj, src)
/obj/item/weapon/flame/match/proc/burn_out()
lit = 0
burnt = 1
@@ -407,17 +407,13 @@
can_hold = list(/obj/item/weapon/flame/match)
starts_with = list(/obj/item/weapon/flame/match = 10)
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob)
/obj/item/weapon/storage/box/matches/attackby(var/obj/item/weapon/flame/match/W, var/mob/user)
if(istype(W) && !W.lit && !W.burnt)
if(prob(25))
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
W.light(user)
user.visible_message("<span class='notice'>[user] manages to light the match on the matchbox.</span>")
W.lit = 1
W.damtype = "burn"
W.icon_state = "match_lit"
START_PROCESSING(SSprocessing, W)
else
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
playsound(src, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon()
return
@@ -46,12 +46,12 @@
desc = "A compact yet rebalanced personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton0"
item_state = "telebaton0"
slot_flags = SLOT_BELT
w_class = ITEMSIZE_SMALL
force = 3
var/on = 0
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
@@ -59,6 +59,7 @@
"<span class='warning'>You extend the baton.</span>",\
"You hear an ominous click.")
icon_state = "telebaton1"
item_state = icon_state
w_class = ITEMSIZE_NORMAL
force = 15//quite robust
attack_verb = list("smacked", "struck", "slapped")
@@ -67,6 +68,7 @@
"<span class='notice'>You collapse the baton.</span>",\
"You hear a click.")
icon_state = "telebaton0"
item_state = icon_state
w_class = ITEMSIZE_SMALL
force = 3//not so robust now
attack_verb = list("hit", "punched")
@@ -78,7 +78,6 @@ var/list/global/tank_gauge_cache = list()
if(istype(loc, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/TTV = loc
TTV.remove_tank(src)
qdel(TTV)
. = ..()