SoundScopes' bugfixes - 01SEP2016 (#848)

This commit is contained in:
SoundScopes
2016-09-01 20:45:18 +02:00
committed by skull132
parent b39d927ac1
commit 893398104f
17 changed files with 132 additions and 35 deletions
+6
View File
@@ -12,7 +12,10 @@ var/global/pipe_processing_killed = 0
datum/controller/game_controller
var/list/shuttle_list // For debugging and VV
#ifdef TESTING //This is just lagging start times and is never used on a live server.
var/datum/random_map/ore/asteroid_ore_map // For debugging and VV.
#endif
datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
@@ -70,10 +73,13 @@ datum/controller/game_controller/proc/setup_objects()
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
// Create the mining ore distribution map.
// These values determine the specific area that the map is applied to.
// If you do not use the official Baycode asteroid map, you will need to change them.
#ifdef TESTING
asteroid_ore_map = new /datum/random_map/ore(null,13,32,5,217,223)
#endif
// Set up antagonists.
populate_antag_type_list()
+4 -1
View File
@@ -339,7 +339,10 @@ datum/controller/vote
. += "<font color='grey'>Restart (Disallowed)</font>"
. += "</li><li>"
if(is_staff || config.allow_vote_restart)
. += "<a href='?src=\ref[src];vote=crew_transfer'>Crew Transfer</a>"
if (get_security_level() == "red" || get_security_level() == "delta")
. += "<a href='?src=\ref[src];vote=crew_transfer'>Crew Transfer (Disallowed, Code Red or above)</a>"
else
. += "<a href='?src=\ref[src];vote=crew_transfer'>Crew Transfer</a>"
else
. += "<font color='grey'>Crew Transfer (Disallowed)</font>"
if(is_staff)
+7 -5
View File
@@ -238,10 +238,11 @@ its easier to just keep the beam vertical.
AM.throwing = 0
return
/atom/proc/add_hiddenprint(mob/living/M as mob)
/atom/proc/add_hiddenprint(mob/living/M)
if(isnull(M)) return
if(!istype(M, /mob)) return
if(isnull(M.key)) return
if (ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna))
return 0
@@ -261,8 +262,9 @@ its easier to just keep the beam vertical.
src.fingerprintslast = M.key
return
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
/atom/proc/add_fingerprint(mob/living/M, ignoregloves = 0)
if(isnull(M)) return
if(!istype(M, /mob)) return
if(isAI(M)) return
if(isnull(M.key)) return
if (ishuman(M))
@@ -387,7 +389,7 @@ its easier to just keep the beam vertical.
//returns 1 if made bloody, returns 0 otherwise
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
/atom/proc/add_blood(mob/living/carbon/human/M)
if(flags & NOBLOODY)
return 0
@@ -407,7 +409,7 @@ its easier to just keep the beam vertical.
. = 1
return 1
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
/atom/proc/add_vomit_floor(mob/living/carbon/M, var/toxvomit = 0)
if( istype(src, /turf/simulated) )
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src)
+21 -8
View File
@@ -162,27 +162,25 @@
var/obj/item/device/pda/P = null
var/itemname = ""
var/info = ""
if(istype(W, /obj/item/weapon/paper))
X = W
itemname = X.name
info = X.info
else
P = W
itemname = P.name
info = P.notehtml
U << "You hold \a [itemname] up to the camera ..."
for(var/mob/living/silicon/ai/O in living_mob_list)
if(!O.client) continue
if(U.name == "Unknown") O << "<b>[U]</b> holds \a [itemname] up to one of your cameras ..."
else O << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U];trackname=[U.name]'>[U]</a></b> holds \a [itemname] up to one of your cameras ..."
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
if(U.name == "Unknown")
O << "<b>[U]</b> holds \a [itemname] up to one of your cameras ...<a href='?src=\ref[src];readcapturedpaper=\ref[W]'>view message</a>"
else
O << "<b><a href='byond://?src=\ref[O];track2=\ref[O];track=\ref[U];trackname=[html_encode(U.name)]'>[U]</a></b> holds \a [itemname] up to one of your cameras ...<a href='?src=\ref[src];readcapturedpaper=\ref[W]'>view message</a>"
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
if (S.current == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
O << "[U] holds \a [itemname] up to one of the cameras ...<a href='?src=\ref[src];readcapturedpaper=\ref[W]'>view message</a>"
else if (istype(W, /obj/item/weapon/camera_bug))
if (!src.can_use())
@@ -463,3 +461,18 @@
wires.MendAll()
update_icon()
update_coverage()
/obj/machinery/camera/Topic(href, href_list)
..()
if (href_list["readcapturedpaper"]) //Yep stolen from admin faxes
var/obj/item/fax = locate(href_list["readcapturedpaper"])
if(!fax)
usr << ""
if (istype(fax, /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = fax
P.show_content(usr,1)
else if (istype(fax, /obj/item/weapon/photo))
var/obj/item/weapon/photo/H = fax
H.show(usr)
return
return
@@ -1,12 +1,27 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/unary_atmos
board_type = "machine"
var/machine_dir = SOUTH
var/init_dirs = SOUTH
/obj/item/weapon/circuitboard/unary_atmos/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
machine_dir = turn(machine_dir, 90)
init_dirs = machine_dir
user.visible_message("\blue \The [user] adjusts the jumper on the [src]'s port configuration pins.", "\blue You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)].")
return
/obj/item/weapon/circuitboard/unary_atmos/examine()
..()
usr << "The jumper is connecting the [dir2text(machine_dir)] pins."
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
U.dir = src.machine_dir
U.initialize_directions = src.init_dirs
U.initialize()
U.build_network()
if (U.node)
@@ -35,13 +35,22 @@
return ..()
if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user)
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
if(M.get_species() == "Machine")
M.visible_message("<span class='notice'>\The [user] smudges some [loaded] from \the [src] on their screen.</span>","<span class='notice'>You smudge some [loaded] from \the [src] on your screen.</span>")
else
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>","<span class='notice'>You eat some [loaded] from \the [src].</span>")
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
else
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
if(M.get_species() == "Machine")
M.visible_message("<span class='notice'>\The [user] smudges some [loaded] onto [M].</span>","<span class='notice'>You smudge some [loaded] from \the [src] onto [M].</span>")
else
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>","<span class='notice'>You feed \the [M] some [loaded] with \the [src].</span>")
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
user << "<span class='warning'>You don't have anything on \the [src].</span>" //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK GODDAMNIT
@@ -112,4 +121,4 @@
user.take_organ_damage(10)
user.Paralyse(2)
return
return ..()
return ..()
+2 -2
View File
@@ -11,7 +11,7 @@
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
throwforce = 10.0
force = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
@@ -315,4 +315,4 @@
if (!safedrop)
spill(user, src.loc)
safedrop = 0
safedrop = 0
@@ -18,6 +18,9 @@
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
for(var/obj/vehicle/V in T.contents)
if(V)
V.unload(user)
qdel(src)
else
return attack_hand(user)
+4
View File
@@ -598,6 +598,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if (alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
if (istype(O, /mob/dead/observer))
var/mob/dead/observer/M = O
if (M.client && alert(src, "They are still connected. Are you sure, they will loose connection.", "Confirmation", "Yes", "No") != "Yes")
return
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+5 -2
View File
@@ -38,6 +38,9 @@
set name = "Adjust welding mask"
set src in usr
if(!base_state)
base_state = icon_state
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
@@ -150,7 +153,7 @@
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
ears.Blend(earbit, ICON_OVERLAY)
item_icons[icon_head] = ears
/obj/item/clothing/head/richard
@@ -158,4 +161,4 @@
desc = "You can hear the distant sounds of rhythmic electronica."
icon_state = "richard"
body_parts_covered = HEAD|FACE
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
@@ -1,6 +1,6 @@
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
if(!slot_to_strip || !istype(user))
if(!slot_to_strip || !istype(user) || isanimal(user) || !istype(user, /mob/living/simple_animal/hostile))
return 0
// TODO : Change to incapacitated() on merge.
@@ -72,7 +72,7 @@
else
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
if(!do_mob(user,src,HUMAN_STRIP_DELAY))
return 0
if(!stripping && user.get_active_hand() != held)
@@ -280,6 +280,21 @@
return
..()
/mob/living/silicon/robot/drone/Bump(var/atom/movable/AM, yes)
if(istype(AM,/obj/machinery/door)) // check for doors first as that will be most common
return ..(AM,yes)
if(!(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)))
if(istype(AM,/obj/item)) //Would this even be possible? Someone try to activate that message
var/obj/item/O = AM
if(O.w_class > can_pull_size)
src << "<span class='warning'>You are too small to push that.</span>"
return 0
else if(istype(AM,/obj))
return 0
..(AM,yes)
/mob/living/silicon/robot/drone/add_robot_verbs()
src.verbs |= silicon_subsystems
@@ -107,9 +107,11 @@
else
set_dir(SOUTH)
if(isturf(movement_target.loc) )
UnarmedAttack(movement_target)
if(isturf(movement_target.loc))
for(var/direction in alldirs)
var/turf/T = get_step(src, direction)
if(T == movement_target.loc)
UnarmedAttack(movement_target)
else if(ishuman(movement_target.loc) && prob(20))
visible_emote("stares at the [movement_target] that [movement_target.loc] has with sad puppy eyes.")
else
+4 -4
View File
@@ -38,10 +38,10 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
if(force_species_check)
var/fail = 1
for(var/name in virus.affected_species)
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
if(mob_type && istype(src, mob_type))
fail = 0
break
if(istype(src, /mob/living/carbon))
if(src:species && src:species.name == name)
fail = 0
break
if(fail) return
if(skip_this == 1)
+1 -1
View File
@@ -580,7 +580,7 @@ proc/is_blind(A)
name = realname
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && check_rights(R_MOD|R_ADMIN, 0, M))) && (M.client.prefs.toggles & CHAT_DEAD))
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && check_rights(R_DEV|R_MOD|R_ADMIN, 0, M))) && (M.client.prefs.toggles & CHAT_DEAD))
var/follow
var/lname
if(subject)
+3
View File
@@ -310,6 +310,9 @@
return 1
/obj/vehicle/user_unbuckle_mob(var/mob/user)
unload(user)
return
/obj/vehicle/proc/unload(var/mob/user, var/direction)
if(!load)