Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
This commit is contained in:
+12
-13
@@ -113,7 +113,8 @@
|
||||
img = image(icon_icon, current_button, button_icon_state)
|
||||
img.pixel_x = 0
|
||||
img.pixel_y = 0
|
||||
current_button.overlays = list(img)
|
||||
current_button.cut_overlays(TRUE)
|
||||
current_button.add_overlay(img)
|
||||
current_button.button_icon_state = button_icon_state
|
||||
|
||||
|
||||
@@ -329,32 +330,30 @@
|
||||
/datum/action/item_action/hands_free/activate
|
||||
name = "Activate"
|
||||
|
||||
|
||||
/datum/action/item_action/hands_free/shift_nerves
|
||||
name = "Shift Nerves"
|
||||
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner
|
||||
name = "Toggle Research Scanner"
|
||||
button_icon_state = "scan_mode"
|
||||
var/active = FALSE
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/Trigger()
|
||||
if(IsAvailable())
|
||||
owner.research_scanner = !owner.research_scanner
|
||||
owner << "<span class='notice'>Research analyzer is now [owner.research_scanner ? "active" : "deactivated"].</span>"
|
||||
active = !active
|
||||
if(active)
|
||||
owner.research_scanner++
|
||||
else
|
||||
owner.research_scanner--
|
||||
owner << "<span class='notice'>[target] research scanner has been [active ? "activated" : "deactivated"].</span>"
|
||||
return 1
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/Remove(mob/M)
|
||||
if(owner)
|
||||
owner.research_scanner = 0
|
||||
if(owner && active)
|
||||
owner.research_scanner--
|
||||
active = FALSE
|
||||
..()
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
current_button.cut_overlays()
|
||||
if(button_icon && button_icon_state)
|
||||
var/image/img = image(button_icon, current_button, "scan_mode")
|
||||
current_button.add_overlay(img)
|
||||
|
||||
/datum/action/item_action/organ_action
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
|
||||
+40
-5
@@ -313,19 +313,53 @@
|
||||
var picked_group = pickweight(replaceable_groups)
|
||||
switch(picked_group)
|
||||
if(LAW_ZEROTH)
|
||||
. = zeroth
|
||||
set_zeroth_law(law)
|
||||
if(LAW_ION)
|
||||
ion[rand(1,ion.len)] = law
|
||||
var/i = rand(1, ion.len)
|
||||
. = ion[i]
|
||||
ion[i] = law
|
||||
if(LAW_INHERENT)
|
||||
inherent[rand(1,inherent.len)] = law
|
||||
var/i = rand(1, inherent.len)
|
||||
. = inherent[i]
|
||||
inherent[i] = law
|
||||
if(LAW_SUPPLIED)
|
||||
supplied[rand(1,supplied.len)] = law
|
||||
var/i = rand(1, supplied.len)
|
||||
. = supplied[i]
|
||||
supplied[i] = law
|
||||
|
||||
/datum/ai_laws/proc/shuffle_laws(list/groups)
|
||||
var/list/laws = list()
|
||||
if(ion.len && (LAW_ION in groups))
|
||||
laws += ion
|
||||
if(inherent.len && (LAW_INHERENT in groups))
|
||||
laws += inherent
|
||||
if(supplied.len && (LAW_SUPPLIED in groups))
|
||||
for(var/law in supplied)
|
||||
if(length(law))
|
||||
laws += law
|
||||
|
||||
if(ion.len && (LAW_ION in groups))
|
||||
for(var/i = 1, i <= ion.len, i++)
|
||||
ion[i] = pick_n_take(laws)
|
||||
if(inherent.len && (LAW_INHERENT in groups))
|
||||
for(var/i = 1, i <= inherent.len, i++)
|
||||
inherent[i] = pick_n_take(laws)
|
||||
if(supplied.len && (LAW_SUPPLIED in groups))
|
||||
var/i = 1
|
||||
for(var/law in supplied)
|
||||
if(length(law))
|
||||
supplied[i] = pick_n_take(laws)
|
||||
if(!laws.len)
|
||||
break
|
||||
i++
|
||||
|
||||
/datum/ai_laws/proc/remove_law(number)
|
||||
if(number <= 0)
|
||||
return
|
||||
if(inherent.len && number <= inherent.len)
|
||||
inherent -= inherent[number]
|
||||
. = inherent[number]
|
||||
inherent -= .
|
||||
return
|
||||
var/list/supplied_laws = list()
|
||||
for(var/index = 1, index <= supplied.len, index++)
|
||||
@@ -334,7 +368,8 @@
|
||||
supplied_laws += index //storing the law number instead of the law
|
||||
if(supplied_laws.len && number <= (inherent.len+supplied_laws.len))
|
||||
var/law_to_remove = supplied_laws[number-inherent.len]
|
||||
supplied -= supplied[law_to_remove]
|
||||
. = supplied[law_to_remove]
|
||||
supplied -= .
|
||||
return
|
||||
|
||||
/datum/ai_laws/proc/clear_supplied_laws()
|
||||
|
||||
@@ -4,6 +4,7 @@ var/global/datum/getrev/revdata = new()
|
||||
var/parentcommit
|
||||
var/commit
|
||||
var/list/testmerge = list()
|
||||
var/has_pr_details = FALSE //example data in a testmerge entry when this is true: https://api.github.com/repositories/3234987/pulls/22586
|
||||
var/date
|
||||
|
||||
/datum/getrev/New()
|
||||
@@ -31,6 +32,44 @@ var/global/datum/getrev/revdata = new()
|
||||
log_world(parentcommit)
|
||||
log_world("Current map - [MAP_NAME]") //can't think of anywhere better to put it
|
||||
|
||||
/datum/getrev/proc/DownloadPRDetails()
|
||||
if(!config.githubrepoid)
|
||||
if(testmerge.len)
|
||||
log_world("PR details download failed: No github repo config set")
|
||||
return
|
||||
if(!isnum(text2num(config.githubrepoid)))
|
||||
log_world("PR details download failed: Invalid github repo id: [config.githubrepoid]")
|
||||
return
|
||||
for(var/line in testmerge)
|
||||
if(!isnum(text2num(line)))
|
||||
log_world("PR details download failed: Invalid PR number: [line]")
|
||||
return
|
||||
|
||||
var/url = "https://api.github.com/repositories/[config.githubrepoid]/pulls/[line].json"
|
||||
valid_HTTPSGet = TRUE
|
||||
var/json = HTTPSGet(url)
|
||||
if(!json)
|
||||
return
|
||||
|
||||
testmerge[line] = json_decode(json)
|
||||
|
||||
if(!testmerge[line])
|
||||
log_world("PR details download failed: null details returned")
|
||||
return
|
||||
CHECK_TICK
|
||||
log_world("PR details successfully downloaded")
|
||||
has_pr_details = TRUE
|
||||
|
||||
/datum/getrev/proc/GetTestMergeInfo(header = TRUE)
|
||||
if(!testmerge.len)
|
||||
return ""
|
||||
. = header ? "The following pull requests are currently test merged:<br>" : ""
|
||||
for(var/line in testmerge)
|
||||
var/details = ""
|
||||
if(has_pr_details)
|
||||
details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["user"]["login"])
|
||||
. += "<a href='[config.githuburl]/pull/[line]'>#[line][details]</a><br>"
|
||||
|
||||
/client/verb/showrevinfo()
|
||||
set category = "OOC"
|
||||
set name = "Show Server Revision"
|
||||
@@ -39,12 +78,9 @@ var/global/datum/getrev/revdata = new()
|
||||
if(revdata.parentcommit)
|
||||
src << "<b>Server revision compiled on:</b> [revdata.date]"
|
||||
if(revdata.testmerge.len)
|
||||
for(var/line in revdata.testmerge)
|
||||
if(line)
|
||||
src << "Test merge active of PR <a href='[config.githuburl]/pull/[line]'>#[line]</a>"
|
||||
src << "Based off master commit <a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
|
||||
else
|
||||
src << "<a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
|
||||
src << revdata.GetTestMergeInfo()
|
||||
src << "Based off master commit:"
|
||||
src << "<a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>"
|
||||
else
|
||||
src << "Revision unknown"
|
||||
src << "<b>Current Infomational Settings:</b>"
|
||||
@@ -56,8 +92,8 @@ var/global/datum/getrev/revdata = new()
|
||||
src << "Allow Midround Antagonists: [config.midround_antag.len] of [config.modes.len] roundtypes"
|
||||
if(config.show_game_type_odds)
|
||||
if(ticker.current_state == GAME_STATE_PLAYING)
|
||||
src <<"<b>Game Mode Odds for current round:</b>"
|
||||
var/prob_sum = 0
|
||||
var/current_odds_differ = FALSE
|
||||
var/list/probs = list()
|
||||
var/list/modes = config.gamemode_cache
|
||||
for(var/mode in modes)
|
||||
@@ -65,17 +101,18 @@ var/global/datum/getrev/revdata = new()
|
||||
var/ctag = initial(M.config_tag)
|
||||
if(!(ctag in config.probabilities))
|
||||
continue
|
||||
if((config.min_pop[ctag] && (config.min_pop[ctag] > ticker.totalPlayersReady)) || (initial(M.required_players) > ticker.totalPlayersReady))
|
||||
continue
|
||||
if(config.max_pop[ctag] && (config.max_pop[ctag] < ticker.totalPlayersReady))
|
||||
if((config.min_pop[ctag] && (config.min_pop[ctag] > ticker.totalPlayersReady)) || (config.max_pop[ctag] && (config.max_pop[ctag] < ticker.totalPlayersReady)) || (initial(M.required_players) > ticker.totalPlayersReady))
|
||||
current_odds_differ = TRUE
|
||||
continue
|
||||
probs[ctag] = 1
|
||||
prob_sum += config.probabilities[ctag]
|
||||
for(var/ctag in probs)
|
||||
if(config.probabilities[ctag] > 0)
|
||||
var/percentage = round(config.probabilities[ctag] / prob_sum * 100, 0.1)
|
||||
src << "[ctag] [percentage]%"
|
||||
|
||||
if(current_odds_differ)
|
||||
src <<"<b>Game Mode Odds for current round:</b>"
|
||||
for(var/ctag in probs)
|
||||
if(config.probabilities[ctag] > 0)
|
||||
var/percentage = round(config.probabilities[ctag] / prob_sum * 100, 0.1)
|
||||
src << "[ctag] [percentage]%"
|
||||
|
||||
src <<"<b>All Game Mode Odds:</b>"
|
||||
var/sum = 0
|
||||
for(var/ctag in config.probabilities)
|
||||
@@ -84,4 +121,3 @@ var/global/datum/getrev/revdata = new()
|
||||
if(config.probabilities[ctag] > 0)
|
||||
var/percentage = round(config.probabilities[ctag] / sum * 100, 0.1)
|
||||
src << "[ctag] [percentage]%"
|
||||
return
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/datum/map_template
|
||||
var/name = "Default Template Name"
|
||||
var/width = 0
|
||||
var/height = 0
|
||||
var/mappath = null
|
||||
var/mapfile = null
|
||||
var/loaded = 0 // Times loaded this round
|
||||
|
||||
/datum/map_template/New(path = null, map = null, rename = null)
|
||||
if(path)
|
||||
mappath = path
|
||||
if(mappath)
|
||||
preload_size(mappath)
|
||||
if(map)
|
||||
mapfile = map
|
||||
if(rename)
|
||||
name = rename
|
||||
|
||||
/datum/map_template/proc/preload_size(path)
|
||||
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE)
|
||||
if(bounds)
|
||||
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
|
||||
height = bounds[MAP_MAXY]
|
||||
return bounds
|
||||
|
||||
/proc/initTemplateBounds(var/list/bounds)
|
||||
var/list/obj/machinery/atmospherics/atmos_machines = list()
|
||||
var/list/obj/structure/cable/cables = list()
|
||||
var/list/atom/atoms = list()
|
||||
|
||||
for(var/L in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
|
||||
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||
var/turf/B = L
|
||||
atoms += B
|
||||
for(var/A in B)
|
||||
atoms += A
|
||||
if(istype(A,/obj/structure/cable))
|
||||
cables += A
|
||||
continue
|
||||
if(istype(A,/obj/machinery/atmospherics))
|
||||
atmos_machines += A
|
||||
continue
|
||||
|
||||
SSobj.InitializeAtoms(atoms)
|
||||
SSmachine.setup_template_powernets(cables)
|
||||
SSair.setup_template_machinery(atmos_machines)
|
||||
SSair.end_map_load()
|
||||
|
||||
/datum/map_template/proc/load(turf/T, centered = FALSE)
|
||||
if(centered)
|
||||
T = locate(T.x - round(width/2) , T.y - round(height/2) , T.z)
|
||||
if(!T)
|
||||
return
|
||||
if(T.x+width > world.maxx)
|
||||
return
|
||||
if(T.y+height > world.maxy)
|
||||
return
|
||||
|
||||
SSair.begin_map_load()
|
||||
var/list/bounds = maploader.load_map(get_file(), T.x, T.y, T.z, cropMap=TRUE)
|
||||
if(!bounds)
|
||||
SSair.end_map_load()
|
||||
return 0
|
||||
|
||||
//initialize things that are normally initialized after map load
|
||||
initTemplateBounds(bounds)
|
||||
|
||||
log_game("[name] loaded at at [T.x],[T.y],[T.z]")
|
||||
return 1
|
||||
|
||||
/datum/map_template/proc/get_file()
|
||||
if(mapfile)
|
||||
. = mapfile
|
||||
else if(mappath)
|
||||
. = file(mappath)
|
||||
|
||||
if(!.)
|
||||
log_world("The file of [src] appears to be empty/non-existent.")
|
||||
|
||||
/datum/map_template/proc/get_affected_turfs(turf/T, centered = FALSE)
|
||||
var/turf/placement = T
|
||||
if(centered)
|
||||
var/turf/corner = locate(placement.x - round(width/2), placement.y - round(height/2), placement.z)
|
||||
if(corner)
|
||||
placement = corner
|
||||
return block(placement, locate(placement.x+width-1, placement.y+height-1, placement.z))
|
||||
|
||||
|
||||
/proc/preloadTemplates(path = "_maps/templates/") //see master controller setup
|
||||
var/list/filelist = flist(path)
|
||||
for(var/map in filelist)
|
||||
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
|
||||
map_templates[T.name] = T
|
||||
|
||||
preloadRuinTemplates()
|
||||
preloadShuttleTemplates()
|
||||
preloadShelterTemplates()
|
||||
|
||||
/proc/preloadRuinTemplates()
|
||||
// Still supporting bans by filename
|
||||
var/list/banned = generateMapList("config/lavaruinblacklist.txt")
|
||||
banned += generateMapList("config/spaceruinblacklist.txt")
|
||||
|
||||
for(var/item in subtypesof(/datum/map_template/ruin))
|
||||
var/datum/map_template/ruin/ruin_type = item
|
||||
// screen out the abstract subtypes
|
||||
if(!initial(ruin_type.id))
|
||||
continue
|
||||
var/datum/map_template/ruin/R = new ruin_type()
|
||||
|
||||
if(banned.Find(R.mappath))
|
||||
continue
|
||||
|
||||
map_templates[R.name] = R
|
||||
ruins_templates[R.name] = R
|
||||
|
||||
if(istype(R, /datum/map_template/ruin/lavaland))
|
||||
lava_ruins_templates[R.name] = R
|
||||
else if(istype(R, /datum/map_template/ruin/space))
|
||||
space_ruins_templates[R.name] = R
|
||||
|
||||
|
||||
/proc/preloadShuttleTemplates()
|
||||
var/list/unbuyable = generateMapList("config/unbuyableshuttles.txt")
|
||||
|
||||
for(var/item in subtypesof(/datum/map_template/shuttle))
|
||||
var/datum/map_template/shuttle/shuttle_type = item
|
||||
if(!(initial(shuttle_type.suffix)))
|
||||
continue
|
||||
|
||||
var/datum/map_template/shuttle/S = new shuttle_type()
|
||||
if(unbuyable.Find(S.mappath))
|
||||
S.can_be_bought = FALSE
|
||||
|
||||
shuttle_templates[S.shuttle_id] = S
|
||||
map_templates[S.shuttle_id] = S
|
||||
|
||||
/proc/preloadShelterTemplates()
|
||||
for(var/item in subtypesof(/datum/map_template/shelter))
|
||||
var/datum/map_template/shelter/shelter_type = item
|
||||
if(!(initial(shelter_type.mappath)))
|
||||
continue
|
||||
var/datum/map_template/shelter/S = new shelter_type()
|
||||
|
||||
shelter_templates[S.shelter_id] = S
|
||||
map_templates[S.shelter_id] = S
|
||||
@@ -258,6 +258,11 @@
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
coin_type = /obj/item/weapon/coin/plasma
|
||||
|
||||
/datum/material/bluespace
|
||||
name = "Bluespace Mesh"
|
||||
id = MAT_BLUESPACE
|
||||
sheet_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
|
||||
/datum/material/bananium
|
||||
name = "Bananium"
|
||||
id = MAT_BANANIUM
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
if(isAI(current))
|
||||
var/mob/living/silicon/ai/A = current
|
||||
A.set_zeroth_law("")
|
||||
A.show_laws()
|
||||
A.verbs -= /mob/living/silicon/ai/proc/choose_modules
|
||||
A.malf_picker.remove_verbs(A)
|
||||
qdel(A.malf_picker)
|
||||
|
||||
+133
-27
@@ -9,12 +9,30 @@
|
||||
var/slowed = FALSE
|
||||
var/slowvalue = 1
|
||||
|
||||
/datum/riding/New(atom/movable/_ridden)
|
||||
ridden = _ridden
|
||||
|
||||
/datum/riding/Destroy()
|
||||
ridden = null
|
||||
return ..()
|
||||
|
||||
/datum/riding/proc/handle_vehicle_layer()
|
||||
if(ridden.dir != NORTH)
|
||||
ridden.layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
ridden.layer = OBJ_LAYER
|
||||
|
||||
/datum/riding/proc/on_vehicle_move()
|
||||
for(var/mob/living/M in ridden.buckled_mobs)
|
||||
ride_check(M)
|
||||
handle_vehicle_offsets()
|
||||
handle_vehicle_layer()
|
||||
|
||||
/datum/riding/proc/ride_check(mob/living/M)
|
||||
return TRUE
|
||||
|
||||
/datum/riding/proc/force_dismount(mob/living/M)
|
||||
ridden.unbuckle_mob(M)
|
||||
|
||||
//Override this to set your vehicle's various pixel offsets
|
||||
//if they differ between directions, otherwise use the
|
||||
@@ -36,7 +54,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
//BUCKLE HOOKS
|
||||
/datum/riding/proc/restore_position(mob/living/buckled_mob)
|
||||
if(istype(buckled_mob))
|
||||
@@ -45,11 +62,6 @@
|
||||
if(buckled_mob.client)
|
||||
buckled_mob.client.change_view(world.view)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//MOVEMENT
|
||||
/datum/riding/proc/handle_ride(mob/user, direction)
|
||||
if(user.incapacitated())
|
||||
@@ -298,12 +310,59 @@
|
||||
else
|
||||
user << "<span class='notice'>You'll need something to guide the [ridden.name].</span>"
|
||||
|
||||
//CYBORGS. NO, THEY ARE NOT ANIMALS.
|
||||
///////Humans. Yes, I said humans. No, this won't end well...//////////
|
||||
/datum/riding/human
|
||||
keytype = null
|
||||
|
||||
/datum/riding/human/ride_check(mob/living/M)
|
||||
var/mob/living/carbon/human/H = ridden //IF this runtimes I'm blaming the admins.
|
||||
if(M.incapacitated(FALSE, TRUE) || H.incapacitated(FALSE, TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] falls off of [ridden]!</span>")
|
||||
ridden.unbuckle_mob(M)
|
||||
return FALSE
|
||||
if(M.restrained(TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't hang onto [ridden] with their hands cuffed!</span>") //Honestly this should put the ridden mob in a chokehold.
|
||||
ridden.unbuckle_mob(M)
|
||||
return FALSE
|
||||
if(H.pulling == M)
|
||||
H.stop_pulling()
|
||||
|
||||
/datum/riding/human/handle_vehicle_offsets()
|
||||
for(var/mob/living/M in ridden.buckled_mobs)
|
||||
M.setDir(ridden.dir)
|
||||
switch(ridden.dir)
|
||||
if(NORTH)
|
||||
M.pixel_x = 0
|
||||
M.pixel_y = 6
|
||||
if(SOUTH)
|
||||
M.pixel_x = 0
|
||||
M.pixel_y = 6
|
||||
if(EAST)
|
||||
M.pixel_x = -6
|
||||
M.pixel_y = 4
|
||||
if(WEST)
|
||||
M.pixel_x = 6
|
||||
M.pixel_y = 4
|
||||
|
||||
/datum/riding/human/handle_vehicle_layer()
|
||||
if(ridden.buckled_mobs && ridden.buckled_mobs.len)
|
||||
if(ridden.dir == SOUTH)
|
||||
ridden.layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
ridden.layer = OBJ_LAYER
|
||||
else
|
||||
ridden.layer = MOB_LAYER
|
||||
|
||||
/datum/riding/human/force_dismount(mob/living/user)
|
||||
ridden.unbuckle_mob(user)
|
||||
user.Weaken(3)
|
||||
user.Stun(3)
|
||||
user.visible_message("<span class='boldwarning'>[ridden] pushes [user] off of them!</span>")
|
||||
|
||||
/datum/riding/cyborg
|
||||
keytype = null
|
||||
vehicle_move_delay = 1
|
||||
|
||||
/datum/riding/cyborg/proc/ride_check(mob/user)
|
||||
/datum/riding/cyborg/ride_check(mob/user)
|
||||
if(user.incapacitated())
|
||||
var/kick = TRUE
|
||||
if(istype(ridden, /mob/living/silicon/robot))
|
||||
@@ -322,11 +381,12 @@
|
||||
return
|
||||
|
||||
/datum/riding/cyborg/handle_vehicle_layer()
|
||||
if(ridden.dir == SOUTH)
|
||||
ridden.layer = ABOVE_MOB_LAYER
|
||||
if(ridden.buckled_mobs && ridden.buckled_mobs.len)
|
||||
if(ridden.dir == SOUTH)
|
||||
ridden.layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
ridden.layer = OBJ_LAYER
|
||||
else
|
||||
ridden.layer = OBJ_LAYER
|
||||
if(!ridden.buckled_mobs)
|
||||
ridden.layer = MOB_LAYER
|
||||
|
||||
/datum/riding/cyborg/handle_vehicle_offsets()
|
||||
@@ -353,19 +413,65 @@
|
||||
M.pixel_x = 6
|
||||
M.pixel_y = 3
|
||||
|
||||
/datum/riding/cyborg/proc/on_vehicle_move()
|
||||
for(var/mob/living/M in ridden.buckled_mobs)
|
||||
ride_check(M)
|
||||
handle_vehicle_offsets()
|
||||
handle_vehicle_layer()
|
||||
/datum/riding/cyborg/force_dismount(mob/living/M)
|
||||
ridden.unbuckle_mob(M)
|
||||
var/turf/target = get_edge_target_turf(ridden, ridden.dir)
|
||||
var/turf/targetm = get_step(get_turf(ridden), ridden.dir)
|
||||
M.Move(targetm)
|
||||
M.visible_message("<span class='boldwarning'>[M] is thrown clear of [ridden]!</span>")
|
||||
M.throw_at(target, 14, 5, ridden)
|
||||
M.Weaken(3)
|
||||
|
||||
/datum/riding/cyborg/proc/force_dismount()
|
||||
for(var/mob/living/M in ridden.buckled_mobs)
|
||||
ridden.unbuckle_mob(M)
|
||||
var/turf/target = get_edge_target_turf(ridden, ridden.dir)
|
||||
var/turf/targetm = get_step(get_turf(ridden), ridden.dir)
|
||||
M.Move(targetm)
|
||||
M.visible_message("<span class='boldwarning'>[M] is thrown clear of [ridden] by rapid spinning!</span>")
|
||||
M.throw_at(target, 14, 5, ridden)
|
||||
M.Weaken(3)
|
||||
/datum/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
|
||||
var/amount_equipped = 0
|
||||
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
||||
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
||||
inhand.rider = user
|
||||
inhand.ridden = ridden
|
||||
if(user.put_in_hands(inhand, TRUE))
|
||||
amount_equipped++
|
||||
else
|
||||
break
|
||||
if(amount_equipped >= amount_required)
|
||||
return TRUE
|
||||
else
|
||||
unequip_buckle_inhands(user)
|
||||
return FALSE
|
||||
|
||||
/datum/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
for(var/obj/item/riding_offhand/O in user.contents)
|
||||
if(O.ridden != ridden)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/obj/item/riding_offhand
|
||||
name = "offhand"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = ABSTRACT | DROPDEL | NOBLUDGEON
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/mob/living/carbon/rider
|
||||
var/mob/living/ridden
|
||||
var/selfdeleting = FALSE
|
||||
|
||||
/obj/item/riding_offhand/dropped()
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/riding_offhand/equipped()
|
||||
if(loc != rider)
|
||||
selfdeleting = TRUE
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/riding_offhand/Destroy()
|
||||
if(selfdeleting)
|
||||
if(rider in ridden.buckled_mobs)
|
||||
ridden.unbuckle_mob(rider)
|
||||
. = ..()
|
||||
@@ -172,6 +172,7 @@
|
||||
Outside of admin intervention, it cannot explode. \
|
||||
It does, however, still dust anything on contact, emits high levels of radiation, and induce hallucinations in anyone looking at it without protective goggles. \
|
||||
Emitters spawn powered on, expect admin notices, they are harmless."
|
||||
credit_cost = 100000
|
||||
|
||||
/datum/map_template/shuttle/emergency/imfedupwiththisworld
|
||||
suffix = "imfedupwiththisworld"
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
|
||||
|
||||
/mob/living
|
||||
var/list/ownedSoullinks //soullinks we are the owner of
|
||||
var/list/sharedSoullinks //soullinks we are a/the sharer of
|
||||
|
||||
/mob/living/Destroy()
|
||||
for(var/s in ownedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.ownerDies(FALSE)
|
||||
qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d
|
||||
ownedSoullinks = null
|
||||
for(var/s in sharedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.sharerDies(FALSE)
|
||||
S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed
|
||||
sharedSoullinks = null
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
//Keeps track of a Mob->Mob (potentially Player->Player) connection
|
||||
//Can be used to trigger actions on one party when events happen to another
|
||||
//Eg: shared deaths
|
||||
//Can be used to form a linked list of mob-hopping
|
||||
//Does NOT transfer with minds
|
||||
/datum/soullink
|
||||
var/mob/living/soulowner
|
||||
var/mob/living/soulsharer
|
||||
var/id //Optional ID, for tagging and finding specific instances
|
||||
|
||||
/datum/soullink/Destroy()
|
||||
if(soulowner)
|
||||
LAZYREMOVE(soulowner.ownedSoullinks, src)
|
||||
soulowner = null
|
||||
if(soulsharer)
|
||||
LAZYREMOVE(soulsharer.sharedSoullinks, src)
|
||||
soulsharer = null
|
||||
return ..()
|
||||
|
||||
/datum/soullink/proc/removeSoulsharer(mob/living/sharer)
|
||||
if(soulsharer == sharer)
|
||||
soulsharer = null
|
||||
LAZYREMOVE(sharer.sharedSoullinks, src)
|
||||
|
||||
//Used to assign variables, called primarily by soullink()
|
||||
//Override this to create more unique soullinks (Eg: 1->Many relationships)
|
||||
//Return TRUE/FALSE to return the soullink/null in soullink()
|
||||
/datum/soullink/proc/parseArgs(mob/living/owner, mob/living/sharer)
|
||||
if(!owner || !sharer)
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharer = sharer
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
LAZYADD(sharer.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/ownerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/sharerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Quick-use helper
|
||||
/proc/soullink(typepath, ...)
|
||||
var/datum/soullink/S = new typepath()
|
||||
if(S.parseArgs(arglist(args.Copy(2, 0))))
|
||||
return S
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// MULTISHARER //
|
||||
/////////////////
|
||||
//Abstract soullink for use with 1 Owner -> Many Sharer setups
|
||||
/datum/soullink/multisharer
|
||||
var/list/soulsharers
|
||||
|
||||
/datum/soullink/multisharer/parseArgs(mob/living/owner, list/sharers)
|
||||
if(!owner || !LAZYLEN(sharers))
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharers = sharers
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
for(var/l in sharers)
|
||||
var/mob/living/L = l
|
||||
LAZYADD(L.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
/datum/soullink/multisharer/removeSoulsharer(mob/living/sharer)
|
||||
LAZYREMOVE(soulsharers, sharer)
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// SHARED FATE //
|
||||
/////////////////
|
||||
//When the soulowner dies, the soulsharer dies, and vice versa
|
||||
//This is intended for two players(or AI) and two mobs
|
||||
|
||||
/datum/soullink/sharedfate/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulsharer)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedfate/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner)
|
||||
soulowner.death(gibbed)
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// SHARED BODY //
|
||||
/////////////////
|
||||
//When the soulsharer dies, they're placed in the soulowner, who remains alive
|
||||
//If the soulowner dies, the soulsharer is killed and placed into the soulowner (who is still dying)
|
||||
//This one is intended for one player moving between many mobs
|
||||
|
||||
/datum/soullink/sharedbody/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulowner && soulsharer)
|
||||
if(soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedbody/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner && soulsharer && soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
// REPLACEMENT POOL //
|
||||
//////////////////////
|
||||
//When the owner dies, one of the sharers is placed in the owner's body, fully healed
|
||||
//Sort of a "winner-stays-on" soullink
|
||||
//Gibbing ends it immediately
|
||||
|
||||
/datum/soullink/multisharer/replacementpool/ownerDies(gibbed, mob/living/owner)
|
||||
if(LAZYLEN(soulsharers) && !gibbed) //let's not put them in some gibs
|
||||
var/list/souls = shuffle(soulsharers.Copy())
|
||||
for(var/l in souls)
|
||||
var/mob/living/L = l
|
||||
if(L.stat != DEAD && L.mind)
|
||||
L.mind.transfer_to(soulowner)
|
||||
soulowner.revive(TRUE, TRUE)
|
||||
L.death(FALSE)
|
||||
|
||||
//Lose your claim to the throne!
|
||||
/datum/soullink/multisharer/replacementpool/sharerDies(gibbed, mob/living/sharer)
|
||||
removeSoulsharer(sharer)
|
||||
@@ -151,3 +151,53 @@
|
||||
return
|
||||
playsound(cyborg, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
cyborg.cell.give(power_to_give)
|
||||
|
||||
/datum/status_effect/his_grace
|
||||
id = "his_grace"
|
||||
duration = -1
|
||||
tick_interval = 4
|
||||
alert_type = /obj/screen/alert/status_effect/his_grace
|
||||
var/bloodlust = 0
|
||||
|
||||
/obj/screen/alert/status_effect/his_grace
|
||||
name = "His Grace"
|
||||
desc = "His Grace hungers, and you must feed Him."
|
||||
icon_state = "his_grace"
|
||||
alerttooltipstyle = "hisgrace"
|
||||
|
||||
/obj/screen/alert/status_effect/his_grace/MouseEntered(location,control,params)
|
||||
desc = initial(desc)
|
||||
var/datum/status_effect/his_grace/HG = attached_effect
|
||||
desc += "<br><font size=3><b>Current Bloodthirst: [HG.bloodlust]</b></font>\
|
||||
<br>Becomes undroppable at <b>[HIS_GRACE_FAMISHED]</b>\
|
||||
<br>Will consume you at <b>[HIS_GRACE_CONSUME_OWNER]</b>"
|
||||
..()
|
||||
|
||||
/datum/status_effect/his_grace/on_apply()
|
||||
add_logs(owner, null, "gained His Grace's stun immunity")
|
||||
owner.add_stun_absorption("hisgrace", INFINITY, 3, null, "His Grace protects you from the stun!")
|
||||
|
||||
/datum/status_effect/his_grace/tick()
|
||||
bloodlust = 0
|
||||
var/graces = 0
|
||||
for(var/obj/item/weapon/his_grace/HG in owner.held_items)
|
||||
if(HG.bloodthirst > bloodlust)
|
||||
bloodlust = HG.bloodthirst
|
||||
if(HG.awakened)
|
||||
graces++
|
||||
if(!graces)
|
||||
owner.apply_status_effect(STATUS_EFFECT_HISWRATH)
|
||||
qdel(src)
|
||||
return
|
||||
var/grace_heal = bloodlust * 0.05
|
||||
owner.adjustBruteLoss(-grace_heal)
|
||||
owner.adjustFireLoss(-grace_heal)
|
||||
owner.adjustToxLoss(-grace_heal, TRUE, TRUE)
|
||||
owner.adjustOxyLoss(-(grace_heal * 2))
|
||||
owner.adjustCloneLoss(-grace_heal)
|
||||
|
||||
/datum/status_effect/his_grace/on_remove()
|
||||
add_logs(owner, null, "lost His Grace's stun immunity")
|
||||
if(islist(owner.stun_absorption) && owner.stun_absorption["hisgrace"])
|
||||
owner.stun_absorption -= "hisgrace"
|
||||
|
||||
|
||||
@@ -9,3 +9,23 @@
|
||||
/datum/status_effect/sigil_mark/tick()
|
||||
if(owner.stat < stat_allowed)
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
|
||||
id = "his_wrath"
|
||||
duration = -1
|
||||
tick_interval = 4
|
||||
alert_type = /obj/screen/alert/status_effect/his_wrath
|
||||
|
||||
/obj/screen/alert/status_effect/his_wrath
|
||||
name = "His Wrath"
|
||||
desc = "You fled from His Grace instead of feeding Him, and now you suffer."
|
||||
icon_state = "his_grace"
|
||||
alerttooltipstyle = "hisgrace"
|
||||
|
||||
/datum/status_effect/his_wrath/tick()
|
||||
for(var/obj/item/weapon/his_grace/HG in owner.held_items)
|
||||
qdel(src)
|
||||
return
|
||||
owner.adjustBruteLoss(0.1)
|
||||
owner.adjustFireLoss(0.1)
|
||||
owner.adjustToxLoss(0.2, TRUE, TRUE)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(!owner.stat)
|
||||
owner << "You become frozen in a cube!"
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
owner.overlays += cube
|
||||
owner.add_overlay(cube)
|
||||
owner.update_canmove()
|
||||
|
||||
/datum/status_effect/freon/tick()
|
||||
@@ -25,6 +25,6 @@
|
||||
/datum/status_effect/freon/on_remove()
|
||||
if(!owner.stat)
|
||||
owner << "The cube melts!"
|
||||
owner.overlays -= cube
|
||||
owner.cut_overlay(cube)
|
||||
owner.bodytemperature += 100
|
||||
owner.update_canmove()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
A.mode = 1 // AALARM_MODE_SCRUB
|
||||
A.apply_mode()
|
||||
if(WIRE_ALARM) // Clear alarms.
|
||||
var/area/AA = get_area_master(A)
|
||||
var/area/AA = get_area(A)
|
||||
if(AA.atmosalert(0, holder))
|
||||
A.post_alert(0)
|
||||
A.update_icon()
|
||||
@@ -68,7 +68,7 @@
|
||||
A.mode = 3 // AALARM_MODE_PANIC
|
||||
A.apply_mode()
|
||||
if(WIRE_ALARM) // Post alarm.
|
||||
var/area/AA = get_area_master(A)
|
||||
var/area/AA = get_area(A)
|
||||
if(AA.atmosalert(2, holder))
|
||||
A.post_alert(2)
|
||||
A.update_icon()
|
||||
@@ -30,7 +30,8 @@
|
||||
if(WIRE_SAFETY)
|
||||
SSU.safeties = !SSU.safeties
|
||||
if(WIRE_ZAP)
|
||||
SSU.shock(usr)
|
||||
if(usr)
|
||||
SSU.shock(usr)
|
||||
|
||||
/datum/wires/suit_storage_unit/on_cut(wire, mend)
|
||||
var/obj/machinery/suit_storage_unit/SSU = holder
|
||||
@@ -40,4 +41,5 @@
|
||||
if(WIRE_SAFETY)
|
||||
SSU.safeties = mend
|
||||
if(WIRE_ZAP)
|
||||
SSU.shock(usr)
|
||||
if(usr)
|
||||
SSU.shock(usr)
|
||||
Reference in New Issue
Block a user