This commit is contained in:
LetterJay
2018-01-11 20:38:06 -06:00
13 changed files with 148 additions and 144 deletions
@@ -22,7 +22,7 @@ GLOBAL_PROTECT(config_dir)
config = src
InitEntries()
LoadModes()
if(LoadEntries("config.txt") <= 1)
if(fexists("config/config.txt") && LoadEntries("config.txt") <= 1)
log_config("No $include directives found in config.txt! Loading legacy game_options/dbconfig/comms files...")
LoadEntries("game_options.txt")
LoadEntries("dbconfig.txt")
+1 -1
View File
@@ -187,7 +187,7 @@ Versioning
"gun_fired" = 2)
*/
/datum/controller/subsystem/blackbox/proc/record_feedback(key_type, key, increment, data, overwrite)
if(sealed || !key_type || !istext(key) || !isnum(increment) || !data)
if(sealed || !key_type || !istext(key) || !isnum(increment || !data))
return
var/datum/feedback_variable/FV = find_feedback_datum(key, key_type)
switch(key_type)
+3 -2
View File
@@ -108,9 +108,10 @@
var/datum/atom_hud/antag/hud_to_transfer = antag_hud//we need this because leave_hud() will clear this list
var/mob/living/old_current = current
if(current)
current.transfer_observers_to(new_character) //transfer anyone observing the old character to the new one
current = new_character //associate ourself with our new body
new_character.mind = src //and associate our new body with ourself
old_current.transfer_observers_to(current) //transfer anyone observing the old character to the new one
new_character.mind = src //and associate our new body with ourself
for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body
var/datum/antagonist/A = a
A.on_body_transfer(old_current, current)
+2 -1
View File
@@ -26,6 +26,7 @@
var/turf/open/atmos_source //Atmos link source
var/turf/open/atmos_destination //Atmos link destination
var/allow_anchored = FALSE
var/innate_accuracy_penalty = 0
/obj/effect/portal/anom
name = "wormhole"
@@ -150,7 +151,7 @@
return
if(ismegafauna(M))
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
if(do_teleport(M, real_target, 0))
if(do_teleport(M, real_target, innate_accuracy_penalty))
if(istype(M, /obj/item/projectile))
var/obj/item/projectile/P = M
P.ignore_source_check = TRUE
@@ -212,6 +212,7 @@
return ..()
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldnt be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(istype(W, cutting_tool))
if(istype(W, /obj/item/weldingtool))
@@ -221,29 +222,29 @@
playsound(loc, cutting_sound, 40, 1)
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(!opened || !WT.isOn())
return TRUE
return
playsound(loc, cutting_sound, 50, 1)
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
"<span class='italics'>You hear welding.</span>")
deconstruct(TRUE)
return TRUE
return
else // for example cardboard box is cut with wirecutters
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
deconstruct(TRUE)
return TRUE
return
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return TRUE
return
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
var/obj/item/weldingtool/WT = W
if(!WT.remove_fuel(0, user))
return TRUE
return
to_chat(user, "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>")
playsound(loc, 'sound/items/welder2.ogg', 40, 1)
if(do_after(user, 40*WT.toolspeed, 1, target = src))
if(opened || !WT.isOn())
return TRUE
return
playsound(loc, WT.usesound, 50, 1)
welded = !welded
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
@@ -252,7 +253,7 @@
update_icon()
else if(istype(W, /obj/item/wrench) && anchorable)
if(isinspace() && !anchored)
return TRUE
return
anchored = !anchored
playsound(src.loc, W.usesound, 75, 1)
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
@@ -261,7 +262,6 @@
else if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1))
if(W.GetID() || !toggle(user))
togglelock(user)
return TRUE
else
return FALSE
@@ -89,15 +89,11 @@
icon_state = "bhole3"
desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon."
mech_sized = TRUE //save your ripley
innate_accuracy_penalty = 6
/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
if(!ismob(M) && !isobj(M)) //No don't teleport lighting and effects!
return
if(M.anchored && (!ismob(M) || (ismecha(M) && !mech_sized)))
return
if(do_teleport(M, hard_target, 6))
. = ..()
if(.)
// KERPLUNK
playsound(M,'sound/weapons/resonator_blast.ogg',50,1)
if(iscarbon(M))
+1 -1
View File
@@ -110,7 +110,7 @@
var/result = (zone == "r_arm" ? owner.put_in_r_hand(holder) : owner.put_in_l_hand(holder))
if(!result)
to_chat(owner, "<span class='warning'>Your [src] fails to activate!</span>")
to_chat(owner, "<span class='warning'>Your [name] fails to activate!</span>")
return
// Activate the hand that now holds our item.
+1 -1
View File
@@ -86,8 +86,8 @@
if(!istype(M))
return FALSE
remove_control_flags(M, ALL)
occupants -= M
remove_passenger_actions(M)
occupants -= M
cleanup_actions_for_mob(M)
after_remove_occupant(M)
return TRUE
+112 -112
View File
@@ -1,112 +1,112 @@
//VEHICLE DEFAULT HANDLING
/obj/vehicle/proc/generate_actions()
return
/obj/vehicle/proc/generate_action_type(actiontype)
var/datum/action/vehicle/A = new actiontype
if(!istype(A))
return
A.vehicle_target = src
return A
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
autogrant_actions_passenger += actiontype
for(var/i in occupants)
grant_passenger_actions(i) //refresh
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
autogrant_actions_controller["[control_flag]"] += actiontype
for(var/i in occupants)
grant_controller_actions(i) //refresh
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
if(!occupants[m] || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
return TRUE
var/datum/action/action = generate_action_type(actiontype)
action.Grant(m)
occupant_actions[m][action.type] = action
return TRUE
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
if(!occupants[m] || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
var/datum/action/action = occupant_actions[m][actiontype]
action.Remove(m)
occupant_actions[m] -= actiontype
return TRUE
/obj/vehicle/proc/grant_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
grant_action_type_to_mob(v, M)
/obj/vehicle/proc/remove_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
remove_action_type_from_mob(v, M)
/obj/vehicle/proc/grant_controller_actions(mob/M)
if(!istype(M) || !occupants[M])
return FALSE
for(var/i in GLOB.bitflags)
if(occupants[M] & i)
grant_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/remove_controller_actions(mob/M)
if(!istype(M) || !occupants[M])
return FALSE
for(var/i in GLOB.bitflags)
remove_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
if(!istype(M) || !autogrant_actions_controller["[flag]"])
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
grant_action_type_to_mob(v, M)
return TRUE
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
if(!istype(M) || autogrant_actions_controller["[flag]"])
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
remove_action_type_from_mob(v, M)
return TRUE
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
if(!istype(M))
return FALSE
LAZYINITLIST(occupant_actions[M])
for(var/path in occupant_actions[M])
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
var/datum/action/action = occupant_actions[M]
action.Remove(M)
occupant_actions -= M
return TRUE
//ACTION DATUMS
/datum/action/vehicle
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon_state = "vehicle_eject"
var/obj/vehicle/vehicle_target
/datum/action/vehicle/sealed
var/obj/vehicle/sealed/vehicle_entered_target
/datum/action/vehicle/sealed/climb_out
name = "Climb Out"
desc = "Climb out of your vehicle!"
/datum/action/vehicle/sealed/climb_out/Trigger()
if(..() && istype(vehicle_entered_target))
vehicle_entered_target.mob_try_exit(owner, owner)
/datum/action/vehicle/ridden
var/obj/vehicle/ridden/vehicle_ridden_target
//VEHICLE DEFAULT HANDLING
/obj/vehicle/proc/generate_actions()
return
/obj/vehicle/proc/generate_action_type(actiontype)
var/datum/action/vehicle/A = new actiontype
if(!istype(A))
return
A.vehicle_target = src
return A
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
autogrant_actions_passenger += actiontype
for(var/i in occupants)
grant_passenger_actions(i) //refresh
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
autogrant_actions_controller["[control_flag]"] += actiontype
for(var/i in occupants)
grant_controller_actions(i) //refresh
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
return TRUE
var/datum/action/action = generate_action_type(actiontype)
action.Grant(m)
occupant_actions[m][action.type] = action
return TRUE
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
var/datum/action/action = occupant_actions[m][actiontype]
action.Remove(m)
occupant_actions[m] -= actiontype
return TRUE
/obj/vehicle/proc/grant_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
grant_action_type_to_mob(v, M)
/obj/vehicle/proc/remove_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
remove_action_type_from_mob(v, M)
/obj/vehicle/proc/grant_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
if(occupants[M] & i)
grant_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/remove_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
remove_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
grant_action_type_to_mob(v, M)
return TRUE
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
remove_action_type_from_mob(v, M)
return TRUE
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
if(!istype(M))
return FALSE
for(var/path in occupant_actions[M])
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
var/datum/action/action = occupant_actions[M][path]
action.Remove(M)
occupant_actions[M] -= path
occupant_actions -= M
return TRUE
//ACTION DATUMS
/datum/action/vehicle
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon_state = "vehicle_eject"
var/obj/vehicle/vehicle_target
/datum/action/vehicle/sealed
var/obj/vehicle/sealed/vehicle_entered_target
/datum/action/vehicle/sealed/climb_out
name = "Climb Out"
desc = "Climb out of your vehicle!"
/datum/action/vehicle/sealed/climb_out/Trigger()
if(..() && istype(vehicle_entered_target))
vehicle_entered_target.mob_try_exit(owner, owner)
/datum/action/vehicle/ridden
var/obj/vehicle/ridden/vehicle_ridden_target