mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 04:32:42 +00:00
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:
@@ -1288,6 +1288,7 @@
|
|||||||
#include "code\modules\mob\living\silicon\pai\software_modules.dm"
|
#include "code\modules\mob\living\silicon\pai\software_modules.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
|
#include "code\modules\mob\living\silicon\robot\analyzer.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\component.dm"
|
#include "code\modules\mob\living\silicon\robot\component.dm"
|
||||||
|
#include "code\modules\mob\living\silicon\robot\custom_sprites.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\death.dm"
|
#include "code\modules\mob\living\silicon\robot\death.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\emote.dm"
|
#include "code\modules\mob\living\silicon\robot\emote.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\examine.dm"
|
#include "code\modules\mob\living\silicon\robot\examine.dm"
|
||||||
@@ -1607,7 +1608,6 @@
|
|||||||
#include "code\modules\research\xenoarchaeology\machinery\geosample_scanner.dm"
|
#include "code\modules\research\xenoarchaeology\machinery\geosample_scanner.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\tools\ano_device_battery.dm"
|
#include "code\modules\research\xenoarchaeology\tools\ano_device_battery.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\tools\anomaly_suit.dm"
|
#include "code\modules\research\xenoarchaeology\tools\anomaly_suit.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\tools\bunsen_burner.dm"
|
|
||||||
#include "code\modules\research\xenoarchaeology\tools\gearbelt.dm"
|
#include "code\modules\research\xenoarchaeology\tools\gearbelt.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\tools\suspension_generator.dm"
|
#include "code\modules\research\xenoarchaeology\tools\suspension_generator.dm"
|
||||||
#include "code\modules\research\xenoarchaeology\tools\tools.dm"
|
#include "code\modules\research\xenoarchaeology\tools\tools.dm"
|
||||||
|
|||||||
@@ -80,8 +80,10 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(in_throw_mode)
|
if(in_throw_mode)
|
||||||
throw_item(A)
|
if(isturf(A) || isturf(A.loc))
|
||||||
return
|
throw_item(A)
|
||||||
|
return
|
||||||
|
throw_mode_off()
|
||||||
|
|
||||||
if(!istype(A,/obj/item/weapon/gun) && !isturf(A) && !istype(A,/obj/screen))
|
if(!istype(A,/obj/item/weapon/gun) && !isturf(A) && !istype(A,/obj/screen))
|
||||||
last_target_click = world.time
|
last_target_click = world.time
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
|||||||
|
|
||||||
var/debug = 0
|
var/debug = 0
|
||||||
var/requires_power = 1
|
var/requires_power = 1
|
||||||
var/unlimited_power = 0
|
|
||||||
var/always_unpowered = 0 //this gets overriden to 1 for space in area/New()
|
var/always_unpowered = 0 //this gets overriden to 1 for space in area/New()
|
||||||
|
|
||||||
var/power_equip = 1
|
var/power_equip = 1
|
||||||
@@ -349,7 +348,6 @@ area/space/atmosalert()
|
|||||||
name = "\improper Centcom"
|
name = "\improper Centcom"
|
||||||
icon_state = "centcom"
|
icon_state = "centcom"
|
||||||
requires_power = 0
|
requires_power = 0
|
||||||
unlimited_power = 1
|
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/centcom/control
|
/area/centcom/control
|
||||||
@@ -388,7 +386,6 @@ area/space/atmosalert()
|
|||||||
name = "\improper Mercenary Base"
|
name = "\improper Mercenary Base"
|
||||||
icon_state = "syndie-ship"
|
icon_state = "syndie-ship"
|
||||||
requires_power = 0
|
requires_power = 0
|
||||||
unlimited_power = 1
|
|
||||||
lighting_use_dynamic = 0
|
lighting_use_dynamic = 0
|
||||||
|
|
||||||
/area/syndicate_mothership/control
|
/area/syndicate_mothership/control
|
||||||
@@ -463,7 +460,6 @@ area/space/atmosalert()
|
|||||||
name = "\improper Independant Station"
|
name = "\improper Independant Station"
|
||||||
icon_state = "yellow"
|
icon_state = "yellow"
|
||||||
requires_power = 0
|
requires_power = 0
|
||||||
unlimited_power = 1
|
|
||||||
flags = RAD_SHIELDED
|
flags = RAD_SHIELDED
|
||||||
|
|
||||||
/area/syndicate_station/start
|
/area/syndicate_station/start
|
||||||
|
|||||||
@@ -106,18 +106,26 @@
|
|||||||
if(component_check)
|
if(component_check)
|
||||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
|
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
|
||||||
new_machine.component_parts.Cut()
|
|
||||||
|
if(new_machine.component_parts)
|
||||||
|
new_machine.component_parts.Cut()
|
||||||
|
else
|
||||||
|
new_machine.component_parts = list()
|
||||||
|
|
||||||
src.circuit.construct(new_machine)
|
src.circuit.construct(new_machine)
|
||||||
|
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
||||||
O.loc = new_machine
|
O.loc = new_machine
|
||||||
else
|
else
|
||||||
O.loc = null
|
O.loc = null
|
||||||
new_machine.component_parts += O
|
new_machine.component_parts += O
|
||||||
|
|
||||||
if(circuit.contain_parts)
|
if(circuit.contain_parts)
|
||||||
circuit.loc = new_machine
|
circuit.loc = new_machine
|
||||||
else
|
else
|
||||||
circuit.loc = null
|
circuit.loc = null
|
||||||
|
|
||||||
new_machine.RefreshParts()
|
new_machine.RefreshParts()
|
||||||
qdel(src)
|
qdel(src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
|||||||
user << "<span class='warning'>\A [charging] is already charging here.</span>"
|
user << "<span class='warning'>\A [charging] is already charging here.</span>"
|
||||||
return
|
return
|
||||||
// Checks to make sure he's not in space doing it, and that the area got proper power.
|
// Checks to make sure he's not in space doing it, and that the area got proper power.
|
||||||
var/area/a = get_area(src)
|
if(!powered())
|
||||||
if(!isarea(a) || (a.power_equip == 0 && !a.unlimited_power))
|
|
||||||
user << "<span class='warning'>The [name] blinks red as you try to insert the item!</span>"
|
user << "<span class='warning'>The [name] blinks red as you try to insert the item!</span>"
|
||||||
return
|
return
|
||||||
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
|
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
|
||||||
|
|||||||
@@ -316,22 +316,6 @@
|
|||||||
|
|
||||||
//Throwing stuff
|
//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)
|
/mob/proc/throw_item(atom/target)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -486,7 +486,7 @@
|
|||||||
|
|
||||||
// Enough to make us sleep as well
|
// Enough to make us sleep as well
|
||||||
if(SA_pp > SA_sleep_min)
|
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
|
// 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)
|
else if(SA_pp > 0.15)
|
||||||
|
|||||||
29
code/modules/mob/living/silicon/robot/custom_sprites.dm
Normal file
29
code/modules/mob/living/silicon/robot/custom_sprites.dm
Normal 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"
|
||||||
@@ -302,23 +302,7 @@
|
|||||||
camera.c_tag = changed_name
|
camera.c_tag = changed_name
|
||||||
|
|
||||||
if(!custom_sprite) //Check for custom sprite
|
if(!custom_sprite) //Check for custom sprite
|
||||||
var/file = file2text("config/custom_sprites.txt")
|
set_custom_sprite()
|
||||||
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"
|
|
||||||
|
|
||||||
//Flavour text.
|
//Flavour text.
|
||||||
if(client)
|
if(client)
|
||||||
|
|||||||
@@ -1031,3 +1031,21 @@ mob/proc/yank_out_object()
|
|||||||
|
|
||||||
/mob/proc/setEarDamage()
|
/mob/proc/setEarDamage()
|
||||||
return
|
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"
|
||||||
@@ -189,9 +189,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
spawn(2)
|
spawn(2)
|
||||||
var/area/A = get_area(src)
|
on = has_power()
|
||||||
if(A && !A.requires_power)
|
|
||||||
on = 1
|
|
||||||
|
|
||||||
switch(fitting)
|
switch(fitting)
|
||||||
if("tube")
|
if("tube")
|
||||||
@@ -393,7 +391,7 @@
|
|||||||
// true if area has power and lightswitch is on
|
// true if area has power and lightswitch is on
|
||||||
/obj/machinery/light/proc/has_power()
|
/obj/machinery/light/proc/has_power()
|
||||||
var/area/A = src.loc.loc
|
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))
|
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
if(flickering) return
|
if(flickering) return
|
||||||
@@ -565,8 +563,7 @@
|
|||||||
// called when area power state changes
|
// called when area power state changes
|
||||||
/obj/machinery/light/power_change()
|
/obj/machinery/light/power_change()
|
||||||
spawn(10)
|
spawn(10)
|
||||||
var/area/A = src.loc.loc
|
seton(has_power())
|
||||||
seton(A.lightswitch && A.power_light)
|
|
||||||
|
|
||||||
// called when on fire
|
// called when on fire
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
/obj/machinery/smartfridge/,
|
/obj/machinery/smartfridge/,
|
||||||
/obj/machinery/biogenerator,
|
/obj/machinery/biogenerator,
|
||||||
/obj/machinery/constructable_frame,
|
/obj/machinery/constructable_frame,
|
||||||
/obj/machinery/bunsen_burner,
|
|
||||||
/obj/machinery/radiocarbon_spectrometer
|
/obj/machinery/radiocarbon_spectrometer
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
|
||||||
4610
maps/exodus-1.dmm
4610
maps/exodus-1.dmm
File diff suppressed because it is too large
Load Diff
3434
maps/exodus-5.dmm
3434
maps/exodus-5.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user