Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/game/machinery/recharger.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/silicon/robot/robot.dm
	code/modules/mob/mob.dm
This commit is contained in:
PsiOmegaDelta
2015-07-20 08:28:32 +02:00
15 changed files with 4089 additions and 4132 deletions

View File

@@ -316,22 +316,6 @@
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
if (src.in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/living/carbon/proc/throw_mode_off()
src.in_throw_mode = 0
if(src.throw_icon) //in case we don't have the HUD and we use the hotkey
src.throw_icon.icon_state = "act_throw_off"
/mob/living/carbon/proc/throw_mode_on()
src.in_throw_mode = 1
if(src.throw_icon)
src.throw_icon.icon_state = "act_throw_on"
/mob/proc/throw_item(atom/target)
return

View File

@@ -486,7 +486,7 @@
// Enough to make us sleep as well
if(SA_pp > SA_sleep_min)
sleeping = min(sleeping+2, 10)
Sleeping(5)
// There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
else if(SA_pp > 0.15)

View File

@@ -0,0 +1,29 @@
//list(ckey = real_name,)
//Since the ckey is used as the icon_state, the current system will only permit a single custom robot sprite per ckey.
//While it might be possible for a ckey to use that custom sprite for several real_names, it seems rather pointless to support it.
var/list/robot_custom_icons
/hook/startup/proc/load_robot_custom_sprites()
var/config_file = file2text("config/custom_sprites.txt")
var/list/lines = text2list(config_file, "\n")
robot_custom_icons = list()
for(var/line in lines)
//split entry into ckey and real_name
var/split_idx = findtext(line, "-") //this works if ckey cannot contain dashes, and findtext starts from the beginning
if(!split_idx || split_idx == length(line))
continue //bad entry
var/ckey = copytext(line, 1, split_idx)
var/real_name = copytext(line, split_idx+1)
robot_custom_icons[ckey] = real_name
/mob/living/silicon/robot/proc/set_custom_sprite()
var/rname = robot_custom_icons[ckey]
if(rname && rname == real_name)
custom_sprite = 1
icon = 'icons/mob/custom-synthetic.dmi'
if(icon_state == "robot")
icon_state = "[ckey]-Standard"

View File

@@ -302,23 +302,7 @@
camera.c_tag = changed_name
if(!custom_sprite) //Check for custom sprite
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, "-")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry[1] == src.ckey && Entry[2] == src.real_name) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
icon = CUSTOM_ITEM_SYNTH
if(icon_state == "robot")
icon_state = "[src.ckey]-Standard"
set_custom_sprite()
//Flavour text.
if(client)

View File

@@ -1031,3 +1031,21 @@ mob/proc/yank_out_object()
/mob/proc/setEarDamage()
return
//Throwing stuff
/mob/proc/toggle_throw_mode()
if (src.in_throw_mode)
throw_mode_off()
else
throw_mode_on()
/mob/proc/throw_mode_off()
src.in_throw_mode = 0
if(src.throw_icon) //in case we don't have the HUD and we use the hotkey
src.throw_icon.icon_state = "act_throw_off"
/mob/proc/throw_mode_on()
src.in_throw_mode = 1
if(src.throw_icon)
src.throw_icon.icon_state = "act_throw_on"

View File

@@ -189,9 +189,7 @@
..()
spawn(2)
var/area/A = get_area(src)
if(A && !A.requires_power)
on = 1
on = has_power()
switch(fitting)
if("tube")
@@ -393,7 +391,7 @@
// true if area has power and lightswitch is on
/obj/machinery/light/proc/has_power()
var/area/A = src.loc.loc
return A.lightswitch && A.power_light
return A.lightswitch && (!A.requires_power || A.power_light)
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
if(flickering) return
@@ -565,8 +563,7 @@
// called when area power state changes
/obj/machinery/light/power_change()
spawn(10)
var/area/A = src.loc.loc
seton(A.lightswitch && A.power_light)
seton(has_power())
// called when on fire

View File

@@ -42,7 +42,6 @@
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/machinery/constructable_frame,
/obj/machinery/bunsen_burner,
/obj/machinery/radiocarbon_spectrometer
)

View File

@@ -1,59 +0,0 @@
/obj/machinery/bunsen_burner
name = "bunsen burner"
desc = "A flat, self-heating device designed for bringing chemical mixtures to boil."
icon = 'icons/obj/device.dmi'
icon_state = "bunsen0"
var/heating = 0 //whether the bunsen is turned on
var/heated = 0 //whether the bunsen has been on long enough to let stuff react
var/obj/item/weapon/reagent_containers/held_container
var/heat_time = 50
/obj/machinery/bunsen_burner/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/reagent_containers))
if(held_container)
user << "\red You must remove the [held_container] first."
else
held_container = W
user.drop_from_inventory(held_container, src)
user << "\blue You put the [held_container] onto the [src]."
var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
underlays += I
if(heating)
spawn(heat_time)
try_heating()
else
user << "\red You can't put the [W] onto the [src]."
/obj/machinery/bunsen_burner/attack_ai()
return
/obj/machinery/bunsen_burner/attack_hand(mob/user as mob)
if(held_container)
underlays = null
user << "\blue You remove the [held_container] from the [src]."
held_container.loc = src.loc
held_container.attack_hand(user)
held_container = null
else
user << "\red There is nothing on the [src]."
/obj/machinery/bunsen_burner/proc/try_heating()
src.visible_message("\blue \icon[src] [src] hisses.")
if(held_container && heating)
heated = 1
held_container.reagents.handle_reactions()
heated = 0
spawn(heat_time)
try_heating()
/obj/machinery/bunsen_burner/verb/toggle()
set src in view(1)
set name = "Toggle bunsen burner"
set category = "IC"
heating = !heating
icon_state = "bunsen[heating]"
if(heating)
spawn(heat_time)
try_heating()