Revert "Bay update."

This commit is contained in:
Zuhayr
2016-02-07 16:07:05 +10:30
parent 2d2e60f6c6
commit 98d983577c
136 changed files with 1512 additions and 1162 deletions

View File

@@ -35,9 +35,10 @@ except ImportError:
try: try:
tiedosto = open("psycodownload.txt","r") tiedosto = open("psycodownload.txt","r")
except: except:
with open("psycodownload.txt","w") as tiedosto: tiedosto = open("psycodownload.txt","w")
tiedosto.write("http://www.voidspace.org.uk/python/modules.shtml#psyco") tiedosto.write("http://www.voidspace.org.uk/python/modules.shtml#psyco")
tiedosto.write("\nhttp://psyco.sourceforge.net/download.html") tiedosto.write("\nhttp://psyco.sourceforge.net/download.html")
tiedosto.close()
print "Check psycodownload.txt for a link" print "Check psycodownload.txt for a link"
else: else:
print "For god's sake, open psycodownload.txt" print "For god's sake, open psycodownload.txt"
@@ -189,13 +190,15 @@ tell_list = {}
if CORE_DATA.DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS: if CORE_DATA.DISABLE_ALL_NON_MANDATORY_SOCKET_CONNECTIONS:
nudgeable = False nudgeable = False
try: try:
with open("replacenames.cache","r") as tiedosto: tiedosto = open("replacenames.cache","r")
replacenames = pickle.load(tiedosto) replacenames = pickle.load(tiedosto)
tiedosto.close()
for i in replacenames.values(): for i in replacenames.values():
if len(i) > call_me_max_length: if len(i) > call_me_max_length:
replacenames[replacenames.keys()[replacenames.values().index(i)]] = i[:call_me_max_length] replacenames[replacenames.keys()[replacenames.values().index(i)]] = i[:call_me_max_length]
with open("replacenames.cache","w") as tiedosto: tiedosto = open("replacenames.cache","w")
pickle.dump(replacenames,tiedosto) pickle.dump(replacenames,tiedosto)
tiedosto.close()
if "[\0x01]" in i.lower() or "[\\0x01]" in i.lower(): if "[\0x01]" in i.lower() or "[\\0x01]" in i.lower():
i = i.replace("[\0x01]","") i = i.replace("[\0x01]","")
i = i.replace("[\0X01]","") i = i.replace("[\0X01]","")
@@ -208,12 +211,13 @@ except EOFError: #Cache corrupt
replacenames = {} replacenames = {}
print "replacenames.cache is corrupt and couldn't be loaded." print "replacenames.cache is corrupt and couldn't be loaded."
try: try:
with open("peopleheknows.cache","r") as tiedosto: tiedosto = open("peopleheknows.cache","r")
peopleheknows = pickle.load(tiedosto) peopleheknows = pickle.load(tiedosto)
tiedosto.close()
except IOError: except IOError:
peopleheknows = [[],[]] peopleheknows = [[],[]]
with open("peopleheknows.cache","w") as tiedosto: tiedosto = open("peopleheknows.cache","w")
pass tiedosto.close()
except EOFError: except EOFError:
peopleheknows = [[],[]] peopleheknows = [[],[]]
print "peopleheknows.cache is corrupt and couldn't be loaded." print "peopleheknows.cache is corrupt and couldn't be loaded."
@@ -341,14 +345,16 @@ if aggressive_pinging:
self_time = 0 self_time = 0
global backup,disconnects,conn global backup,disconnects,conn
while disconnects < 5: while disconnects < 5:
if backup > self_time and time.time()-backup > delay: if backup > self_time:
conn.send("PONG "+pongtarg) if time.time()-backup > delay:
print "Ponged" conn.send("PONG "+pongtarg)
self_time = time.time() print "Ponged"
elif time.time()-self_time > delay: self_time = time.time()
conn.send("PONG "+pongtarg) else:
print "Ponged" if time.time()-self_time > delay:
self_time = time.time() conn.send("PONG "+pongtarg)
print "Ponged"
self_time = time.time()
time.sleep(refresh) time.sleep(refresh)
thread.start_new_thread(aggressive_ping,(aggressive_pinging_delay,aggressive_pinging_refresh,)) thread.start_new_thread(aggressive_ping,(aggressive_pinging_delay,aggressive_pinging_refresh,))
def stop(sender,debug=1): def stop(sender,debug=1):
@@ -364,15 +370,16 @@ def stop(sender,debug=1):
access_granted = True access_granted = True
else: else:
access_granted = False access_granted = False
if access_granted and debug: if access_granted:
print sender+":"+prefix+"stop" if debug:
if random.randint(0,100) == 50: print sender+":"+prefix+"stop"
conn.privmsg(channel,"Hammertime!") if random.randint(0,100) == 50:
else: conn.privmsg(channel,"Hammertime!")
conn.privmsg(channel,"Shutting down.") else:
disconnects = 99999 conn.privmsg(channel,"Shutting down.")
conn.quit() disconnects = 99999
return True conn.quit()
return True
else: else:
conn.privmsg(channel,"You cannot command me") conn.privmsg(channel,"You cannot command me")
return False return False
@@ -394,12 +401,13 @@ def target(who,how_long):
if debug: if debug:
print "Banned",who,"For",how_long,"seconds" print "Banned",who,"For",how_long,"seconds"
if logbans: if logbans:
with open(targetdirectory+"banlog/"+str(int(start))+"-"+str(int(end))+".txt","w") as tiedosto: tiedosto = open(targetdirectory+"banlog/"+str(int(start))+"-"+str(int(end))+".txt","w")
tiedosto.write("Start of ban on "+who+":"+str(int(start))) tiedosto.write("Start of ban on "+who+":"+str(int(start)))
tiedosto.write("\n") tiedosto.write("\n")
tiedosto.write("End of ban on "+who+":"+str(int(end))) tiedosto.write("End of ban on "+who+":"+str(int(end)))
tiedosto.write("\n") tiedosto.write("\n")
tiedosto.write("In total:"+str(int(end-start))+"Seconds") tiedosto.write("In total:"+str(int(end-start))+"Seconds")
tiedosto.close()
else: else:
CALL_OFF = False CALL_OFF = False
pass pass
@@ -568,12 +576,13 @@ while True:
time.sleep(6) time.sleep(6)
Name = origname Name = origname
conn.nick(Name) conn.nick(Name)
if origname in truesender and influx == prefix+"stop": if origname in truesender:
time.sleep(0.5) #A small delay if influx == prefix+"stop":
conn.privmsg(channel,"Shutting down.") time.sleep(0.5) #A small delay
conn.quit() conn.privmsg(channel,"Shutting down.")
disconnects = 99999 conn.quit()
break disconnects = 99999
break
if len(translateable) > 0 and enabled == True: if len(translateable) > 0 and enabled == True:
people = "-5|5|1-".join(users).lower() people = "-5|5|1-".join(users).lower()
if truesender.lower() in translateable: if truesender.lower() in translateable:
@@ -624,8 +633,9 @@ while True:
arg = influx.lower()[8+len(prefix):] arg = influx.lower()[8+len(prefix):]
if debug: if debug:
print truesender+":"+prefix+"suggest "+arg print truesender+":"+prefix+"suggest "+arg
with open(targetdirectory+"suggestions/suggestions_"+str(int(time.time()))+".txt","a") as tiedosto: tiedosto = open(targetdirectory+"suggestions/suggestions_"+str(int(time.time()))+".txt","a")
tiedosto.write(arg) tiedosto.write(arg)
tiedosto.close()
conn.privmsg(targetchannel,"Suggestion received") conn.privmsg(targetchannel,"Suggestion received")
elif cocheck( prefix+"help "): #Space in front of the ( to make sure that my command finder does not pick this up. elif cocheck( prefix+"help "): #Space in front of the ( to make sure that my command finder does not pick this up.
arg = " ".join(influx.split(" ")[1:]).lower() arg = " ".join(influx.split(" ")[1:]).lower()

View File

@@ -28,6 +28,9 @@ datum/pipeline
if(!member.check_pressure(pressure)) if(!member.check_pressure(pressure))
break //Only delete 1 pipe per process break //Only delete 1 pipe per process
//Allow for reactions
//air.react() //Should be handled by pipe_network now
proc/temporarily_store_air() proc/temporarily_store_air()
//Update individual gas_mixtures by volume ratio //Update individual gas_mixtures by volume ratio

View File

@@ -19,7 +19,6 @@
#define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME / (T20C * R_IDEAL_GAS_EQUATION)) // Amount of air to take a from a tile #define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME / (T20C * R_IDEAL_GAS_EQUATION)) // Amount of air to take a from a tile
#define BREATH_PERCENTAGE (BREATH_VOLUME / CELL_VOLUME) // Amount of air needed before pass out/suffocation commences. #define BREATH_PERCENTAGE (BREATH_VOLUME / CELL_VOLUME) // Amount of air needed before pass out/suffocation commences.
#define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD * BREATH_PERCENTAGE * 0.16) #define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD * BREATH_PERCENTAGE * 0.16)
#define HUMAN_HEAT_CAPACITY 280000 //J/K For 80kg person
#define SOUND_MINIMUM_PRESSURE 10 #define SOUND_MINIMUM_PRESSURE 10

View File

@@ -13,7 +13,6 @@
#define GAS_CRITICAL_TEMPERATURE 132.65 // K. The critical point temperature for air. #define GAS_CRITICAL_TEMPERATURE 132.65 // K. The critical point temperature for air.
#define RADIATOR_EXPOSED_SURFACE_AREA_RATIO 0.04 // (3 cm + 100 cm * sin(3deg))/(2*(3+100 cm)). Unitless ratio. #define RADIATOR_EXPOSED_SURFACE_AREA_RATIO 0.04 // (3 cm + 100 cm * sin(3deg))/(2*(3+100 cm)). Unitless ratio.
#define HUMAN_EXPOSED_SURFACE_AREA 5.2 //m^2, surface area of 1.7m (H) x 0.46m (D) cylinder
#define T0C 273.15 // 0.0 degrees celcius #define T0C 273.15 // 0.0 degrees celcius
#define T20C 293.15 // 20.0 degrees celcius #define T20C 293.15 // 20.0 degrees celcius

View File

@@ -25,7 +25,6 @@
#define BORGMESON 0x1 #define BORGMESON 0x1
#define BORGTHERM 0x2 #define BORGTHERM 0x2
#define BORGXRAY 0x4 #define BORGXRAY 0x4
#define BORGMATERIAL 8
#define HOSTILE_STANCE_IDLE 1 #define HOSTILE_STANCE_IDLE 1
#define HOSTILE_STANCE_ALERT 2 #define HOSTILE_STANCE_ALERT 2

View File

@@ -269,7 +269,7 @@
user.listed_turf = null user.listed_turf = null
else else
user.listed_turf = T user.listed_turf = T
user.client.statpanel = "Turf" user.client.statpanel = T.name
return 1 return 1
/mob/proc/TurfAdjacent(var/turf/T) /mob/proc/TurfAdjacent(var/turf/T)

View File

@@ -1,4 +1,3 @@
////////////////////////// //////////////////////////
//Movable Screen Objects// //Movable Screen Objects//
// By RemieRichards // // By RemieRichards //
@@ -31,10 +30,9 @@
//Split X+Pixel_X up into list(X, Pixel_X) //Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = text2list(screen_loc_params[1],":") var/list/screen_loc_X = text2list(screen_loc_params[1],":")
screen_loc_X[1] = encode_screen_X(text2num(screen_loc_X[1]))
//Split Y+Pixel_Y up into list(Y, Pixel_Y) //Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = text2list(screen_loc_params[2],":") var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
screen_loc_Y[1] = encode_screen_Y(text2num(screen_loc_Y[1]))
if(snap2grid) //Discard Pixel Values if(snap2grid) //Discard Pixel Values
screen_loc = "[screen_loc_X[1]],[screen_loc_Y[1]]" screen_loc = "[screen_loc_X[1]],[screen_loc_Y[1]]"
@@ -44,50 +42,8 @@
var/pix_Y = text2num(screen_loc_Y[2]) - 16 var/pix_Y = text2num(screen_loc_Y[2]) - 16
screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]" screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]"
/obj/screen/movable/proc/encode_screen_X(X) moved = TRUE
if(X > usr.client.view+1)
. = "EAST-[usr.client.view*2 + 1-X]"
else if(X < usr.client.view+1)
. = "WEST+[X-1]"
else
. = "CENTER"
/obj/screen/movable/proc/decode_screen_X(X)
//Find EAST/WEST implementations
if(findtext(X,"EAST-"))
var/num = text2num(copytext(X,6)) //Trim EAST-
if(!num)
num = 0
. = usr.client.view*2 + 1 - num
else if(findtext(X,"WEST+"))
var/num = text2num(copytext(X,6)) //Trim WEST+
if(!num)
num = 0
. = num+1
else if(findtext(X,"CENTER"))
. = usr.client.view+1
/obj/screen/movable/proc/encode_screen_Y(Y)
if(Y > usr.client.view+1)
. = "NORTH-[usr.client.view*2 + 1-Y]"
else if(Y < usr.client.view+1)
. = "SOUTH+[Y-1]"
else
. = "CENTER"
/obj/screen/movable/proc/decode_screen_Y(Y)
if(findtext(Y,"NORTH-"))
var/num = text2num(copytext(Y,7)) //Trim NORTH-
if(!num)
num = 0
. = usr.client.view*2 + 1 - num
else if(findtext(Y,"SOUTH+"))
var/num = text2num(copytext(Y,7)) //Time SOUTH+
if(!num)
num = 0
. = num+1
else if(findtext(Y,"CENTER"))
. = usr.client.view+1
//Debug procs //Debug procs
/client/proc/test_movable_UI() /client/proc/test_movable_UI()
@@ -125,4 +81,4 @@
S.screen_loc = screen_l S.screen_loc = screen_l
screen += S screen += S

View File

@@ -19,12 +19,9 @@
spell_objects.Cut() spell_objects.Cut()
if(spell_holder) if(spell_holder)
spell_holder.spell_masters -= src spell_holder.spell_masters -= src
if(spell_holder.client && spell_holder.client.screen)
spell_holder.client.screen -= src
spell_holder = null
/obj/screen/movable/spell_master/ResetVars() /obj/screen/movable/spell_master/ResetVars()
..("spell_objects", args) ..("spell_objects")
spell_objects = list() spell_objects = list()
/obj/screen/movable/spell_master/MouseDrop() /obj/screen/movable/spell_master/MouseDrop()
@@ -50,34 +47,25 @@
overlays.len = 0 overlays.len = 0
overlays.Add(closed_state) overlays.Add(closed_state)
else if(forced_state != 1) else if(forced_state != 1)
open_spellmaster() var/temp_loc = screen_loc
var/x_position = text2num(copytext(temp_loc, 1, findtext(temp_loc, ":")))
var/x_pix = text2num(copytext(temp_loc, findtext(temp_loc, ":") + 1, findtext(temp_loc, ",")))
temp_loc = copytext(temp_loc, findtext(temp_loc, ",") + 1)
var/y_position = text2num(copytext(temp_loc, 1, findtext(temp_loc, ":")))
var/y_pix = text2num(copytext(temp_loc, findtext(temp_loc, ":")+1))
for(var/i = 1; i <= spell_objects.len; i++)
var/obj/screen/spell/S = spell_objects[i]
S.screen_loc = "[x_position + (x_position < 8 ? 1 : -1)*(i%7)]:[x_pix],[y_position + (y_position < 8 ? round(i/7) : -round(i/7))]:[y_pix]"
if(spell_holder && spell_holder.client)
spell_holder.client.screen += S
S.handle_icon_updates = 1
update_spells(1) update_spells(1)
showing = 1 showing = 1
overlays.len = 0 overlays.len = 0
overlays.Add(open_state) overlays.Add(open_state)
/obj/screen/movable/spell_master/proc/open_spellmaster()
var/list/screen_loc_xy = text2list(screen_loc,",")
//Create list of X offsets
var/list/screen_loc_X = text2list(screen_loc_xy[1],":")
var/x_position = decode_screen_X(screen_loc_X[1])
var/x_pix = screen_loc_X[2]
//Create list of Y offsets
var/list/screen_loc_Y = text2list(screen_loc_xy[2],":")
var/y_position = decode_screen_Y(screen_loc_Y[1])
var/y_pix = screen_loc_Y[2]
for(var/i = 1; i <= spell_objects.len; i++)
var/obj/screen/spell/S = spell_objects[i]
var/xpos = x_position + (x_position < 8 ? 1 : -1)*(i%7)
var/ypos = y_position + (y_position < 8 ? round(i/7) : -round(i/7))
S.screen_loc = "[encode_screen_X(xpos)]:[x_pix],[encode_screen_Y(ypos)]:[y_pix]"
if(spell_holder && spell_holder.client)
spell_holder.client.screen += S
S.handle_icon_updates = 1
/obj/screen/movable/spell_master/proc/add_spell(var/spell/spell) /obj/screen/movable/spell_master/proc/add_spell(var/spell/spell)
if(!spell) return if(!spell) return
@@ -86,14 +74,13 @@
return return
else else
spell_objects.Add(spell.connected_button) spell_objects.Add(spell.connected_button)
if(spell_holder.client) toggle_open(2)
toggle_open(2)
return return
if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
return return
var/obj/screen/spell/newscreen = PoolOrNew(/obj/screen/spell) var/obj/screen/spell/newscreen = new /obj/screen/spell
newscreen.spellmaster = src newscreen.spellmaster = src
newscreen.spell = spell newscreen.spell = spell
@@ -109,8 +96,7 @@
newscreen.name = spell.name newscreen.name = spell.name
newscreen.update_charge(1) newscreen.update_charge(1)
spell_objects.Add(newscreen) spell_objects.Add(newscreen)
if(spell_holder.client) toggle_open(2) //forces the icons to refresh on screen
toggle_open(2) //forces the icons to refresh on screen
/obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell) /obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell)
qdel(spell.connected_button) qdel(spell.connected_button)
@@ -165,8 +151,6 @@
last_charged_icon = null last_charged_icon = null
if(spellmaster) if(spellmaster)
spellmaster.spell_objects -= src spellmaster.spell_objects -= src
if(spellmaster.spell_holder && spellmaster.spell_holder.client)
spellmaster.spell_holder.client.screen -= src
if(spellmaster && !spellmaster.spell_objects.len) if(spellmaster && !spellmaster.spell_objects.len)
qdel(spellmaster) qdel(spellmaster)
spellmaster = null spellmaster = null

View File

@@ -39,12 +39,12 @@ datum/controller/vote
result() result()
for(var/client/C in voting) for(var/client/C in voting)
if(C) if(C)
C << browse(null,"window=vote") C << browse(null,"window=vote;can_close=0")
reset() reset()
else else
for(var/client/C in voting) for(var/client/C in voting)
if(C) if(C)
C << browse(vote.interface(C),"window=vote") C << browse(vote.interface(C),"window=vote;can_close=0")
voting.Cut() voting.Cut()
@@ -392,4 +392,4 @@ datum/controller/vote
set name = "Vote" set name = "Vote"
if(vote) if(vote)
src << browse(vote.interface(client),"window=vote") src << browse(vote.interface(client),"window=vote;can_close=0")

View File

@@ -166,7 +166,7 @@
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1)) if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
var/assignment = GetAssignment(H) var/assignment = GetAssignment(H)
var/id = generate_record_id() var/id = add_zero(num2hex(rand(1, 65535)), 4) //no point generating higher numbers because of the limitations of num2hex
//General Record //General Record
var/datum/data/record/G = CreateGeneralRecord(H, id) var/datum/data/record/G = CreateGeneralRecord(H, id)
G.fields["name"] = H.real_name G.fields["name"] = H.real_name
@@ -222,10 +222,8 @@
locked += L locked += L
return return
/proc/generate_record_id() // TODO.
return add_zero(num2hex(rand(1, 65535)), 4) //no point generating higher numbers because of the limitations of num2hex proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
/proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
var/icon/preview_icon = null var/icon/preview_icon = null
var/g = "m" var/g = "m"

84
code/game/asteroid.dm Normal file
View File

@@ -0,0 +1,84 @@
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger =4,
/obj/item/weapon/pickaxe/silver =4,
/obj/item/weapon/pickaxe/drill =4,
/obj/item/weapon/pickaxe/jackhammer =4,
//mob/living/simple_animal/hostile/carp =3,
/obj/item/weapon/pickaxe/diamond =3,
/obj/item/weapon/pickaxe/diamonddrill =3,
/obj/item/weapon/pickaxe/gold =3,
/obj/item/weapon/pickaxe/plasmacutter =2,
/obj/structure/closet/syndicate/resources =2,
/obj/item/weapon/melee/energy/sword/pirate =1,
/obj/mecha/working/ripley/mining =1
)
var/global/list/spawned_surprises = list()
var/global/max_secret_rooms = 3
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/tiled,/turf/simulated/floor/reinforced)
for(var/x = 0,x<x_size,x++)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
qdel(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
proc/admin_spawn_room_at_pos()
var/wall
var/floor
var/x = input("X position","X pos",usr.x)
var/y = input("Y position","Y pos",usr.y)
var/z = input("Z position","Z pos",usr.z)
var/x_len = input("Desired length.","Length",5)
var/y_len = input("Desired width.","Width",5)
var/clean = input("Delete existing items in area?" , "Clean area?", 0)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Resin wall"))
if("Reinforced wall")
wall=/turf/simulated/wall/r_wall
if("Regular wall")
wall=/turf/simulated/wall
if("Resin wall")
wall=/obj/effect/alien/resin
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
if("Regular floor")
floor=/turf/simulated/floor/tiled
if("Reinforced floor")
floor=/turf/simulated/floor/reinforced
if(x && y && z && wall && floor && x_len && y_len)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor,clean)
return

View File

@@ -79,7 +79,7 @@
else if(isobj(hit_atom)) else if(isobj(hit_atom))
var/obj/O = hit_atom var/obj/O = hit_atom
if(!O.anchored) if(!O.anchored)
step(O, src.last_move) step(O, src.dir)
O.hitby(src,speed) O.hitby(src,speed)
else if(isturf(hit_atom)) else if(isturf(hit_atom))
@@ -87,7 +87,7 @@
var/turf/T = hit_atom var/turf/T = hit_atom
if(T.density) if(T.density)
spawn(2) spawn(2)
step(src, turn(src.last_move, 180)) step(src, turn(src.dir, 180))
if(istype(src,/mob/living)) if(istype(src,/mob/living))
var/mob/living/M = src var/mob/living/M = src
M.turf_collision(T, speed) M.turf_collision(T, speed)

View File

@@ -17,8 +17,6 @@ var/global/list/additional_antag_types = list()
var/ert_disabled = 0 // ERT cannot be called. var/ert_disabled = 0 // ERT cannot be called.
var/deny_respawn = 0 // Disable respawn during this round. var/deny_respawn = 0 // Disable respawn during this round.
var/list/disabled_jobs = list() // Mostly used for Malf. This check is performed in job_controller so it doesn't spawn a regular AI.
var/shuttle_delay = 1 // Shuttle transit time is multiplied by this. var/shuttle_delay = 1 // Shuttle transit time is multiplied by this.
var/auto_recall_shuttle = 0 // Will the shuttle automatically be recalled? var/auto_recall_shuttle = 0 // Will the shuttle automatically be recalled?

View File

@@ -9,4 +9,3 @@
end_on_antag_death = 0 end_on_antag_death = 0
auto_recall_shuttle = 0 auto_recall_shuttle = 0
antag_tags = list(MODE_MALFUNCTION) antag_tags = list(MODE_MALFUNCTION)
disabled_jobs = list("AI")

View File

@@ -182,6 +182,79 @@
H.species.equip_survival_gear(H,1) H.species.equip_survival_gear(H,1)
return 1 return 1
//Griff //BS12 EDIT
/*
/datum/job/clown
title = "Clown"
flag = CLOWN
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_clown, access_theatre, access_maint_tunnels)
minimal_access = list(access_clown, access_theatre)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/rainbow(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack)
H.mutations.Add(CLUMSY)
return 1
/datum/job/mime
title = "Mime"
flag = MIME
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_mime, access_theatre, access_maint_tunnels)
minimal_access = list(access_mime, access_theatre)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/mime(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
H.verbs += /client/proc/mimespeak
H.verbs += /client/proc/mimewall
H.mind.special_verbs += /client/proc/mimespeak
H.mind.special_verbs += /client/proc/mimewall
H.miming = 1
return 1
*/
/datum/job/janitor /datum/job/janitor
title = "Janitor" title = "Janitor"
flag = JANITOR flag = JANITOR

View File

@@ -191,6 +191,36 @@ var/global/datum/controller/occupations/job_master
return return
proc/FillAIPosition()
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
if(!job) return 0
if((job.title == "AI") && (config) && (!config.allow_ai)) return 0
for(var/i = job.total_positions, i > 0, i--)
for(var/level = 1 to 3)
var/list/candidates = list()
if(ticker.mode.name == "AI malfunction")//Make sure they want to malf if its malf
candidates = FindOccupationCandidates(job, level, BE_MALF)
else
candidates = FindOccupationCandidates(job, level)
if(candidates.len)
var/mob/new_player/candidate = pick(candidates)
if(AssignRole(candidate, "AI"))
ai_selected++
break
//Malf NEEDS an AI so force one if we didn't get a player who wanted it
if((ticker.mode.name == "AI malfunction")&&(!ai_selected))
unassigned = shuffle(unassigned)
for(var/mob/new_player/player in unassigned)
if(jobban_isbanned(player, "AI")) continue
if(AssignRole(player, "AI"))
ai_selected++
break
if(ai_selected) return 1
return 0
/** Proc DivideOccupations /** Proc DivideOccupations
* fills var "assigned_role" for all ready players. * fills var "assigned_role" for all ready players.
* This proc must not have any side effect besides of modifying "assigned_role". * This proc must not have any side effect besides of modifying "assigned_role".
@@ -236,6 +266,11 @@ var/global/datum/controller/occupations/job_master
FillHeadPosition() FillHeadPosition()
Debug("DO, Head Check end") Debug("DO, Head Check end")
//Check for an AI
Debug("DO, Running AI Check")
FillAIPosition()
Debug("DO, AI Check end")
//Other jobs are now checked //Other jobs are now checked
Debug("DO, Running Standard Check") Debug("DO, Running Standard Check")
@@ -246,7 +281,6 @@ var/global/datum/controller/occupations/job_master
// Loop through all levels from high to low // Loop through all levels from high to low
var/list/shuffledoccupations = shuffle(occupations) var/list/shuffledoccupations = shuffle(occupations)
// var/list/disabled_jobs = ticker.mode.disabled_jobs // So we can use .Find down below without a colon.
for(var/level = 1 to 3) for(var/level = 1 to 3)
//Check the head jobs first each level //Check the head jobs first each level
CheckHeadPositions(level) CheckHeadPositions(level)
@@ -256,7 +290,7 @@ var/global/datum/controller/occupations/job_master
// Loop through all jobs // Loop through all jobs
for(var/datum/job/job in shuffledoccupations) // SHUFFLE ME BABY for(var/datum/job/job in shuffledoccupations) // SHUFFLE ME BABY
if(!job || ticker.mode.disabled_jobs.Find(job.title) ) if(!job)
continue continue
if(jobban_isbanned(player, job.title)) if(jobban_isbanned(player, job.title))
@@ -448,7 +482,7 @@ var/global/datum/controller/occupations/job_master
if(istype(H)) //give humans wheelchairs, if they need them. if(istype(H)) //give humans wheelchairs, if they need them.
var/obj/item/organ/external/l_foot = H.get_organ("l_foot") var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot") var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
if(!l_foot || !r_foot) if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc) var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
H.buckled = W H.buckled = W
H.update_canmove() H.update_canmove()

View File

@@ -0,0 +1,66 @@
//TODO: put these somewhere else
/client/proc/mimewall()
set category = "Mime"
set name = "Invisible wall"
set desc = "Create an invisible wall on your location."
if(usr.stat)
usr << "Not when you're incapicated."
return
if(!ishuman(usr))
return
var/mob/living/carbon/human/H = usr
if(!H.miming)
usr << "You still haven't atoned for your speaking transgression. Wait."
return
H.verbs -= /client/proc/mimewall
spawn(300)
H.verbs += /client/proc/mimewall
for (var/mob/V in viewers(H))
if(V!=usr)
V.show_message("[H] looks as if a wall is in front of them.", 3, "", 2)
usr << "You form a wall in front of yourself."
new /obj/effect/forcefield/mime(locate(usr.x,usr.y,usr.z))
return
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
name = "invisible wall"
desc = "You have a bad feeling about this."
var/timeleft = 300
var/last_process = 0
/obj/effect/forcefield/mime/New()
..()
last_process = world.time
processing_objects.Add(src)
/obj/effect/forcefield/mime/process()
timeleft -= (world.time - last_process)
if(timeleft <= 0)
processing_objects.Remove(src)
qdel(src)
///////////////////////////////
/client/proc/mimespeak()
set category = "Mime"
set name = "Speech"
set desc = "Toggle your speech."
if(!ishuman(usr))
return
var/mob/living/carbon/human/H = usr
if(H.miming)
H.miming = 0
else
H << "You'll have to wait if you want to atone for your sins."
spawn(3000)
H.miming = 1
return

View File

@@ -385,7 +385,7 @@
if(!AN && !open && !infected & !imp) if(!AN && !open && !infected & !imp)
AN = "None:" AN = "None:"
if(!e.is_stump()) if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>" dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
else else
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not [e.is_stump() ? "Found" : "Attached Completely"]</td>" dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not [e.is_stump() ? "Found" : "Attached Completely"]</td>"

View File

@@ -449,7 +449,7 @@
var/counter = 1 var/counter = 1
while(src.active2.fields[text("com_[]", counter)]) while(src.active2.fields[text("com_[]", counter)])
counter++ counter++
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]") src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["del_c"]) if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))

View File

@@ -391,7 +391,7 @@ What a mess.*/
var/counter = 1 var/counter = 1
while(active2.fields[text("com_[]", counter)]) while(active2.fields[text("com_[]", counter)])
counter++ counter++
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]") active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if ("Delete Record (ALL)") if ("Delete Record (ALL)")
if (active1) if (active1)

View File

@@ -461,7 +461,7 @@
var/counter = 1 var/counter = 1
while(src.active2.fields[text("com_[]", counter)]) while(src.active2.fields[text("com_[]", counter)])
counter++ counter++
src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]") src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["del_c"]) if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))

View File

@@ -410,7 +410,7 @@ What a mess.*/
var/counter = 1 var/counter = 1
while(active2.fields[text("com_[]", counter)]) while(active2.fields[text("com_[]", counter)])
counter++ counter++
active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD")] [worldtime2text()], [game_year]<BR>[t1]") active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if ("Delete Record (ALL)") if ("Delete Record (ALL)")
if (active1) if (active1)

View File

@@ -29,14 +29,16 @@
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/obj/item/weapon/card/id/I = W.GetID() if(vendmode == 1)
if(istype(W, /obj/item/weapon/card))
if(vendmode == 1 && I) var/obj/item/weapon/card/I = W
scan_id(I, W) scan_card(I)
vendmode = 0
if(vendmode == 3 && I)
if(reimburse_id(I, W))
vendmode = 0 vendmode = 0
if(vendmode == 3)
if(istype(W,/obj/item/weapon/card))
var/obj/item/weapon/card/I = W
if(reimburse(I))
vendmode = 0
if(vendmode == 0) if(vendmode == 0)
if(istype(W, /obj/item/device/laptop)) if(istype(W, /obj/item/device/laptop))
var/obj/item/device/laptop/L = W var/obj/item/device/laptop/L = W
@@ -199,24 +201,26 @@
newlap.spawn_parts() newlap.spawn_parts()
/obj/machinery/lapvend/proc/scan_id(var/obj/item/weapon/card/id/C, var/obj/item/I) /obj/machinery/lapvend/proc/scan_card(var/obj/item/weapon/card/I)
visible_message("<span class='info'>\The [usr] swipes \the [I] through \the [src].</span>") if (istype(I, /obj/item/weapon/card/id))
var/datum/money_account/CH = get_account(C.associated_account_number) var/obj/item/weapon/card/id/C = I
if(!CH) visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>" var/datum/money_account/CH = get_account(C.associated_account_number)
return if(!CH)
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>"
if(vendor_account) return
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) if(vendor_account)
if(D) var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
transfer_and_vend(D, C) var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
transfer_and_vend(D, C)
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
else else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call [boss_short] Support.</span>" usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call [boss_short] Support.</span>"
else else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>" transfer_and_vend(CH, C)
else
transfer_and_vend(CH, C)
// Transfers money and vends the laptop. // Transfers money and vends the laptop.
@@ -348,28 +352,30 @@
/obj/machinery/lapvend/proc/reimburse_id(var/obj/item/weapon/card/id/C, var/obj/item/I) /obj/machinery/lapvend/proc/reimburse(var/obj/item/weapon/card/I)
visible_message("<span class='info'>\The [usr] swipes \the [I] through \the [src].</span>") if (istype(I, /obj/item/weapon/card/id))
var/datum/money_account/CH = get_account(C.associated_account_number) var/obj/item/weapon/card/id/C = I
if(!CH) visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>" var/datum/money_account/CH = get_account(C.associated_account_number)
return 0 if(!CH)
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>"
if(vendor_account) return 0
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2) if(vendor_account)
if(D) var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
transfer_and_reimburse(D) var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
return 1 if(D)
transfer_and_reimburse(D)
return 1
else
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
return 0
else else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call [boss_short] Support.</span>" usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call [boss_short] Support.</span>"
return 0 return 0
else else
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>" transfer_and_reimburse(CH)
return 0 return 1
else
transfer_and_reimburse(CH)
return 1
/obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D) /obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D)
var/transaction_amount = total() var/transaction_amount = total()

View File

@@ -397,12 +397,12 @@
set_opacity(0) set_opacity(0)
sleep(3) sleep(3)
src.density = 0 src.density = 0
update_nearby_tiles()
sleep(7) sleep(7)
src.layer = open_layer src.layer = open_layer
explosion_resistance = 0 explosion_resistance = 0
update_icon() update_icon()
set_opacity(0) set_opacity(0)
update_nearby_tiles()
operating = 0 operating = 0
if(autoclose) if(autoclose)
@@ -424,12 +424,12 @@
src.density = 1 src.density = 1
explosion_resistance = initial(explosion_resistance) explosion_resistance = initial(explosion_resistance)
src.layer = closed_layer src.layer = closed_layer
update_nearby_tiles()
sleep(7) sleep(7)
update_icon() update_icon()
if(visible && !glass) if(visible && !glass)
set_opacity(1) //caaaaarn! set_opacity(1) //caaaaarn!
operating = 0 operating = 0
update_nearby_tiles()
//I shall not add a check every x ticks if a door has closed over some fire. //I shall not add a check every x ticks if a door has closed over some fire.
var/obj/fire/fire = locate() in loc var/obj/fire/fire = locate() in loc

View File

@@ -88,7 +88,7 @@
//Processes the occupant, drawing from the internal power cell if needed. //Processes the occupant, drawing from the internal power cell if needed.
/obj/machinery/recharge_station/proc/process_occupant() /obj/machinery/recharge_station/proc/process_occupant()
if(isrobot(occupant)) if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant var/mob/living/silicon/robot/R = occupant
if(R.module) if(R.module)
@@ -103,11 +103,6 @@
R.adjustBruteLoss(-weld_rate) R.adjustBruteLoss(-weld_rate)
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE)) if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
R.adjustFireLoss(-wire_rate) R.adjustFireLoss(-wire_rate)
else if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450)
H.nutrition = min(H.nutrition+10, 450)
cell.use(7000/450*10)
else if(istype(occupant, /mob/living/carbon/human)) else if(istype(occupant, /mob/living/carbon/human))
@@ -124,6 +119,7 @@
H.nutrition = min(H.nutrition+10, 450) H.nutrition = min(H.nutrition+10, 450)
cell.use(7000/450*10) cell.use(7000/450*10)
/obj/machinery/recharge_station/examine(mob/user) /obj/machinery/recharge_station/examine(mob/user)
..(user) ..(user)
user << "The charge meter reads: [round(chargepercentage())]%" user << "The charge meter reads: [round(chargepercentage())]%"
@@ -251,17 +247,6 @@
else else
return return
/obj/machinery/recharge_station/proc/hascell(var/mob/M)
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.cell)
return 1
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!isnull(H.internal_organs_by_name["cell"]))
return 1
return 0
/obj/machinery/recharge_station/proc/go_out() /obj/machinery/recharge_station/proc/go_out()
if(!occupant) if(!occupant)
return return
@@ -288,6 +273,4 @@
set name = "Enter Recharger" set name = "Enter Recharger"
set src in oview(1) set src in oview(1)
if(!usr.incapacitated())
return
go_in(usr) go_in(usr)

View File

@@ -88,7 +88,7 @@ obj/machinery/scanner/attack_hand(mob/living/carbon/human/user)
G.fields["rank"] = "Unassigned" G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = G.fields["rank"] G.fields["real_rank"] = G.fields["rank"]
G.fields["name"] = mname G.fields["name"] = mname
G.fields["id"] = generate_record_id() G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
M.fields["name"] = G.fields["name"] M.fields["name"] = G.fields["name"]
M.fields["id"] = G.fields["id"] M.fields["id"] = G.fields["id"]
S.fields["name"] = G.fields["name"] S.fields["name"] = G.fields["name"]

View File

@@ -815,12 +815,15 @@
dat += "<A href='?src=\ref[src];apply_paintjob=1'><br>\[apply customisation routine\]</a><br><hr>" dat += "<A href='?src=\ref[src];apply_paintjob=1'><br>\[apply customisation routine\]</a><br><hr>"
if(panel_open) if(panel_open)
wires.Interact(user) dat += wires()
user << browse(dat, "window=suit_cycler") user << browse(dat, "window=suit_cycler")
onclose(user, "suit_cycler") onclose(user, "suit_cycler")
return return
/obj/machinery/suit_cycler/proc/wires()
return wires.GetInteractWindow()
/obj/machinery/suit_cycler/Topic(href, href_list) /obj/machinery/suit_cycler/Topic(href, href_list)
if(href_list["eject_suit"]) if(href_list["eject_suit"])
if(!suit) return if(!suit) return

View File

@@ -987,11 +987,6 @@
if (usr.stat || !ishuman(usr)) if (usr.stat || !ishuman(usr))
return return
if (usr.buckled)
usr << "<span class='warning'>You can't climb into the exosuit while buckled!</span>"
return
src.log_message("[usr] tries to move in.") src.log_message("[usr] tries to move in.")
if(iscarbon(usr)) if(iscarbon(usr))
var/mob/living/carbon/C = usr var/mob/living/carbon/C = usr

View File

@@ -77,7 +77,7 @@ var/global/list/image/splatter_cache=list()
var/obj/item/organ/external/l_foot = perp.get_organ("l_foot") var/obj/item/organ/external/l_foot = perp.get_organ("l_foot")
var/obj/item/organ/external/r_foot = perp.get_organ("r_foot") var/obj/item/organ/external/r_foot = perp.get_organ("r_foot")
var/hasfeet = 1 var/hasfeet = 1
if((!l_foot || l_foot.is_stump()) && (!r_foot || r_foot.is_stump())) if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
hasfeet = 0 hasfeet = 0
if(perp.shoes && !perp.buckled)//Adding blood to shoes if(perp.shoes && !perp.buckled)//Adding blood to shoes
var/obj/item/clothing/shoes/S = perp.shoes var/obj/item/clothing/shoes/S = perp.shoes

View File

@@ -167,9 +167,6 @@
if(temp && !temp.is_usable()) if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>" user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
return return
if(!temp)
user << "<span class='notice'>You try to use your hand, but realize it is no longer attached!</span>"
return
src.pickup(user) src.pickup(user)
if (istype(src.loc, /obj/item/weapon/storage)) if (istype(src.loc, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = src.loc var/obj/item/weapon/storage/S = src.loc
@@ -260,9 +257,6 @@
// for items that can be placed in multiple slots // for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player // note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot) /obj/item/proc/equipped(var/mob/user, var/slot)
layer = 20
if(user.client) user.client.screen |= src
if(user.pulling == src) user.stop_pulling()
return return
//Defines which slots correspond to which slot flags //Defines which slots correspond to which slot flags

View File

@@ -18,12 +18,10 @@
/obj/item/device/chameleon/dropped() /obj/item/device/chameleon/dropped()
disrupt() disrupt()
..()
/obj/item/device/chameleon/equipped() /obj/item/device/chameleon/equipped()
..() ..()
disrupt() disrupt()
..()
/obj/item/device/chameleon/attack_self() /obj/item/device/chameleon/attack_self()
toggle() toggle()

View File

@@ -322,7 +322,7 @@
qdel(src) qdel(src)
/obj/item/device/paicard/see_emote(mob/living/M, text) /obj/item/device/paicard/see_emote(mob/living/M, text)
if(pai && pai.client && !pai.canmove) if(pai && pai.client)
var/rendered = "<span class='message'>[text]</span>" var/rendered = "<span class='message'>[text]</span>"
pai.show_message(rendered, 2) pai.show_message(rendered, 2)
..() ..()

View File

@@ -71,10 +71,6 @@
icon_state = "meson" icon_state = "meson"
icon = 'icons/obj/clothing/glasses.dmi' icon = 'icons/obj/clothing/glasses.dmi'
/obj/item/borg/sight/material
name = "\proper material scanner vision"
sight_mode = BORGMATERIAL
/obj/item/borg/sight/hud /obj/item/borg/sight/hud
name = "hud" name = "hud"
var/obj/item/clothing/glasses/hud/hud = null var/obj/item/clothing/glasses/hud/hud = null

View File

@@ -71,7 +71,7 @@
var/uses = 10 var/uses = 10
/obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user) /obj/item/weapon/card/emag/resolve_attackby(atom/A, mob/user)
var/used_uses = A.emag_act(uses, user, src) var/used_uses = A.emag_act(uses, user)
if(used_uses < 0) if(used_uses < 0)
return ..(A, user) return ..(A, user)

View File

@@ -15,15 +15,7 @@
/* /*
* Soap * Soap
*/ */
/obj/item/weapon/soap/New() /obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
..()
create_reagents(5)
wet()
/obj/item/weapon/soap/proc/wet()
reagents.add_reagent("cleaner", 5)
/obj/item/weapon/soap/Crossed(AM as mob|obj)
if (istype(AM, /mob/living)) if (istype(AM, /mob/living))
var/mob/living/M = AM var/mob/living/M = AM
M.slip("the [src.name]",3) M.slip("the [src.name]",3)
@@ -40,10 +32,7 @@
else if(istype(target,/turf)) else if(istype(target,/turf))
user << "<span class='notice'>You scrub \the [target.name] clean.</span>" user << "<span class='notice'>You scrub \the [target.name] clean.</span>"
var/turf/T = target var/turf/T = target
T.clean(src, user) T.clean(src)
else if(istype(target,/obj/structure/sink))
user << "<span class='notice'>You wet \the [src] in the sink.</span>"
wet()
else else
user << "<span class='notice'>You clean \the [target.name].</span>" user << "<span class='notice'>You clean \the [target.name].</span>"
target.clean_blood() target.clean_blood()

View File

@@ -164,7 +164,7 @@
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1) playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers) for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to_obj(src, G.reagents.total_volume) G.reagents.trans_to(src, G.reagents.total_volume)
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents. if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()

View File

@@ -6,7 +6,6 @@
name = "implant" name = "implant"
icon = 'icons/obj/device.dmi' icon = 'icons/obj/device.dmi'
icon_state = "implant" icon_state = "implant"
w_class = 1
var/implanted = null var/implanted = null
var/mob/imp_in = null var/mob/imp_in = null
var/obj/item/organ/external/part = null var/obj/item/organ/external/part = null

View File

@@ -38,20 +38,14 @@
if (reagents.total_volume > 0) if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user) if(M == user)
if(!M.can_eat(loaded))
return
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>") M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
else else
user.visible_message("<span class='warning'>\The [user] begins to feed \the [M]!</span>")
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
return
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>") 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) playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut() overlays.Cut()
return return
else 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 ..()
return
/obj/item/weapon/material/kitchen/utensil/fork /obj/item/weapon/material/kitchen/utensil/fork
name = "fork" name = "fork"
@@ -96,14 +90,14 @@
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50)) if ((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>You accidentally cut yourself with \the [src].</span>" user << "<span class='warning'>You accidentally cut yourself with the [src].</span>"
user.take_organ_damage(20) user.take_organ_damage(20)
return return
return ..() return ..()
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) /obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50)) if ((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>You somehow managed to cut yourself with \the [src].</span>" user << "<span class='warning'>You somehow managed to cut yourself with the [src].</span>"
user.take_organ_damage(20) user.take_organ_damage(20)
return return
return ..() return ..()
@@ -126,7 +120,7 @@
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob) /obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50)) if ((CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>" user << "<span class='warning'>The [src] slips out of your hand and hits your head.</span>"
user.take_organ_damage(10) user.take_organ_damage(10)
user.Paralyse(2) user.Paralyse(2)
return return

View File

@@ -14,7 +14,19 @@
/obj/item/weapon/mop/New() /obj/item/weapon/mop/New()
create_reagents(30) create_reagents(5)
//expects an atom containing the reagents used to clean the turf
/turf/proc/clean(atom/source)
if(source.reagents.has_reagent("water", 1))
clean_blood()
if(istype(src, /turf/simulated))
var/turf/simulated/T = src
T.dirt = 0
for(var/obj/effect/O in src)
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity) /obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return if(!proximity) return
@@ -28,7 +40,7 @@
if(do_after(user, 40)) if(do_after(user, 40))
var/turf/T = get_turf(A) var/turf/T = get_turf(A)
if(T) if(T)
T.clean(src, user) T.clean(src)
user << "<span class='notice'>You have finished mopping!</span>" user << "<span class='notice'>You have finished mopping!</span>"

View File

@@ -35,7 +35,7 @@
else else
user << "<span class='warning'>Access Denied</span>" user << "<span class='warning'>Access Denied</span>"
else if(istype(W, /obj/item/weapon/melee/energy/blade)) else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying.")) if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc) spark_system.set_up(5, 0, src.loc)
spark_system.start() spark_system.start()
@@ -55,7 +55,7 @@
..() ..()
return return
/obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "") /obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback = "", var/audible_feedback = "")
if(!broken) if(!broken)
if(visual_feedback) if(visual_feedback)
visual_feedback = "<span class='warning'>[visual_feedback]</span>" visual_feedback = "<span class='warning'>[visual_feedback]</span>"

View File

@@ -33,7 +33,7 @@
attackby(obj/item/weapon/W as obj, mob/user as mob) attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked) if(locked)
if (istype(W, /obj/item/weapon/melee/energy/blade) && emag_act(INFINITY, user, "You slice through the lock of \the [src]")) if (emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc) spark_system.set_up(5, 0, src.loc)
spark_system.start() spark_system.start()

View File

@@ -165,18 +165,19 @@
if(1) if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(src.loc) A.forceMove(src.loc)
A.ex_act(severity + 1) A.ex_act(severity++)
qdel(src) qdel(src)
if(2) if(2)
if(prob(50)) if(prob(50))
for (var/atom/movable/A as mob|obj in src) for (var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc) A.forceMove(src.loc)
A.ex_act(severity + 1) A.ex_act(severity++)
qdel(src) qdel(src)
if(3) if(3)
if(prob(5)) if(prob(5))
for(var/atom/movable/A as mob|obj in src) for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc) A.forceMove(src.loc)
A.ex_act(severity++)
qdel(src) qdel(src)
/obj/structure/closet/proc/damage(var/damage) /obj/structure/closet/proc/damage(var/damage)

View File

@@ -66,12 +66,11 @@
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
user.drop_item() user.drop_item()
if (W) W.forceMove(src.loc) if (W) W.forceMove(src.loc)
else if(W.GetID()) else if(istype(W, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = W.GetID()
if(src.broken) if(src.broken)
user << "<span class='warning'>It appears to be broken.</span>" user << "<span class='warning'>It appears to be broken.</span>"
return return
var/obj/item/weapon/card/id/I = W
if(!I || !I.registered_name) return if(!I || !I.registered_name) return
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name))) if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker //they can open all lockers, or nobody owns this, or they own this locker

View File

@@ -90,7 +90,7 @@
else else
togglelock(user) togglelock(user)
/obj/structure/closet/secure_closet/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "") /obj/structure/closet/secure_closet/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken) if(!broken)
broken = 1 broken = 1
locked = 0 locked = 0
@@ -100,11 +100,8 @@
if(visual_feedback) if(visual_feedback)
visible_message(visual_feedback, audible_feedback) visible_message(visual_feedback, audible_feedback)
else if(user && emag_source)
visible_message("<span class='warning'>\The [src] has been broken by \the [user] with \an [emag_source]!</span>", "You hear a faint electrical spark.")
else else
visible_message("<span class='warning'>\The [src] sparks and breaks open!</span>", "You hear a faint electrical spark.") visible_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", "You hear a faint electrical spark.")
return 1
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob) /obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user) src.add_fingerprint(user)

View File

@@ -135,7 +135,7 @@
return 1 return 1
if(is_full_window()) if(is_full_window())
return 0 //full tile window, you can't move into it! return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) & dir) if(get_dir(loc, target) == dir)
return !density return !density
else else
return 1 return 1
@@ -187,8 +187,8 @@
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
user.do_attack_animation(src) user.do_attack_animation(src)
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>", usr.visible_message("<span class='danger'>[usr.name] bangs against the [src.name]!</span>",
"<span class='danger'>You bang against \the [src]!</span>", "<span class='danger'>You bang against the [src.name]!</span>",
"You hear a banging sound.") "You hear a banging sound.")
else else
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
@@ -295,7 +295,7 @@
if(usr.incapacitated()) if(usr.incapacitated())
return 0 return 0
if(anchored) if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!" usr << "It is fastened to the floor therefore you can't rotate it!"
return 0 return 0

View File

@@ -217,20 +217,5 @@ var/const/enterloopsanity = 100
return 1 return 1
return 0 return 0
//expects an atom containing the reagents used to clean the turf
/turf/proc/clean(atom/source, mob/user)
if(source.reagents.has_reagent("water", 1) || source.reagents.has_reagent("cleaner", 1))
clean_blood()
if(istype(src, /turf/simulated))
var/turf/simulated/T = src
T.dirt = 0
for(var/obj/effect/O in src)
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
qdel(O)
else
user << "<span class='warning'>\The [source] is too dry to wash that.</span>"
source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
/turf/proc/update_blood_overlays() /turf/proc/update_blood_overlays()
return return

View File

@@ -108,7 +108,7 @@
log_ooc("(LOCAL) [mob.name]/[key] : [msg]") log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
var/mob/source = mob.get_looc_source() var/mob/source = mob.get_looc_source()
var/list/heard = get_mobs_or_objects_in_view(7, get_turf(source), 1, 0) var/list/heard = get_mobs_or_objects_in_view(7, source, 1, 0)
var/display_name = key var/display_name = key
if(holder && holder.fakekey) if(holder && holder.fakekey)

View File

@@ -31,7 +31,6 @@
if(held_item) if(held_item)
var/damagetype = held_item.suicide_act(src) var/damagetype = held_item.suicide_act(src)
if(damagetype) if(damagetype)
log_and_message_admins("[key_name(src)] commited suicide using \a [held_item]")
var/damage_mod = 1 var/damage_mod = 1
switch(damagetype) //Sorry about the magic numbers. switch(damagetype) //Sorry about the magic numbers.
//brute = 1, burn = 2, tox = 4, oxy = 8 //brute = 1, burn = 2, tox = 4, oxy = 8
@@ -71,7 +70,7 @@
updatehealth() updatehealth()
return return
log_and_message_admins("[key_name(src)] commited suicide")
viewers(src) << pick("<span class='danger'>[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.</span>", \ viewers(src) << pick("<span class='danger'>[src] is attempting to bite \his tongue off! It looks like \he's trying to commit suicide.</span>", \
"<span class='danger'>[src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.</span>", \ "<span class='danger'>[src] is jamming \his thumbs into \his eye sockets! It looks like \he's trying to commit suicide.</span>", \
"<span class='danger'>[src] is twisting \his own neck! It looks like \he's trying to commit suicide.</span>", \ "<span class='danger'>[src] is twisting \his own neck! It looks like \he's trying to commit suicide.</span>", \

View File

@@ -1315,7 +1315,7 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins)) if (!istype(src,/datum/admins))
src = usr.client.holder src = usr.client.holder
if (!istype(src,/datum/admins) || !check_rights(R_ADMIN)) if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!" usr << "Error: you are not an admin!"
return return
@@ -1323,31 +1323,17 @@ proc/admin_notice(var/message, var/rights)
usr << "Mode has not started." usr << "Mode has not started."
return return
log_and_message_admins("attempting to force mode autospawn.") message_admins("[key_name(usr)] attempting to force mode latespawn.")
ticker.mode.next_spawn = 0
ticker.mode.try_latespawn() ticker.mode.try_latespawn()
/datum/admins/proc/paralyze_mob(mob/living/H as mob)
set category = "Admin"
set name = "Toggle Paralyze"
set desc = "Paralyzes a player. Or unparalyses them."
var/msg
if(check_rights(R_ADMIN))
if (H.paralysis == 0)
H.paralysis = 8000
msg = "has paralyzed [key_name(H)]."
else
H.paralysis = 0
msg = "has unparalyzed [key_name(H)]."
log_and_message_admins(msg)
/datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob) /datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob)
set category = "Debug" set category = "Debug"
set name = "Set Telecrystals" set name = "Set Telecrystals"
set desc = "Allows admins to change telecrystals of a user." set desc = "Allows admins to change telecrystals of a user."
var/crystals var/crystals
if(check_rights(R_ADMIN)) if(check_rights(R_ADMIN))
crystals = input("Amount of telecrystals for [H.ckey]", crystals) as null|num crystals = input("Amount of telecrystals for [H.ckey]", crystals) as null|num
if (!isnull(crystals)) if (!isnull(crystals))
@@ -1356,4 +1342,19 @@ proc/admin_notice(var/message, var/rights)
message_admins(msg) message_admins(msg)
else else
usr << "You do not have access to this command." usr << "You do not have access to this command."
/datum/admins/proc/paralyze_mob(mob/living/H as mob)
set category = "Admin"
set name = "Toggle Paralyze"
set desc = "Paralyzes a player. Or unparalyses them."
var/msg
if(check_rights(R_ADMIN|R_MOD))
if (H.paralysis == 0)
H.paralysis = 8000
msg = "[key_name(usr)] has paralyzed [key_name(H)]."
else
H.paralysis = 0
msg = "[key_name(usr)] has unparalyzed [key_name(H)]."
message_admins(msg)

View File

@@ -132,6 +132,9 @@ var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_plant, /datum/admins/proc/spawn_plant,
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/ /datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
/client/proc/respawn_character, /client/proc/respawn_character,
/client/proc/FireLaser,
/client/proc/FireCannons,
/client/proc/ChangeIcarusPosition,
/client/proc/virus2_editor, /client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge /client/proc/spawn_chemdisp_cartridge
) )

View File

@@ -1681,8 +1681,13 @@
else else
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel") var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
if(choice=="Confirm") if(choice=="Confirm")
news_network.CreateFeedChannel(admincaster_feed_channel.channel_name, admincaster_signature, admincaster_feed_channel.locked, 1) var/datum/feed_channel/newChannel = new /datum/feed_channel
feedback_inc("newscaster_channels",1) //Adding channel to the global network newChannel.channel_name = src.admincaster_feed_channel.channel_name
newChannel.author = src.admincaster_signature
newChannel.locked = src.admincaster_feed_channel.locked
newChannel.is_admin_channel = 1
feedback_inc("newscaster_channels",1)
news_network.network_channels += newChannel //Adding channel to the global network
log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!") log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
src.admincaster_screen=5 src.admincaster_screen=5
src.access_news_network() src.access_news_network()

View File

@@ -296,4 +296,3 @@
if(pa.Find("right")) if(pa.Find("right"))
if(holder.throw_atom) if(holder.throw_atom)
holder.throw_atom.throw_at(object, 10, 1) holder.throw_atom.throw_at(object, 10, 1)
log_admin("[key_name(usr)] threw [holder.throw_atom] at [object]")

View File

@@ -0,0 +1,129 @@
/client/proc/FireLaser()
set name = "Fire the Icarus lasers"
set desc = "Fires a laser bolt at your position. You should only do this as a(n) (a)ghost"
set category = "Fun"
var/turf/target = get_turf(src.mob)
log_and_message_admins("has fired the Icarus point defense laser at [target.x]-[target.y]-[target.z]")
if(!src.holder)
src << "Only administrators may use this command."
return
Icarus_FireLaser(target)
/client/proc/FireCannons()
set name = "Fire the Icarus cannons"
set desc = "Fires an explosive missile at your position. You should only do this as a(n) (a)ghost."
set category = "Fun"
var/turf/target = get_turf(src.mob)
log_and_message_admins("has fired the Icarus main gun projectile at [target.x]-[target.y]-[target.z]")
if(!src.holder)
src << "Only administrators may use this command."
return
Icarus_FireCannon(target)
/client/proc/ChangeIcarusPosition()
set name = "Adjust Icarus Position"
set desc = "Lets you chose the position of the Icarus in regards to the map."
set category = "Fun"
log_and_message_admins("is changing the Icarus position.")
if(!src.holder)
src << "Only administrators may use this command."
return
Icarus_SetPosition(src)
var/icarus_position = SOUTH
proc/Icarus_FireLaser(var/turf/target)
// Find the world edge to fire from.
var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
var/x_off = x != target.x ? abs(target.x - x) : INFINITY
var/y_off = y != target.y ? abs(target.y - y) : INFINITY
// Get the minimum number of steps using the rise/run shit.
var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
// Now we can get the location of the start.
x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
var/turf/start = locate(x, y, target.z)
// should step down as:
// 1000, 500, 333, 250, 200, 167, 142, 125, 111, 100, 90
var/damage = 1000
for(var/i in 2 to 12)
var/obj/item/projectile/beam/in_chamber = new (start)
in_chamber.original = target
in_chamber.starting = start
in_chamber.silenced = 1
in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
in_chamber.damage = damage
in_chamber.kill_count = 500
in_chamber.process()
damage -= damage / i
sleep(-1)
// Let everyone know what hit them.
var/obj/item/projectile/beam/in_chamber = new (start)
in_chamber.original = target
in_chamber.starting = start
in_chamber.silenced = 0
in_chamber.yo = icarus_position & NORTH ? -1 : icarus_position & SOUTH ? 1 : 0
in_chamber.xo = icarus_position & EAST ? -1 : icarus_position & WEST ? 1 : 0
in_chamber.kill_count = 500
in_chamber.damage = 0
in_chamber.name = "point defense laser"
in_chamber.firer = "Icarus" // Never displayed, but we want this to display the hit message.
in_chamber.process()
proc/Icarus_FireCannon(var/turf/target)
// Find the world edge to fire from.
var/x = icarus_position & EAST ? world.maxx : icarus_position & WEST ? 1 : target.x
var/y = icarus_position & NORTH ? world.maxy : icarus_position & SOUTH ? 1 : target.y
var/x_off = x != target.x ? abs(target.x - x) : INFINITY
var/y_off = y != target.y ? abs(target.y - y) : INFINITY
// Get the minimum number of steps using the rise/run shit.
var/iterations = round(min(x_off, y_off)) - 14 // We cannot fire straight from the edge since teleport thing.
// Now we can get the location of the start.
x = target.x + (icarus_position & EAST ? iterations : icarus_position & WEST ? -iterations : 0)
y = target.y + (icarus_position & NORTH ? iterations : icarus_position & SOUTH ? -iterations : 0)
var/turf/start = locate(x, y, target.z)
// Now we find the corresponding turf on the other side of the level.
// Yeah, yeah. Overuse of the terinary operator. So sue me.
x = icarus_position & EAST ? 1 : icarus_position & WEST ? world.maxx : target.x
y = icarus_position & NORTH ? 1 : icarus_position & SOUTH ? world.maxy : target.y
x_off = x != target.x ? abs(target.x - x) : INFINITY
y_off = y != target.y ? abs(target.y - y) : INFINITY
iterations = round(min(x_off, y_off))
x = target.x + (icarus_position & EAST ? -iterations : icarus_position & WEST ? iterations : 0)
y = target.y + (icarus_position & NORTH ? -iterations : icarus_position & SOUTH ? iterations : 0)
target = locate(x, y, target.z)
// Finally fire the fucker.
var/obj/effect/meteor/projectile = new (start)
projectile.dest = target
projectile.name = "main gun projectile" // stealthy
projectile.hits = 6
// Make sure it travels
spawn(0)
walk_towards(projectile, projectile.dest, 1)
proc/Icarus_SetPosition(var/user)
var/global/list/directions = list("North" = 1, "North East" = 5, "East" = 4, "South East" = 6, "South" = 2, "South West" = 10, "West" = 8, "North West" = 9)
var/direction = input(user, "Where should the Icarus fire from?", "Icarus Comms") as null|anything in directions
if(!direction)
return
icarus_position = directions[direction]

View File

@@ -520,8 +520,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(! (C.stat & (BROKEN|NOPOWER) ) ) if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc ) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "'[command_name()] Update.'" P.name = "'[command_name()] Update.'"
P.info = replacetext(input, "\n", "<br/>") P.info = input
P.update_space(P.info)
P.update_icon() P.update_icon()
C.messagetitle.Add("[command_name()] Update") C.messagetitle.Add("[command_name()] Update")
C.messagetext.Add(P.info) C.messagetext.Add(P.info)

View File

@@ -158,7 +158,6 @@
spawn(5) // And wait a half-second, since it sounds like you can do this too fast. spawn(5) // And wait a half-second, since it sounds like you can do this too fast.
if(src) if(src)
winset(src, null, "command=\".configure graphics-hwmode off\"") winset(src, null, "command=\".configure graphics-hwmode off\"")
sleep(2) // wait a bit more, possibly fixes hardware mode not re-activating right
winset(src, null, "command=\".configure graphics-hwmode on\"") winset(src, null, "command=\".configure graphics-hwmode on\"")
log_client_to_db() log_client_to_db()

View File

@@ -368,4 +368,4 @@ datum/preferences
user << browse(dat, "window=saves;size=300x390") user << browse(dat, "window=saves;size=300x390")
/datum/preferences/proc/close_load_dialog(mob/user) /datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves") user << browse(null, "window=saves")

View File

@@ -25,7 +25,7 @@ var/global/list/home_system_choices = list(
"Vir", "Vir",
"Nyx", "Nyx",
"Tau Ceti", "Tau Ceti",
"Epsilon Ursae Minoris", "Epsilon Ursae Majoris",
"S'randarr" "S'randarr"
) )

View File

@@ -18,17 +18,7 @@ var/global/list/gear_datums = list()
//create a list of gear datums to sort //create a list of gear datums to sort
for(var/type in typesof(/datum/gear)-/datum/gear) for(var/type in typesof(/datum/gear)-/datum/gear)
var/datum/gear/G = type var/datum/gear/G = new type()
if(!initial(G.display_name))
error("Loadout - Missing display name: [G]")
continue
if(!initial(G.cost))
error("Loadout - Missing cost: [G]")
continue
if(!initial(G.path))
error("Loadout - Missing path definition: [G]")
continue
G = new G()
var/category = (G.sort_category in sort_categories)? G.sort_category : "unknown" var/category = (G.sort_category in sort_categories)? G.sort_category : "unknown"
sort_categories[category][G.display_name] = G sort_categories[category][G.display_name] = G
@@ -220,7 +210,7 @@ var/global/list/gear_datums = list()
cost = 1 cost = 1
slot = slot_head slot = slot_head
/datum/gear/bowler /datum/gear/bowler
display_name = "hat, bowler" display_name = "hat, bowler"
path = /obj/item/clothing/head/bowler path = /obj/item/clothing/head/bowler
cost = 1 cost = 1
@@ -601,7 +591,7 @@ var/global/list/gear_datums = list()
cost = 1 cost = 1
allowed_roles = list("Quartermaster","Cargo Technician") allowed_roles = list("Quartermaster","Cargo Technician")
/datum/gear/pants /datum/gear/white
display_name = "pants, white" display_name = "pants, white"
path = /obj/item/clothing/under/pants/white path = /obj/item/clothing/under/pants/white
slot = slot_w_uniform slot = slot_w_uniform
@@ -651,55 +641,55 @@ var/global/list/gear_datums = list()
display_name = "pants, young folks jeans" display_name = "pants, young folks jeans"
path = /obj/item/clothing/under/pants/youngfolksjeans path = /obj/item/clothing/under/pants/youngfolksjeans
/datum/gear/jeans /datum/gear/shorts/jeans
display_name = "shorts, jeans" display_name = "shorts, jeans"
path = /obj/item/clothing/under/shorts/jeans path = /obj/item/clothing/under/shorts/jeans
slot = slot_w_uniform slot = slot_w_uniform
cost = 1 cost = 1
/datum/gear/jeans/classic /datum/gear/shorts/jeans/classic
display_name = "shorts, classic jeans" display_name = "shorts, classic jeans"
path = /obj/item/clothing/under/shorts/jeans/classic path = /obj/item/clothing/under/shorts/jeans/classic
/datum/gear/jeans/mustang /datum/gear/shorts/jeans/mustang
display_name = "shorts, mustang jeans" display_name = "shorts, mustang jeans"
path = /obj/item/clothing/under/shorts/jeans/mustang path = /obj/item/clothing/under/shorts/jeans/mustang
/datum/gear/jeans/youngfolks /datum/gear/shorts/jeans/youngfolks
display_name = "shorts, young folks jeans" display_name = "shorts, young folks jeans"
path = /obj/item/clothing/under/shorts/jeans/youngfolks path = /obj/item/clothing/under/shorts/jeans/youngfolks
/datum/gear/jeans/black /datum/gear/shorts/jeans/black
display_name = "shorts, black jeans" display_name = "shorts, black jeans"
path = /obj/item/clothing/under/shorts/jeans/black path = /obj/item/clothing/under/shorts/jeans/black
/datum/gear/jeans/female /datum/gear/shorts/jeans/female
display_name = "shorts, female, jeans" display_name = "shorts, female, jeans"
path = /obj/item/clothing/under/shorts/jeans/female path = /obj/item/clothing/under/shorts/jeans/female
/datum/gear/jeans/classic/female /datum/gear/shorts/jeans/classic/female
display_name = "shorts, female, classic jeans" display_name = "shorts, female, classic jeans"
path = /obj/item/clothing/under/shorts/jeans/classic/female path = /obj/item/clothing/under/shorts/jeans/classic/female
/datum/gear/jeans/mustang/female /datum/gear/shorts/jeans/mustang/female
display_name = "shorts, female, mustang jeans" display_name = "shorts, female, mustang jeans"
path = /obj/item/clothing/under/shorts/jeans/mustang/female path = /obj/item/clothing/under/shorts/jeans/mustang/female
/datum/gear/jeans/youngfolks/female /datum/gear/shorts/jeans/youngfolks/female
display_name = "shorts, female, young folks jeans" display_name = "shorts, female, young folks jeans"
path = /obj/item/clothing/under/shorts/jeans/youngfolks/female path = /obj/item/clothing/under/shorts/jeans/youngfolks/female
/datum/gear/jeans/black/female /datum/gear/shorts/jeans/black/female
display_name = "shorts, female, black jeans" display_name = "shorts, female, black jeans"
path = /obj/item/clothing/under/shorts/jeans/black/female path = /obj/item/clothing/under/shorts/jeans/black/female
/datum/gear/khaki /datum/gear/shorts/khaki
display_name = "shorts, khaki" display_name = "shorts, khaki"
path = /obj/item/clothing/under/shorts/khaki path = /obj/item/clothing/under/shorts/khaki
slot = slot_w_uniform slot = slot_w_uniform
cost = 1 cost = 1
/datum/gear/khaki/female /datum/gear/shorts/khaki/female
display_name = "shorts, female, khaki" display_name = "shorts, female, khaki"
path = /obj/item/clothing/under/shorts/khaki/female path = /obj/item/clothing/under/shorts/khaki/female
@@ -1258,7 +1248,7 @@ var/global/list/gear_datums = list()
slot = slot_wear_suit slot = slot_wear_suit
whitelisted = "Tajara" // You do have a monopoly on a fur suit tho whitelisted = "Tajara" // You do have a monopoly on a fur suit tho
/datum/gear/forensics /datum/gear/forensics/red
display_name = "forensics long, red" display_name = "forensics long, red"
path = /obj/item/clothing/suit/storage/forensics/red/long path = /obj/item/clothing/suit/storage/forensics/red/long
cost = 2 cost = 2
@@ -1662,11 +1652,11 @@ var/global/list/gear_datums = list()
display_name = "skrell headtail-wear, male, blue, cloth" display_name = "skrell headtail-wear, male, blue, cloth"
path = /obj/item/clothing/ears/skrell/cloth_male/blue path = /obj/item/clothing/ears/skrell/cloth_male/blue
/datum/gear/skrell_cloth/male/green /datum/gear/skrell_cloth_male/green
display_name = "skrell headtail-wear, male, green, cloth" display_name = "skrell headtail-wear, male, green, cloth"
path = /obj/item/clothing/ears/skrell/cloth_male/green path = /obj/item/clothing/ears/skrell/cloth_male/green
/datum/gear/skrell_cloth/male/pink /datum/gear/skrell_cloth_male/pink
display_name = "skrell headtail-wear, male, pink, cloth" display_name = "skrell headtail-wear, male, pink, cloth"
path = /obj/item/clothing/ears/skrell/cloth_male/pink path = /obj/item/clothing/ears/skrell/cloth_male/pink
@@ -1674,18 +1664,18 @@ var/global/list/gear_datums = list()
display_name = "skrell headtail-wear, female, red, cloth" display_name = "skrell headtail-wear, female, red, cloth"
path = /obj/item/clothing/ears/skrell/cloth_female path = /obj/item/clothing/ears/skrell/cloth_female
/datum/gear/skrell_cloth/female/black /datum/gear/skrell_cloth_female/black
display_name = "skrell headtail-wear, female, black, cloth" display_name = "skrell headtail-wear, female, black, cloth"
path = /obj/item/clothing/ears/skrell/cloth_female/black path = /obj/item/clothing/ears/skrell/cloth_female/black
/datum/gear/skrell_cloth/female/blue /datum/gear/skrell_cloth_female/blue
display_name = "skrell headtail-wear, female, blue, cloth" display_name = "skrell headtail-wear, female, blue, cloth"
path = /obj/item/clothing/ears/skrell/cloth_female/blue path = /obj/item/clothing/ears/skrell/cloth_female/blue
/datum/gear/skrell_cloth/female/green /datum/gear/skrell_cloth_female/green
display_name = "skrell headtail-wear, female, green, cloth" display_name = "skrell headtail-wear, female, green, cloth"
path = /obj/item/clothing/ears/skrell/cloth_female/green path = /obj/item/clothing/ears/skrell/cloth_female/green
/datum/gear/skrell_cloth/female/pink /datum/gear/skrell_cloth_female/pink
display_name = "skrell headtail-wear, female, pink, cloth" display_name = "skrell headtail-wear, female, pink, cloth"
path = /obj/item/clothing/ears/skrell/cloth_female/pink path = /obj/item/clothing/ears/skrell/cloth_female/pink

View File

@@ -90,4 +90,4 @@
return 1 return 1
#undef SAVEFILE_VERSION_MAX #undef SAVEFILE_VERSION_MAX
#undef SAVEFILE_VERSION_MIN #undef SAVEFILE_VERSION_MIN

View File

@@ -38,7 +38,6 @@
interface_desc = "A self-sustaining plasma arc capable of cutting through walls." interface_desc = "A self-sustaining plasma arc capable of cutting through walls."
suit_overlay_active = "plasmacutter" suit_overlay_active = "plasmacutter"
suit_overlay_inactive = "plasmacutter" suit_overlay_inactive = "plasmacutter"
use_power_cost = 0.5
device_type = /obj/item/weapon/pickaxe/plasmacutter device_type = /obj/item/weapon/pickaxe/plasmacutter
@@ -59,7 +58,6 @@
interface_desc = "A diamond-tipped industrial drill." interface_desc = "A diamond-tipped industrial drill."
suit_overlay_active = "mounted-drill" suit_overlay_active = "mounted-drill"
suit_overlay_inactive = "mounted-drill" suit_overlay_inactive = "mounted-drill"
use_power_cost = 0.1
device_type = /obj/item/weapon/pickaxe/diamonddrill device_type = /obj/item/weapon/pickaxe/diamonddrill

View File

@@ -1,6 +1,6 @@
/obj/item/clothing/head/helmet/space/rig/ert /obj/item/clothing/head/helmet/space/rig/ert
light_overlay = "helmet_light_dual" light_overlay = "helmet_light_dual"
camera_networks = list(NETWORK_ERT) camera_networks = list("ERT")
/obj/item/weapon/rig/ert /obj/item/weapon/rig/ert
name = "ERT-C hardsuit control module" name = "ERT-C hardsuit control module"

View File

@@ -40,7 +40,7 @@
airtight = 0 airtight = 0
seal_delay = 5 //not being vaccum-proof has an upside I guess seal_delay = 5 //not being vaccum-proof has an upside I guess
helm_type = /obj/item/clothing/head/lightrig/hacker helm_type = /obj/item/clothing/head/lightrig/hacker
chest_type = /obj/item/clothing/suit/lightrig/hacker chest_type = /obj/item/clothing/suit/lightrig/hacker
glove_type = /obj/item/clothing/gloves/lightrig/hacker glove_type = /obj/item/clothing/gloves/lightrig/hacker

View File

@@ -1,23 +1,23 @@
/obj/item/clothing/head/helmet/space/rig/industrial /obj/item/clothing/head/helmet/space/rig/industrial
camera_networks = list(NETWORK_MINE) camera_networks = list("Mine")
/obj/item/clothing/head/helmet/space/rig/ce /obj/item/clothing/head/helmet/space/rig/ce
camera_networks = list(NETWORK_ENGINEERING) camera_networks = list("Engineering")
/obj/item/clothing/head/helmet/space/rig/eva /obj/item/clothing/head/helmet/space/rig/eva
light_overlay = "helmet_light_dual" light_overlay = "helmet_light_dual"
camera_networks = list(NETWORK_ENGINEERING) camera_networks = list("Engineering")
/obj/item/clothing/head/helmet/space/rig/hazmat /obj/item/clothing/head/helmet/space/rig/hazmat
light_overlay = "hardhat_light" light_overlay = "hardhat_light"
camera_networks = list(NETWORK_RESEARCH) camera_networks = list("Research")
/obj/item/clothing/head/helmet/space/rig/medical /obj/item/clothing/head/helmet/space/rig/medical
camera_networks = list(NETWORK_MEDICAL) camera_networks = list("Medbay")
/obj/item/clothing/head/helmet/space/rig/hazard /obj/item/clothing/head/helmet/space/rig/hazard
light_overlay = "helmet_light_dual" light_overlay = "helmet_light_dual"
camera_networks = list(NETWORK_SECURITY) camera_networks = list("Security")
/obj/item/weapon/rig/internalaffairs /obj/item/weapon/rig/internalaffairs
name = "augmented tie" name = "augmented tie"

View File

@@ -39,7 +39,6 @@
return return
name = "[seed.seed_name]" name = "[seed.seed_name]"
trash = seed.get_trash_type()
update_icon() update_icon()

View File

@@ -69,9 +69,6 @@
/datum/seed/proc/get_trait(var/trait) /datum/seed/proc/get_trait(var/trait)
return traits["[trait]"] return traits["[trait]"]
/datum/seed/proc/get_trash_type()
return trash_type
/datum/seed/proc/set_trait(var/trait,var/nval,var/ubound,var/lbound, var/degrade) /datum/seed/proc/set_trait(var/trait,var/nval,var/ubound,var/lbound, var/degrade)
if(!isnull(degrade)) nval *= degrade if(!isnull(degrade)) nval *= degrade
if(!isnull(ubound)) nval = min(nval,ubound) if(!isnull(ubound)) nval = min(nval,ubound)

View File

@@ -124,7 +124,7 @@
) )
/obj/machinery/portable_atmospherics/hydroponics/AltClick() /obj/machinery/portable_atmospherics/hydroponics/AltClick()
if(mechanical && !usr.incapacitated() && Adjacent(usr)) if(mechanical && !usr.stat && !usr.lying && Adjacent(usr))
close_lid(usr) close_lid(usr)
return 1 return 1
return ..() return ..()
@@ -357,15 +357,12 @@
set category = "Object" set category = "Object"
set src in view(1) set src in view(1)
if(usr.incapacitated()) if(labelled)
return usr << "You remove the label."
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) labelled = null
if(labelled) update_icon()
usr << "You remove the label." else
labelled = null usr << "There is no label to remove."
update_icon()
else
usr << "There is no label to remove."
return return
/obj/machinery/portable_atmospherics/hydroponics/verb/setlight() /obj/machinery/portable_atmospherics/hydroponics/verb/setlight()
@@ -373,14 +370,10 @@
set category = "Object" set category = "Object"
set src in view(1) set src in view(1)
if(usr.incapacitated()) var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10)
return if(new_light)
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) tray_light = new_light
var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10) usr << "You set the tray to a light level of [tray_light] lumens."
if(new_light)
tray_light = new_light
usr << "You set the tray to a light level of [tray_light] lumens."
return
/obj/machinery/portable_atmospherics/hydroponics/proc/check_level_sanity() /obj/machinery/portable_atmospherics/hydroponics/proc/check_level_sanity()
//Make sure various values are sane. //Make sure various values are sane.
@@ -621,14 +614,12 @@
set name = "Toggle Tray Lid" set name = "Toggle Tray Lid"
set category = "Object" set category = "Object"
set src in view(1) set src in view(1)
if(usr.incapacitated()) close_lid(usr)
return
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot))
close_lid(usr)
return
/obj/machinery/portable_atmospherics/hydroponics/proc/close_lid(var/mob/living/user) /obj/machinery/portable_atmospherics/hydroponics/proc/close_lid(var/mob/living/user)
if(!user || user.stat || user.restrained())
return
closed_system = !closed_system closed_system = !closed_system
user << "You [closed_system ? "close" : "open"] the tray's lid." user << "You [closed_system ? "close" : "open"] the tray's lid."
update_icon() update_icon()

View File

@@ -11,7 +11,7 @@
recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]")
if(integrity>=50) if(integrity>=100)
recipes += new/datum/stack_recipe("[display_name] door", /obj/structure/simple_door, 10, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] door", /obj/structure/simple_door, 10, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
recipes += new/datum/stack_recipe("[display_name] barricade", /obj/structure/barricade, 5, time = 50, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] barricade", /obj/structure/barricade, 5, time = 50, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
recipes += new/datum/stack_recipe("[display_name] stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")

View File

@@ -571,7 +571,7 @@ var/list/name_to_material
name = "wood" name = "wood"
stack_type = /obj/item/stack/material/wood stack_type = /obj/item/stack/material/wood
icon_colour = "#824B28" icon_colour = "#824B28"
integrity = 50 integrity = 25
icon_base = "solid" icon_base = "solid"
explosion_resistance = 2 explosion_resistance = 2
shard_type = SHARD_SPLINTER shard_type = SHARD_SPLINTER

View File

@@ -151,8 +151,6 @@ Works together with spawning an observer, noted above.
ghost.can_reenter_corpse = can_reenter_corpse ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.timeofdeath //BS12 EDIT ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.key = key ghost.key = key
if(ghost.client)
ghost.client.time_died_as_mouse = ghost.timeofdeath
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing! ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost return ghost

View File

@@ -2,8 +2,9 @@
//m_type == 1 --> visual. //m_type == 1 --> visual.
//m_type == 2 --> audible //m_type == 2 --> audible
/mob/proc/custom_emote(var/m_type=1,var/message = null) /mob/proc/custom_emote(var/m_type=1,var/message = null)
if(stat || !use_me && usr == src) if(stat || !use_me && usr == src)
src << "You are unable to emote." usr << "You are unable to emote."
return return
var/muzzled = is_muzzled() var/muzzled = is_muzzled()

View File

@@ -103,34 +103,64 @@ var/list/slot_equipment_priority = list( \
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success. //Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(var/obj/item/W) /mob/proc/put_in_l_hand(var/obj/item/W)
if(lying || !istype(W)) if(lying) return 0
return 0 if(!istype(W)) return 0
return 1 if(!l_hand)
W.forceMove(src) //TODO: move to equipped?
l_hand = W
W.layer = 20 //TODO: move to equipped?
// l_hand.screen_loc = ui_lhand
W.equipped(src,slot_l_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_l_hand()
return 1
return 0
//Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success. //Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_r_hand(var/obj/item/W) /mob/proc/put_in_r_hand(var/obj/item/W)
if(lying || !istype(W)) if(lying) return 0
return 0 if(!istype(W)) return 0
return 1 if(!r_hand)
W.forceMove(src)
r_hand = W
W.layer = 20
// r_hand.screen_loc = ui_rhand
W.equipped(src,slot_r_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_r_hand()
return 1
return 0
//Puts the item into our active hand if possible. returns 1 on success. //Puts the item into our active hand if possible. returns 1 on success.
/mob/proc/put_in_active_hand(var/obj/item/W) /mob/proc/put_in_active_hand(var/obj/item/W)
return 0 // Moved to human procs because only they need to use hands. if(hand) return put_in_l_hand(W)
else return put_in_r_hand(W)
//Puts the item into our inactive hand if possible. returns 1 on success. //Puts the item into our inactive hand if possible. returns 1 on success.
/mob/proc/put_in_inactive_hand(var/obj/item/W) /mob/proc/put_in_inactive_hand(var/obj/item/W)
return 0 // As above. if(hand) return put_in_r_hand(W)
else return put_in_l_hand(W)
//Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success. //Puts the item our active hand if possible. Failing that it tries our inactive hand. Returns 1 on success.
//If both fail it drops it on the floor and returns 0. //If both fail it drops it on the floor and returns 0.
//This is probably the main one you need to know :) //This is probably the main one you need to know :)
/mob/proc/put_in_hands(var/obj/item/W) /mob/proc/put_in_hands(var/obj/item/W)
if(!W) if(!W) return 0
if(put_in_active_hand(W))
update_inv_l_hand()
update_inv_r_hand()
return 1
else if(put_in_inactive_hand(W))
update_inv_l_hand()
update_inv_r_hand()
return 1
else
W.forceMove(get_turf(src))
W.layer = initial(W.layer)
W.dropped()
return 0 return 0
W.forceMove(get_turf(src))
W.layer = initial(W.layer)
W.dropped()
return 0
// Removes an item from inventory and places it in the target atom. // Removes an item from inventory and places it in the target atom.
// If canremove or other conditions need to be checked then use unEquip instead. // If canremove or other conditions need to be checked then use unEquip instead.

View File

@@ -26,8 +26,6 @@
var/blood = 1 var/blood = 1
var/list/target_types = list() var/list/target_types = list()
var/maximum_search_range = 7
/mob/living/bot/cleanbot/New() /mob/living/bot/cleanbot/New()
..() ..()
get_targets() get_targets()
@@ -38,25 +36,6 @@
if(radio_controller) if(radio_controller)
radio_controller.add_object(listener, beacon_freq, filter = RADIO_NAVBEACONS) radio_controller.add_object(listener, beacon_freq, filter = RADIO_NAVBEACONS)
/mob/living/bot/cleanbot/proc/handle_target()
if(loc == target.loc)
if(!cleaning)
UnarmedAttack(target)
return 1
if(!path.len)
// spawn(0)
path = AStar(loc, target.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30, id = botcard)
if(!path)
custom_emote(2, "[src] can't reach the target and is giving up.")
target = null
path = list()
return
if(path.len)
step_to(src, path[1])
path -= path[1]
return 1
return
/mob/living/bot/cleanbot/Life() /mob/living/bot/cleanbot/Life()
..() ..()
@@ -67,7 +46,7 @@
return return
if(cleaning) if(cleaning)
return return
if(!screwloose && !oddbutton && prob(5)) if(!screwloose && !oddbutton && prob(5))
custom_emote(2, "makes an excited beeping booping sound!") custom_emote(2, "makes an excited beeping booping sound!")
@@ -83,64 +62,65 @@
spawn(600) spawn(600)
ignorelist -= gib ignorelist -= gib
// Find a target if(!target) // Find a target
for(var/obj/effect/decal/cleanable/D in view(7, src))
if(pulledby) // Don't wiggle if someone pulls you if(D in ignorelist)
patrol_path = list() continue
return for(var/T in target_types)
if(istype(D, T))
target = D
patrol_path = list()
var/found_spot if(!target) // No targets in range
search_loop: if(!should_patrol)
for(var/i=0, i <= maximum_search_range, i++)
for(var/obj/effect/decal/cleanable/D in view(i, src))
if(D in ignorelist)
continue
for(var/T in target_types)
if(istype(D, T))
patrol_path = list()
target = D
found_spot = handle_target()
if (found_spot)
break search_loop
else
target = null
continue // no need to check the other types
if(!found_spot && !target) // No targets in range
if(!patrol_path || !patrol_path.len)
if(!signal_sent || signal_sent > world.time + 200) // Waited enough or didn't send yet
var/datum/radio_frequency/frequency = radio_controller.return_frequency(beacon_freq)
if(!frequency)
return
closest_dist = 9999
next_dest = null
next_dest_loc = null
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = 1
signal.data = list("findbeakon" = "patrol")
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
signal_sent = world.time
else
if(next_dest)
next_dest_loc = listener.memorized[next_dest]
if(next_dest_loc)
patrol_path = AStar(loc, next_dest_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id = botcard, exclude = null)
signal_sent = 0
else
if(pulledby) // Don't wiggle if someone pulls you
patrol_path = list()
return return
if(patrol_path[1] == loc)
patrol_path -= patrol_path[1]
var/moved = step_towards(src, patrol_path[1])
if(moved)
patrol_path -= patrol_path[1]
if(!patrol_path || !patrol_path.len)
if(!signal_sent || signal_sent > world.time + 200) // Waited enough or didn't send yet
var/datum/radio_frequency/frequency = radio_controller.return_frequency(beacon_freq)
if(!frequency)
return
closest_dist = 9999
next_dest = null
next_dest_loc = null
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = 1
signal.data = list("findbeakon" = "patrol")
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
signal_sent = world.time
else
if(next_dest)
next_dest_loc = listener.memorized[next_dest]
if(next_dest_loc)
patrol_path = AStar(loc, next_dest_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id = botcard, exclude = null)
signal_sent = 0
else
if(pulledby) // Don't wiggle if someone pulls you
patrol_path = list()
return
if(patrol_path[1] == loc)
patrol_path -= patrol_path[1]
var/moved = step_towards(src, patrol_path[1])
if(moved)
patrol_path -= patrol_path[1]
if(target)
if(loc == target.loc)
if(!cleaning)
UnarmedAttack(target)
return
if(!path.len)
spawn(0)
path = AStar(loc, target.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30, id = botcard)
if(!path)
path = list()
return
if(path.len)
step_to(src, path[1])
path -= path[1]
return
/mob/living/bot/cleanbot/UnarmedAttack(var/obj/effect/decal/cleanable/D, var/proximity) /mob/living/bot/cleanbot/UnarmedAttack(var/obj/effect/decal/cleanable/D, var/proximity)
if(!..()) if(!..())
@@ -153,7 +133,7 @@
return return
cleaning = 1 cleaning = 1
custom_emote(2, "begins to clean up \the [D]") custom_emote(2, "begins to clean up the [D]")
update_icons() update_icons()
var/cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50 var/cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50
if(do_after(src, cleantime)) if(do_after(src, cleantime))
@@ -163,8 +143,6 @@
if(!D) if(!D)
return return
qdel(D) qdel(D)
if(D == target)
target = null
cleaning = 0 cleaning = 0
update_icons() update_icons()

View File

@@ -185,7 +185,7 @@
if(40 to INFINITY) if(40 to INFINITY)
status += "peeling away" status += "peeling away"
if(org.is_stump()) if(org.status & ORGAN_DESTROYED)
status += "MISSING" status += "MISSING"
if(org.status & ORGAN_MUTATED) if(org.status & ORGAN_MUTATED)
status += "weirdly shapen" status += "weirdly shapen"

View File

@@ -1,42 +1,53 @@
/mob/living/carbon/human/verb/give(var/mob/living/target in view(1)-usr) mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr)
set category = "IC" set category = "IC"
set name = "Give" set name = "Give"
if(!istype(target) || target.stat == 2 || usr.stat == 2|| target.client == null)
// TODO : Change to incapacitated() on merge.
if(usr.stat || usr.lying || usr.resting || usr.buckled)
return return
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null) var/obj/item/I
if(!usr.hand && usr.r_hand == null)
usr << "<span class='warning'>You don't have anything in your right hand to give to [target.name]</span>"
return return
if(usr.hand && usr.l_hand == null)
var/obj/item/I = usr.get_active_hand() usr << "<span class='warning'>You don't have anything in your left hand to give to [target.name]</span>"
return
if(usr.hand)
I = usr.l_hand
else if(!usr.hand)
I = usr.r_hand
if(!I) if(!I)
I = usr.get_inactive_hand()
if(!I)
usr << "<span class='warning'>You don't have anything in your hands to give to \the [target].</span>"
return return
if(target.r_hand == null || target.l_hand == null)
if(alert(target,"[usr] wants to give you \a [I]. Will you accept it?",,"No","Yes") == "No") switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No"))
target.visible_message("<span class='notice'>\The [usr] tried to hand \the [I] to \the [target], \ if("Yes")
but \the [target] didn't want it.</span>") if(!I)
return return
if(!Adjacent(usr))
if(!I) return usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
target << "<span class='warning'>[usr.name] moved too far away.</span>"
if(!Adjacent(target)) return
usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>" if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
target << "<span class='warning'>\The [usr] moved too far away.</span>" usr << "<span class='warning'>You need to keep the item in your active hand.</span>"
return target << "<span class='warning'>[usr.name] seem to have given up on giving \the [I.name] to you.</span>"
return
if(I.loc != usr || (usr.l_hand != I && usr.r_hand != I)) if(target.r_hand != null && target.l_hand != null)
usr << "<span class='warning'>You need to keep the item in your hands.</span>" target << "<span class='warning'>Your hands are full.</span>"
target << "<span class='warning'>\The [usr] seems to have given up on passing \the [I] to you.</span>" usr << "<span class='warning'>Their hands are full.</span>"
return return
else
if(target.r_hand != null && target.l_hand != null) usr.drop_item()
target << "<span class='warning'>Your hands are full.</span>" if(target.r_hand == null)
usr << "<span class='warning'>Their hands are full.</span>" target.r_hand = I
return else
target.l_hand = I
if(usr.unEquip(I)) I.loc = target
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea. I.layer = 20
target.visible_message("<span class='notice'>\The [usr] handed \the [I] to \the [target].</span>") I.add_fingerprint(target)
target.update_inv_l_hand()
target.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
target.visible_message("<span class='notice'>[usr.name] handed \the [I.name] to [target.name].</span>")
if("No")
target.visible_message("<span class='warning'>[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
else
usr << "<span class='warning'>[target.name]'s hands are full.</span>"

View File

@@ -251,12 +251,14 @@
msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg].</span>\n" msg += "<span class='deadsay'>[T.He] [T.is] [ssd_msg].</span>\n"
var/list/wound_flavor_text = list() var/list/wound_flavor_text = list()
var/list/is_destroyed = list()
var/list/is_bleeding = list() var/list/is_bleeding = list()
for(var/organ_tag in species.has_limbs) for(var/organ_tag in species.has_limbs)
var/list/organ_data = species.has_limbs[organ_tag] var/list/organ_data = species.has_limbs[organ_tag]
var/organ_descriptor = organ_data["descriptor"] var/organ_descriptor = organ_data["descriptor"]
is_destroyed["organ_descriptor"] = 1
var/obj/item/organ/external/E = organs_by_name[organ_tag] var/obj/item/organ/external/E = organs_by_name[organ_tag]
if(!E) if(!E)
@@ -264,11 +266,13 @@
else if(E.is_stump()) else if(E.is_stump())
wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be.</b></span>\n" wound_flavor_text["[organ_descriptor]"] = "<span class='warning'><b>[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be.</b></span>\n"
else else
is_destroyed["organ_descriptor"] = 0
continue continue
for(var/obj/item/organ/external/temp in organs) for(var/obj/item/organ/external/temp in organs)
if(temp) if(temp)
if(temp.status & ORGAN_DESTROYED) if(temp.status & ORGAN_DESTROYED)
is_destroyed["[temp.name]"] = 1
wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [temp.name].</b></span>\n" wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[T.He] [T.is] missing [T.his] [temp.name].</b></span>\n"
continue continue
if(!is_synth && temp.status & ORGAN_ROBOT) if(!is_synth && temp.status & ORGAN_ROBOT)

View File

@@ -305,7 +305,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name() /mob/living/carbon/human/proc/get_face_name()
var/obj/item/organ/external/head = get_organ(BP_HEAD) var/obj/item/organ/external/head = get_organ(BP_HEAD)
if(!head || head.disfigured || head.is_stump() || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible if(!head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown" return "Unknown"
return real_name return real_name
@@ -1357,55 +1357,6 @@
return 1 return 1
return 0 return 0
/mob/living/carbon/human/MouseDrop(var/atom/over_object)
var/mob/living/carbon/human/H = over_object
if(holder_type && a_intent == I_HELP && istype(H) && H == usr && H.a_intent == I_HELP && !issmall(H) && Adjacent(H))
get_scooped(H)
return
return ..()
//Puts the item into our active hand if possible. returns 1 on success.
/mob/living/carbon/human/put_in_active_hand(var/obj/item/W)
return (hand ? put_in_l_hand(W) : put_in_r_hand(W))
//Puts the item into our inactive hand if possible. returns 1 on success.
/mob/living/carbon/human/put_in_inactive_hand(var/obj/item/W)
return (hand ? put_in_r_hand(W) : put_in_l_hand(W))
/mob/living/carbon/human/put_in_hands(var/obj/item/W)
if(!W)
return 0
if(put_in_active_hand(W))
update_inv_l_hand()
update_inv_r_hand()
return 1
else if(put_in_inactive_hand(W))
update_inv_l_hand()
update_inv_r_hand()
return 1
else
return ..()
/mob/living/carbon/human/put_in_l_hand(var/obj/item/W)
if(!..() || l_hand)
return 0
W.forceMove(src)
l_hand = W
W.equipped(src,slot_l_hand)
W.add_fingerprint(src)
update_inv_l_hand()
return 1
/mob/living/carbon/human/put_in_r_hand(var/obj/item/W)
if(!..() || r_hand)
return 0
W.forceMove(src)
r_hand = W
W.equipped(src,slot_r_hand)
W.add_fingerprint(src)
update_inv_r_hand()
return 1
/mob/living/carbon/human/can_stand_overridden() /mob/living/carbon/human/can_stand_overridden()
if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1)) if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1))
// Actually missing a leg will screw you up. Everything else can be compensated for. // Actually missing a leg will screw you up. Everything else can be compensated for.

View File

@@ -138,7 +138,7 @@
var/hit_zone = H.zone_sel.selecting var/hit_zone = H.zone_sel.selecting
var/obj/item/organ/external/affecting = get_organ(hit_zone) var/obj/item/organ/external/affecting = get_organ(hit_zone)
if(!affecting || affecting.is_stump()) if(!affecting || affecting.is_stump() || (affecting.status & ORGAN_DESTROYED))
M << "<span class='danger'>They are missing that limb!</span>" M << "<span class='danger'>They are missing that limb!</span>"
return 1 return 1

View File

@@ -143,12 +143,6 @@ emp_act
for(var/obj/O in src) for(var/obj/O in src)
if(!O) continue if(!O) continue
O.emp_act(severity) O.emp_act(severity)
for(var/obj/item/organ/external/O in organs)
O.emp_act(severity)
for(var/obj/item/organ/I in O.internal_organs)
if(!(I.status & ORGAN_ROBOT))
continue
I.emp_act(severity)
..() ..()
@@ -166,7 +160,7 @@ emp_act
var/obj/item/organ/external/affecting = get_organ(target_zone) var/obj/item/organ/external/affecting = get_organ(target_zone)
if (!affecting || affecting.is_stump()) if (!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump())
user << "<span class='danger'>They are missing that limb!</span>" user << "<span class='danger'>They are missing that limb!</span>"
return 0 return 0

View File

@@ -1,37 +0,0 @@
#define HUMAN_EATING_NO_ISSUE 0
#define HUMAN_EATING_NO_MOUTH 1
#define HUMAN_EATING_BLOCKED_MOUTH 2
/mob/living/carbon/human/can_eat(var/food, var/feedback = 1)
var/list/status = can_eat_status()
if(status[1] == HUMAN_EATING_NO_ISSUE)
return 1
if(feedback)
if(status[1] == HUMAN_EATING_NO_MOUTH)
src << "Where do you intend to put \the [food]? You don't have a mouth!"
else if(status[1] == HUMAN_EATING_BLOCKED_MOUTH)
src << "<span class='warning'>\The [status[2]] is in the way!</span>"
return 0
/mob/living/carbon/human/can_force_feed(var/feeder, var/food, var/feedback = 1)
var/list/status = can_eat_status()
if(status[1] == HUMAN_EATING_NO_ISSUE)
return 1
if(feedback)
if(status[1] == HUMAN_EATING_NO_MOUTH)
feeder << "Where do you intend to put \the [food]? \The [src] doesn't have a mouth!"
else if(status[1] == HUMAN_EATING_BLOCKED_MOUTH)
feeder << "<span class='warning'>\The [status[2]] is in the way!</span>"
return 0
/mob/living/carbon/human/proc/can_eat_status()
if(!check_has_mouth())
return list(HUMAN_EATING_NO_MOUTH)
var/obj/item/blocked = check_mouth_coverage()
if(blocked)
return list(HUMAN_EATING_BLOCKED_MOUTH, blocked)
return list(HUMAN_EATING_NO_ISSUE)
#undef HUMAN_EATING_NO_ISSUE
#undef HUMAN_EATING_NO_MOUTH
#undef HUMAN_EATING_BLOCKED_MOUTH

View File

@@ -28,7 +28,7 @@
if(istype(buckled, /obj/structure/bed/chair/wheelchair)) if(istype(buckled, /obj/structure/bed/chair/wheelchair))
for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM)) for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM))
var/obj/item/organ/external/E = get_organ(organ_name) var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || E.is_stump()) if(!E || (E.status & ORGAN_DESTROYED))
tally += 4 tally += 4
if(E.status & ORGAN_SPLINTED) if(E.status & ORGAN_SPLINTED)
tally += 0.5 tally += 0.5
@@ -40,7 +40,7 @@
for(var/organ_name in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)) for(var/organ_name in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
var/obj/item/organ/external/E = get_organ(organ_name) var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || E.is_stump()) if(!E || (E.status & ORGAN_DESTROYED))
tally += 4 tally += 4
else if(E.status & ORGAN_SPLINTED) else if(E.status & ORGAN_SPLINTED)
tally += 0.5 tally += 0.5

View File

@@ -71,7 +71,7 @@
var/limb_pain var/limb_pain
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot")) for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = organs_by_name[limb_tag] var/obj/item/organ/external/E = organs_by_name[limb_tag]
if(!E || (E.status & (ORGAN_MUTATED|ORGAN_DEAD)) || E.is_stump()) //should just be !E.is_usable() here but dislocation screws that up. if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)))
stance_damage += 2 // let it fail even if just foot&leg stance_damage += 2 // let it fail even if just foot&leg
else if (E.is_malfunctioning()) else if (E.is_malfunctioning())
//malfunctioning only happens intermittently so treat it as a missing limb when it procs //malfunctioning only happens intermittently so treat it as a missing limb when it procs

View File

@@ -1,7 +1,15 @@
/* /*
Add fingerprints to items when we put them in our hands. Add fingerprints to items when we put them in our hands.
This saves us from having to call add_fingerprint() any time something is put in a human's hands programmatically. This saves us from having to call add_fingerprint() any time something is put in a human's hands programmatically.
*/ */
/mob/living/carbon/human/put_in_l_hand(var/obj/item/W)
. = ..()
if(.) W.add_fingerprint(src)
/mob/living/carbon/human/put_in_r_hand(var/obj/item/W)
. = ..()
if(.) W.add_fingerprint(src)
/mob/living/carbon/human/verb/quick_equip() /mob/living/carbon/human/verb/quick_equip()
set name = "quick-equip" set name = "quick-equip"
@@ -32,7 +40,7 @@ This saves us from having to call add_fingerprint() any time something is put in
/mob/living/carbon/human/proc/has_organ(name) /mob/living/carbon/human/proc/has_organ(name)
var/obj/item/organ/external/O = organs_by_name[name] var/obj/item/organ/external/O = organs_by_name[name]
return (O && !O.is_stump()) return (O && !(O.status & ORGAN_DESTROYED) && !O.is_stump())
/mob/living/carbon/human/proc/has_organ_for_slot(slot) /mob/living/carbon/human/proc/has_organ_for_slot(slot)
switch(slot) switch(slot)

View File

@@ -563,14 +563,7 @@
pl_effects() pl_effects()
break break
if(istype(get_turf(src), /turf/space)) if(!istype(get_turf(src), /turf/space)) //space is not meant to change your body temperature.
//Don't bother if the temperature drop is less than 0.1 anyways. Hopefully BYOND is smart enough to turn this constant expression into a constant
if(bodytemperature > (0.1 * HUMAN_HEAT_CAPACITY/(HUMAN_EXPOSED_SURFACE_AREA*STEFAN_BOLTZMANN_CONSTANT))**(1/4) + COSMIC_RADIATION_TEMPERATURE)
//Thermal radiation into space
var/heat_loss = HUMAN_EXPOSED_SURFACE_AREA * STEFAN_BOLTZMANN_CONSTANT * ((bodytemperature - COSMIC_RADIATION_TEMPERATURE)**4)
var/temperature_loss = heat_loss/HUMAN_HEAT_CAPACITY
bodytemperature -= temperature_loss
else
var/loc_temp = T0C var/loc_temp = T0C
if(istype(loc, /obj/mecha)) if(istype(loc, /obj/mecha))
var/obj/mecha/M = loc var/obj/mecha/M = loc
@@ -584,7 +577,7 @@
pressure_alert = 0 pressure_alert = 0
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
//Body temperature adjusts depending on surrounding atmosphere based on your thermal protection (convection) //Body temperature adjusts depending on surrounding atmosphere based on your thermal protection
var/temp_adj = 0 var/temp_adj = 0
if(loc_temp < bodytemperature) //Place is colder than we are if(loc_temp < bodytemperature) //Place is colder than we are
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
@@ -678,8 +671,6 @@
// We produce heat naturally. // We produce heat naturally.
if (species.passive_temp_gain) if (species.passive_temp_gain)
bodytemperature += species.passive_temp_gain bodytemperature += species.passive_temp_gain
if (species.body_temperature == null)
return //this species doesn't have metabolic thermoregulation
// Robolimbs cause overheating too. // Robolimbs cause overheating too.
if(robolimb_count) if(robolimb_count)
@@ -691,7 +682,7 @@
return //fuck this precision return //fuck this precision
if (on_fire) if (on_fire)
return //too busy for pesky metabolic regulation return //too busy for pesky convection
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects. if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up. if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
@@ -1246,7 +1237,7 @@
if(healths) if(healths)
if (analgesic > 100) if (analgesic > 100)
healths.icon_state = "health_numb" healths.icon_state = "health_health_numb"
else else
switch(hal_screwyhud) switch(hal_screwyhud)
if(1) healths.icon_state = "health6" if(1) healths.icon_state = "health6"
@@ -1262,6 +1253,8 @@
if(0 to 20) healths.icon_state = "health5" if(0 to 20) healths.icon_state = "health5"
else healths.icon_state = "health6" else healths.icon_state = "health6"
if(!seer)
see_invisible = SEE_INVISIBLE_LIVING
if(nutrition_icon) if(nutrition_icon)
switch(nutrition) switch(nutrition)
if(450 to INFINITY) nutrition_icon.icon_state = "nutrition0" if(450 to INFINITY) nutrition_icon.icon_state = "nutrition0"
@@ -1299,36 +1292,31 @@
if(260 to 280) bodytemp.icon_state = "temp-3" if(260 to 280) bodytemp.icon_state = "temp-3"
else bodytemp.icon_state = "temp-4" else bodytemp.icon_state = "temp-4"
else else
//TODO: precalculate all of this stuff when the species datum is created
var/base_temperature = species.body_temperature
if(base_temperature == null) //some species don't have a set metabolic temperature
base_temperature = (species.heat_level_1 + species.cold_level_1)/2
var/temp_step var/temp_step
if (bodytemperature >= base_temperature) if (bodytemperature >= species.body_temperature)
temp_step = (species.heat_level_1 - base_temperature)/4 temp_step = (species.heat_level_1 - species.body_temperature)/4
if (bodytemperature >= species.heat_level_1) if (bodytemperature >= species.heat_level_1)
bodytemp.icon_state = "temp4" bodytemp.icon_state = "temp4"
else if (bodytemperature >= base_temperature + temp_step*3) else if (bodytemperature >= species.body_temperature + temp_step*3)
bodytemp.icon_state = "temp3" bodytemp.icon_state = "temp3"
else if (bodytemperature >= base_temperature + temp_step*2) else if (bodytemperature >= species.body_temperature + temp_step*2)
bodytemp.icon_state = "temp2" bodytemp.icon_state = "temp2"
else if (bodytemperature >= base_temperature + temp_step*1) else if (bodytemperature >= species.body_temperature + temp_step*1)
bodytemp.icon_state = "temp1" bodytemp.icon_state = "temp1"
else else
bodytemp.icon_state = "temp0" bodytemp.icon_state = "temp0"
else if (bodytemperature < base_temperature) else if (bodytemperature < species.body_temperature)
temp_step = (base_temperature - species.cold_level_1)/4 temp_step = (species.body_temperature - species.cold_level_1)/4
if (bodytemperature <= species.cold_level_1) if (bodytemperature <= species.cold_level_1)
bodytemp.icon_state = "temp-4" bodytemp.icon_state = "temp-4"
else if (bodytemperature <= base_temperature - temp_step*3) else if (bodytemperature <= species.body_temperature - temp_step*3)
bodytemp.icon_state = "temp-3" bodytemp.icon_state = "temp-3"
else if (bodytemperature <= base_temperature - temp_step*2) else if (bodytemperature <= species.body_temperature - temp_step*2)
bodytemp.icon_state = "temp-2" bodytemp.icon_state = "temp-2"
else if (bodytemperature <= base_temperature - temp_step*1) else if (bodytemperature <= species.body_temperature - temp_step*1)
bodytemp.icon_state = "temp-1" bodytemp.icon_state = "temp-1"
else else
bodytemp.icon_state = "temp0" bodytemp.icon_state = "temp0"

View File

@@ -263,14 +263,18 @@
var/obj/item/organ/O = new limb_path(H) var/obj/item/organ/O = new limb_path(H)
organ_data["descriptor"] = O.name organ_data["descriptor"] = O.name
for(var/organ_tag in has_organ) for(var/organ in has_organ)
var/organ_type = has_organ[organ_tag] var/organ_type = has_organ[organ]
var/obj/item/organ/O = new organ_type(H,1) H.internal_organs_by_name[organ] = new organ_type(H,1)
if(organ_tag != O.organ_tag)
warning("[O.type] has a default organ tag \"[O.organ_tag]\" that differs from the species' organ tag \"[organ_tag]\". Updating organ_tag to match.")
O.organ_tag = organ_tag
H.internal_organs_by_name[organ_tag] = O
for(var/name in H.organs_by_name)
H.organs |= H.organs_by_name[name]
for(var/name in H.internal_organs_by_name)
H.internal_organs |= H.internal_organs_by_name[name]
for(var/obj/item/organ/O in (H.organs|H.internal_organs))
O.owner = H
/datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target) /datum/species/proc/hug(var/mob/living/carbon/human/H,var/mob/living/target)

View File

@@ -271,4 +271,3 @@
qdel(D) qdel(D)
H.visible_message("<span class='danger'>\The [H] splits apart with a wet slithering noise!</span>") H.visible_message("<span class='danger'>\The [H] splits apart with a wet slithering noise!</span>")

View File

@@ -29,11 +29,11 @@ var/global/list/sparring_attack_cache = list()
// Check if they have a functioning hand. // Check if they have a functioning hand.
var/obj/item/organ/external/E = user.organs_by_name["l_hand"] var/obj/item/organ/external/E = user.organs_by_name["l_hand"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
E = user.organs_by_name["r_hand"] E = user.organs_by_name["r_hand"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
return 0 return 0
@@ -181,11 +181,11 @@ var/global/list/sparring_attack_cache = list()
return 0 return 0
var/obj/item/organ/external/E = user.organs_by_name["l_foot"] var/obj/item/organ/external/E = user.organs_by_name["l_foot"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
E = user.organs_by_name["r_foot"] E = user.organs_by_name["r_foot"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
return 0 return 0
@@ -225,11 +225,11 @@ var/global/list/sparring_attack_cache = list()
if(target.grabbed_by == user && target.lying) if(target.grabbed_by == user && target.lying)
return 0 return 0
var/obj/item/organ/external/E = user.organs_by_name["l_foot"] var/obj/item/organ/external/E = user.organs_by_name["l_foot"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
E = user.organs_by_name["r_foot"] E = user.organs_by_name["r_foot"]
if(E && !E.is_stump()) if(E && !(E.status & ORGAN_DESTROYED))
return 1 return 1
return 0 return 0

View File

@@ -187,10 +187,9 @@ var/global/list/damage_icon_parts = list()
for(var/obj/item/organ/external/O in organs) for(var/obj/item/organ/external/O in organs)
if(O.is_stump()) if(O.is_stump())
continue continue
//if(O.status & ORGAN_DESTROYED) damage_appearance += "d" //what is this? if(O.status & ORGAN_DESTROYED) damage_appearance += "d"
//else else
// damage_appearance += O.damage_state damage_appearance += O.damage_state
damage_appearance += O.damage_state
if(damage_appearance == previous_damage_appearance) if(damage_appearance == previous_damage_appearance)
// nothing to do here // nothing to do here
@@ -206,21 +205,21 @@ var/global/list/damage_icon_parts = list()
for(var/obj/item/organ/external/O in organs) for(var/obj/item/organ/external/O in organs)
if(O.is_stump()) if(O.is_stump())
continue continue
if(!(O.status & ORGAN_DESTROYED))
O.update_icon()
if(O.damage_state == "00") continue
var/use_colour = ((O.status & ORGAN_ROBOT) ? SYNTH_BLOOD_COLOUR : O.species.get_blood_colour(src))
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[use_colour]/[species.get_bodytype()]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
DI.Blend(use_colour, ICON_MULTIPLY)
damage_icon_parts[cache_index] = DI
else
DI = damage_icon_parts[cache_index]
standing_image.overlays += DI
O.update_icon()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.get_bodytype()]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
DI.Blend(species.blood_color, ICON_MULTIPLY)
damage_icon_parts[cache_index] = DI
else
DI = damage_icon_parts[cache_index]
standing_image.overlays += DI
overlays_standing[DAMAGE_LAYER] = standing_image overlays_standing[DAMAGE_LAYER] = standing_image
@@ -262,7 +261,7 @@ var/global/list/damage_icon_parts = list()
for(var/organ_tag in species.has_limbs) for(var/organ_tag in species.has_limbs)
var/obj/item/organ/external/part = organs_by_name[organ_tag] var/obj/item/organ/external/part = organs_by_name[organ_tag]
if(isnull(part) || part.is_stump()) if(isnull(part) || part.is_stump() || (part.status & ORGAN_DESTROYED))
icon_key += "0" icon_key += "0"
else if(part.status & ORGAN_ROBOT) else if(part.status & ORGAN_ROBOT)
icon_key += "2[part.model ? "-[part.model]": ""]" icon_key += "2[part.model ? "-[part.model]": ""]"
@@ -354,7 +353,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[HAIR_LAYER] = null overlays_standing[HAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD) var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD)
if(!head_organ || head_organ.is_stump() ) if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons() if(update_icons) update_icons()
return return

View File

@@ -11,7 +11,6 @@
origin_tech = list(TECH_BIO = 4) origin_tech = list(TECH_BIO = 4)
var/Uses = 1 // uses before it goes inert var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before? var/enhanced = 0 //has it been enhanced before?
flags = OPENCONTAINER
attackby(obj/item/O as obj, mob/user as mob) attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/slimesteroid2)) if(istype(O, /obj/item/weapon/slimesteroid2))

View File

@@ -36,13 +36,11 @@
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1) bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= hurt_temperature) if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= die_temperature) if(bodytemperature <= 50) // sqrting negative numbers is bad
adjustToxLoss(200) adjustToxLoss(200)
else else
// could be more fancy, but doesn't worth the complexity: when the slimes goes into a cold area adjustToxLoss(round(sqrt(bodytemperature)) * 2)
// the damage is mostly determined by how fast its body cools
adjustToxLoss(30)
updatehealth() updatehealth()
@@ -531,4 +529,4 @@
return 0 return 0
/mob/living/carbon/slime/slip() //Can't slip something without legs. /mob/living/carbon/slime/slip() //Can't slip something without legs.
return 0 return 0

View File

@@ -49,9 +49,6 @@
var/SStun = 0 // NPC stun variable. Used to calm them down when they are attacked while feeding, or they will immediately re-attach var/SStun = 0 // NPC stun variable. Used to calm them down when they are attacked while feeding, or they will immediately re-attach
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while. The part about freeze gun is a lie var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while. The part about freeze gun is a lie
var/hurt_temperature = T0C-50 // slime keeps taking damage when its bodytemperature is below this
var/die_temperature = 50 // slime dies instantly when its bodytemperature is below this
///////////TIME FOR SUBSPECIES ///////////TIME FOR SUBSPECIES
var/colour = "grey" var/colour = "grey"

View File

@@ -166,6 +166,7 @@ var/list/ai_verbs_default = list(
spawn(5) spawn(5)
new /obj/machinery/ai_powersupply(src) new /obj/machinery/ai_powersupply(src)
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
@@ -207,23 +208,8 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/Destroy() /mob/living/silicon/ai/Destroy()
ai_list -= src ai_list -= src
qdel(eyeobj) qdel(eyeobj)
eyeobj = null ..()
qdel(psupply)
psupply = null
qdel(aiMulti)
aiMulti = null
qdel(aiRadio)
aiRadio = null
qdel(aiCamera)
aiCamera = null
return ..()
/mob/living/silicon/ai/proc/setup_icon() /mob/living/silicon/ai/proc/setup_icon()
var/file = file2text("config/custom_sprites.txt") var/file = file2text("config/custom_sprites.txt")
@@ -281,22 +267,20 @@ var/list/ai_verbs_default = list(
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null) /obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
powered_ai = ai powered_ai = ai
powered_ai.psupply = src powered_ai.psupply = src
forceMove(powered_ai.loc) if(isnull(powered_ai))
qdel(src)
..() loc = powered_ai.loc
use_power(1) // Just incase we need to wake up the power system. use_power(1) // Just incase we need to wake up the power system.
/obj/machinery/ai_powersupply/Destroy() ..()
. = ..()
powered_ai = null
/obj/machinery/ai_powersupply/process() /obj/machinery/ai_powersupply/process()
if(!powered_ai || powered_ai.stat == DEAD) if(!powered_ai || powered_ai.stat & DEAD)
qdel(src) qdel()
return return
if(powered_ai.psupply != src) // For some reason, the AI has different powersupply object. Delete this one, it's no longer needed. if(powered_ai.psupply != src) // For some reason, the AI has different powersupply object. Delete this one, it's no longer needed.
qdel(src) qdel(src)
return
if(powered_ai.APU_power) if(powered_ai.APU_power)
use_power = 0 use_power = 0
return return

View File

@@ -17,7 +17,7 @@
msg += "It looks slightly charred.\n" msg += "It looks slightly charred.\n"
else else
msg += "<B>Its casing is melted and heat-warped!</B>\n" msg += "<B>Its casing is melted and heat-warped!</B>\n"
if (src.getOxyLoss() && (aiRestorePowerRoutine != 0 && !APU_power)) if (src.getOxyLoss())
if (src.getOxyLoss() > 175) if (src.getOxyLoss() > 175)
msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.</B>\n" msg += "<B>It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.</B>\n"
else if(src.getOxyLoss() > 100) else if(src.getOxyLoss() > 100)

View File

@@ -146,13 +146,13 @@
/mob/living/silicon/robot/handle_regular_hud_updates() /mob/living/silicon/robot/handle_regular_hud_updates()
if (src.stat == 2 || (XRAY in mutations) || (src.sight_mode & BORGXRAY)) if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
src.sight |= SEE_TURFS src.sight |= SEE_TURFS
src.sight |= SEE_MOBS src.sight |= SEE_MOBS
src.sight |= SEE_OBJS src.sight |= SEE_OBJS
src.see_in_dark = 8 src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_MINIMUM src.see_invisible = SEE_INVISIBLE_MINIMUM
else if ((src.sight_mode & BORGMESON) && (src.sight_mode & BORGTHERM)) else if (src.sight_mode & BORGMESON && src.sight_mode & BORGTHERM)
src.sight |= SEE_TURFS src.sight |= SEE_TURFS
src.sight |= SEE_MOBS src.sight |= SEE_MOBS
src.see_in_dark = 8 src.see_in_dark = 8
@@ -161,10 +161,6 @@
src.sight |= SEE_TURFS src.sight |= SEE_TURFS
src.see_in_dark = 8 src.see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGMATERIAL)
src.sight |= SEE_OBJS
src.see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGTHERM) else if (src.sight_mode & BORGTHERM)
src.sight |= SEE_MOBS src.sight |= SEE_MOBS
src.see_in_dark = 8 src.see_in_dark = 8

View File

@@ -314,7 +314,6 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/device/pipe_painter(src) src.modules += new /obj/item/device/pipe_painter(src)
src.modules += new /obj/item/device/floor_painter(src) src.modules += new /obj/item/device/floor_painter(src)
src.modules += new /obj/item/weapon/gripper/no_use/loader(src)
var/datum/matter_synth/metal = new /datum/matter_synth/metal() var/datum/matter_synth/metal = new /datum/matter_synth/metal()
var/datum/matter_synth/plasteel = new /datum/matter_synth/plasteel() var/datum/matter_synth/plasteel = new /datum/matter_synth/plasteel()
@@ -567,7 +566,7 @@ var/global/list/robot_modules = list(
/obj/item/weapon/robot_module/miner/New() /obj/item/weapon/robot_module/miner/New()
src.modules += new /obj/item/device/flash(src) src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/material(src) src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/wrench(src) src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/screwdriver(src) src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/storage/bag/ore(src) src.modules += new /obj/item/weapon/storage/bag/ore(src)
@@ -678,7 +677,6 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/device/lightreplacer(src) src.modules += new /obj/item/device/lightreplacer(src)
src.modules += new /obj/item/weapon/gripper(src) src.modules += new /obj/item/weapon/gripper(src)
src.modules += new /obj/item/weapon/soap(src) src.modules += new /obj/item/weapon/soap(src)
src.modules += new /obj/item/weapon/gripper/no_use/loader(src)
src.modules += new /obj/item/weapon/extinguisher(src) src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/device/pipe_painter(src) src.modules += new /obj/item/device/pipe_painter(src)
src.modules += new /obj/item/device/floor_painter(src) src.modules += new /obj/item/device/floor_painter(src)

View File

@@ -74,7 +74,7 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/obj/item/organ/external/E = H.organs_by_name[BP_HEAD] var/obj/item/organ/external/E = H.organs_by_name[BP_HEAD]
if(!E || E.is_stump()) if(!E || (E.status & ORGAN_DESTROYED))
src << "\The [H] does not have a head!" src << "\The [H] does not have a head!"
if(!H.should_have_organ("brain")) if(!H.should_have_organ("brain"))

View File

@@ -14,68 +14,74 @@
//////////////////////////////Capturing//////////////////////////////////////////////////////// //////////////////////////////Capturing////////////////////////////////////////////////////////
/obj/item/device/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob) attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/human))//If target is not a human. if(!istype(M, /mob/living/carbon/human))//If target is not a human.
return ..() return ..()
if(istype(M, /mob/living/carbon/human/dummy)) if(istype(M, /mob/living/carbon/human/dummy))
return..() return..()
if(M.has_brain_worms()) //Borer stuff - RR if(M.has_brain_worms()) //Borer stuff - RR
user << "<span class='warning'>This being is corrupted by an alien intelligence and cannot be soul trapped.</span>" user << "<span class='warning'>This being is corrupted by an alien intelligence and cannot be soul trapped.</span>"
return..() return..()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>") M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>") user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
transfer_soul("VICTIM", M, user) transfer_soul("VICTIM", M, user)
return return
/*attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
return ..()
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
transfer_soul("SHADE", M, user)
return*/
///////////////////Options for using captured souls/////////////////////////////////////// ///////////////////Options for using captured souls///////////////////////////////////////
/obj/item/device/soulstone/attack_self(mob/user) attack_self(mob/user)
if (!in_range(src, user)) if (!in_range(src, user))
return return
user.set_machine(src) user.set_machine(src)
var/dat = "<TT><B>Soul Stone</B><BR>" var/dat = "<TT><B>Soul Stone</B><BR>"
for(var/mob/living/simple_animal/shade/A in src) for(var/mob/living/simple_animal/shade/A in src)
dat += "Captured Soul: [A.name]<br>" dat += "Captured Soul: [A.name]<br>"
dat += {"<A href='byond://?src=\ref[src];choice=Summon'>Summon Shade</A>"} dat += {"<A href='byond://?src=\ref[src];choice=Summon'>Summon Shade</A>"}
dat += "<br>" dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"} dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
user << browse(dat, "window=aicard") user << browse(dat, "window=aicard")
onclose(user, "aicard") onclose(user, "aicard")
return
/obj/item/device/soulstone/Topic(href, href_list)
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard")
U.unset_machine()
return return
add_fingerprint(U)
U.set_machine(src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
Topic(href, href_list)
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard") U << browse(null, "window=aicard")
U.unset_machine() U.unset_machine()
return return
if ("Summon") add_fingerprint(U)
for(var/mob/living/simple_animal/shade/A in src) U.set_machine(src)
A.status_flags &= ~GODMODE
A.canmove = 1 switch(href_list["choice"])//Now we switch based on choice.
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>" if ("Close")
A.forceMove(U.loc) U << browse(null, "window=aicard")
A.cancel_camera() U.unset_machine()
src.icon_state = "soulstone" return
attack_self(U)
if ("Summon")
for(var/mob/living/simple_animal/shade/A in src)
A.status_flags &= ~GODMODE
A.canmove = 1
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
A.loc = U.loc
A.cancel_camera()
src.icon_state = "soulstone"
attack_self(U)
///////////////////////////Transferring to constructs///////////////////////////////////////////////////// ///////////////////////////Transferring to constructs/////////////////////////////////////////////////////
/obj/structure/constructshell /obj/structure/constructshell
@@ -93,127 +99,118 @@
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob) /obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone)) if(istype(O, /obj/item/device/soulstone))
var/obj/item/device/soulstone/S = O; O.transfer_soul("CONSTRUCT",src,user)
S.transfer_soul("CONSTRUCT",src,user)
////////////////////////////Proc for moving soul in and out off stone////////////////////////////////////// ////////////////////////////Proc for moving soul in and out off stone//////////////////////////////////////
/obj/item/device/soulstone/proc/transfer_human(var/mob/living/carbon/human/T,var/mob/U)
if(!istype(T))
return;
if(src.imprinted != "empty")
U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
return
if ((T.health + T.halloss) > config.health_threshold_crit && T.stat != DEAD)
U << "<span class='danger'>Capture failed!</span>: Kill or maim the victim first!"
return
if(T.client == null)
U << "<span class='danger'>Capture failed!</span>: The soul has already fled it's mortal frame."
return
if(src.contents.len)
U << "<span class='danger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
return
for(var/obj/item/W in T)
T.drop_from_inventory(W)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = T
flick("dust-h", animation)
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = src //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
S.icon = T.icon
S.icon_state = T.icon_state
S.overlays = T.overlays
S.color = rgb(254,0,0)
S.alpha = 127
if (T.client)
T.client.mob = S
S.cancel_camera()
src.icon_state = "soulstone2" /obj/item/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
src.name = "Soul Stone: [S.real_name]"
S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
U << "<span class='notice'>Capture successful!</span> : [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
src.imprinted = "[S.name]"
qdel(T)
/obj/item/device/soulstone/proc/transfer_shade(var/mob/living/simple_animal/shade/T,var/mob/U)
if(!istype(T))
return;
if (T.stat == DEAD)
U << "<span class='danger'>Capture failed!</span>: The shade has already been banished!"
return
if(src.contents.len)
U << "<span class='danger'>Capture failed!</span>: The soul stone is full! Use or free an existing soul to make room."
return
if(T.name != src.imprinted)
U << "<span class='danger'>Capture failed!</span>: The soul stone has already been imprinted with [src.imprinted]'s mind!"
return
T.loc = src //put shade in stone
T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
src.icon_state = "soulstone2"
T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form"
U << "<span class='notice'>Capture successful!</span> : [T.name]'s has been recaptured and stored within the soul stone."
/obj/item/device/soulstone/proc/transfer_construct(var/obj/structure/constructshell/T,var/mob/U)
var/mob/living/simple_animal/shade/A = locate() in src
if(!A)
U << "<span class='danger'>Capture failed!</span>: The soul stone is empty! Go kill someone!"
return;
var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
switch(construct_class)
if("Juggernaut")
var/mob/living/simple_animal/construct/armoured/Z = new /mob/living/simple_animal/construct/armoured (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(src)
if("Wraith")
var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(src)
if("Artificer")
var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(src)
/obj/item/device/soulstone/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
switch(choice) switch(choice)
if("VICTIM") if("VICTIM")
transfer_human(target,U) var/mob/living/carbon/human/T = target
var/obj/item/device/soulstone/C = src
if(C.imprinted != "empty")
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
if ((T.health + T.halloss) > config.health_threshold_crit)
U << "\red <b>Capture failed!</b>: \black Kill or maim the victim first!"
else
if(T.client == null)
U << "\red <b>Capture failed!</b>: \black The soul has already fled it's mortal frame."
else
if(C.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
else
for(var/obj/item/W in T)
T.drop_from_inventory(W)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = T
flick("dust-h", animation)
qdel(animation)
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
S.loc = C //put shade in stone
S.status_flags |= GODMODE //So they won't die inside the stone somehow
S.canmove = 0//Can't move out of the soul stone
S.name = "Shade of [T.real_name]"
S.real_name = "Shade of [T.real_name]"
S.icon = T.icon
S.icon_state = T.icon_state
S.overlays = T.overlays
S.color = rgb(254,0,0)
S.alpha = 127
if (T.client)
T.client.mob = S
S.cancel_camera()
C.icon_state = "soulstone2"
C.name = "Soul Stone: [S.real_name]"
S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
U << "\blue <b>Capture successful!</b>: \black [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
C.imprinted = "[S.name]"
qdel(T)
if("SHADE") if("SHADE")
transfer_shade(target,U) var/mob/living/simple_animal/shade/T = target
var/obj/item/device/soulstone/C = src
if (T.stat == DEAD)
U << "\red <b>Capture failed!</b>: \black The shade has already been banished!"
else
if(C.contents.len)
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
else
if(T.name != C.imprinted)
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
T.loc = C //put shade in stone
T.status_flags |= GODMODE
T.canmove = 0
T.health = T.maxHealth
C.icon_state = "soulstone2"
T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form"
U << "\blue <b>Capture successful!</b>: \black [T.name]'s has been recaptured and stored within the soul stone."
if("CONSTRUCT") if("CONSTRUCT")
transfer_construct(target,U) var/obj/structure/constructshell/T = target
var/obj/item/device/soulstone/C = src
var/mob/living/simple_animal/shade/A = locate() in C
if(A)
var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
switch(construct_class)
if("Juggernaut")
var/mob/living/simple_animal/construct/armoured/Z = new /mob/living/simple_animal/construct/armoured (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(C)
if("Wraith")
var/mob/living/simple_animal/construct/wraith/Z = new /mob/living/simple_animal/construct/wraith (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(C)
if("Artificer")
var/mob/living/simple_animal/construct/builder/Z = new /mob/living/simple_animal/construct/builder (get_turf(T.loc))
Z.key = A.key
if(iscultist(U))
cult.add_antagonist(Z.mind)
qdel(T)
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.cancel_camera()
qdel(C)
else
U << "\red <b>Creation failed!</b>: \black The soul stone is empty! Go kill someone!"
return

View File

@@ -37,8 +37,7 @@
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri /mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone)) if(istype(O, /obj/item/device/soulstone))
var/obj/item/device/soulstone/S = O; O.transfer_soul("SHADE", src, user)
S.transfer_soul("SHADE", src, user)
return return
/mob/living/simple_animal/shade/proc/OnDeathInLife() /mob/living/simple_animal/shade/proc/OnDeathInLife()

View File

@@ -717,17 +717,17 @@
if(!TurfAdjacent(listed_turf)) if(!TurfAdjacent(listed_turf))
listed_turf = null listed_turf = null
else else
if(statpanel("Turf")) statpanel(listed_turf.name, null, listed_turf)
stat("\icon[listed_turf]", listed_turf.name) for(var/atom/A in listed_turf)
for(var/atom/A in listed_turf) if(!A.mouse_opacity)
if(!A.mouse_opacity) continue
continue if(A.invisibility > see_invisible)
if(A.invisibility > see_invisible) continue
continue if(is_type_in_list(A, shouldnt_see))
if(is_type_in_list(A, shouldnt_see)) continue
continue statpanel(listed_turf.name, null, A)
stat(A)
sleep(4) //Prevent updating the stat panel for the next .4 seconds, prevents clientside latency from updates
// facing verbs // facing verbs
/mob/proc/canface() /mob/proc/canface()

View File

@@ -3,7 +3,7 @@
var/obj/item/organ/external/E = H.get_organ(target_zone) var/obj/item/organ/external/E = H.get_organ(target_zone)
if(!E || E.is_stump()) if(!E || (E.status & ORGAN_DESTROYED))
user << "<span class='notice'>[H] is missing that bodypart.</span>" user << "<span class='notice'>[H] is missing that bodypart.</span>"
return return

Some files were not shown because too many files have changed in this diff Show More