mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +01:00
Merge upstream
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
mergeable_decal = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/New()
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize()
|
||||
..()
|
||||
reagents.add_reagent("liquidgibs", 5)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
icon_state = "ash"
|
||||
mergeable_decal = 0
|
||||
|
||||
/obj/effect/decal/cleanable/ash/New()
|
||||
/obj/effect/decal/cleanable/ash/Initialize()
|
||||
..()
|
||||
reagents.add_reagent("ash", 30)
|
||||
pixel_x = rand(-5, 5)
|
||||
@@ -21,7 +21,7 @@
|
||||
name = "large pile of ashes"
|
||||
icon_state = "big_ash"
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large/New()
|
||||
/obj/effect/decal/cleanable/ash/large/Initialize()
|
||||
..()
|
||||
reagents.add_reagent("ash", 30) //double the amount of ash.
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/New()
|
||||
/obj/effect/decal/cleanable/shreds/Initialize()
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
|
||||
/obj/effect/decal/cleanable/oil/New()
|
||||
/obj/effect/decal/cleanable/oil/Initialize()
|
||||
..()
|
||||
reagents.add_reagent("oil", 30)
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
gender = NEUTER
|
||||
var/do_icon_rotate = TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/New(location, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
|
||||
..()
|
||||
loc = location
|
||||
|
||||
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(type == "poseur tag")
|
||||
@@ -32,17 +31,17 @@
|
||||
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
|
||||
var/datum/gang/gang
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/New(location, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0)
|
||||
/obj/effect/decal/cleanable/crayon/gang/Initialize(mapload, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0)
|
||||
if(!type || !G)
|
||||
qdel(src)
|
||||
|
||||
var/area/territory = get_area(location)
|
||||
var/area/territory = get_area(src)
|
||||
gang = G
|
||||
var/newcolor = G.color_hex
|
||||
icon_state = G.name
|
||||
G.territory_new |= list(territory.type = territory.name)
|
||||
|
||||
..(location, newcolor, icon_state, e_name, rotation)
|
||||
..(mapload, newcolor, icon_state, e_name, rotation)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
var/area/territory = get_area(src)
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/HandleTurfChange(turf/T)
|
||||
..()
|
||||
if(T == loc && (isspaceturf(T) || isclosedturf(T) || islava(T) || istype(T, /turf/open/water) || istype(T, /turf/open/chasm)))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/turf_decal
|
||||
var/group = TURF_DECAL_PAINT
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
/obj/effect/overlay/temp/point/New(atom/target, set_invis = 0)
|
||||
/obj/effect/overlay/temp/point/Initialize(mapload, set_invis = 0)
|
||||
..()
|
||||
loc = get_turf(target)
|
||||
pixel_x = target.pixel_x
|
||||
pixel_y = target.pixel_y
|
||||
var/atom/old_loc = loc
|
||||
loc = get_turf(src)
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
@@ -30,4 +31,4 @@
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = 1
|
||||
density = 1
|
||||
|
||||
@@ -10,59 +10,6 @@
|
||||
tag = text("landmark*[]", name)
|
||||
landmarks_list += src
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("secequipment")
|
||||
secequipment += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("Emergencyresponseteam")
|
||||
emergencyresponseteamspawn += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
qdel(src)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/Destroy()
|
||||
landmarks_list -= src
|
||||
return ..()
|
||||
@@ -76,14 +23,112 @@
|
||||
/obj/effect/landmark/start/New()
|
||||
start_landmarks_list += src
|
||||
..()
|
||||
if(name != initial(name))
|
||||
if(name != "start")
|
||||
tag = "start*[name]"
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/start/Destroy()
|
||||
start_landmarks_list -= src
|
||||
return ..()
|
||||
|
||||
// START LANDMARKS FOLLOW. Don't change the names unless
|
||||
// you are refactoring shitty landmark code.
|
||||
|
||||
/obj/effect/landmark/start/assistant
|
||||
name = "Assistant"
|
||||
|
||||
/obj/effect/landmark/start/janitor
|
||||
name = "Janitor"
|
||||
|
||||
/obj/effect/landmark/start/cargo_technician
|
||||
name = "Cargo Technician"
|
||||
|
||||
/obj/effect/landmark/start/bartender
|
||||
name = "Bartender"
|
||||
|
||||
/obj/effect/landmark/start/clown
|
||||
name = "Clown"
|
||||
|
||||
/obj/effect/landmark/start/mime
|
||||
name = "Mime"
|
||||
|
||||
/obj/effect/landmark/start/quartermaster
|
||||
name = "Quartermaster"
|
||||
|
||||
/obj/effect/landmark/start/atmospheric_technician
|
||||
name = "Atmospheric Technician"
|
||||
|
||||
/obj/effect/landmark/start/cook
|
||||
name = "Cook"
|
||||
|
||||
/obj/effect/landmark/start/shaft_miner
|
||||
name = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/start/security_officer
|
||||
name = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/botanist
|
||||
name = "Botanist"
|
||||
|
||||
/obj/effect/landmark/start/head_of_security
|
||||
name = "Head of Security"
|
||||
|
||||
/obj/effect/landmark/start/ai
|
||||
name = "AI"
|
||||
|
||||
/obj/effect/landmark/start/captain
|
||||
name = "Captain"
|
||||
|
||||
/obj/effect/landmark/start/detective
|
||||
name = "Detective"
|
||||
|
||||
/obj/effect/landmark/start/warden
|
||||
name = "Warden"
|
||||
|
||||
/obj/effect/landmark/start/chief_engineer
|
||||
name = "Chief Engineer"
|
||||
|
||||
/obj/effect/landmark/start/cyborg
|
||||
name = "Cyborg"
|
||||
|
||||
/obj/effect/landmark/start/head_of_personnel
|
||||
name = "Head of Personnel"
|
||||
|
||||
/obj/effect/landmark/start/librarian
|
||||
name = "Librarian"
|
||||
|
||||
/obj/effect/landmark/start/lawyer
|
||||
name = "Lawyer"
|
||||
|
||||
/obj/effect/landmark/start/station_engineer
|
||||
name = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/start/medical_doctor
|
||||
name = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
|
||||
/obj/effect/landmark/start/chemist
|
||||
name = "Chemist"
|
||||
|
||||
/obj/effect/landmark/start/roboticist
|
||||
name = "Roboticist"
|
||||
|
||||
/obj/effect/landmark/start/research_director
|
||||
name = "Research Director"
|
||||
|
||||
/obj/effect/landmark/start/geneticist
|
||||
name = "Geneticist"
|
||||
|
||||
/obj/effect/landmark/start/chief_medical_officer
|
||||
name = "Chief Medical Officer"
|
||||
|
||||
/obj/effect/landmark/start/virologist
|
||||
name = "Virologist"
|
||||
|
||||
/obj/effect/landmark/start/chaplain
|
||||
name = "Chaplain"
|
||||
|
||||
//Department Security spawns
|
||||
|
||||
/obj/effect/landmark/start/depsec
|
||||
@@ -109,14 +154,162 @@
|
||||
/obj/effect/landmark/start/depsec/science
|
||||
name = "science_sec"
|
||||
|
||||
/obj/effect/landmark/start/wizard
|
||||
name = "wizard"
|
||||
|
||||
/obj/effect/landmark/start/wizard/Initialize(mapload)
|
||||
..()
|
||||
wizardstart += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/start/new_player
|
||||
name = "New Player"
|
||||
|
||||
// Must be on New() rather than Initialize, because players will
|
||||
// join before SSatom initializes everything.
|
||||
/obj/effect/landmark/start/new_player/New(loc)
|
||||
..()
|
||||
newplayer_start += loc
|
||||
|
||||
/obj/effect/landmark/start/new_player/Initialize(mapload)
|
||||
..()
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/effect/landmark/latejoin
|
||||
name = "JoinLate"
|
||||
|
||||
/obj/effect/landmark/latejoin/Initialize(mapload)
|
||||
..()
|
||||
latejoin += loc
|
||||
qdel(src)
|
||||
|
||||
// carp.
|
||||
/obj/effect/landmark/carpspawn
|
||||
name = "carpspawn"
|
||||
|
||||
// lightsout.
|
||||
/obj/effect/landmark/lightsout
|
||||
name = "lightsout"
|
||||
|
||||
// observer-start.
|
||||
/obj/effect/landmark/observer_start
|
||||
name = "Observer-Start"
|
||||
|
||||
// revenant spawn.
|
||||
/obj/effect/landmark/revenantspawn
|
||||
name = "revnantspawn"
|
||||
|
||||
// triple ais.
|
||||
/obj/effect/landmark/tripai
|
||||
name = "tripai"
|
||||
|
||||
// marauder entry (XXX WTF IS MAURADER ENTRY???)
|
||||
|
||||
/obj/effect/landmark/marauder_entry
|
||||
name = "Marauder Entry"
|
||||
|
||||
// syndicate breach area (XXX I DON'T KNOW WHAT THIS IS EITHER)
|
||||
|
||||
/obj/effect/landmark/syndicate_breach_area
|
||||
name = "Syndicate Breach Area"
|
||||
|
||||
// teleport scroll landmark, XXX DOES THIS DO ANYTHING?
|
||||
/obj/effect/landmark/teleport_scroll
|
||||
name = "Teleport-Scroll"
|
||||
|
||||
/obj/effect/landmark/syndicate_spawn
|
||||
name = "Syndicate-Spawn"
|
||||
|
||||
// xenos.
|
||||
/obj/effect/landmark/xeno_spawn
|
||||
name = "xeno_spawn"
|
||||
|
||||
/obj/effect/landmark/xeno_spawn/Initialize(mapload)
|
||||
..()
|
||||
xeno_spawn += loc
|
||||
qdel(src)
|
||||
|
||||
// blobs.
|
||||
/obj/effect/landmark/blobstart
|
||||
name = "blobstart"
|
||||
|
||||
/obj/effect/landmark/blobstart/Initialize(mapload)
|
||||
..()
|
||||
blobstart += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/secequipment
|
||||
name = "secequipment"
|
||||
|
||||
/obj/effect/landmark/secequipment/Initialize(mapload)
|
||||
..()
|
||||
secequipment += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/prisonwarp
|
||||
name = "prisonwarp"
|
||||
|
||||
/obj/effect/landmark/prisonwarp/Initialize(mapload)
|
||||
..()
|
||||
prisonwarp += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/ert_spawn
|
||||
name = "Emergencyresponseteam"
|
||||
|
||||
/obj/effect/landmark/ert_spawn/Initialize(mapload)
|
||||
..()
|
||||
emergencyresponseteamspawn += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/holding_facility
|
||||
name = "Holding Facility"
|
||||
|
||||
/obj/effect/landmark/holding_facility/Initialize(mapload)
|
||||
..()
|
||||
holdingfacility += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe
|
||||
name = "tdomeobserve"
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe/Initialize(mapload)
|
||||
..()
|
||||
tdomeobserve += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/thunderdome/one
|
||||
name = "tdome1"
|
||||
|
||||
/obj/effect/landmark/thunderdome/one/Initialize(mapload)
|
||||
..()
|
||||
tdome1 += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/thunderdome/two
|
||||
name = "tdome2"
|
||||
|
||||
/obj/effect/landmark/thunderdome/two/Initialize(mapload)
|
||||
..()
|
||||
tdome2 += loc
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin
|
||||
name = "tdomeadmin"
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin/Initialize(mapload)
|
||||
..()
|
||||
tdomeadmin += loc
|
||||
qdel(src)
|
||||
|
||||
//generic event spawns
|
||||
/obj/effect/landmark/event_spawn
|
||||
name = "generic event spawn"
|
||||
icon_state = "x4"
|
||||
|
||||
|
||||
/obj/effect/landmark/event_spawn/New()
|
||||
..()
|
||||
generic_event_spawns += src
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
message_admins("An alien egg has been delivered to [A] at [ADMIN_COORDJMP(T)].")
|
||||
log_game("An alien egg has been delivered to [A] at [COORD(T)]")
|
||||
var/message = "Attention [station_name()], we have entrusted you with a research specimen in [A]. Remember to follow all safety precautions when dealing with the specimen."
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /.proc/print_command_report, message), announcement_time)
|
||||
SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/addtimer, CALLBACK(GLOBAL_PROC, /.proc/print_command_report, message), announcement_time))
|
||||
qdel(src)
|
||||
|
||||
@@ -51,6 +51,7 @@ var/explosionid = 1
|
||||
|
||||
if(!silent)
|
||||
var/frequency = get_rand_frequency()
|
||||
var/ex_sound = get_sfx("explosion")
|
||||
for(var/mob/M in player_list)
|
||||
// Double check for client
|
||||
if(M && M.client)
|
||||
@@ -59,7 +60,7 @@ var/explosionid = 1
|
||||
var/dist = get_dist(M_turf, epicenter)
|
||||
// If inside the blast radius + world.view - 2
|
||||
if(dist <= round(max_range + world.view - 2, 1))
|
||||
M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
|
||||
M.playsound_local(epicenter, ex_sound, 100, 1, frequency, falloff = 5)
|
||||
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
|
||||
else if(dist <= far_dist)
|
||||
var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
|
||||
|
||||
@@ -6,7 +6,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building, or something."
|
||||
desc = "Some rods. Can be used for building or something."
|
||||
singular_name = "metal rod"
|
||||
icon_state = "rods"
|
||||
item_state = "rods"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/item/weapon/implantcase/chem/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/syringe) && imp)
|
||||
W.afterattack(imp, user, params)
|
||||
W.afterattack(imp, user, TRUE, params)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -238,9 +238,6 @@
|
||||
icon_state_on = "cutlass1"
|
||||
light_color = "#ff0000"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/pirate/New()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/energy/blade
|
||||
name = "energy blade"
|
||||
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/obj
|
||||
languages_spoken = HUMAN
|
||||
languages_understood = HUMAN
|
||||
var/crit_fail = 0
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
var/throwforce = 0
|
||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
|
||||
var/damtype = "brute"
|
||||
var/damtype = BRUTE
|
||||
var/force = 0
|
||||
|
||||
var/list/armor
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
|
||||
var/being_shocked = 0
|
||||
var/being_shocked = FALSE
|
||||
|
||||
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
|
||||
var/force_blueprints = FALSE //forces the obj to be on the blueprints, regardless of when it was created.
|
||||
|
||||
var/persistence_replacement = null //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
|
||||
var/unique_rename = 0 // can you customize the description/name of the thing?
|
||||
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
|
||||
var/unique_rename = FALSE // can you customize the description/name of the thing?
|
||||
|
||||
var/dangerous_possession = FALSE //Admin possession yes/no
|
||||
|
||||
|
||||
@@ -50,4 +50,7 @@
|
||||
. = ..(amount, TRUE)
|
||||
|
||||
/mob/living/simple_animal/bot/rad_act(amount)
|
||||
. = ..(amount, TRUE)
|
||||
. = ..(amount, TRUE)
|
||||
|
||||
/mob/living/simple_animal/drone/rad_act(amount)
|
||||
. = ..(amount, TRUE)
|
||||
|
||||
@@ -37,11 +37,7 @@
|
||||
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
|
||||
. = TRUE //late initialize so we come back here
|
||||
else if(initialized)
|
||||
//we were late initialized, so now it's time to...
|
||||
take_contents()
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/take_contents), 0)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
@@ -122,7 +118,7 @@
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in T)
|
||||
if(insert(AM) == -1) // limit reached
|
||||
if(AM != src && insert(AM) == -1) // limit reached
|
||||
break
|
||||
|
||||
/obj/structure/closet/proc/open(mob/living/user)
|
||||
|
||||
@@ -82,9 +82,7 @@
|
||||
var/obj/structure/statue/petrified/S = new(loc, src, statue_timer)
|
||||
S.name = "statue of [name]"
|
||||
bleedsuppress = 1
|
||||
S.icon = icon
|
||||
S.icon_state = icon_state
|
||||
S.copy_overlays(overlays)
|
||||
S.copy_overlays(src)
|
||||
var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY)
|
||||
return 1
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
for(var/obj/structure/lattice/LAT in loc)
|
||||
if(LAT != src)
|
||||
qdel(LAT)
|
||||
QDEL_IN(LAT, 0)
|
||||
|
||||
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
@@ -182,6 +182,27 @@
|
||||
popup.set_title_image(user.browse_rsc_icon(instrumentObj.icon, instrumentObj.icon_state))
|
||||
popup.open()
|
||||
|
||||
/datum/song/proc/ParseSong(text)
|
||||
set waitfor = FALSE
|
||||
//split into lines
|
||||
lines = splittext(text, "\n")
|
||||
if(lines.len)
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
if(lines.len > 50)
|
||||
to_chat(usr, "Too many lines!")
|
||||
lines.Cut(51)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(lentext(l) > 50)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
updateDialog(usr) // make sure updates when complete
|
||||
|
||||
/datum/song/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(instrumentObj))
|
||||
@@ -208,26 +229,7 @@
|
||||
if(cont == "no")
|
||||
break
|
||||
while(lentext(t) > 3072)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
lines = splittext(t, "\n")
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
if(lines.len > 50)
|
||||
to_chat(usr, "Too many lines!")
|
||||
lines.Cut(51)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(lentext(l) > 50)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
updateDialog(usr) // make sure updates when complete
|
||||
ParseSong(t)
|
||||
|
||||
else if(href_list["help"])
|
||||
help = text2num(href_list["help"]) - 1
|
||||
|
||||
Reference in New Issue
Block a user