Oh hey, all of those compile fixes
This commit is contained in:
@@ -128,6 +128,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
@@ -183,6 +185,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
name = "lifeguard sleeper"
|
||||
id_job = "Lifeguard"
|
||||
uniform = /obj/item/clothing/under/shorts/red
|
||||
|
||||
|
||||
/datum/outfit/beachbum
|
||||
name = "Beach Bum"
|
||||
glasses = /obj/item/clothing/glasses/sunglasses
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
// Drop the dox!
|
||||
|
||||
// Selling Syndicate docs to NT
|
||||
/datum/export/intel
|
||||
cost = 25000
|
||||
k_elasticity = 0
|
||||
unit_name = "original article"
|
||||
message = "of enemy intelligence"
|
||||
var/global/originals_recieved = list()
|
||||
var/global/copies_recieved = list()
|
||||
var/copy_path = null
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
|
||||
/datum/export/intel/applies_to(obj/O, contr = 0, emag = 0)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if(emagged != emag) // Emagging the console will stop you from selling Syndicate docs to NT.
|
||||
return FALSE
|
||||
|
||||
// No docs double-selling!
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
if(!C.copy_type)
|
||||
return FALSE
|
||||
if((C.copy_type in originals_recieved) || (C.copy_type in copies_recieved))
|
||||
return FALSE
|
||||
if(copy_path && !ispath(C.copy_type, copy_path))
|
||||
return FALSE
|
||||
|
||||
else if(O.type in originals_recieved)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/export/intel/get_cost(obj/O)
|
||||
if(O.type in copies_recieved)
|
||||
return ..() - 15000 // Already have a copy of it, deduce the cost.
|
||||
return ..()
|
||||
|
||||
/datum/export/intel/sell_object(obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
copies_recieved += C.copy_type
|
||||
else
|
||||
originals_recieved += O.type
|
||||
|
||||
/datum/export/intel/photocopy
|
||||
cost = 15000 // Allows double agents to earn some cargo points without failing their objectives.
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/syndicate
|
||||
|
||||
|
||||
|
||||
// Selling NT docs to Syndicate
|
||||
/datum/export/intel/syndie
|
||||
message = "of Nanotrasen intelligence"
|
||||
export_types = list(/obj/item/documents/nanotrasen)
|
||||
emagged = TRUE
|
||||
|
||||
/datum/export/intel/syndie/photocopy
|
||||
cost = 15000
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/nanotrasen
|
||||
|
||||
// Selling Syndicate docs to Syndicate, why not?
|
||||
/datum/export/intel/syndie/recovered
|
||||
cost = 15000
|
||||
unit_name = "recovered article"
|
||||
message = "of Syndicate intelligence"
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
// Syndicate only wants originals of their docs recovered.
|
||||
@@ -1,65 +0,0 @@
|
||||
//Tendril chest artifacts and ruin loot. Includes ash drake loot since they drop two sets of armor + random item
|
||||
//Consumable or one-use items like the magic D20 and gluttony's blessing are omitted
|
||||
|
||||
/datum/export/lavaland/minor
|
||||
cost = 10000
|
||||
unit_name = "minor lava planet artifact"
|
||||
export_types = list(/obj/item/immortality_talisman,
|
||||
/obj/item/book_of_babel,
|
||||
/obj/item/gun/magic/hook,
|
||||
/obj/item/wisp_lantern,
|
||||
/obj/item/reagent_containers/glass/bottle/potion/flight,
|
||||
/obj/item/katana/cursed,
|
||||
/obj/item/clothing/glasses/godeye,
|
||||
/obj/item/melee/ghost_sword,
|
||||
/obj/item/clothing/suit/space/hardsuit/cult,
|
||||
/obj/item/voodoo,
|
||||
/obj/item/grenade/clusterbuster/inferno,
|
||||
/obj/item/clothing/neck/necklace/memento_mori,
|
||||
/obj/item/organ/heart/cursed/wizard,
|
||||
/obj/item/clothing/suit/hooded/cloak/drake,
|
||||
/obj/item/dragons_blood,
|
||||
/obj/item/lava_staff,
|
||||
/obj/item/ship_in_a_bottle,
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes,
|
||||
/obj/item/gun/magic/staff/honk,
|
||||
/obj/item/kitchen/knife/envy,
|
||||
/obj/item/gun/ballistic/revolver/russian/soul,
|
||||
/obj/item/veilrender/vealrender)
|
||||
|
||||
/datum/export/lavaland/major //valuable chest/ruin loot and staff of storms
|
||||
cost = 20000
|
||||
unit_name = "lava planet artifact"
|
||||
export_types = list(/obj/item/guardiancreator,
|
||||
/obj/item/rod_of_asclepius,
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/paranormal,
|
||||
/obj/item/prisoncube,
|
||||
/obj/item/staff/storm)
|
||||
|
||||
//Megafauna loot, except for ash drakes and legion
|
||||
|
||||
/datum/export/lavaland/megafauna
|
||||
cost = 40000
|
||||
unit_name = "major lava planet artifact"
|
||||
export_types = list(/obj/item/hierophant_club,
|
||||
/obj/item/melee/transforming/cleaving_saw,
|
||||
/obj/item/organ/vocal_cords/colossus,
|
||||
/obj/machinery/anomalous_crystal,
|
||||
/obj/item/mayhem,
|
||||
/obj/item/blood_contract,
|
||||
/obj/item/gun/magic/staff/spellblade)
|
||||
|
||||
/datum/export/lavaland/megafauna/total_printout(datum/export_report/ex, notes = TRUE) //in the unlikely case a miner feels like selling megafauna loot
|
||||
. = ..()
|
||||
if(. && notes)
|
||||
. += " On behalf of the Nanotrasen RnD division: Thank you for your hard work."
|
||||
|
||||
/datum/export/lavaland/megafauna/hev/suit
|
||||
cost = 30000
|
||||
unit_name = "H.E.C.K. suit"
|
||||
export_types = list(/obj/item/clothing/suit/space/hostile_environment)
|
||||
|
||||
/datum/export/lavaland/megafauna/hev/helmet
|
||||
cost = 10000
|
||||
unit_name = "H.E.C.K. helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/space/hostile_environment)
|
||||
@@ -1,123 +0,0 @@
|
||||
// Organs.
|
||||
|
||||
|
||||
// Alien organs
|
||||
/datum/export/organ/alien/get_cost(O, contr = 0, emag = 0)
|
||||
. = ..()
|
||||
if(emag) // Syndicate really wants some new bio-weapons.
|
||||
. *= 2
|
||||
|
||||
/datum/export/organ/alien/brain
|
||||
cost = 5000
|
||||
unit_name = "alien brain"
|
||||
export_types = list(/obj/item/organ/brain/alien)
|
||||
|
||||
/datum/export/organ/alien/acid
|
||||
cost = 5000
|
||||
unit_name = "alien acid gland"
|
||||
export_types = list(/obj/item/organ/alien/acid)
|
||||
|
||||
/datum/export/organ/alien/hivenode
|
||||
cost = 5000
|
||||
unit_name = "alien hive node"
|
||||
export_types = list(/obj/item/organ/alien/hivenode)
|
||||
|
||||
/datum/export/organ/alien/neurotoxin
|
||||
cost = 5000
|
||||
unit_name = "alien neurotoxin gland"
|
||||
export_types = list(/obj/item/organ/alien/neurotoxin)
|
||||
|
||||
/datum/export/organ/alien/resinspinner
|
||||
cost = 5000
|
||||
unit_name = "alien resin spinner"
|
||||
|
||||
/datum/export/organ/alien/plasmavessel
|
||||
cost = 5000
|
||||
unit_name = "alien plasma vessel"
|
||||
export_types = list(/obj/item/organ/alien/plasmavessel)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/alien/plasmavessel/P)
|
||||
return ..() + (P.max_plasma * 2) + (P.plasma_rate * 20)
|
||||
|
||||
|
||||
|
||||
/datum/export/organ/alien/embryo
|
||||
cost = 5000 // Allows buyer to set up his own alien farm.
|
||||
unit_name = "alien embryo"
|
||||
export_types = list(/obj/item/organ/body_egg/alien_embryo)
|
||||
|
||||
/datum/export/organ/alien/eggsac
|
||||
cost = 10000 // Even better than a single embryo.
|
||||
unit_name = "alien egg sac"
|
||||
export_types = list(/obj/item/organ/alien/eggsac)
|
||||
|
||||
|
||||
// Other alien organs.
|
||||
/datum/export/organ/alien/abductor
|
||||
cost = 2500
|
||||
unit_name = "abductor gland"
|
||||
export_types = list(/obj/item/organ/heart/gland)
|
||||
|
||||
/datum/export/organ/alien/changeling_egg
|
||||
cost = 50000 // Holy. Fuck.
|
||||
unit_name = "changeling egg"
|
||||
export_types = list(/obj/item/organ/body_egg/changeling_egg)
|
||||
|
||||
|
||||
/datum/export/organ/hivelord
|
||||
cost = 1500
|
||||
unit_name = "active regenerative core"
|
||||
export_types = list(/obj/item/organ/regenerative_core)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/regenerative_core/C)
|
||||
if(C.inert)
|
||||
return ..() / 3
|
||||
if(C.preserved)
|
||||
return ..() * 2
|
||||
return ..()
|
||||
|
||||
// Mutant race organs.
|
||||
/datum/export/organ/mutant/cat_ears
|
||||
cost = 1000
|
||||
unit_name = "cat ears pair"
|
||||
export_types = list(/obj/item/organ/ears/cat)
|
||||
|
||||
/datum/export/organ/mutant/cat_tail
|
||||
cost = 1000
|
||||
unit_name = "cat tail"
|
||||
export_types = list(/obj/item/organ/tail/cat)
|
||||
|
||||
/datum/export/organ/mutant/lizard_tail
|
||||
cost = 200
|
||||
unit_name = "lizard tail"
|
||||
export_types = list(/obj/item/organ/tail/lizard)
|
||||
|
||||
// Human organs.
|
||||
|
||||
// Do not put human brains here, they are not sellable for a purpose.
|
||||
// If they would be sellable, X-Porter cannon's finishing move (selling victim's organs) will be instakill with no revive.
|
||||
|
||||
/datum/export/organ/human
|
||||
contraband = TRUE
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/organ/human/heart
|
||||
cost = 500
|
||||
unit_name = "heart"
|
||||
export_types = list(/obj/item/organ/heart)
|
||||
|
||||
/datum/export/organ/human/lungs
|
||||
cost = 400
|
||||
unit_name = "pair"
|
||||
message = "of lungs"
|
||||
export_types = list(/obj/item/organ/lungs)
|
||||
|
||||
/datum/export/organ/human/appendix
|
||||
cost = 50
|
||||
unit_name = "appendix"
|
||||
export_types = list(/obj/item/organ/appendix)
|
||||
|
||||
/datum/export/organ/human/appendix/get_cost(obj/item/organ/appendix/O)
|
||||
if(O.inflamed)
|
||||
return 0
|
||||
return ..()
|
||||
@@ -609,7 +609,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
if(3)
|
||||
if(3)
|
||||
if(!gear_tab)
|
||||
gear_tab = GLOB.loadout_items[1]
|
||||
dat += "<table align='center' width='100%'>"
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in AOOC: [msg]")
|
||||
return
|
||||
|
||||
log_talk(mob,"(AOOC) [key_name(src)] : [raw_msg]",LOGOOC)
|
||||
mob.log_message("(AOOC) [key]: [raw_msg]", INDIVIDUAL_OOC_LOG)
|
||||
mob.log_talk(raw_msg,LOG_OOC, tag="(AOOC)")
|
||||
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
||||
mob.log_message("(LOCAL): [msg]", INDIVIDUAL_OOC_LOG)
|
||||
mob.log_talk(msg,LOG_OOC, tag="(LOOC)")
|
||||
|
||||
var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob))
|
||||
for(var/mob/M in heard)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
icon_state = "hardsuit0-knight"
|
||||
item_state = "hardsuit0-knight"
|
||||
armor = list(melee = 60, bullet = 40, laser = 40,energy = 30, bomb = 50, bio = 100, rad = 60)
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
item_color="knight"
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
slowdown = 1
|
||||
allowed = list(/obj/item/gun,/obj/item/melee/baton,/obj/item/tank,/obj/item/shield/energy,/obj/item/claymore)
|
||||
armor = list(melee = 60, bullet = 40, laser = 40,energy = 30, bomb = 50, bio = 100, rad = 60)
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
siemens_coefficient = 0.5
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/knight
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
@@ -135,5 +135,5 @@ obj/item/clothing/suit/space/bomberman
|
||||
slowdown = 0
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
|
||||
siemens_coefficient = 0
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
@@ -130,15 +130,12 @@ Shaft Miner
|
||||
var/obj/item/clothing/suit/hooded/S = H.wear_suit
|
||||
S.ToggleHood()
|
||||
|
||||
/datum/outfit/job/miner/equipped/asteroid
|
||||
name = "Shaft Miner (Asteroid + Equipment)"
|
||||
uniform = /obj/item/clothing/under/rank/miner
|
||||
shoes = /obj/item/clothing/shoes/workboots
|
||||
/datum/outfit/job/miner/equipped/hardsuit
|
||||
name = "Shaft Miner (Equipment + Hardsuit)"
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/mining
|
||||
mask = /obj/item/clothing/mask/breath
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Bartender
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
//If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect.
|
||||
var/req_admin_notify
|
||||
|
||||
var/custom_spawn_text
|
||||
|
||||
//If you have the use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.)
|
||||
var/minimal_player_age = 0
|
||||
|
||||
|
||||
@@ -130,11 +130,11 @@
|
||||
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
|
||||
//CITADEL EDIT Vore code required overrides
|
||||
if(istype(loc, /obj/item/dogborg/sleeper))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
if(ismob(loc))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
if(isbelly(loc))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
//END EDIT
|
||||
if(wear_suit)
|
||||
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
|
||||
|
||||
@@ -1394,7 +1394,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
user.visible_message("<span class='danger'>[user] slaps [target] in the face!</span>",
|
||||
"<span class='notice'>You slap [target] in the face! </span>",\
|
||||
"You hear a slap.")
|
||||
target.endTailWag()
|
||||
stop_wagging_tail(target)
|
||||
return FALSE
|
||||
else if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
// Picture frames
|
||||
|
||||
/obj/item/wallframe/picture
|
||||
name = "picture frame"
|
||||
desc = "The perfect showcase for your favorite deathtrap memories."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
materials = list()
|
||||
flags_1 = 0
|
||||
icon_state = "frame-empty"
|
||||
result_path = /obj/structure/sign/picture_frame
|
||||
var/obj/item/photo/displayed
|
||||
|
||||
/obj/item/wallframe/picture/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/photo))
|
||||
if(!displayed)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
displayed = I
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class=notice>\The [src] already contains a photo.</span>")
|
||||
..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/wallframe/picture/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() != src)
|
||||
..()
|
||||
return
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
user.put_in_hands(I)
|
||||
to_chat(user, "<span class='notice'>You carefully remove the photo from \the [src].</span>")
|
||||
displayed = null
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/wallframe/picture/attack_self(mob/user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/item/wallframe/picture/examine(mob/user)
|
||||
if(user.is_holding(src) && displayed)
|
||||
displayed.show(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wallframe/picture/update_icon()
|
||||
cut_overlays()
|
||||
if(displayed)
|
||||
add_overlay(getFlatIcon(displayed))
|
||||
|
||||
/obj/item/wallframe/picture/after_attach(obj/O)
|
||||
..()
|
||||
var/obj/structure/sign/picture_frame/PF = O
|
||||
PF.copy_overlays(src)
|
||||
if(displayed)
|
||||
PF.framed = displayed
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
I.forceMove(PF)
|
||||
|
||||
/obj/structure/sign/picture_frame
|
||||
name = "picture frame"
|
||||
desc = "Every time you look it makes you laugh."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "frame-empty"
|
||||
var/obj/item/photo/framed
|
||||
var/persistence_id
|
||||
|
||||
/obj/structure/sign/picture_frame/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
LAZYADD(SSpersistence.photo_frames, src)
|
||||
if(dir)
|
||||
setDir(dir)
|
||||
if(building)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
|
||||
|
||||
/obj/structure/sign/picture_frame/Destroy()
|
||||
LAZYREMOVE(SSpersistence.photo_frames, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/picture_frame/proc/get_photo_id()
|
||||
if(istype(framed) && istype(framed.picture))
|
||||
return framed.picture.id
|
||||
|
||||
/obj/structure/sign/picture_frame/proc/load_from_id(id)
|
||||
var/obj/item/photo/P = load_photo_from_disk(id)
|
||||
if(istype(P))
|
||||
if(istype(framed))
|
||||
framed.forceMove(drop_location())
|
||||
else
|
||||
qdel(framed)
|
||||
framed = P
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/picture_frame/examine(mob/user)
|
||||
if(in_range(src, user) && framed)
|
||||
framed.show(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) || istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/photo))
|
||||
if(!framed)
|
||||
var/obj/item/photo/P = I
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
framed = P
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class=notice>\The [src] already contains a photo.</span>")
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/sign/picture_frame/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(framed)
|
||||
framed.show(user)
|
||||
|
||||
/obj/structure/sign/picture_frame/update_icon()
|
||||
cut_overlays()
|
||||
if(framed)
|
||||
add_overlay(getFlatIcon(framed))
|
||||
|
||||
/obj/structure/sign/picture_frame/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
var/obj/item/wallframe/picture/F = new /obj/item/wallframe/picture(loc)
|
||||
if(framed)
|
||||
F.displayed = framed
|
||||
framed = null
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
I.forceMove(F)
|
||||
F.update_icon()
|
||||
qdel(src)
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Photo album
|
||||
*/
|
||||
/obj/item/storage/photo_album
|
||||
name = "photo album"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "album"
|
||||
item_state = "briefcase"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
resistance_flags = FLAMMABLE
|
||||
var/persistence_id
|
||||
|
||||
/obj/item/storage/photo_album/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.can_hold = typecacheof(list(/obj/item/photo))
|
||||
LAZYADD(SSpersistence.photo_albums, src)
|
||||
|
||||
/obj/item/storage/photo_album/Destroy()
|
||||
LAZYREMOVE(SSpersistence.photo_albums, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/photo_album/proc/get_picture_id_list()
|
||||
var/list/L = list()
|
||||
for(var/i in contents)
|
||||
if(istype(i, /obj/item/photo))
|
||||
L += i
|
||||
if(!L.len)
|
||||
return
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
var/obj/item/photo/P = i
|
||||
if(!istype(P.picture))
|
||||
continue
|
||||
. |= P.picture.id
|
||||
|
||||
/obj/item/storage/photo_album/proc/populate_from_id_list(list/ids)
|
||||
for(var/i in ids)
|
||||
var/obj/item/photo/P = load_photo_from_disk(i)
|
||||
if(istype(P))
|
||||
if(!SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, P, null, TRUE, TRUE))
|
||||
qdel(P)
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Photo
|
||||
*/
|
||||
/obj/item/photo
|
||||
name = "photo"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "photo"
|
||||
item_state = "paper"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 50
|
||||
grind_results = list("iodine" = 4)
|
||||
var/datum/picture/picture
|
||||
var/scribble //Scribble on the back.
|
||||
var/sillynewscastervar //Photo objects with this set to 1 will not be ejected by a newscaster. Only gets set to 1 if a silicon puts one of their images into a newscaster
|
||||
|
||||
/obj/item/photo/Initialize(mapload, datum/picture/P, datum_name = TRUE, datum_desc = TRUE)
|
||||
set_picture(P, datum_name, datum_desc)
|
||||
return ..()
|
||||
|
||||
/obj/item/photo/proc/set_picture(datum/picture/P, setname, setdesc)
|
||||
if(!istype(P))
|
||||
return
|
||||
picture = P
|
||||
update_icon()
|
||||
if(P.caption)
|
||||
scribble = P.caption
|
||||
if(setname && P.picture_name)
|
||||
name = P.picture_name
|
||||
if(setdesc && P.picture_desc)
|
||||
desc = P.picture_desc
|
||||
|
||||
/obj/item/photo/update_icon()
|
||||
var/icon/I = picture.get_small_icon()
|
||||
if(I)
|
||||
icon = I
|
||||
|
||||
/obj/item/photo/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] is taking one last look at \the [src]! It looks like [user.p_theyre()] giving in to death!</span>")//when you wanna look at photo of waifu one last time before you die...
|
||||
if (user.gender == MALE)
|
||||
playsound(user, 'sound/voice/human/manlaugh1.ogg', 50, 1)//EVERY TIME I DO IT MAKES ME LAUGH
|
||||
else if (user.gender == FEMALE)
|
||||
playsound(user, 'sound/voice/human/womanlaugh.ogg', 50, 1)
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/photo/attack_self(mob/user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/item/photo/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
|
||||
txt = copytext(txt, 1, 128)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
scribble = txt
|
||||
..()
|
||||
|
||||
/obj/item/photo/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(in_range(src, user))
|
||||
show(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to get closer to get a good look at this photo!</span>")
|
||||
|
||||
/obj/item/photo/proc/show(mob/user)
|
||||
user << browse_rsc(picture.picture_image, "tmp_photo.png")
|
||||
user << browse("<html><head><title>[name]</title></head>" \
|
||||
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
|
||||
+ "<img src='tmp_photo.png' width='[picture.psize_y]' style='-ms-interpolation-mode:nearest-neighbor' />" \
|
||||
+ "[scribble ? "<br>Written on the back:<br><i>[scribble]</i>" : ""]"\
|
||||
+ "</body></html>", "window=photo_showing;size=[picture.psize_x + scribble? 128:0]x[picture.psize_y + scribble? 128:0]")
|
||||
onclose(user, "[name]")
|
||||
|
||||
/obj/item/photo/verb/rename()
|
||||
set name = "Rename photo"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
|
||||
//loc.loc check is for making possible renaming photos in clipboards
|
||||
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained())
|
||||
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(usr)
|
||||
@@ -1,3 +1,4 @@
|
||||
/*
|
||||
/datum/design/flightsuit
|
||||
name = "Flight Suit"
|
||||
desc = "A specialized hardsuit that is able to attach a flightpack and accessories.."
|
||||
@@ -29,7 +30,7 @@
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_GOLD = 1500, MAT_SILVER = 1500, MAT_PLASMA = 2000, MAT_TITANIUM = 2000)
|
||||
construction_time = 100
|
||||
category = list("Misc")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING */
|
||||
|
||||
/datum/design/constructionhardsuit
|
||||
name = "Construction Hardsuit"
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
*
|
||||
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
||||
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
||||
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
||||
**/
|
||||
/datum/component/uplink
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/name = "syndicate uplink"
|
||||
var/active = FALSE
|
||||
var/lockable = TRUE
|
||||
var/locked = TRUE
|
||||
var/allow_restricted = TRUE
|
||||
var/telecrystals
|
||||
var/selected_cat
|
||||
var/owner = null
|
||||
var/datum/game_mode/gamemode
|
||||
var/datum/uplink_purchase_log/purchase_log
|
||||
var/list/uplink_items
|
||||
var/hidden_crystals = 0
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||
owner = _owner
|
||||
if(owner)
|
||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
||||
else
|
||||
purchase_log = new(owner, src)
|
||||
lockable = _lockable
|
||||
active = _enabled
|
||||
gamemode = _gamemode
|
||||
telecrystals = starting_tc
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
|
||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||
lockable |= U.lockable
|
||||
active |= U.active
|
||||
if(!gamemode)
|
||||
gamemode = U.gamemode
|
||||
telecrystals += U.telecrystals
|
||||
if(purchase_log && U.purchase_log)
|
||||
purchase_log.MergeWithAndDel(U.purchase_log)
|
||||
|
||||
/datum/component/uplink/Destroy()
|
||||
GLOB.uplinks -= src
|
||||
gamemode = null
|
||||
return ..()
|
||||
|
||||
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
||||
var/amt = TC.amount
|
||||
telecrystals += amt
|
||||
TC.use(amt)
|
||||
|
||||
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
||||
gamemode = _gamemode
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
|
||||
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
|
||||
if(!active)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/UI = uplink_items[category][item]
|
||||
var/path = UI.refund_path || UI.item
|
||||
var/cost = UI.refund_amount || UI.cost
|
||||
if(I.type == path && UI.refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/datum/component/uplink/proc/interact(mob/user)
|
||||
if(locked)
|
||||
return
|
||||
active = TRUE
|
||||
if(user)
|
||||
ui_interact(user)
|
||||
|
||||
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
active = TRUE
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
/datum/component/uplink/ui_data(mob/user)
|
||||
if(!user.mind)
|
||||
return
|
||||
var/list/data = list()
|
||||
data["telecrystals"] = telecrystals
|
||||
data["lockable"] = lockable
|
||||
|
||||
data["categories"] = list()
|
||||
for(var/category in uplink_items)
|
||||
var/list/cat = list(
|
||||
"name" = category,
|
||||
"items" = (category == selected_cat ? list() : null))
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
data["categories"] += list(cat)
|
||||
return data
|
||||
|
||||
/datum/component/uplink/ui_act(action, params)
|
||||
if(!active)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("buy")
|
||||
var/item = params["item"]
|
||||
|
||||
var/list/buyable_items = list()
|
||||
for(var/category in uplink_items)
|
||||
buyable_items += uplink_items[category]
|
||||
|
||||
if(item in buyable_items)
|
||||
var/datum/uplink_item/I = buyable_items[item]
|
||||
MakePurchase(usr, I)
|
||||
. = TRUE
|
||||
if("lock")
|
||||
active = FALSE
|
||||
locked = TRUE
|
||||
telecrystals += hidden_crystals
|
||||
hidden_crystals = 0
|
||||
SStgui.close_uis(src)
|
||||
if("select")
|
||||
selected_cat = params["category"]
|
||||
return TRUE
|
||||
|
||||
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
||||
if(!istype(U))
|
||||
return
|
||||
if (!user || user.incapacitated())
|
||||
return
|
||||
|
||||
if(telecrystals < U.cost || U.limited_stock == 0)
|
||||
return
|
||||
telecrystals -= U.cost
|
||||
|
||||
U.purchase(user, src)
|
||||
|
||||
if(U.limited_stock > 0)
|
||||
U.limited_stock -= 1
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user