some cherrypicked TG fixes and tweaks

This commit is contained in:
Poojawa
2018-10-12 05:37:36 -05:00
parent 29d62bc2a8
commit 91620218e4
19 changed files with 96 additions and 43 deletions

View File

@@ -1,5 +1,4 @@
FROM tgstation/byond:512.1448 as base FROM tgstation/byond:512.1453 as base
#above version must be the same as the one in dependencies.sh
FROM base as build_base FROM base as build_base

View File

@@ -258,3 +258,5 @@
// /obj/item/bodypart on_mob_life() retval flag // /obj/item/bodypart on_mob_life() retval flag
#define BODYPART_LIFE_UPDATE_HEALTH (1<<0) #define BODYPART_LIFE_UPDATE_HEALTH (1<<0)
#define HUMAN_FIRE_STACK_ICON_NUM 3

View File

@@ -10,6 +10,10 @@
//Comment this out once you've filled in the below //Comment this out once you've filled in the below
#error TGS API unconfigured #error TGS API unconfigured
//Uncomment this if you wish to allow the game to interact with TGS 3
//This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()()
//#define TGS_V3_API
//Required interfaces (fill in with your codebase equivalent): //Required interfaces (fill in with your codebase equivalent):
//create a global variable named `Name` and set it to `Value` //create a global variable named `Name` and set it to `Value`
@@ -47,7 +51,21 @@
#define TGS_EVENT_PORT_SWAP -2 //before a port change is about to happen, extra parameter is new port #define TGS_EVENT_PORT_SWAP -2 //before a port change is about to happen, extra parameter is new port
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //before a reboot mode change, extras parameters are the current and new reboot mode enums #define TGS_EVENT_REBOOT_MODE_CHANGE -1 //before a reboot mode change, extras parameters are the current and new reboot mode enums
//TODO //See the descriptions for these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs
#define TGS_EVENT_REPO_RESET_ORIGIN 0
#define TGS_EVENT_REPO_CHECKOUT 1
#define TGS_EVENT_REPO_FETCH 2
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
#define TGS_EVENT_BYOND_INSTALL_START 5
#define TGS_EVENT_BYOND_INSTALL_FAIL 6
#define TGS_EVENT_BYOND_ACTIVE_VERSION_CHANGE 7
#define TGS_EVENT_COMPILE_START 8
#define TGS_EVENT_COMPILE_CANCELLED 9
#define TGS_EVENT_COMPILE_FAILURE 10
#define TGS_EVENT_COMPILE_COMPLETE 11
#define TGS_EVENT_INSTANCE_AUTO_UPDATE_START 12
#define TGS_EVENT_REPO_MERGE_CONFLICT 13
//OTHER ENUMS //OTHER ENUMS
@@ -74,8 +92,8 @@
/world/proc/TgsInitializationComplete() /world/proc/TgsInitializationComplete()
return return
//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified //Put this at the start of /world/Topic()
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(T); if(tgs_topic_return) return tgs_topic_return #define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return
//Call this at the beginning of world/Reboot(reason) //Call this at the beginning of world/Reboot(reason)
/world/proc/TgsReboot() /world/proc/TgsReboot()
@@ -177,7 +195,7 @@
//Gets a list of connected tgs_chat_channel //Gets a list of connected tgs_chat_channel
/world/proc/TgsChatChannelInfo() /world/proc/TgsChatChannelInfo()
return return
//Sends a message to connected game chats //Sends a message to connected game chats
//message: The message to send //message: The message to send
//channels: optional channels to limit the broadcast to //channels: optional channels to limit the broadcast to
@@ -201,24 +219,24 @@ The MIT License
Copyright (c) 2017 Jordan Brown Copyright (c) 2017 Jordan Brown
Permission is hereby granted, free of charge, Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and to any person obtaining a copy of this software and
associated documentation files (the "Software"), to associated documentation files (the "Software"), to
deal in the Software without restriction, including deal in the Software without restriction, including
without limitation the rights to use, copy, modify, without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom copies of the Software, and to permit persons to whom
the Software is furnished to do so, the Software is furnished to do so,
subject to the following conditions: subject to the following conditions:
The above copyright notice and this permission notice The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the Software. shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */

View File

@@ -3,6 +3,11 @@
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed. //#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
#ifdef DEBUG
#define USE_CUSTOM_ERROR_HANDLER
#endif
#ifdef TESTING #ifdef TESTING
#define DATUMVAR_DEBUGGING_MODE #define DATUMVAR_DEBUGGING_MODE

View File

@@ -4,7 +4,7 @@
mood_change = -4 mood_change = -4
/datum/mood_event/wellfed /datum/mood_event/wellfed
description = "<span class='nicegreen'>My belly feels round and full.</span>\n" description = "<span class='nicegreen'>I'm stuffed!</span>\n"
mood_change = 6 mood_change = 6
/datum/mood_event/fed /datum/mood_event/fed

View File

@@ -186,8 +186,8 @@
/datum/point/vector/proc/increment(multiplier = 1) /datum/point/vector/proc/increment(multiplier = 1)
iteration++ iteration++
x += mpx * 1 x += mpx * (multiplier)
y += mpy * 1 y += mpy * (multiplier)
/datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE) /datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE)
var/datum/point/vector/v = copy_to() var/datum/point/vector/v = copy_to()

View File

@@ -222,7 +222,7 @@
var/icon/I = icon(icon, icon_state, dir) var/icon/I = icon(icon, icon_state, dir)
holder.pixel_y = I.Height() - world.icon_size holder.pixel_y = I.Height() - world.icon_size
holder.icon_state = "hudno_id" holder.icon_state = "hudno_id"
if(wear_id) if(wear_id?.GetID())
holder.icon_state = "hud[ckey(wear_id.GetJobName())]" holder.icon_state = "hud[ckey(wear_id.GetJobName())]"
sec_hud_set_security_status() sec_hud_set_security_status()

View File

@@ -378,6 +378,8 @@ GLOBAL_LIST_EMPTY(objectives)
for(var/datum/mind/M in owners) for(var/datum/mind/M in owners)
if(considered_alive(M)) if(considered_alive(M))
return FALSE return FALSE
if(M.current?.suiciding) //killing yourself ISN'T glorious.
return FALSE
return TRUE return TRUE
/datum/objective/nuclear /datum/objective/nuclear

View File

@@ -91,6 +91,7 @@ Class Procs:
verb_yell = "blares" verb_yell = "blares"
pressure_resistance = 15 pressure_resistance = 15
max_integrity = 200 max_integrity = 200
layer = BELOW_OBJ_LAYER //keeps shit coming out of the machine from ending up underneath it.
anchored = TRUE anchored = TRUE
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
@@ -120,7 +121,7 @@ Class Procs:
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70) armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
. = ..() . = ..()
GLOB.machines += src GLOB.machines += src
if(ispath(circuit, /obj/item/circuitboard)) if(ispath(circuit, /obj/item/circuitboard))
circuit = new circuit circuit = new circuit
circuit.apply_default_parts(src) circuit.apply_default_parts(src)

View File

@@ -131,18 +131,24 @@
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, 0) playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, 0)
/obj/machinery/harvester/screwdriver_act(mob/living/user, obj/item/I) /obj/machinery/harvester/screwdriver_act(mob/living/user, obj/item/I)
. = ..() . = TRUE
if(.) if(..())
return TRUE return
if(!state_open && !occupant) if(occupant)
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I)) to_chat(user, "<span class='warning'>[src] is currently occupied!</span>")
return return
if(state_open)
to_chat(user, "<span class='warning'>[src] must be closed to [panel_open ? "close" : "open"] it's maintenance hatch!</span>")
return
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
return
return FALSE
/obj/machinery/harvester/crowbar_act(mob/living/user, obj/item/I) /obj/machinery/harvester/crowbar_act(mob/living/user, obj/item/I)
if(default_pry_open(I)) if(default_pry_open(I))
return return TRUE
if(default_deconstruction_crowbar(I)) if(default_deconstruction_crowbar(I))
return return TRUE
/obj/machinery/harvester/default_pry_open(obj/item/I) //wew /obj/machinery/harvester/default_pry_open(obj/item/I) //wew
. = !(state_open || panel_open || (flags_1 & NODECONSTRUCT_1)) && I.tool_behaviour == TOOL_CROWBAR //We removed is_operational() here . = !(state_open || panel_open || (flags_1 & NODECONSTRUCT_1)) && I.tool_behaviour == TOOL_CROWBAR //We removed is_operational() here
@@ -181,4 +187,4 @@
if(state_open) if(state_open)
to_chat(user, "<span class='notice'>[src] must be closed before harvesting.</span>") to_chat(user, "<span class='notice'>[src] must be closed before harvesting.</span>")
else if(!harvesting) else if(!harvesting)
to_chat(user, "<span class='notice'>Alt-click [src] to start harvesting.</span>") to_chat(user, "<span class='notice'>Alt-click [src] to start harvesting.</span>")

View File

@@ -37,7 +37,7 @@
active_hotspot = new /obj/effect/hotspot(src) active_hotspot = new /obj/effect/hotspot(src)
active_hotspot.temperature = exposed_temperature active_hotspot.temperature = exposed_temperature
active_hotspot.volume = exposed_volume active_hotspot.volume = exposed_volume*25
active_hotspot.just_spawned = (current_cycle < SSair.times_fired) active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
//remove just_spawned protection if no longer processing this cell //remove just_spawned protection if no longer processing this cell

View File

@@ -20,6 +20,7 @@
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/extinguisher, /obj/item/crowbar) allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/extinguisher, /obj/item/crowbar)
slowdown = 1 slowdown = 1
armor = list("melee" = 15, "bullet" = 5, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS

View File

@@ -148,6 +148,7 @@
new /obj/item/stack/spacecash/c200(drop_location()) new /obj/item/stack/spacecash/c200(drop_location())
credits_stored -= 200 credits_stored -= 200
to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>") to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>")
credits_stored = 0
/obj/machinery/shuttle_scrambler/proc/send_notification() /obj/machinery/shuttle_scrambler/proc/send_notification()

View File

@@ -156,7 +156,7 @@
icon_state = "mint" icon_state = "mint"
bitesize = 1 bitesize = 1
trash = /obj/item/trash/plate trash = /obj/item/trash/plate
list_reagents = list("minttoxin" = 1) list_reagents = list("minttoxin" = 2)
filling_color = "#800000" filling_color = "#800000"
foodtype = TOXIC | SUGAR foodtype = TOXIC | SUGAR

View File

@@ -10,6 +10,8 @@
active_power_usage = 100 active_power_usage = 100
circuit = /obj/item/circuitboard/machine/microwave circuit = /obj/item/circuitboard/machine/microwave
pass_flags = PASSTABLE pass_flags = PASSTABLE
light_color = LIGHT_COLOR_YELLOW
light_power = 3
var/operating = FALSE // Is it on? var/operating = FALSE // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning? var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it??? var/broken = 0 // ={0,1,2} How broken is it???
@@ -267,12 +269,14 @@
soundloop.start() soundloop.start()
operating = TRUE operating = TRUE
icon_state = "mw1" icon_state = "mw1"
set_light(1.5)
updateUsrDialog() updateUsrDialog()
/obj/machinery/microwave/proc/abort() /obj/machinery/microwave/proc/abort()
operating = FALSE // Turn it off again aferwards operating = FALSE // Turn it off again aferwards
icon_state = "mw" icon_state = "mw"
updateUsrDialog() updateUsrDialog()
set_light(0)
soundloop.stop() soundloop.stop()
/obj/machinery/microwave/proc/stop() /obj/machinery/microwave/proc/stop()
@@ -298,6 +302,7 @@
if(prob(50)) if(prob(50))
new /obj/item/reagent_containers/food/snacks/badrecipe(src) new /obj/item/reagent_containers/food/snacks/badrecipe(src)
qdel(S) qdel(S)
set_light(0)
soundloop.stop() soundloop.stop()
/obj/machinery/microwave/proc/broke() /obj/machinery/microwave/proc/broke()
@@ -310,6 +315,7 @@
flags_1 = null //So you can't add condiments flags_1 = null //So you can't add condiments
operating = FALSE // Turn it off again aferwards operating = FALSE // Turn it off again aferwards
updateUsrDialog() updateUsrDialog()
set_light(0)
soundloop.stop() soundloop.stop()
/obj/machinery/microwave/Topic(href, href_list) /obj/machinery/microwave/Topic(href, href_list)

View File

@@ -53,3 +53,4 @@
var/creamed = FALSE //to use with creampie overlays var/creamed = FALSE //to use with creampie overlays
var/static/list/can_ride_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot)) var/static/list/can_ride_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot))
var/lastpuke = 0 var/lastpuke = 0
var/last_fire_update

View File

@@ -122,6 +122,12 @@
///FIRE CODE ///FIRE CODE
/mob/living/carbon/human/handle_fire() /mob/living/carbon/human/handle_fire()
if(!last_fire_update)
last_fire_update = fire_stacks
if((fire_stacks > HUMAN_FIRE_STACK_ICON_NUM && last_fire_update <= HUMAN_FIRE_STACK_ICON_NUM) || (fire_stacks <= HUMAN_FIRE_STACK_ICON_NUM && last_fire_update > HUMAN_FIRE_STACK_ICON_NUM))
last_fire_update = fire_stacks
update_fire()
..() ..()
if(dna) if(dna)
dna.species.handle_fire(src) dna.species.handle_fire(src)
@@ -154,6 +160,7 @@
/mob/living/carbon/human/ExtinguishMob() /mob/living/carbon/human/ExtinguishMob()
if(!dna || !dna.species.ExtinguishMob(src)) if(!dna || !dna.species.ExtinguishMob(src))
last_fire_update = null
..() ..()
//END FIRE CODE //END FIRE CODE

View File

@@ -3,11 +3,12 @@
#Project dependencies file #Project dependencies file
#Final authority on what's required to fully build the project #Final authority on what's required to fully build the project
#byond version # byond version
#note, this also needs to be changed in the Dockerfile's initial FROM command # Extracted from the Dockerfile. Change by editing Dockerfile's FROM command.
#If someone has an idea for how to set that version within the Dockerfile itself without any other dependencies, feel free to PR it LIST=($(sed -n 's/.*byond:\([0-9]\+\)\.\([0-9]\+\).*/\1 \2/p' Dockerfile))
export BYOND_MAJOR=512 export BYOND_MAJOR=${LIST[0]}
export BYOND_MINOR=1448 export BYOND_MINOR=${LIST[1]}
unset LIST
#rust_g git tag #rust_g git tag
export RUST_G_VERSION=0.4.1 export RUST_G_VERSION=0.4.1

View File

@@ -370,7 +370,7 @@ def _parse(map_raw_text):
continue continue
elif in_comment_line: elif in_comment_line:
continue continue
elif char == "\t": elif char in "\r\t":
continue continue
if char == "/" and not in_quote_block: if char == "/" and not in_quote_block:
@@ -478,6 +478,9 @@ def _parse(map_raw_text):
# grid block # grid block
for char in it: for char in it:
if char == "\r":
continue
if in_coord_block: if in_coord_block:
if char == ",": if char == ",":
if reading_coord == "x": if reading_coord == "x":