Merge branch 'master' into upstream-merge-32307
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -518,6 +518,19 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
assembled += A
|
||||
return assembled
|
||||
|
||||
/atom/proc/GetAllContentsIgnoring(list/ignore_typecache)
|
||||
if(!ignore_typecache)
|
||||
return GetAllContents()
|
||||
var/list/processing = list(src)
|
||||
var/list/assembled = list()
|
||||
while(processing.len)
|
||||
var/atom/A = processing[1]
|
||||
processing.Cut(1,2)
|
||||
if(!ignore_typecache[A.type])
|
||||
processing += A.contents
|
||||
assembled += A
|
||||
return assembled
|
||||
|
||||
//Step-towards method of determining whether one atom can see another. Similar to viewers()
|
||||
/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate.
|
||||
var/turf/current = get_turf(source)
|
||||
|
||||
@@ -213,6 +213,8 @@
|
||||
damage = 15
|
||||
armour_penetration = 10
|
||||
light_range = 2
|
||||
speed = 1.2
|
||||
range = 25
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/bullet/nlmags //non-lethal boolets
|
||||
@@ -220,9 +222,11 @@
|
||||
icon_state = "magjectile-nl"
|
||||
damage = 1
|
||||
knockdown = 0
|
||||
stamina = 25
|
||||
stamina = 30
|
||||
armour_penetration = -10
|
||||
light_range = 2
|
||||
speed = 1.2
|
||||
range = 25
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
|
||||
@@ -378,19 +382,23 @@
|
||||
/obj/item/projectile/bullet/magrifle
|
||||
icon = 'icons/obj/guns/cit_guns.dmi'
|
||||
icon_state = "magjectile-large"
|
||||
damage = 25
|
||||
damage = 20
|
||||
armour_penetration = 25
|
||||
light_range = 3
|
||||
speed = 1.2
|
||||
range = 35
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/bullet/nlmagrifle //non-lethal boolets
|
||||
icon = 'icons/obj/guns/cit_guns.dmi'
|
||||
icon_state = "magjectile-large-nl"
|
||||
damage = 2
|
||||
damage = 1
|
||||
knockdown = 0
|
||||
stamina = 30
|
||||
stamina = 35
|
||||
armour_penetration = -10
|
||||
light_range = 3
|
||||
speed = 1.0
|
||||
range = 35
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
///ammo casings///
|
||||
@@ -494,7 +502,7 @@
|
||||
name = "foamag rifle"
|
||||
desc = "A foam launching magnetic rifle. Ages 8 and up."
|
||||
icon_state = "foamagrifle"
|
||||
needs_permit = 0
|
||||
needs_permit = FALSE
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/foamag
|
||||
casing_ejector = FALSE
|
||||
origin_tech = "combat=2;engineering=2;magnets=2"
|
||||
@@ -1070,12 +1078,16 @@ obj/item/projectile/bullet/c10mm/soporific
|
||||
name = "9mm frangible bullet"
|
||||
damage = 15
|
||||
stamina = 0
|
||||
speed = 1.0
|
||||
range = 20
|
||||
armour_penetration = -25
|
||||
|
||||
/obj/item/projectile/bullet/c9mm/rubber
|
||||
name = "9mm rubber bullet"
|
||||
damage = 2
|
||||
stamina = 25
|
||||
damage = 5
|
||||
stamina = 30
|
||||
speed = 1.2
|
||||
range = 14
|
||||
knockdown = 0
|
||||
|
||||
/obj/item/ammo_casing/c9mm/frangible
|
||||
@@ -1120,9 +1132,9 @@ obj/item/projectile/bullet/c10mm/soporific
|
||||
name = "Box of 9mm Frangible Bullets"
|
||||
id = "9mm_frag"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 30000)
|
||||
materials = list(MAT_METAL = 25000)
|
||||
build_path = /obj/item/ammo_box/c9mm/frangible
|
||||
category = list("initial", "Security")
|
||||
category = list("hacked", "Security")
|
||||
|
||||
/datum/design/c9mmrubber
|
||||
name = "Box of 9mm Rubber Bullets"
|
||||
@@ -1159,6 +1171,7 @@ obj/item/projectile/bullet/c10mm/soporific
|
||||
icon_state = "p37_foam"
|
||||
pin = /obj/item/device/firing_pin
|
||||
spawnwithmagazine = TRUE
|
||||
needs_permit = FALSE
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/pistol
|
||||
can_suppress = FALSE
|
||||
actions_types = list(/datum/action/item_action/pick_color)
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
blade_inhand.color = light_color
|
||||
. += blade_inhand
|
||||
|
||||
/obj/item/toy/sword/cx/attackby(obj/item/W, mob/living/user, params)
|
||||
return //NO MORE MAKING DUAL ESWORDS
|
||||
|
||||
/*///autolathe memes/// I really need to stop doing this and find a proper way of adding in my toys
|
||||
|
||||
/datum/design/toyneb
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
var/datum/parent
|
||||
|
||||
/datum/component/New(datum/P, ...)
|
||||
if(type == /datum/component)
|
||||
qdel(src)
|
||||
CRASH("[type] instantiated!")
|
||||
|
||||
parent = P
|
||||
var/list/arguments = args.Copy()
|
||||
arguments.Cut(1, 2)
|
||||
@@ -56,7 +60,7 @@
|
||||
var/test = dc[I]
|
||||
if(test) //already another component of this type here
|
||||
var/list/components_of_type
|
||||
if(!islist(test))
|
||||
if(!length(test))
|
||||
components_of_type = list(test)
|
||||
dc[I] = components_of_type
|
||||
else
|
||||
@@ -91,10 +95,9 @@
|
||||
/datum/component/proc/_RemoveFromParent()
|
||||
var/datum/P = parent
|
||||
var/list/dc = P.datum_components
|
||||
var/our_type = type
|
||||
for(var/I in _GetInverseTypeList(our_type))
|
||||
for(var/I in _GetInverseTypeList())
|
||||
var/list/components_of_type = dc[I]
|
||||
if(islist(components_of_type)) //
|
||||
if(length(components_of_type)) //
|
||||
var/list/subtracted = components_of_type - src
|
||||
if(subtracted.len == 1) //only 1 guy left
|
||||
dc[I] = subtracted[1] //make him special
|
||||
@@ -133,10 +136,6 @@
|
||||
set waitfor = FALSE
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
/datum/component/proc/_GetInverseTypeList(current_type)
|
||||
. = list(current_type)
|
||||
=======
|
||||
/datum/component/proc/_GetInverseTypeList(our_type = type)
|
||||
#if DM_VERSION > 511
|
||||
#warning Remove this hack for http://www.byond.com/forum/?post=73469
|
||||
@@ -146,7 +145,6 @@
|
||||
var/current_type = parent_type
|
||||
. = list(our_type, current_type)
|
||||
//and since most components are root level + 1, this won't even have to run
|
||||
>>>>>>> 828ff86... Merge pull request #32307 from tgstation/Cyberboss-patch-1
|
||||
while (current_type != /datum/component)
|
||||
current_type = type2parent(current_type)
|
||||
. += current_type
|
||||
@@ -158,7 +156,7 @@
|
||||
var/list/arguments = args.Copy()
|
||||
arguments.Cut(1, 2)
|
||||
var/target = comps[/datum/component]
|
||||
if(!islist(target))
|
||||
if(!length(target))
|
||||
var/datum/component/C = target
|
||||
if(!C.enabled)
|
||||
return FALSE
|
||||
@@ -194,7 +192,7 @@
|
||||
if(!dc)
|
||||
return null
|
||||
. = dc[c_type]
|
||||
if(islist(.))
|
||||
if(length(.))
|
||||
return .[1]
|
||||
|
||||
/datum/proc/GetExactComponent(c_type)
|
||||
@@ -203,7 +201,7 @@
|
||||
return null
|
||||
var/datum/component/C = dc[c_type]
|
||||
if(C)
|
||||
if(islist(C))
|
||||
if(length(C))
|
||||
C = C[1]
|
||||
if(C.type == c_type)
|
||||
return C
|
||||
@@ -214,7 +212,7 @@
|
||||
if(!dc)
|
||||
return null
|
||||
. = dc[c_type]
|
||||
if(!islist(.))
|
||||
if(!length(.))
|
||||
return list(.)
|
||||
|
||||
/datum/proc/AddComponent(new_type, ...)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/list/dc = datum_components
|
||||
if(dc)
|
||||
var/all_components = dc[/datum/component]
|
||||
if(islist(all_components))
|
||||
if(length(all_components))
|
||||
for(var/I in all_components)
|
||||
var/datum/component/C = I
|
||||
C._RemoveFromParent()
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
icon_state = "cuff"
|
||||
item_state = "coil"
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=75)
|
||||
@@ -109,6 +110,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/update_icon()
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
@@ -130,24 +132,31 @@
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/red
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/yellow
|
||||
item_color = "yellow"
|
||||
color = "#ffff00"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/blue
|
||||
item_color = "blue"
|
||||
color = "#1919c8"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/green
|
||||
item_color = "green"
|
||||
color = "#00aa00"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/pink
|
||||
item_color = "pink"
|
||||
color = "#ff3ccd"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/orange
|
||||
item_color = "orange"
|
||||
color = "#ff8000"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/cyan
|
||||
item_color = "cyan"
|
||||
color = "#00ffff"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/white
|
||||
item_color = "white"
|
||||
|
||||
@@ -26,8 +26,31 @@
|
||||
var/fire_mode = PCANNON_FIREALL
|
||||
var/automatic = FALSE
|
||||
var/clumsyCheck = TRUE
|
||||
var/list/allowed_typecache //Leave as null to allow all.
|
||||
var/charge_amount = 1
|
||||
var/charge_ticks = 1
|
||||
var/charge_tick = 0
|
||||
var/charge_type
|
||||
var/selfcharge = FALSE
|
||||
trigger_guard = TRIGGER_GUARD_NORMAL
|
||||
|
||||
|
||||
/obj/item/pneumatic_cannon/Initialize()
|
||||
. = ..()
|
||||
if(selfcharge)
|
||||
init_charge()
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/init_charge() //wrapper so it can be vv'd easier
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/pneumatic_cannon/process()
|
||||
if(++charge_tick >= charge_ticks && charge_type)
|
||||
fill_with_type(charge_type, charge_amount)
|
||||
|
||||
/obj/item/pneumatic_cannon/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/pneumatic_cannon/CanItemAutoclick()
|
||||
return automatic
|
||||
|
||||
@@ -75,6 +98,10 @@
|
||||
load_item(IW, user)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/can_load_item(obj/item/I, mob/user)
|
||||
if(allowed_typecache && is_type_in_typecache(I, allowed_typecache))
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>[I] won't fit into [src]!</span>")
|
||||
return
|
||||
if((loadedWeightClass + I.w_class) > maxWeightClass) //Only make messages if there's a user
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>\The [I] won't fit into \the [src]!</span>")
|
||||
@@ -233,28 +260,14 @@
|
||||
throw_amount = 1
|
||||
maxWeightClass = 150 //50 pies. :^)
|
||||
clumsyCheck = FALSE
|
||||
var/static/list/pie_typecache = typecacheof(/obj/item/reagent_containers/food/snacks/pie)
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/can_load_item(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/reagent_containers/food/snacks/pie))
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>[src] only accepts pies!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/Initialize()
|
||||
. = ..()
|
||||
allowed_typecache = pie_typecache
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge
|
||||
automatic = TRUE
|
||||
var/charge_amount = 1
|
||||
var/charge_ticks = 1
|
||||
var/charge_tick = 0
|
||||
selfcharge = TRUE
|
||||
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream
|
||||
maxWeightClass = 60 //20 pies.
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge/process()
|
||||
if(++charge_tick >= charge_ticks)
|
||||
fill_with_type(/obj/item/reagent_containers/food/snacks/pie/cream, charge_amount)
|
||||
|
||||
@@ -561,6 +561,10 @@
|
||||
if(istype(dampening_field))
|
||||
QDEL_NULL(dampening_field)
|
||||
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
|
||||
|
||||
var/mob/living/silicon/robot/owner = get_host()
|
||||
if(owner)
|
||||
owner.module.allow_riding = FALSE
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
@@ -568,6 +572,18 @@
|
||||
for(var/P in tracked)
|
||||
restore_projectile(P)
|
||||
|
||||
var/mob/living/silicon/robot/owner = get_host()
|
||||
if(owner)
|
||||
owner.module.allow_riding = TRUE
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/get_host()
|
||||
if(istype(host))
|
||||
return host
|
||||
else
|
||||
if(iscyborg(host.loc))
|
||||
return host.loc
|
||||
return null
|
||||
|
||||
/obj/item/borg/projectile_dampen/dropped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
/turf/proc/empty(turf_type=/turf/open/space, baseturf_type, list/ignore_typecache, forceop = FALSE)
|
||||
// Remove all atoms except observers, landmarks, docking ports
|
||||
var/static/list/ignored_atoms = typecacheof(list(/mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object))
|
||||
var/list/allowed_contents = typecache_filter_list_reverse(GetAllContents(), ignored_atoms | ignore_typecache)
|
||||
var/list/allowed_contents = typecache_filter_list_reverse(GetAllContentsIgnoring(ignore_typecache), ignored_atoms)
|
||||
allowed_contents -= src
|
||||
for(var/i in 1 to allowed_contents.len)
|
||||
var/thing = allowed_contents[i]
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
#define STICKYBAN_MAX_EXISTING_USER_MATCHES 5 //ie, users who were connected before the ban triggered
|
||||
#define STICKYBAN_MAX_ADMIN_MATCHES 2
|
||||
|
||||
/world/IsBanned(key,address,computer_id)
|
||||
/world/IsBanned(key,address,computer_id,real_bans_only=FALSE)
|
||||
if (!key || !address || !computer_id)
|
||||
if(real_bans_only)
|
||||
return FALSE
|
||||
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
|
||||
|
||||
@@ -31,7 +33,7 @@
|
||||
return list("reason"="whitelist", "desc" = "\nReason: You are not on the white list for this server")
|
||||
|
||||
//Guest Checking
|
||||
if(IsGuestKey(key))
|
||||
if(!real_bans_only && IsGuestKey(key))
|
||||
if (CONFIG_GET(flag/guest_ban))
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
@@ -41,7 +43,7 @@
|
||||
|
||||
//Population Cap Checking
|
||||
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
|
||||
if(extreme_popcap && living_player_count() >= extreme_popcap && !admin)
|
||||
if(!real_bans_only && extreme_popcap && living_player_count() >= extreme_popcap && !admin)
|
||||
log_access("Failed Login: [key] - Population cap reached")
|
||||
return list("reason"="popcap", "desc"= "\nReason: [CONFIG_GET(string/extreme_popcap_message)]")
|
||||
|
||||
|
||||
@@ -179,6 +179,16 @@
|
||||
time = 40
|
||||
category = CAT_ROBOT
|
||||
|
||||
/datum/crafting_recipe/honkbot
|
||||
name = "Honkbot"
|
||||
result = /mob/living/simple_animal/bot/honkbot
|
||||
reqs = list(/obj/item/storage/box/clown = 1,
|
||||
/obj/item/bodypart/r_arm/robot = 1,
|
||||
/obj/item/device/assembly/prox_sensor = 1,
|
||||
/obj/item/bikehorn/ = 1)
|
||||
time = 40
|
||||
category = CAT_ROBOT
|
||||
|
||||
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
|
||||
name = "Pneumatic Cannon"
|
||||
result = /obj/item/pneumatic_cannon/ghetto
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(R.has_buckled_mobs())
|
||||
for(var/mob/living/L in R.buckled_mobs)
|
||||
L.visible_message("<span class='warning'>[L] is knocked off of [R] by the charge in [R]'s chassis induced by [name]!</span>") //I know it's bad.
|
||||
L.Knockdown(60)
|
||||
L.Knockdown(10)
|
||||
R.unbuckle_mob(L)
|
||||
do_sparks(5, 0, L)
|
||||
..()
|
||||
|
||||
@@ -158,7 +158,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
var/list/row = src.connectionHistory[i]
|
||||
if (!row || row.len < 3 || (!row["ckey"] || !row["compid"] || !row["ip"])) //Passed malformed history object
|
||||
return
|
||||
if (world.IsBanned(row["ckey"], row["compid"], row["ip"]))
|
||||
if (world.IsBanned(row["ckey"], row["compid"], row["ip"], real_bans_only=TRUE))
|
||||
found = row
|
||||
break
|
||||
|
||||
|
||||
@@ -320,6 +320,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
forceMove(summoner.loc)
|
||||
new /obj/effect/temp_visual/guardian/phase(loc)
|
||||
cooldown = world.time + 10
|
||||
reset_perspective()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -48,24 +48,31 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
var/obj/item/stack/cable_coil/stored
|
||||
|
||||
var/cable_color = "red"
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/structure/cable/yellow
|
||||
cable_color = "yellow"
|
||||
color = "#ffff00"
|
||||
|
||||
/obj/structure/cable/green
|
||||
cable_color = "green"
|
||||
color = "#00aa00"
|
||||
|
||||
/obj/structure/cable/blue
|
||||
cable_color = "blue"
|
||||
color = "#1919c8"
|
||||
|
||||
/obj/structure/cable/pink
|
||||
cable_color = "pink"
|
||||
color = "#ff3cc8"
|
||||
|
||||
/obj/structure/cable/orange
|
||||
cable_color = "orange"
|
||||
color = "#ff8000"
|
||||
|
||||
/obj/structure/cable/cyan
|
||||
cable_color = "cyan"
|
||||
color = "#00ffff"
|
||||
|
||||
/obj/structure/cable/white
|
||||
cable_color = "white"
|
||||
@@ -123,6 +130,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon_state = "[d1]-[d2]-f"
|
||||
else
|
||||
icon_state = "[d1]-[d2]"
|
||||
color = null
|
||||
add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/structure/cable/proc/handlecable(obj/item/W, mob/user, params)
|
||||
@@ -523,6 +531,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
/obj/item/stack/cable_coil/update_icon()
|
||||
icon_state = "[initial(item_state)][amount < 3 ? amount : ""]"
|
||||
name = "cable [amount < 3 ? "piece" : "coil"]"
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/stack/cable_coil/attack_hand(mob/user)
|
||||
@@ -743,30 +752,38 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
|
||||
/obj/item/stack/cable_coil/red
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/item/stack/cable_coil/yellow
|
||||
item_color = "yellow"
|
||||
color = "#ffff00"
|
||||
|
||||
/obj/item/stack/cable_coil/blue
|
||||
item_color = "blue"
|
||||
color = "#1919c8"
|
||||
|
||||
/obj/item/stack/cable_coil/green
|
||||
item_color = "green"
|
||||
color = "#00aa00"
|
||||
|
||||
/obj/item/stack/cable_coil/pink
|
||||
item_color = "pink"
|
||||
color = "#ff3ccd"
|
||||
|
||||
/obj/item/stack/cable_coil/orange
|
||||
item_color = "orange"
|
||||
color = "#ff8000"
|
||||
|
||||
/obj/item/stack/cable_coil/cyan
|
||||
item_color = "cyan"
|
||||
color = "#00ffff"
|
||||
|
||||
/obj/item/stack/cable_coil/white
|
||||
item_color = "white"
|
||||
|
||||
/obj/item/stack/cable_coil/random
|
||||
item_color = null
|
||||
color = "#ffffff"
|
||||
|
||||
/obj/item/stack/cable_coil/random/five
|
||||
amount = 5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/smoke_machine
|
||||
name = "Smoke Machine"
|
||||
desc = "Seriously man?"
|
||||
name = "smoke machine"
|
||||
desc = "A machine with a centrifuge installed into it. It produces smoke with any reagents you put into the machine."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "smoke0"
|
||||
density = TRUE
|
||||
@@ -11,9 +11,9 @@
|
||||
var/cooldown = 0
|
||||
var/screen = "home"
|
||||
var/useramount = 30 // Last used amount
|
||||
var/volume = 1000
|
||||
var/volume = 300
|
||||
var/setting = 3
|
||||
var/list/possible_settings = list(3,6,9,12,15)
|
||||
var/list/possible_settings = list(3,6,9)
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/smoke_machine/set_up(datum/reagents/carry, setting = 3, efficiency = 10, loc)
|
||||
amount = setting
|
||||
|
||||
@@ -121,14 +121,22 @@
|
||||
O.transfer_to_limb(src, C)
|
||||
|
||||
update_icon_dropped()
|
||||
forceMove(T)
|
||||
C.update_health_hud() //update the healthdoll
|
||||
C.update_body()
|
||||
C.update_hair()
|
||||
C.update_canmove()
|
||||
|
||||
if(!T) // T = null happens when a "dummy human" used for rendering icons on prefs screen gets its limbs replaced.
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(is_pseudopart)
|
||||
drop_organs(C) //Psuedoparts shouldn't have organs, but just in case
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
forceMove(T)
|
||||
|
||||
|
||||
|
||||
//when a limb is dropped, the internal organs are removed from the mob and put into the limb
|
||||
|
||||
@@ -42,7 +42,7 @@ set_error_handler(function($severity, $message, $file, $line) {
|
||||
set_exception_handler(function($e) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
echo "Error on line {$e->getLine()}: " . htmlSpecialChars($e->getMessage());
|
||||
file_put_contents('htwebhookerror.log', "Error on line {$e->getLine()}: " . $e->getMessage(), FILE_APPEND);
|
||||
file_put_contents('htwebhookerror.log', '['.date(DATE_ATOM).'] '."Error on line {$e->getLine()}: " . $e->getMessage().PHP_EOL, FILE_APPEND);
|
||||
die();
|
||||
});
|
||||
$rawPost = NULL;
|
||||
@@ -519,35 +519,49 @@ function update_pr_balance($payload) {
|
||||
fclose($balances_file);
|
||||
}
|
||||
|
||||
function auto_update($payload){
|
||||
global $enable_live_tracking;
|
||||
global $path_to_script;
|
||||
global $repoOwnerAndName;
|
||||
global $tracked_branch;
|
||||
if(!$enable_live_tracking || !has_tree_been_edited($payload, $path_to_script) || $payload['pull_request']['base']['ref'] != $tracked_branch)
|
||||
return;
|
||||
|
||||
$content = file_get_contents('https://raw.githubusercontent.com/' . $repoOwnerAndName . '/' . $tracked_branch . '/'. $path_to_script);
|
||||
|
||||
create_comment($payload, "Edit detected. Self updating... Here is my new code:\n``" . "`HTML+PHP\n" . $content . "\n``" . '`');
|
||||
|
||||
$code_file = fopen(basename($path_to_script), 'w');
|
||||
fwrite($code_file, $content);
|
||||
fclose($code_file);
|
||||
}
|
||||
|
||||
$github_diff = null;
|
||||
|
||||
function has_tree_been_edited($payload, $tree){
|
||||
function get_diff($payload) {
|
||||
global $github_diff;
|
||||
if ($github_diff === null) {
|
||||
//go to the diff url
|
||||
$url = $payload['pull_request']['diff_url'];
|
||||
$github_diff = file_get_contents($url);
|
||||
}
|
||||
return $github_diff;
|
||||
}
|
||||
|
||||
function auto_update($payload){
|
||||
global $enable_live_tracking;
|
||||
global $path_to_script;
|
||||
global $repoOwnerAndName;
|
||||
global $tracked_branch;
|
||||
global $github_diff;
|
||||
if(!$enable_live_tracking || !has_tree_been_edited($payload, $path_to_script) || $payload['pull_request']['base']['ref'] != $tracked_branch)
|
||||
return;
|
||||
|
||||
get_diff($payload);
|
||||
$content = file_get_contents('https://raw.githubusercontent.com/' . $repoOwnerAndName . '/' . $tracked_branch . '/'. $path_to_script);
|
||||
$content_diff = "### Diff not available. :slightly_frowning_face:";
|
||||
if($github_diff && preg_match('/(diff --git a\/' . preg_quote($path_to_script, '/') . '.+?)(?:^diff)?/sm', $github_diff, $matches)) {
|
||||
$script_diff = matches[1];
|
||||
if($script_diff) {
|
||||
$content_diff = "``" . "`DIFF\n" . $script_diff ."\n``" . "`";
|
||||
}
|
||||
}
|
||||
create_comment($payload, "Edit detected. Self updating... \n<details><summary>Here are my changes:</summary>\n\n" . $content_diff . "\n</details>\n<details><summary>Here is my new code:</summary>\n\n``" . "`HTML+PHP\n" . $content . "\n``" . '`\n</details>');
|
||||
|
||||
$code_file = fopen(basename($path_to_script), 'w');
|
||||
fwrite($code_file, $content);
|
||||
fclose($code_file);
|
||||
}
|
||||
|
||||
function has_tree_been_edited($payload, $tree){
|
||||
global $github_diff;
|
||||
get_diff($payload);
|
||||
//find things in the _maps/map_files tree
|
||||
//e.g. diff --git a/_maps/map_files/Cerestation/cerestation.dmm b/_maps/map_files/Cerestation/cerestation.dmm
|
||||
return $github_diff !== FALSE && preg_match('/^diff --git a\/' . preg_quote($tree, '/') . '/m') !== FALSE;
|
||||
return ($github_diff !== FALSE) && (preg_match('/^diff --git a\/' . preg_quote($tree, '/') . '/m', $github_diff) !== 0);
|
||||
}
|
||||
|
||||
$no_changelog = false;
|
||||
|
||||
Reference in New Issue
Block a user