mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport
Conflicts: code/ATMOSPHERICS/pipes.dm code/datums/organs/organ_external.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/events.dm code/game/gamemodes/events/ninja_equipment.dm code/game/hud.dm code/game/jobs/job/captain.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/recharger.dm code/game/objects/hud.dm code/game/turfs/turf.dm code/modules/client/client defines.dm code/modules/clothing/head/misc.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/under/miscellaneous.dm code/modules/mob/living/carbon/alien/humanoid/hud.dm code/modules/mob/living/carbon/human/hud.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/carbon/monkey/hud.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_helpers.dm code/modules/mob/mob_movement.dm code/modules/mob/screen.dm code/modules/paperwork/filingcabinet.dm code/modules/power/cable_heavyduty.dm code/modules/projectiles/guns/energy/temperature.dm code/setup.dm config/game_options.txt icons/mob/screen1_Midnight.dmi icons/mob/screen1_Orange.dmi icons/mob/screen1_alien.dmi icons/mob/screen1_old.dmi icons/obj/atmospherics/passive_gate.dmi icons/obj/pipe-item.dmi interface/interface.dm
This commit is contained in:
@@ -10,6 +10,10 @@ obj/machinery/atmospherics/binary/passive_gate
|
||||
var/on = 0
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
update_icon()
|
||||
if(node1&&node2)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
@@ -53,3 +57,132 @@ obj/machinery/atmospherics/binary/passive_gate
|
||||
|
||||
if(network2)
|
||||
network2.update = 1
|
||||
|
||||
|
||||
//Radio remote control
|
||||
|
||||
proc
|
||||
set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
|
||||
|
||||
broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.source = src
|
||||
|
||||
signal.data = list(
|
||||
"tag" = id,
|
||||
"device" = "AGP",
|
||||
"power" = on,
|
||||
"target_output" = target_pressure,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=\ref[src];set_press=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
|
||||
initialize()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
if("power" in signal.data)
|
||||
on = text2num(signal.data["power"])
|
||||
|
||||
if("power_toggle" in signal.data)
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = between(
|
||||
0,
|
||||
text2num(signal.data["set_output_pressure"]),
|
||||
ONE_ATMOSPHERE*50
|
||||
)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
return //do not update_icon
|
||||
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
|
||||
attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access denied."
|
||||
return
|
||||
usr.machine = src
|
||||
interact(user)
|
||||
return
|
||||
|
||||
Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
if(href_list["set_press"])
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
|
||||
src.target_pressure = max(0, min(4500, new_pressure))
|
||||
usr.machine = src
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (on)
|
||||
user << "\red You cannot unwrench this [src], turn it off first."
|
||||
return 1
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to unfasten \the [src]..."
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -26,11 +26,9 @@ obj/machinery/atmospherics/binary/pump
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/*
|
||||
attack_hand(mob/user)
|
||||
on = !on
|
||||
update_icon()
|
||||
*/
|
||||
on
|
||||
on = 1
|
||||
icon_state = "intact_on"
|
||||
|
||||
update_icon()
|
||||
if(node1&&node2)
|
||||
|
||||
@@ -16,8 +16,8 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
icon = 'icons/obj/atmospherics/volume_pump.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
name = "Gas pump"
|
||||
desc = "A pump"
|
||||
name = "Volumetric gas pump"
|
||||
desc = "A volumetric pump"
|
||||
|
||||
var/on = 0
|
||||
var/transfer_rate = 200
|
||||
@@ -26,6 +26,10 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
on
|
||||
on = 1
|
||||
icon_state = "intact_on"
|
||||
|
||||
update_icon()
|
||||
if(node1&&node2)
|
||||
icon_state = "intact_[on?("on"):("off")]"
|
||||
@@ -36,15 +40,23 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
icon_state = "exposed_2_off"
|
||||
else
|
||||
icon_state = "exposed_3_off"
|
||||
on = 0
|
||||
|
||||
return
|
||||
|
||||
process()
|
||||
// ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
// Pump mechanism just won't do anything if the pressure is too high/too low
|
||||
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
|
||||
if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
|
||||
return 1
|
||||
|
||||
var/transfer_ratio = max(1, transfer_rate/air1.volume)
|
||||
|
||||
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
|
||||
@@ -85,6 +97,17 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
|
||||
return 1
|
||||
|
||||
interact(mob/user as mob)
|
||||
var/dat = {"<b>Power: </b><a href='?src=\ref[src];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=\ref[src];set_transfer_rate=1'>Change</a>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src.name] control</TITLE></HEAD><TT>[dat]</TT>", "window=atmo_pump")
|
||||
onclose(user, "atmo_pump")
|
||||
|
||||
|
||||
|
||||
initialize()
|
||||
..()
|
||||
|
||||
@@ -115,3 +138,60 @@ obj/machinery/atmospherics/binary/volume_pump
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
|
||||
attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access denied."
|
||||
return
|
||||
usr.machine = src
|
||||
interact(user)
|
||||
return
|
||||
|
||||
Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
if(href_list["set_transfer_rate"])
|
||||
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
|
||||
src.transfer_rate = max(0, min(200, new_transfer_rate))
|
||||
usr.machine = src
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
user << "\red You cannot unwrench this [src], turn it off first."
|
||||
return 1
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to unfasten \the [src]..."
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -64,3 +64,26 @@
|
||||
partner.network.update = 1
|
||||
|
||||
return 1
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to unfasten \the [src]..."
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
@@ -8,7 +8,6 @@
|
||||
level = 1
|
||||
var/area_uid
|
||||
var/id_tag = null
|
||||
power_channel = ENVIRON
|
||||
|
||||
var/on = 0
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
@@ -29,6 +28,18 @@
|
||||
var/radio_filter_out
|
||||
var/radio_filter_in
|
||||
|
||||
on
|
||||
on = 1
|
||||
icon_state = "out"
|
||||
|
||||
siphon
|
||||
pump_direction = 0
|
||||
icon_state = "off"
|
||||
|
||||
on
|
||||
on = 1
|
||||
icon_state = "in"
|
||||
|
||||
New()
|
||||
var/area/A = get_area(loc)
|
||||
if (A.master)
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
return
|
||||
|
||||
power_change()
|
||||
if(powered(ENVIRON))
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
@@ -17,6 +17,10 @@ obj/machinery/atmospherics/valve
|
||||
var/datum/pipe_network/network_node1
|
||||
var/datum/pipe_network/network_node2
|
||||
|
||||
open
|
||||
open = 1
|
||||
icon_state = "valve1"
|
||||
|
||||
update_icon(animation)
|
||||
if(animation)
|
||||
flick("valve[src.open][!src.open]",src)
|
||||
|
||||
File diff suppressed because one or more lines are too long
7
code/WorkInProgress/carn/debug_locnull.dm
Normal file
7
code/WorkInProgress/carn/debug_locnull.dm
Normal file
@@ -0,0 +1,7 @@
|
||||
/client/verb/find_atoms_in_null()
|
||||
if(!holder) return
|
||||
var/msg
|
||||
for(var/atom/A)
|
||||
if(A.loc == null)
|
||||
msg += "\ref[A] [A.type] - [A]\n"
|
||||
world.log << msg
|
||||
@@ -75,12 +75,6 @@
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
var/organ_health_multiplier = 1
|
||||
var/organ_regeneration_multiplier = 1
|
||||
|
||||
var/bones_can_break = 0
|
||||
var/limbs_can_break = 0
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
var/revival_cloning = 1
|
||||
var/revival_brain_life = -1
|
||||
@@ -383,14 +377,6 @@
|
||||
config.metroid_delay = value
|
||||
if("animal_delay")
|
||||
config.animal_delay = value
|
||||
if("organ_health_multiplier")
|
||||
config.organ_health_multiplier = value / 100
|
||||
if("organ_regeneration_multiplier")
|
||||
config.organ_regeneration_multiplier = value / 100
|
||||
if("bones_can_break")
|
||||
config.bones_can_break = value
|
||||
if("limbs_can_break")
|
||||
config.limbs_can_break = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
@@ -512,7 +498,7 @@
|
||||
if (M.config_tag && M.config_tag == mode_name)
|
||||
return M
|
||||
del(M)
|
||||
return null
|
||||
return new /datum/game_mode/extended()
|
||||
|
||||
/datum/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
|
||||
@@ -244,6 +244,7 @@ client
|
||||
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='byond://?src=\ref[src];make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='byond://?src=\ref[src];drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='byond://?src=\ref[src];regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
@@ -546,6 +547,22 @@ client
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(MOB)
|
||||
|
||||
else if (href_list["make_skeleton"])
|
||||
if(!href_list["make_skeleton"])
|
||||
return
|
||||
var/mob/MOB = locate(href_list["make_skeleton"])
|
||||
if(!MOB)
|
||||
return
|
||||
if(!ismob(MOB))
|
||||
return
|
||||
if(!src.holder)
|
||||
return
|
||||
|
||||
if(ishuman(MOB))
|
||||
world << "derp"
|
||||
var/mob/living/carbon/human/HUMANMOB = MOB
|
||||
HUMANMOB.makeSkeleton()
|
||||
|
||||
else if (href_list["delall"])
|
||||
if(!href_list["delall"])
|
||||
return
|
||||
|
||||
@@ -1153,17 +1153,17 @@ datum/mind
|
||||
..()
|
||||
mind.assigned_role = "Shade"
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/mind_initialize()
|
||||
/mob/living/simple_animal/construct/builder/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Artificer"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/constructwraith/mind_initialize()
|
||||
/mob/living/simple_animal/construct/wraith/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Wraith"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/mind_initialize()
|
||||
/mob/living/simple_animal/construct/armoured/mind_initialize()
|
||||
..()
|
||||
mind.assigned_role = "Juggernaut"
|
||||
mind.special_role = "Cultist"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/datum/organ
|
||||
var/name = "organ"
|
||||
var/mob/living/carbon/human/owner = null
|
||||
var/mob/owner = null
|
||||
|
||||
///datum/organ/proc/process()
|
||||
// return 0
|
||||
@@ -8,8 +10,5 @@
|
||||
///datum/organ/proc/receive_chem(chemical as obj)
|
||||
// return 0
|
||||
|
||||
proc/process()
|
||||
return 0
|
||||
|
||||
proc/receive_chem(chemical as obj)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1,661 +1,142 @@
|
||||
/****************************************************
|
||||
EXTERNAL ORGANS
|
||||
****************************************************/
|
||||
/datum/organ/external
|
||||
name = "external"
|
||||
var/icon_name = null
|
||||
var/body_part = null
|
||||
|
||||
var/damage_state = "00"
|
||||
var/brutestate = 0
|
||||
var/burnstate = 0
|
||||
var/brute_dam = 0
|
||||
var/burn_dam = 0
|
||||
var/max_damage = 0
|
||||
var/max_size = 0
|
||||
var/tmp/list/obj/item/weapon/implant/implant
|
||||
|
||||
var/display_name
|
||||
var/list/wounds = list()
|
||||
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
|
||||
|
||||
var/tmp/perma_injury = 0
|
||||
var/tmp/perma_dmg = 0
|
||||
var/tmp/destspawn = 0 //Has it spawned the broken limb?
|
||||
var/tmp/amputated = 0 // Whether this has been cleanly amputated, thus causing no pain
|
||||
var/min_broken_damage = 30
|
||||
|
||||
var/datum/organ/external/parent
|
||||
var/list/datum/organ/external/children
|
||||
|
||||
var/damage_msg = "\red You feel an intense pain"
|
||||
|
||||
var/status = 0
|
||||
var/broken_description
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
|
||||
proc/take_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list())
|
||||
// TODO: this proc needs to be rewritten toa not update damages directly
|
||||
if((brute <= 0) && (burn <= 0))
|
||||
return 0
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
if(status & ORGAN_ROBOT)
|
||||
brute *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
burn *= 0.66 //~2/3 damage for ROBOLIMBS
|
||||
|
||||
//if(owner && !(status & ORGAN_ROBOT))
|
||||
// owner.pain(display_name, (brute+burn)*3, 1, burn > brute)
|
||||
|
||||
if(sharp)
|
||||
var/nux = brute * rand(10,15)
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if(prob(5 * brute))
|
||||
status |= ORGAN_DESTROYED
|
||||
droplimb()
|
||||
return
|
||||
|
||||
else if(prob(nux))
|
||||
createwound( CUT, brute )
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
owner << "You feel something wet on your [display_name]"
|
||||
|
||||
else if(brute > 20)
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if(prob(5 * brute))
|
||||
status |= ORGAN_DESTROYED
|
||||
droplimb()
|
||||
return
|
||||
|
||||
// If the limbs can break, make sure we don't exceed the maximum damage a limb can take before breaking
|
||||
if((brute_dam + burn_dam + brute + burn) < max_damage || !config.limbs_can_break)
|
||||
if(brute)
|
||||
brute_dam += brute
|
||||
if( (prob(brute*2) && !sharp) || sharp )
|
||||
createwound( CUT, brute )
|
||||
else if(!sharp)
|
||||
createwound( BRUISE, brute )
|
||||
if(burn)
|
||||
burn_dam += burn
|
||||
createwound( BURN, burn )
|
||||
else
|
||||
var/can_inflict = max_damage * config.organ_health_multiplier - (brute_dam + burn_dam) //How much damage can we actually cause?
|
||||
if(can_inflict)
|
||||
if (brute > 0 && burn > 0)
|
||||
brute = can_inflict/2
|
||||
burn = can_inflict/2
|
||||
var/ratio = brute / (brute + burn)
|
||||
brute_dam += ratio * can_inflict
|
||||
burn_dam += (1 - ratio) * can_inflict
|
||||
else
|
||||
if (brute > 0)
|
||||
brute = can_inflict
|
||||
brute_dam += brute
|
||||
createwound(BRUISE, brute)
|
||||
else
|
||||
burn = can_inflict
|
||||
burn_dam += burn
|
||||
createwound(BRUISE, brute)
|
||||
else if(!(status & ORGAN_ROBOT))
|
||||
var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have.
|
||||
var/list/datum/organ/external/possible_points = list()
|
||||
if(parent)
|
||||
possible_points += parent
|
||||
if(children)
|
||||
possible_points += children
|
||||
if(forbidden_limbs.len)
|
||||
possible_points -= forbidden_limbs
|
||||
if(!possible_points.len)
|
||||
message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!")
|
||||
else
|
||||
var/datum/organ/external/target = pick(possible_points)
|
||||
if(brute)
|
||||
target.take_damage(passed_dam, 0, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
target.take_damage(0, passed_dam, sharp, used_weapon, forbidden_limbs + src)
|
||||
else
|
||||
droplimb(1) //Robot limbs just kinda fail at full damage.
|
||||
|
||||
|
||||
if(status & ORGAN_BROKEN)
|
||||
owner.emote("scream")
|
||||
|
||||
owner.updatehealth()
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
|
||||
|
||||
proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||
if(status & ORGAN_ROBOT && !robo_repair)
|
||||
return
|
||||
|
||||
// heal damage on the individual wounds
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(brute == 0 && burn == 0)
|
||||
break
|
||||
|
||||
// heal brute damage
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute = W.heal_damage(brute)
|
||||
else if(W.damage_type == BURN)
|
||||
burn = W.heal_damage(burn)
|
||||
|
||||
// sync organ damage with wound damages
|
||||
update_damages()
|
||||
|
||||
if(internal)
|
||||
status &= ~ORGAN_BROKEN
|
||||
perma_injury = 0
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
owner.updatehealth()
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
proc/update_damages()
|
||||
number_wounds = 0
|
||||
brute_dam = 0
|
||||
burn_dam = 0
|
||||
status &= ~ORGAN_BLEEDING
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute_dam += W.damage
|
||||
else if(W.damage_type == BURN)
|
||||
burn_dam += W.damage
|
||||
|
||||
if(!W.bandaged && W.damage > 4)
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
number_wounds += W.amount
|
||||
|
||||
proc/update_wounds()
|
||||
for(var/datum/wound/W in wounds)
|
||||
// wounds can disappear after 10 minutes at the earliest
|
||||
if(W.damage == 0 && W.created + 10 * 10 * 60 <= world.time)
|
||||
wounds -= W
|
||||
// let the GC handle the deletion of the wound
|
||||
if(W.is_treated())
|
||||
// slow healing
|
||||
var/amount = 0.2
|
||||
if(W.bandaged) amount++
|
||||
if(W.salved) amount++
|
||||
if(W.disinfected) amount++
|
||||
// amount of healing is spread over all the wounds
|
||||
W.heal_damage((amount * W.amount * config.organ_regeneration_multiplier) / (5*owner.number_wounds+1))
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
|
||||
|
||||
proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
proc/get_damage_brute()
|
||||
return max(brute_dam+perma_injury, perma_injury)
|
||||
|
||||
proc/get_damage_fire()
|
||||
return burn_dam
|
||||
|
||||
process()
|
||||
// process wounds, doing healing etc., only do this every 4 ticks to save processing power
|
||||
if(owner.life_tick % 4 == 0)
|
||||
update_wounds()
|
||||
if(status & ORGAN_DESTROYED)
|
||||
if(!destspawn && config.limbs_can_break)
|
||||
droplimb()
|
||||
return
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_dmg = 0
|
||||
if(parent)
|
||||
if(parent.status & ORGAN_DESTROYED)
|
||||
status |= ORGAN_DESTROYED
|
||||
owner.update_body(1)
|
||||
return
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
owner.visible_message("\red You hear a loud cracking sound coming from \the [owner].","\red <b>Something feels like it shattered in your [display_name]!</b>","You hear a sickening crack.")
|
||||
owner.emote("scream")
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
return
|
||||
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
proc/damage_state_text()
|
||||
if(status & ORGAN_DESTROYED)
|
||||
return "--"
|
||||
|
||||
var/tburn = 0
|
||||
var/tbrute = 0
|
||||
|
||||
if(burn_dam ==0)
|
||||
tburn =0
|
||||
else if (burn_dam < (max_damage * 0.25 / 2))
|
||||
tburn = 1
|
||||
else if (burn_dam < (max_damage * 0.75 / 2))
|
||||
tburn = 2
|
||||
else
|
||||
tburn = 3
|
||||
|
||||
if (brute_dam == 0)
|
||||
tbrute = 0
|
||||
else if (brute_dam < (max_damage * 0.25 / 2))
|
||||
tbrute = 1
|
||||
else if (brute_dam < (max_damage * 0.75 / 2))
|
||||
tbrute = 2
|
||||
else
|
||||
tbrute = 3
|
||||
return "[tbrute][tburn]"
|
||||
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
proc/update_icon()
|
||||
var/n_is = damage_state_text()
|
||||
if (n_is != damage_state)
|
||||
damage_state = n_is
|
||||
owner.update_body(1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
if(override)
|
||||
status |= ORGAN_DESTROYED
|
||||
if(status & ORGAN_DESTROYED)
|
||||
if(status & ORGAN_SPLINTED)
|
||||
status &= ~ORGAN_SPLINTED
|
||||
if(implant)
|
||||
for(var/implants in implant)
|
||||
del(implants)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in owner.organs)
|
||||
if(O.parent == src)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/item/weapon/organ/H
|
||||
switch(body_part)
|
||||
if(UPPER_TORSO)
|
||||
owner.gib()
|
||||
if(LOWER_TORSO)
|
||||
owner << "\red You are now sterile."
|
||||
if(HEAD)
|
||||
H = new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
if(ishuman(owner))
|
||||
if(owner.gender == FEMALE)
|
||||
H.icon_state = "head_f_l"
|
||||
H.overlays += owner.generate_head_icon()
|
||||
H:transfer_identity(owner)
|
||||
H.pixel_x = -10
|
||||
H.pixel_y = 6
|
||||
H.name = "[owner.real_name]'s head"
|
||||
|
||||
owner.u_equip(owner.glasses)
|
||||
owner.u_equip(owner.head)
|
||||
owner.u_equip(owner.ears)
|
||||
owner.u_equip(owner.wear_mask)
|
||||
|
||||
owner.regenerate_icons()
|
||||
|
||||
owner.death()
|
||||
if(ARM_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_arm_l"
|
||||
if(ARM_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_arm(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_arm_l"
|
||||
if(LEG_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_leg_l"
|
||||
if(LEG_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_leg(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_leg_l"
|
||||
if(HAND_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_hand_l"
|
||||
owner.u_equip(owner.gloves)
|
||||
if(HAND_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_hand(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_hand_l"
|
||||
owner.u_equip(owner.gloves)
|
||||
if(FOOT_RIGHT)
|
||||
H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "r_foot_l"
|
||||
owner.u_equip(owner.shoes)
|
||||
if(FOOT_LEFT)
|
||||
H = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
|
||||
if(ismonkey(owner))
|
||||
H.icon_state = "l_foot_l"
|
||||
owner.u_equip(owner.shoes)
|
||||
if(ismonkey(owner))
|
||||
H.icon = 'monkey.dmi'
|
||||
var/lol = pick(cardinal)
|
||||
step(H,lol)
|
||||
destspawn = 1
|
||||
if(status & ORGAN_ROBOT)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
if(!no_explode)
|
||||
explosion(get_turf(owner),-1,-1,2,3)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
// force the icon to rebuild
|
||||
owner.regenerate_icons()
|
||||
|
||||
proc/createwound(var/type = CUT, var/damage)
|
||||
if(hasorgans(owner))
|
||||
var/wound_type
|
||||
var/size = min( max( 1, damage/10 ) , 6)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
if(wounds.len > 0 && prob(25))
|
||||
if((type == CUT || type == BRUISE) && damage >= 5)
|
||||
var/datum/wound/W = pick(wounds)
|
||||
if(W.amount == 1 && W.started_healing())
|
||||
W.open_wound()
|
||||
owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\
|
||||
"\red The wound on your [display_name] widens with a nasty ripping voice.",\
|
||||
"You hear a nasty ripping noise, as if flesh is being torn apart.")
|
||||
|
||||
return
|
||||
|
||||
if(damage == 0) return
|
||||
|
||||
// the wound we will create
|
||||
var/datum/wound/W
|
||||
|
||||
switch(type)
|
||||
if(CUT)
|
||||
src.status |= ORGAN_BLEEDING
|
||||
var/list/size_names = list(/datum/wound/cut, /datum/wound/deep_cut, /datum/wound/flesh_wound, /datum/wound/gaping_wound, /datum/wound/big_gaping_wound, /datum/wound/massive_wound)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
|
||||
if(BRUISE)
|
||||
var/list/size_names = list(/datum/wound/bruise/tiny_bruise, /datum/wound/bruise/small_bruise, /datum/wound/bruise/moderate_bruise, /datum/wound/bruise/large_bruise, /datum/wound/bruise/huge_bruise, /datum/wound/bruise/monumental_bruise)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
if(BURN)
|
||||
var/list/size_names = list(/datum/wound/moderate_burn, /datum/wound/large_burn, /datum/wound/severe_burn, /datum/wound/deep_burn, /datum/wound/carbonised_area)
|
||||
wound_type = size_names[size]
|
||||
|
||||
W = new wound_type(damage)
|
||||
|
||||
|
||||
|
||||
// check whether we can add the wound to an existing wound
|
||||
for(var/datum/wound/other in wounds)
|
||||
if(other.desc == W.desc)
|
||||
// okay, add it!
|
||||
other.damage += W.damage
|
||||
other.amount += 1
|
||||
W = null // to signify that the wound was added
|
||||
break
|
||||
|
||||
// if we couldn't add the wound to another wound, ignore
|
||||
if(W)
|
||||
wounds += W
|
||||
|
||||
proc/emp_act(severity)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
return
|
||||
if(prob(30*severity))
|
||||
take_damage(4(4-severity), 0, 1, used_weapon = "EMP")
|
||||
else
|
||||
droplimb(1)
|
||||
|
||||
proc/getDisplayName()
|
||||
switch(name)
|
||||
if("l_leg")
|
||||
return "left leg"
|
||||
if("r_leg")
|
||||
return "right leg"
|
||||
if("l_arm")
|
||||
return "left arm"
|
||||
if("r_arm")
|
||||
return "right arm"
|
||||
if("l_foot")
|
||||
return "left foot"
|
||||
if("r_foot")
|
||||
return "right foot"
|
||||
if("l_hand")
|
||||
return "left hand"
|
||||
if("r_hand")
|
||||
return "right hand"
|
||||
else
|
||||
return name
|
||||
// var/bandaged = 0
|
||||
// var/wound_size = 0
|
||||
// var/max_size = 0
|
||||
|
||||
/datum/organ/external/chest
|
||||
name = "chest"
|
||||
icon_name = "chest"
|
||||
display_name = "chest"
|
||||
max_damage = 150
|
||||
min_broken_damage = 75
|
||||
body_part = UPPER_TORSO
|
||||
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
icon_name = "diaper"
|
||||
display_name = "groin"
|
||||
max_damage = 115
|
||||
min_broken_damage = 70
|
||||
body_part = LOWER_TORSO
|
||||
|
||||
/datum/organ/external/head
|
||||
name = "head"
|
||||
icon_name = "head"
|
||||
display_name = "head"
|
||||
max_damage = 75
|
||||
min_broken_damage = 40
|
||||
max_damage = 125
|
||||
body_part = HEAD
|
||||
var/disfigured = 0
|
||||
|
||||
/datum/organ/external/l_arm
|
||||
name = "l_arm"
|
||||
display_name = "left arm"
|
||||
icon_name = "l_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_LEFT
|
||||
|
||||
/datum/organ/external/l_leg
|
||||
name = "l_leg"
|
||||
display_name = "left leg"
|
||||
icon_name = "l_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_LEFT
|
||||
|
||||
/datum/organ/external/r_arm
|
||||
name = "r_arm"
|
||||
display_name = "right arm"
|
||||
icon_name = "r_arm"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
/datum/organ/external/r_leg
|
||||
name = "r_leg"
|
||||
display_name = "right leg"
|
||||
icon_name = "r_leg"
|
||||
max_damage = 75
|
||||
min_broken_damage = 30
|
||||
body_part = LEG_RIGHT
|
||||
|
||||
/*Leaving these here in case we want to use them later
|
||||
/datum/organ/external/l_foot
|
||||
name = "l_foot"
|
||||
display_name = "left foot"
|
||||
name = "l foot"
|
||||
icon_name = "l_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_LEFT
|
||||
|
||||
/datum/organ/external/r_foot
|
||||
name = "r_foot"
|
||||
display_name = "right foot"
|
||||
name = "r foot"
|
||||
icon_name = "r_foot"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = FOOT_RIGHT
|
||||
|
||||
/datum/organ/external/r_hand
|
||||
name = "r_hand"
|
||||
display_name = "right hand"
|
||||
name = "r hand"
|
||||
icon_name = "r_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
/datum/organ/external/l_hand
|
||||
name = "l_hand"
|
||||
display_name = "left hand"
|
||||
name = "l hand"
|
||||
icon_name = "l_hand"
|
||||
max_damage = 40
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
/****************************************************
|
||||
EXTERNAL ORGAN ITEMS
|
||||
****************************************************/
|
||||
/datum/organ/external/groin
|
||||
name = "groin"
|
||||
icon_name = "groin"
|
||||
body_part = LOWER_TORSO
|
||||
*/
|
||||
|
||||
obj/item/weapon/organ
|
||||
icon = 'human.dmi'
|
||||
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
|
||||
//Damage will not exceed max_damage using this proc
|
||||
//Cannot apply negative damage
|
||||
/datum/organ/external/proc/take_damage(brute, burn)
|
||||
if(owner && owner.nodamage) return 0 //godmode
|
||||
brute = max(brute,0)
|
||||
burn = max(burn,0)
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
if(!istype(H))
|
||||
return
|
||||
if(H.dna)
|
||||
if(!blood_DNA)
|
||||
blood_DNA = list()
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam)
|
||||
if(!can_inflict) return 0
|
||||
|
||||
var/icon/I = new /icon(icon, icon_state)
|
||||
|
||||
if (H.s_tone >= 0)
|
||||
I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
|
||||
if((brute + burn) < can_inflict)
|
||||
brute_dam += brute
|
||||
burn_dam += burn
|
||||
else
|
||||
I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
icon = I
|
||||
|
||||
obj/item/weapon/organ/head
|
||||
name = "head"
|
||||
icon_state = "head_m_l"
|
||||
var/mob/living/carbon/brain/brainmob
|
||||
var/brain_op_stage = 0
|
||||
|
||||
obj/item/weapon/organ/head/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob.container = src
|
||||
|
||||
obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
switch(brain_op_stage)
|
||||
if(0)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 1
|
||||
|
||||
if(2)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [src]!"
|
||||
user << "\red You cut [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 3.0
|
||||
if(brute > 0)
|
||||
if(burn > 0)
|
||||
brute = round( (brute/(brute+burn)) * can_inflict, 1 )
|
||||
burn = can_inflict - brute //gets whatever damage is left over
|
||||
brute_dam += brute
|
||||
burn_dam += burn
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/weapon/circular_saw))
|
||||
switch(brain_op_stage)
|
||||
if(1)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1)
|
||||
brainmob << "\red [user] begins to saw open your head with [src]!"
|
||||
user << "\red You saw [brainmob]'s head open with [src]!"
|
||||
|
||||
brain_op_stage = 2
|
||||
if(3)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1)
|
||||
brainmob << "\red [user] severs your brain's connection to the spine with [src]!"
|
||||
user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!"
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
|
||||
|
||||
var/obj/item/brain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
|
||||
brain_op_stage = 4.0
|
||||
brute_dam += can_inflict
|
||||
else
|
||||
..()
|
||||
if(burn > 0)
|
||||
burn_dam += can_inflict
|
||||
else
|
||||
..()
|
||||
return 0
|
||||
return update_icon()
|
||||
|
||||
obj/item/weapon/organ/l_arm
|
||||
name = "left arm"
|
||||
icon_state = "l_arm_l"
|
||||
obj/item/weapon/organ/l_foot
|
||||
name = "left foot"
|
||||
icon_state = "l_foot_l"
|
||||
obj/item/weapon/organ/l_hand
|
||||
name = "left hand"
|
||||
icon_state = "l_hand_l"
|
||||
obj/item/weapon/organ/l_leg
|
||||
name = "left leg"
|
||||
icon_state = "l_leg_l"
|
||||
obj/item/weapon/organ/r_arm
|
||||
name = "right arm"
|
||||
icon_state = "r_arm_l"
|
||||
obj/item/weapon/organ/r_foot
|
||||
name = "right foot"
|
||||
icon_state = "r_foot_l"
|
||||
obj/item/weapon/organ/r_hand
|
||||
name = "right hand"
|
||||
icon_state = "r_hand_l"
|
||||
obj/item/weapon/organ/r_leg
|
||||
name = "right leg"
|
||||
icon_state = "r_leg_l"
|
||||
|
||||
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
|
||||
//Damage cannot go below zero.
|
||||
//Cannot remove negative damage (i.e. apply damage)
|
||||
/datum/organ/external/proc/heal_damage(brute, burn)
|
||||
brute = max(brute, 0)
|
||||
burn = max(burn, 0)
|
||||
brute_dam = max(brute_dam - brute, 0)
|
||||
burn_dam = max(burn_dam - burn, 0)
|
||||
return update_icon()
|
||||
|
||||
|
||||
//Returns total damage...kinda pointless really
|
||||
/datum/organ/external/proc/get_damage()
|
||||
return brute_dam + burn_dam
|
||||
|
||||
|
||||
//Updates an organ's brute/burn states for use by updateDamageIcon()
|
||||
//Returns 1 if we need to update overlays. 0 otherwise.
|
||||
/datum/organ/external/proc/update_icon()
|
||||
var/tbrute = round( (brute_dam/max_damage)*3, 1 )
|
||||
var/tburn = round( (burn_dam/max_damage)*3, 1 )
|
||||
if((tbrute != brutestate) || (tburn != burnstate))
|
||||
brutestate = tbrute
|
||||
burnstate = tburn
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Returns a display name for the organ
|
||||
/datum/organ/external/proc/getDisplayName()
|
||||
switch(name)
|
||||
if("l_leg") return "left leg"
|
||||
if("r_leg") return "right leg"
|
||||
if("l_arm") return "left arm"
|
||||
if("r_arm") return "right arm"
|
||||
else return name
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
/****************************************************
|
||||
INTERNAL ORGANS
|
||||
****************************************************/
|
||||
/datum/organ/internal
|
||||
name = "internal"
|
||||
var/damage = 0
|
||||
var/max_damage = 100
|
||||
|
||||
/datum/organ/internal/skeleton
|
||||
name = "spooky scary skeleton"
|
||||
max_damage = 200
|
||||
|
||||
/datum/organ/internal/skin
|
||||
name = "skin"
|
||||
max_damage = 100
|
||||
|
||||
/datum/organ/internal/blood_vessels
|
||||
name = "blood vessels"
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
|
||||
/****************************************************
|
||||
WOUNDS
|
||||
****************************************************/
|
||||
/datum/wound
|
||||
// stages such as "cut", "deep cut", etc.
|
||||
var/list/stages
|
||||
// number representing the current stage
|
||||
var/current_stage = 0
|
||||
|
||||
// description of the wound
|
||||
var/desc = ""
|
||||
|
||||
// amount of damage this wound causes
|
||||
var/damage = 0
|
||||
|
||||
// amount of damage the current wound type requires(less means we need to apply the next healing stage)
|
||||
var/min_damage = 0
|
||||
|
||||
// one of CUT, BRUISE, BURN
|
||||
var/damage_type = CUT
|
||||
|
||||
// whether this wound needs a bandage/salve to heal at all
|
||||
var/needs_treatment = 0
|
||||
|
||||
// is the wound bandaged?
|
||||
var/tmp/bandaged = 0
|
||||
// is the wound salved?
|
||||
var/tmp/salved = 0
|
||||
// is the wound disinfected?
|
||||
var/tmp/disinfected = 0
|
||||
var/tmp/created = 0
|
||||
|
||||
// number of wounds of this type
|
||||
var/tmp/amount = 1
|
||||
|
||||
// helper lists
|
||||
var/tmp/list/desc_list = list()
|
||||
var/tmp/list/damage_list = list()
|
||||
New(var/damage)
|
||||
|
||||
created = world.time
|
||||
|
||||
// reading from a list("stage" = damage) is pretty difficult, so build two separate
|
||||
// lists from them instead
|
||||
for(var/V in stages)
|
||||
desc_list += V
|
||||
damage_list += stages[V]
|
||||
|
||||
src.damage = damage
|
||||
|
||||
// initialize with the first stage
|
||||
next_stage()
|
||||
|
||||
// this will ensure the size of the wound matches the damage
|
||||
src.heal_damage(0)
|
||||
|
||||
// returns 1 if there's a next stage, 0 otherwise
|
||||
proc/next_stage()
|
||||
if(current_stage + 1 > src.desc_list.len)
|
||||
return 0
|
||||
|
||||
current_stage++
|
||||
|
||||
src.min_damage = damage_list[current_stage]
|
||||
src.desc = desc_list[current_stage]
|
||||
return 1
|
||||
|
||||
// returns 1 if the wound has started healing
|
||||
proc/started_healing()
|
||||
return (current_stage > 1)
|
||||
|
||||
// checks whether the wound has been appropriately treated
|
||||
// always returns 1 for wounds that don't need to be treated
|
||||
proc/is_treated()
|
||||
if(!needs_treatment) return 1
|
||||
|
||||
if(damage_type == BRUISE || damage_type == CUT)
|
||||
return bandaged
|
||||
else if(damage_type == BURN)
|
||||
return salved
|
||||
|
||||
// heal the given amount of damage, and if the given amount of damage was more
|
||||
// than what needed to be healed, return how much heal was left
|
||||
proc/heal_damage(amount)
|
||||
var/healed_damage = min(src.damage, amount)
|
||||
amount -= healed_damage
|
||||
src.damage -= healed_damage
|
||||
|
||||
while(src.damage / src.amount < damage_list[current_stage] && current_stage < src.desc_list.len)
|
||||
current_stage++
|
||||
desc = desc_list[current_stage]
|
||||
|
||||
// return amount of healing still leftover, can be used for other wounds
|
||||
return amount
|
||||
|
||||
// opens the wound again
|
||||
proc/open_wound()
|
||||
if(current_stage > 1)
|
||||
// e.g. current_stage is 2, then reset it to 0 and do next_stage(), bringing it to 1
|
||||
src.current_stage -= 2
|
||||
next_stage()
|
||||
src.damage = src.min_damage + 5
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut
|
||||
// link wound descriptions to amounts of damage
|
||||
stages = list("cut" = 5, "healing cut" = 2, "small scab" = 0)
|
||||
|
||||
/datum/wound/deep_cut
|
||||
stages = list("deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/flesh_wound
|
||||
stages = list("flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
|
||||
|
||||
/datum/wound/gaping_wound
|
||||
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
|
||||
"small straight scar" = 0)
|
||||
|
||||
/datum/wound/big_gaping_wound
|
||||
stages = list("big gaping wound" = 60, "gauze wrapped wound" = 50, "blood soaked bandage" = 25,\
|
||||
"large angry scar" = 10, "large straight scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
/datum/wound/massive_wound
|
||||
stages = list("massive wound" = 70, "massive blood soaked bandage" = 40, "huge bloody mess" = 20,\
|
||||
"massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
/** BRUISES **/
|
||||
/datum/wound/bruise
|
||||
stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,\
|
||||
"moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
damage_type = BRUISE
|
||||
|
||||
/datum/wound/bruise/monumental_bruise
|
||||
|
||||
// implement sub-paths by starting at a later stage
|
||||
/datum/wound/bruise/huge_bruise
|
||||
current_stage = 1
|
||||
|
||||
/datum/wound/bruise/large_bruise
|
||||
current_stage = 2
|
||||
|
||||
/datum/wound/bruise/moderate_bruise
|
||||
current_stage = 3
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/small_bruise
|
||||
current_stage = 4
|
||||
needs_treatment = 0
|
||||
|
||||
/datum/wound/bruise/tiny_bruise
|
||||
current_stage = 5
|
||||
needs_treatment = 0
|
||||
|
||||
/** BURNS **/
|
||||
/datum/wound/moderate_burn
|
||||
stages = list("moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/large_burn
|
||||
stages = list("large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/severe_burn
|
||||
stages = list("severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
/datum/wound/deep_burn
|
||||
stages = list("deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
|
||||
|
||||
/datum/wound/carbonised_area
|
||||
stages = list("carbonised area" = 50, "treated carbonised area" = 20, "massive burn scar" = 0)
|
||||
|
||||
needs_treatment = 1 // this only heals when bandaged
|
||||
|
||||
damage_type = BURN
|
||||
@@ -68,13 +68,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
return 0
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
|
||||
usr << "I don't feel strong enough without my robe."
|
||||
return 0
|
||||
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
|
||||
usr << "I don't feel strong enough without my sandals."
|
||||
return 0
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard))
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
|
||||
usr << "I don't feel strong enough without my hat."
|
||||
return 0
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/datum/supply_packs
|
||||
var/name = null
|
||||
var/list/contains = list()
|
||||
var/manifest
|
||||
var/manifest = ""
|
||||
var/amount = null
|
||||
var/cost = null
|
||||
var/containertype = null
|
||||
@@ -18,7 +18,7 @@
|
||||
var/contraband = 0
|
||||
|
||||
/datum/supply_packs/New()
|
||||
manifest = "<ul>"
|
||||
manifest += "<ul>"
|
||||
for(var/path in contains)
|
||||
if(!path) continue
|
||||
var/atom/movable/AM = new path()
|
||||
@@ -575,12 +575,8 @@
|
||||
/obj/item/clothing/head/collectable/thunderdome,
|
||||
/obj/item/clothing/head/collectable/swat,
|
||||
/obj/item/clothing/head/collectable/metroid,
|
||||
/obj/item/clothing/head/collectable/metroid,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/collectable/slime,
|
||||
/obj/item/clothing/head/collectable/slime,
|
||||
/obj/item/clothing/head/collectable/xenom,
|
||||
/obj/item/clothing/head/collectable/xenom,
|
||||
/obj/item/clothing/head/collectable/petehat)
|
||||
name = "Collectable hat crate!"
|
||||
@@ -589,10 +585,7 @@
|
||||
containername = "Collectable hats crate! Brought to you by Bass.inc!"
|
||||
|
||||
/datum/supply_packs/randomised/New()
|
||||
var/list/tempContains = list()
|
||||
for(var/i = 0,i<num_contained,i++)
|
||||
tempContains += pick(contains)
|
||||
contains = tempContains
|
||||
manifest += "Contains any [num_contained] of:"
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -962,6 +962,23 @@
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/cherryseed
|
||||
name = "pack of cherry pits"
|
||||
desc = "Careful not to crack a tooth on one... That'd be the pits."
|
||||
icon_state = "seed-cherry"
|
||||
mypath = "/obj/item/seeds/cherryseed"
|
||||
species = "cherry"
|
||||
plantname = "Cherry Tree"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/cherries"
|
||||
lifespan = 35
|
||||
endurance = 35
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 3
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/* // Maybe one day when I get it to work like a grenade which exlodes gibs.
|
||||
/obj/item/seeds/gibtomatoseed
|
||||
name = "Gib Tomato seeds"
|
||||
@@ -1051,10 +1068,18 @@
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
|
||||
user.show_message("<span class='notice'>You make planks out of the [src]!</span>", 1)
|
||||
for(var/i=0,i<2,i++)
|
||||
new /obj/item/stack/sheet/wood (src.loc)
|
||||
var/obj/item/stack/sheet/wood/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/wood/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed wood to the stack. It now contains [NG.amount] planks."
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grown/sunflower // FLOWER POWER!
|
||||
name = "sunflower"
|
||||
desc = "It's beautiful! A certain person might beat you to death if you trample these."
|
||||
@@ -1319,3 +1344,4 @@
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
icon_state = "meterX"
|
||||
var/obj/machinery/atmospherics/pipe/target = null
|
||||
anchored = 1.0
|
||||
power_channel = ENVIRON
|
||||
var/frequency = 0
|
||||
var/id
|
||||
use_power = 1
|
||||
@@ -198,6 +199,7 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "doorctrl0"
|
||||
desc = "A remote control-switch for a door."
|
||||
power_channel = ENVIRON
|
||||
var/id = null
|
||||
var/range = 10
|
||||
var/normaldoorcontrol = 0
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
desc = "Tools for tools."
|
||||
icon_state = "tool"
|
||||
icon_deny = "tool-deny"
|
||||
req_access_txt = "12" //Maintenance access
|
||||
//req_access_txt = "12" //Maintenance access
|
||||
product_paths = "/obj/item/weapon/cable_coil/random;/obj/item/weapon/crowbar;/obj/item/weapon/weldingtool;/obj/item/weapon/wirecutters;/obj/item/weapon/wrench;/obj/item/device/analyzer;/obj/item/device/t_scanner"
|
||||
product_amounts = "10;5;3;5;5;5;5"
|
||||
product_hidden = "/obj/item/weapon/weldingtool/hugeetank;/obj/item/clothing/gloves/fyellow"
|
||||
|
||||
@@ -1116,6 +1116,10 @@
|
||||
name = "paper- 'Greetings from Billy Bob'"
|
||||
info = "<B>Hey fellow botanist!</B><BR>\n<BR>\nI didn't trust the station folk so I left<BR>\na couple of weeks ago. But here's some<BR>\ninstructions on how to operate things here.<BR>\nYou can grow plants and each iteration they become<BR>\nstronger, more potent and have better yield, if you<BR>\nknow which ones to pick. Use your botanist's analyzer<BR>\nfor that. You can turn harvested plants into seeds<BR>\nat the seed extractor, and replant them for better stuff!<BR>\nSometimes if the weed level gets high in the tray<BR>\nmutations into different mushroom or weed species have<BR>\nbeen witnessed. On the rare occassion even weeds mutate!<BR>\n<BR>\nEither way, have fun!<BR>\n<BR>\nBest regards,<BR>\nBilly Bob Johnson.<BR>\n<BR>\nPS.<BR>\nHere's a few tips:<BR>\nIn nettles, potency = damage<BR>\nIn amanitas, potency = deadliness + side effect<BR>\nIn Liberty caps, potency = drug power + effect<BR>\nIn chilis, potency = heat<BR>\n<B>Nutrients keep mushrooms alive!</B><BR>\n<B>Water keeps weeds such as nettles alive!</B><BR>\n<B>All other plants need both.</B>"
|
||||
|
||||
/obj/item/weapon/paper/djstation
|
||||
name = "paper - 'DJ Listening Outpost'"
|
||||
info = "<B>Welcome new owner!</B><BR><BR>You have purchased the latest in listening equipment. The telecommunication setup we created is the best in listening to common and private radio fequencies. Here is a step by step guide to start listening in on those saucy radio channels:<br><ol><li>Equip yourself with a multi-tool</li><li>Use the multitool on each machine, that is the broadcaster, receiver and the relay.</li><li>Turn all the machines on, it has already been configured for you to listen on.</li></ol> Simple as that. Now to listen to the private channels, you'll have to configure the intercoms, located on the front desk. Here is a list of frequencies for you to listen on.<br><ul><li>145.7 - Common Channel</li><li>144.7 - Private AI Channel</li><li>135.9 - Security Channel</li><li>135.7 - Engineering Channel</li><li>135.5 - Medical Channel</li><li>135.3 - Command Channel</li><li>135.1 - Science Channel</li><li>134.9 - Mining Channel</li><li>134.7 - Cargo Channel</li>"
|
||||
|
||||
/obj/item/weapon/paper/flag
|
||||
icon_state = "flag_neutral"
|
||||
item_state = "paper"
|
||||
@@ -1551,7 +1555,6 @@
|
||||
m_amt = 12000
|
||||
origin_tech = "materials=1"
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/kitchenknife/ritual
|
||||
name = "ritual knife"
|
||||
@@ -1633,7 +1636,6 @@
|
||||
icon_state = "knife"
|
||||
force = 10.0
|
||||
throwforce = 10.0
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
@@ -1656,7 +1658,6 @@
|
||||
g_amt = 5000
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/retractor
|
||||
name = "retractor"
|
||||
@@ -1723,7 +1724,6 @@
|
||||
g_amt = 10000
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
attack_verb = list("attacked", "slashed", "sawed", "cut")
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/syntiflesh
|
||||
name = "syntiflesh"
|
||||
|
||||
@@ -1229,10 +1229,6 @@ proc/get_mob_with_client_list()
|
||||
else if (zone == "r_leg") return "right leg"
|
||||
else if (zone == "l_foot") return "left foot"
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else if (zone == "l_hand") return "left hand"
|
||||
else if (zone == "r_hand") return "right hand"
|
||||
else if (zone == "l_foot") return "left foot"
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else return zone
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
|
||||
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,
|
||||
|
||||
@@ -505,6 +505,8 @@
|
||||
|
||||
for(var/obj/T in (M.contents-implants))
|
||||
del(T)
|
||||
//for(var/R in M.organs)
|
||||
// del(M.organs[text("[]", R)])
|
||||
|
||||
O.loc = M.loc
|
||||
|
||||
|
||||
@@ -6,12 +6,6 @@
|
||||
|
||||
var/lesser_form = !ishuman(src)
|
||||
|
||||
for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(lesser_form && !P.allowduringlesserform) continue
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
if(!powerinstances.len)
|
||||
for(var/P in powers)
|
||||
powerinstances += new P()
|
||||
@@ -20,7 +14,13 @@
|
||||
for(var/datum/power/changeling/P in powerinstances)
|
||||
if(!P.genomecost) // Is it free?
|
||||
if(!(P in mind.changeling.purchasedpowers)) // Do we not have it already?
|
||||
mind.changeling.purchasePower(P.name)// Purchase it.
|
||||
mind.changeling.purchasePower(mind, P.name, 0)// Purchase it. Don't remake our verbs, we're doing it after this.
|
||||
|
||||
for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
|
||||
if(P.isVerb)
|
||||
if(lesser_form && !P.allowduringlesserform) continue
|
||||
if(!(P in src.verbs))
|
||||
src.verbs += P.verbpath
|
||||
|
||||
mind.changeling.absorbed_dna |= dna
|
||||
return 1
|
||||
@@ -35,29 +35,29 @@
|
||||
|
||||
//Helper proc. Does all the checks and stuff for us to avoid copypasta
|
||||
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0)
|
||||
if(!src) return
|
||||
if(!src.mind) return
|
||||
if(!iscarbon(src)) return
|
||||
if(!usr) return
|
||||
if(!usr.mind) return
|
||||
if(!iscarbon(usr)) return
|
||||
|
||||
var/datum/changeling/changeling = src.mind.changeling
|
||||
var/datum/changeling/changeling = usr.mind.changeling
|
||||
if(!changeling)
|
||||
world.log << "[src] has the changeling_transform() verb but is not a changeling."
|
||||
world.log << "[usr] has the changeling_transform() verb but is not a changeling."
|
||||
return
|
||||
|
||||
if(usr.stat > max_stat)
|
||||
src << "<span class='warning'>We are incapacitated.</span>"
|
||||
usr << "<span class='warning'>We are incapacitated.</span>"
|
||||
return
|
||||
|
||||
if(changeling.absorbed_dna.len < required_dna)
|
||||
src << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
|
||||
usr << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
|
||||
return
|
||||
|
||||
if(changeling.chem_charges < required_chems)
|
||||
src << "<span class='warning'>We require at least [required_chems] units of chemicals to do that!</span>"
|
||||
usr << "<span class='warning'>We require at least [required_chems] units of chemicals to do that!</span>"
|
||||
return
|
||||
|
||||
if(changeling.geneticdamage > max_genetic_damage)
|
||||
src << "<span class='warning'>Our geneomes are still reassembling. We need time to recover first.</span>"
|
||||
usr << "<span class='warning'>Our geneomes are still reassembling. We need time to recover first.</span>"
|
||||
return
|
||||
|
||||
return changeling
|
||||
|
||||
@@ -417,17 +417,21 @@ var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
/datum/changeling/Topic(href, href_list)
|
||||
..()
|
||||
if(!ismob(usr))
|
||||
return
|
||||
|
||||
if(href_list["P"])
|
||||
purchasePower(href_list["P"])
|
||||
var/datum/mind/M = usr.mind
|
||||
if(!istype(M))
|
||||
return
|
||||
purchasePower(M, href_list["P"])
|
||||
call(/datum/changeling/proc/EvolutionMenu)()
|
||||
|
||||
|
||||
|
||||
/datum/changeling/proc/purchasePower(var/Pname)
|
||||
if(!usr.mind || !usr.mind.changeling)
|
||||
/datum/changeling/proc/purchasePower(var/datum/mind/M, var/Pname, var/remake_verbs = 1)
|
||||
if(!M || !M.changeling)
|
||||
return
|
||||
// src = usr.mind.changeling
|
||||
|
||||
var/datum/power/changeling/Thepower = Pname
|
||||
|
||||
@@ -440,16 +444,16 @@ var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
|
||||
if(Thepower == null)
|
||||
usr << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(Thepower in purchasedpowers)
|
||||
usr << "We have already evolved this ability!"
|
||||
M.current << "We have already evolved this ability!"
|
||||
return
|
||||
|
||||
|
||||
if(geneticpoints < Thepower.genomecost)
|
||||
usr << "We cannot evolve this... yet. We must acquire more DNA."
|
||||
M.current << "We cannot evolve this... yet. We must acquire more DNA."
|
||||
return
|
||||
|
||||
geneticpoints -= Thepower.genomecost
|
||||
@@ -458,6 +462,6 @@ var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
if(!Thepower.isVerb && Thepower.verbpath)
|
||||
call(Thepower.verbpath)()
|
||||
else
|
||||
usr.make_changeling()
|
||||
else if(remake_verbs)
|
||||
M.current.make_changeling()
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/proc/start_events()
|
||||
//changed to a while(1) loop since they are more efficient.
|
||||
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
|
||||
@@ -526,4 +527,537 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
|
||||
world << "Ion Storm Main Done"
|
||||
|
||||
=======
|
||||
/proc/start_events()
|
||||
//changed to a while(1) loop since they are more efficient.
|
||||
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
|
||||
//and also to stop spawn copying variables from the game ticker
|
||||
spawn(3000)
|
||||
while(1)
|
||||
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
|
||||
spawn(1)
|
||||
dust_swarm("weak")
|
||||
if (!event)
|
||||
//CARN: checks to see if random events are enabled.
|
||||
if(config.allow_random_events && prob(eventchance))
|
||||
event()
|
||||
hadevent = 1
|
||||
else
|
||||
Holiday_Random_Event()
|
||||
else
|
||||
event = 0
|
||||
sleep(1200)
|
||||
|
||||
/proc/event()
|
||||
event = 1
|
||||
|
||||
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events.
|
||||
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
eventNumbersToPickFrom += 3
|
||||
switch(pick(eventNumbersToPickFrom))
|
||||
if(1)
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
world << sound('sound/AI/meteors.ogg')
|
||||
spawn(100)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
spawn(700)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
|
||||
if(2)
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
del(bh)
|
||||
/*
|
||||
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/spanomalies.ogg')
|
||||
var/list/turfs = new
|
||||
var/turf/picked
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
turfs += T
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(prob(20))
|
||||
spawn(50+rand(0,3000))
|
||||
picked = pick(turfs)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(300,600))
|
||||
del(P)
|
||||
*/
|
||||
if(3)
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
if(4)
|
||||
mini_blob_event()
|
||||
|
||||
if(5)
|
||||
high_radiation_event()
|
||||
if(6)
|
||||
viral_outbreak()
|
||||
if(7)
|
||||
alien_infestation()
|
||||
if(8)
|
||||
prison_break()
|
||||
if(9)
|
||||
carp_migration()
|
||||
if(10)
|
||||
immovablerod()
|
||||
if(11)
|
||||
lightsout(1,2)
|
||||
if(12)
|
||||
appendicitis()
|
||||
if(13)
|
||||
IonStorm()
|
||||
if(14)
|
||||
spacevine_infestation()
|
||||
if(15)
|
||||
communications_blackout()
|
||||
|
||||
/proc/communications_blackout(var/silent = 1)
|
||||
|
||||
if(!silent)
|
||||
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
A << "<span class='warning'>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</span>"
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
/proc/power_failure()
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
|
||||
world << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output = 0
|
||||
S.online = 0
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/A = get_area(C)
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore()
|
||||
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
world << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
for(var/area/A in world)
|
||||
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
|
||||
A.power_light = 1
|
||||
A.power_equip = 1
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/power_restore_quick()
|
||||
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
world << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
/proc/appendicitis()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
var/datum/disease/D = new /datum/disease/appendicitis
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
|
||||
/proc/viral_outbreak(var/virus = null)
|
||||
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
// world << sound('sound/AI/outbreak7.ogg')
|
||||
var/virus_type
|
||||
if(!virus)
|
||||
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
|
||||
else
|
||||
switch(virus)
|
||||
if("fake gbs")
|
||||
virus_type = /datum/disease/fake_gbs
|
||||
if("gbs")
|
||||
virus_type = /datum/disease/gbs
|
||||
if("magnitis")
|
||||
virus_type = /datum/disease/magnitis
|
||||
if("rhumba beat")
|
||||
virus_type = /datum/disease/rhumba_beat
|
||||
if("brain rot")
|
||||
virus_type = /datum/disease/brainrot
|
||||
if("cold")
|
||||
virus_type = /datum/disease/cold
|
||||
if("retrovirus")
|
||||
virus_type = /datum/disease/dnaspread
|
||||
if("flu")
|
||||
virus_type = /datum/disease/flu
|
||||
// if("t-virus")
|
||||
// virus_type = /datum/disease/t_virus
|
||||
if("pierrot's throat")
|
||||
virus_type = /datum/disease/pierrot_throat
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.uni_identity
|
||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
else
|
||||
var/datum/disease/D = new virus_type
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak7.ogg')
|
||||
|
||||
/proc/alien_infestation(var/spawncount = 1) // -- TLE
|
||||
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
//world << sound('sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current != DEAD))
|
||||
candidates += G.key
|
||||
|
||||
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
|
||||
var/obj/vent = pick(vents)
|
||||
var/candidate = pick(candidates)
|
||||
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = candidate
|
||||
|
||||
candidates -= candidate
|
||||
vents -= vent
|
||||
spawncount--
|
||||
|
||||
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('sound/AI/aliens.ogg')
|
||||
|
||||
/proc/high_radiation_event()
|
||||
|
||||
/* // Haha, this is way too laggy. I'll keep the prison break though.
|
||||
for(var/obj/machinery/light/L in world)
|
||||
if(L.z != 1) continue
|
||||
L.flicker(50)
|
||||
|
||||
sleep(100)
|
||||
*/
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if (prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
if (prob(25))
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
world << sound('sound/AI/radiation.ogg')
|
||||
|
||||
|
||||
|
||||
//Changing this to affect the main station. Blame Urist. --Pete
|
||||
/proc/prison_break() // -- Callagan
|
||||
|
||||
|
||||
var/list/area/areas = list()
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
|
||||
areas += A
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
|
||||
for(var/area/A in areas)
|
||||
for(var/obj/machinery/light/L in A)
|
||||
L.flicker(10)
|
||||
|
||||
sleep(100)
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/power/apc/temp_apc in A)
|
||||
temp_apc.overload_lighting()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/structure/closet/secure_closet/brig/temp_closet in A)
|
||||
temp_closet.locked = 0
|
||||
temp_closet.icon_state = temp_closet.icon_closed
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door/airlock/security/temp_airlock in A)
|
||||
temp_airlock.prison_open()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
|
||||
temp_glassairlock.prison_open()
|
||||
|
||||
for(var/area/A in areas)
|
||||
for (var/obj/machinery/door_timer/temp_timer in A)
|
||||
temp_timer.releasetime = 1
|
||||
|
||||
sleep(150)
|
||||
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
|
||||
else
|
||||
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
|
||||
|
||||
/proc/carp_migration() // -- Darem
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
new /mob/living/simple_animal/carp(C.loc)
|
||||
//sleep(100)
|
||||
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
|
||||
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
|
||||
if(isEvent)
|
||||
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
|
||||
|
||||
if(lightsoutAmount)
|
||||
var/list/epicentreList = list()
|
||||
|
||||
for(var/i=1,i<=lightsoutAmount,i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
epicentreList += pick(possibleEpicentres)
|
||||
else
|
||||
break
|
||||
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/power/apc/apc in world)
|
||||
apc.overload_lighting()
|
||||
|
||||
return
|
||||
|
||||
/proc/IonStorm(botEmagChance = 10)
|
||||
|
||||
/*Deuryn's current project, notes here for those who care.
|
||||
Revamping the random laws so they don't suck.
|
||||
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
|
||||
*/
|
||||
|
||||
//AI laws
|
||||
for(var/mob/living/silicon/ai/M in living_mob_list)
|
||||
if(M.stat != 2 && M.see_in_dark != 0)
|
||||
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
|
||||
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
|
||||
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
|
||||
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
|
||||
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
|
||||
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
|
||||
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
|
||||
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
|
||||
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
|
||||
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
|
||||
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
|
||||
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
|
||||
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
|
||||
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
|
||||
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
|
||||
var/crew
|
||||
var/list/pos_crew = list()
|
||||
for(var/mob/living/carbon/human/pos in player_list)
|
||||
pos_crew += pos.real_name
|
||||
if(pos_crew.len)
|
||||
crew = pick(pos_crew)
|
||||
else
|
||||
crew = "Any Human"
|
||||
switch(rand(1,14))
|
||||
if(1)
|
||||
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
|
||||
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
|
||||
if(2)
|
||||
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
|
||||
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
|
||||
if(3)
|
||||
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
|
||||
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
|
||||
if(4)
|
||||
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
|
||||
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
|
||||
if(5)
|
||||
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
|
||||
if(6)
|
||||
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
|
||||
if(7)
|
||||
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
|
||||
M.add_ion_law("YOU ARE [amount] [who2]")
|
||||
if(8)
|
||||
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
|
||||
M.add_ion_law("YOU MUST ALWAYS [aimust]")
|
||||
if(9)
|
||||
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
|
||||
M.add_ion_law("[area] [area2] [amount] [what2]")
|
||||
if(10)
|
||||
M << "\red [crew] is [target]...LAWS UPDATED"
|
||||
M.add_ion_law("[crew] is [target]")
|
||||
if(11)
|
||||
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
|
||||
M.add_ion_law("[define] IS A FORM OF HARM")
|
||||
if(12)
|
||||
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
|
||||
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
|
||||
if(13)
|
||||
M << "\red [crew] is [allergysev] to [allergy]. LAWS UPDATED"
|
||||
M.add_ion_law("[crew] is [allergysev] to [allergy]. LAWS UPDATED")
|
||||
if(14)
|
||||
M << "\ref THE STATION IS [who2pref] [who2]"
|
||||
M.add_ion_law("THE STATION IS [who2pref] [who2]")
|
||||
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
|
||||
/*
|
||||
|
||||
var/apcnum = 0
|
||||
var/smesnum = 0
|
||||
var/airlocknum = 0
|
||||
var/firedoornum = 0
|
||||
|
||||
world << "Ion Storm Main Started"
|
||||
|
||||
spawn(0)
|
||||
world << "Started processing APCs"
|
||||
for (var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1)
|
||||
APC.ion_act()
|
||||
apcnum++
|
||||
world << "Finished processing APCs. Processed: [apcnum]"
|
||||
spawn(0)
|
||||
world << "Started processing SMES"
|
||||
for (var/obj/machinery/power/smes/SMES in world)
|
||||
if(SMES.z == 1)
|
||||
SMES.ion_act()
|
||||
smesnum++
|
||||
world << "Finished processing SMES. Processed: [smesnum]"
|
||||
spawn(0)
|
||||
world << "Started processing AIRLOCKS"
|
||||
for (var/obj/machinery/door/airlock/D in world)
|
||||
if(D.z == 1)
|
||||
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
|
||||
airlocknum++
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
|
||||
spawn(0)
|
||||
world << "Started processing FIREDOORS"
|
||||
for (var/obj/machinery/door/firedoor/D in world)
|
||||
if(D.z == 1)
|
||||
firedoornum++;
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
|
||||
|
||||
world << "Ion Storm Main Done"
|
||||
|
||||
>>>>>>> remotes/git-svn
|
||||
*/
|
||||
@@ -844,16 +844,15 @@ ________________________________________________________________________________
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
|
||||
var/obj/item/weapon/disk/tech_disk/tdisk = I
|
||||
if(tdisk.stored)//If it has something on it.
|
||||
if(I:stored)//If it has something on it.
|
||||
U << "Research information detected, processing..."
|
||||
if(do_after(U,s_delay))
|
||||
for(var/datum/tech/current_data in stored_research)
|
||||
if(current_data.id==tdisk.stored.id)
|
||||
if(current_data.level<tdisk.stored.level)
|
||||
current_data.level=tdisk.stored.level
|
||||
if(current_data.id==I:stored.id)
|
||||
if(current_data.level<I:stored.level)
|
||||
current_data.level=I:stored.level
|
||||
break
|
||||
tdisk.stored = null
|
||||
I:stored = null
|
||||
U << "\blue Data analyzed and updated. Disk erased."
|
||||
else
|
||||
U << "\red <b>ERROR</b>: \black Procedure interrupted. Process terminated."
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
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/constructarmoured/Z = new /mob/living/simple_animal/constructarmoured (get_turf(T.loc))
|
||||
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))
|
||||
if(ticker.mode.name == "cult")
|
||||
@@ -183,7 +183,7 @@
|
||||
del(C)
|
||||
|
||||
if("Wraith")
|
||||
var/mob/living/simple_animal/constructwraith/Z = new /mob/living/simple_animal/constructwraith (get_turf(T.loc))
|
||||
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))
|
||||
if(ticker.mode.name == "cult")
|
||||
@@ -199,7 +199,7 @@
|
||||
del(C)
|
||||
|
||||
if("Artificer")
|
||||
var/mob/living/simple_animal/constructbuilder/Z = new /mob/living/simple_animal/constructbuilder (get_turf(T.loc))
|
||||
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))
|
||||
if(ticker.mode.name == "cult")
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=16'>Six Soul Stone Shards and the spell Artificer</A><BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=17'>Mastercrafted Armor Set</A><BR>"
|
||||
dat += "<HR>"
|
||||
if(op)
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=18'>Re-memorize Spells</A><BR>"
|
||||
user << browse(dat, "window=radio")
|
||||
@@ -55,7 +57,7 @@
|
||||
if(href_list["spell_choice"])
|
||||
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 18)
|
||||
src.uses--
|
||||
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock","Summon Guns","Staff of Change","Six Soul Stone Shards and the spell Artificer")
|
||||
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock","Summon Guns","Staff of Change","Six Soul Stone Shards and the spell Artificer","Mastercrafted Armor Set")
|
||||
var/already_knows = 0
|
||||
for(var/obj/effect/proc_holder/spell/aspell in usr.spell_list)
|
||||
if(available_spells[text2num(href_list["spell_choice"])] == aspell.name)
|
||||
@@ -133,6 +135,15 @@
|
||||
usr.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct(usr)
|
||||
src.temp = "Soul Stone Shards are ancient tools capable of capturing and harnessing the spirits of the dead and dying. The spell Artificer allows you to create arcane machines for the captured souls to pilot."
|
||||
src.max_uses--
|
||||
if ("17")
|
||||
feedback_add_details("wizard_spell_learned","HS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/clothing/shoes/sandal(get_turf(usr)) //In case they've lost them.
|
||||
new /obj/item/clothing/gloves/purple(get_turf(usr))//To complete the outfit
|
||||
new /obj/item/clothing/suit/space/rig/wizard(get_turf(usr))
|
||||
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(usr))
|
||||
src.temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
|
||||
src.max_uses--
|
||||
|
||||
if (href_list["spell_choice"] == "18")
|
||||
var/area/wizard_station/A = locate()
|
||||
if(usr in A.contents)
|
||||
|
||||
201
code/game/hud.dm
201
code/game/hud.dm
@@ -1,4 +1,3 @@
|
||||
|
||||
//Upper left action buttons, displayed when you pick up an item that has this enabled.
|
||||
#define ui_action_slot1 "1:6,14:26"
|
||||
#define ui_action_slot2 "2:8,14:26"
|
||||
@@ -55,18 +54,15 @@
|
||||
#define ui_alien_fire "14:28,12:25"
|
||||
#define ui_alien_oxygen "14:28,11:25"
|
||||
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_nutrition "14:28,5:11"
|
||||
#define ui_temp "14:28,6:13"
|
||||
#define ui_health "14:28,7:15"
|
||||
#define ui_internal "14:28,8:17"
|
||||
|
||||
//borgs
|
||||
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
|
||||
|
||||
|
||||
//Pop-up inventory
|
||||
#define ui_shoes "2:8,1:5"
|
||||
|
||||
@@ -80,24 +76,14 @@
|
||||
|
||||
#define ui_head "2:8,4:11"
|
||||
|
||||
|
||||
|
||||
|
||||
//Intent small buttons
|
||||
/*
|
||||
#define ui_help_small "12:8,1:1"
|
||||
#define ui_disarm_small "12:15,1:18"
|
||||
#define ui_grab_small "12:32,1:18"
|
||||
#define ui_harm_small "12:39,1:1"
|
||||
*/
|
||||
#define ui_help_small "13:18,1:-3"
|
||||
#define ui_disarm_small "13:18,1:12"
|
||||
#define ui_grab_small "14:2,1:12"
|
||||
#define ui_harm_small "14:2,1:-3"
|
||||
|
||||
//#define ui_swapbutton "6:-16,1:5" //Unused
|
||||
|
||||
|
||||
//#define ui_headset "SOUTH,8"
|
||||
#define ui_hand "6:14,1:5"
|
||||
#define ui_hstore1 "5,5"
|
||||
@@ -109,82 +95,161 @@
|
||||
#define ui_iarrowleft "SOUTH-1,11"
|
||||
#define ui_iarrowright "SOUTH-1,13"
|
||||
|
||||
var/datum/global_hud/global_hud = new()
|
||||
|
||||
/datum/global_hud
|
||||
var/obj/screen/druggy
|
||||
var/obj/screen/blurry
|
||||
var/list/vimpaired
|
||||
var/list/darkMask
|
||||
|
||||
New()
|
||||
//420erryday psychedellic colours screen overlay for when you are high
|
||||
druggy = new /obj/screen()
|
||||
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
druggy.icon_state = "druggy"
|
||||
druggy.layer = 17
|
||||
druggy.mouse_opacity = 0
|
||||
|
||||
//that white blurry effect you get when you eyes are damaged
|
||||
blurry = new /obj/screen()
|
||||
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
blurry.icon_state = "blurry"
|
||||
blurry.layer = 17
|
||||
blurry.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/O
|
||||
var/i
|
||||
//that nasty looking dither you get when you're short-sighted
|
||||
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
|
||||
O = vimpaired[1]
|
||||
O.screen_loc = "1,1 to 5,15"
|
||||
O = vimpaired[2]
|
||||
O.screen_loc = "5,1 to 10,5"
|
||||
O = vimpaired[3]
|
||||
O.screen_loc = "6,11 to 10,15"
|
||||
O = vimpaired[4]
|
||||
O.screen_loc = "11,1 to 15,15"
|
||||
|
||||
//welding mask overlay black/dither
|
||||
darkMask = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen)
|
||||
O = darkMask[1]
|
||||
O.screen_loc = "3,3 to 5,13"
|
||||
O = darkMask[2]
|
||||
O.screen_loc = "5,3 to 10,5"
|
||||
O = darkMask[3]
|
||||
O.screen_loc = "6,11 to 10,13"
|
||||
O = darkMask[4]
|
||||
O.screen_loc = "11,3 to 13,13"
|
||||
O = darkMask[5]
|
||||
O.screen_loc = "1,1 to 15,2"
|
||||
O = darkMask[6]
|
||||
O.screen_loc = "1,3 to 2,15"
|
||||
O = darkMask[7]
|
||||
O.screen_loc = "14,3 to 15,15"
|
||||
O = darkMask[8]
|
||||
O.screen_loc = "3,14 to 13,15"
|
||||
|
||||
for(i=1,i<=4,i++)
|
||||
O = vimpaired[i]
|
||||
O.icon_state = "dither50"
|
||||
O.layer = 17
|
||||
O.mouse_opacity = 0
|
||||
|
||||
O = darkMask[i]
|
||||
O.icon_state = "dither50"
|
||||
O.layer = 17
|
||||
O.mouse_opacity = 0
|
||||
|
||||
for(i=5,i<=8,i++)
|
||||
O = darkMask[i]
|
||||
O.icon_state = "black"
|
||||
O.layer = 17
|
||||
O.mouse_opacity = 0
|
||||
|
||||
|
||||
|
||||
obj/hud/New(var/type = 0)
|
||||
instantiate(type)
|
||||
/datum/hud
|
||||
var/mob/mymob
|
||||
|
||||
var/hud_shown = 1 //Used for the HUD toggle (F12)
|
||||
var/inventory_shown = 1 //the inventory
|
||||
var/show_intent_icons = 0
|
||||
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
var/obj/screen/r_hand_hud_object
|
||||
var/obj/screen/l_hand_hud_object
|
||||
var/obj/screen/action_intent
|
||||
var/obj/screen/move_intent
|
||||
|
||||
var/list/adding
|
||||
var/list/other
|
||||
var/list/obj/screen/hotkeybuttons
|
||||
|
||||
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
|
||||
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
instantiate()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/hud/proc/hidden_inventory_update()
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
if(!mymob) return
|
||||
if(ishuman(mymob))
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(inventory_shown && hud_shown)
|
||||
if(ishuman(mymob))
|
||||
if(mymob:shoes) mymob:shoes:screen_loc = ui_shoes
|
||||
if(mymob:gloves) mymob:gloves:screen_loc = ui_gloves
|
||||
if(mymob:ears) mymob:ears:screen_loc = ui_ears
|
||||
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
|
||||
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
|
||||
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
|
||||
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
|
||||
if(mymob:head) mymob:head:screen_loc = ui_head
|
||||
if(H.shoes) H.shoes.screen_loc = ui_shoes
|
||||
if(H.gloves) H.gloves.screen_loc = ui_gloves
|
||||
if(H.ears) H.ears.screen_loc = ui_ears
|
||||
if(H.glasses) H.glasses.screen_loc = ui_glasses
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
|
||||
if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
|
||||
if(H.head) H.head.screen_loc = ui_head
|
||||
else
|
||||
if(ishuman(mymob))
|
||||
if(mymob:shoes) mymob:shoes:screen_loc = null
|
||||
if(mymob:gloves) mymob:gloves:screen_loc = null
|
||||
if(mymob:ears) mymob:ears:screen_loc = null
|
||||
if(mymob:glasses) mymob:glasses:screen_loc = null
|
||||
if(mymob:w_uniform) mymob:w_uniform:screen_loc = null
|
||||
if(mymob:wear_suit) mymob:wear_suit:screen_loc = null
|
||||
if(mymob:wear_mask) mymob:wear_mask:screen_loc = null
|
||||
if(mymob:head) mymob:head:screen_loc = null
|
||||
if(H.shoes) H.shoes.screen_loc = null
|
||||
if(H.gloves) H.gloves.screen_loc = null
|
||||
if(H.ears) H.ears.screen_loc = null
|
||||
if(H.glasses) H.glasses.screen_loc = null
|
||||
if(H.w_uniform) H.w_uniform.screen_loc = null
|
||||
if(H.wear_suit) H.wear_suit.screen_loc = null
|
||||
if(H.wear_mask) H.wear_mask.screen_loc = null
|
||||
if(H.head) H.head.screen_loc = null
|
||||
|
||||
/obj/hud/proc/persistant_inventory_update()
|
||||
/datum/hud/proc/persistant_inventory_update()
|
||||
if(!mymob) return
|
||||
if(ishuman(mymob))
|
||||
var/mob/living/carbon/human/H = mymob
|
||||
if(hud_shown)
|
||||
if(ishuman(mymob))
|
||||
if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
|
||||
if(mymob:wear_id) mymob:wear_id:screen_loc = ui_id
|
||||
if(mymob:belt) mymob:belt:screen_loc = ui_belt
|
||||
if(mymob:back) mymob:back:screen_loc = ui_back
|
||||
if(mymob:l_store) mymob:l_store:screen_loc = ui_storage1
|
||||
if(mymob:r_store) mymob:r_store:screen_loc = ui_storage2
|
||||
if(H.s_store) H.s_store.screen_loc = ui_sstore1
|
||||
if(H.wear_id) H.wear_id.screen_loc = ui_id
|
||||
if(H.belt) H.belt.screen_loc = ui_belt
|
||||
if(H.back) H.back.screen_loc = ui_back
|
||||
if(H.l_store) H.l_store.screen_loc = ui_storage1
|
||||
if(H.r_store) H.r_store.screen_loc = ui_storage2
|
||||
else
|
||||
if(ishuman(mymob))
|
||||
if(mymob:s_store) mymob:s_store:screen_loc = null
|
||||
if(mymob:wear_id) mymob:wear_id:screen_loc = null
|
||||
if(mymob:belt) mymob:belt:screen_loc = null
|
||||
if(mymob:back) mymob:back:screen_loc = null
|
||||
if(mymob:l_store) mymob:l_store:screen_loc = null
|
||||
if(mymob:r_store) mymob:r_store:screen_loc = null
|
||||
if(H.s_store) H.s_store.screen_loc = null
|
||||
if(H.wear_id) H.wear_id.screen_loc = null
|
||||
if(H.belt) H.belt.screen_loc = null
|
||||
if(H.back) H.back.screen_loc = null
|
||||
if(H.l_store) H.l_store.screen_loc = null
|
||||
if(H.r_store) H.r_store.screen_loc = null
|
||||
|
||||
|
||||
/obj/hud
|
||||
var/obj/screen/action_intent
|
||||
var/obj/screen/move_intent
|
||||
|
||||
var/obj/screen/hurt_intent
|
||||
var/obj/screen/disarm_intent
|
||||
var/obj/screen/help_intent
|
||||
var/obj/screen/grab_intent
|
||||
|
||||
var/hud_shown = 1 //Used for the HUD toggle (F12)
|
||||
var/inventory_shown = 1 //the inventory
|
||||
|
||||
/obj/hud/proc/instantiate(var/type = 0)
|
||||
|
||||
mymob = loc
|
||||
if(!istype(mymob, /mob)) return 0
|
||||
/datum/hud/proc/instantiate()
|
||||
if(!ismob(mymob)) return 0
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
|
||||
|
||||
if(RADAR in mymob.augmentations)
|
||||
spawn()
|
||||
if((RADAR in mymob.augmentations) && mymob.radar_open)
|
||||
if(mymob.radar_open)
|
||||
mymob:start_radar()
|
||||
else if(RADAR in mymob.augmentations)
|
||||
else
|
||||
mymob:place_radar_closed()
|
||||
|
||||
else if(ismonkey(mymob))
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
|
||||
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/captain(H), slot_w_uniform)
|
||||
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
|
||||
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
|
||||
H.equip_to_slot_or_del(U, slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
|
||||
|
||||
@@ -80,3 +80,87 @@
|
||||
process()
|
||||
..()
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater
|
||||
name = "Heater"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "freezer_0"
|
||||
density = 1
|
||||
|
||||
anchored = 1.0
|
||||
|
||||
current_heat_capacity = 1000
|
||||
|
||||
New()
|
||||
..()
|
||||
initialize_directions = dir
|
||||
|
||||
initialize()
|
||||
if(node) return
|
||||
|
||||
var/node_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
update_icon()
|
||||
if(src.node)
|
||||
if(src.on)
|
||||
icon_state = "heater_1"
|
||||
else
|
||||
icon_state = "heater"
|
||||
else
|
||||
icon_state = "heater_0"
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
var/temp_text = ""
|
||||
if(air_contents.temperature > (T20C+40))
|
||||
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
|
||||
else
|
||||
temp_text = "<FONT color=black>[air_contents.temperature]</FONT>"
|
||||
|
||||
var/dat = {"<B>Heating system</B><BR>
|
||||
Current status: [ on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
|
||||
Current gas temperature: [temp_text]<BR>
|
||||
Current air pressure: [air_contents.return_pressure()]<BR>
|
||||
Target gas temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
||||
"}
|
||||
|
||||
user << browse(dat, "window=heater;size=400x500")
|
||||
onclose(user, "heater")
|
||||
|
||||
Topic(href, href_list)
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
|
||||
usr.machine = src
|
||||
if (href_list["start"])
|
||||
src.on = !src.on
|
||||
update_icon()
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min((T20C+280), src.current_temperature+amount)
|
||||
else
|
||||
src.current_temperature = max(T20C, src.current_temperature+amount)
|
||||
src.updateUsrDialog()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
process()
|
||||
..()
|
||||
src.updateUsrDialog()
|
||||
@@ -94,6 +94,7 @@ obj/machinery/airlock_sensor
|
||||
name = "Airlock Sensor"
|
||||
|
||||
anchored = 1
|
||||
power_channel = ENVIRON
|
||||
|
||||
var/id_tag
|
||||
var/master_tag
|
||||
@@ -160,6 +161,7 @@ obj/machinery/access_button
|
||||
name = "Access Button"
|
||||
|
||||
anchored = 1
|
||||
power_channel = ENVIRON
|
||||
|
||||
var/master_tag
|
||||
var/frequency = 1449
|
||||
|
||||
@@ -3,8 +3,20 @@
|
||||
desc = "A computer used to control the stationary scrubbers and pumps in the area."
|
||||
icon_state = "area_atmos"
|
||||
circuit = "/obj/item/weapon/circuitboard/area_atmos"
|
||||
var/scrubber_state = 0 //0 = off; 1 = on
|
||||
|
||||
var/list/connectedscrubbers = new()
|
||||
var/status = ""
|
||||
|
||||
var/range = 25
|
||||
|
||||
//Simple variable to prevent me from doing attack_hand in both this and the child computer
|
||||
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
|
||||
|
||||
New()
|
||||
..()
|
||||
//So the scrubbers have time to spawn
|
||||
spawn(10)
|
||||
scanscrubbers()
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -14,38 +26,105 @@
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
var/dat = text("<center>Area Air Control:<br> <b><A href='?src=\ref[src];scrubbers=[1]'>Turn area scrubbers [scrubber_state?"off":"on"]</A></b></center>")
|
||||
user << browse("[dat]", "window=miningshuttle;size=200x100")
|
||||
var/dat = {"
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
a.green:link
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:visited
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:hover
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.green:active
|
||||
{
|
||||
color:#00CC00;
|
||||
}
|
||||
a.red:link
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:visited
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:hover
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
a.red:active
|
||||
{
|
||||
color:#FF0000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1>Area Air Control</h1></center>
|
||||
<font color="red">[status]</font><br>
|
||||
<a href="?src=\ref[src];scan=1">Scan</a>
|
||||
<table border="1" width="90%">"}
|
||||
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in connectedscrubbers)
|
||||
dat += {"
|
||||
<tr>
|
||||
<td>[scrubber.name]</td>
|
||||
<td width="150"><a class="green" href="?src=\ref[src];scrub=\ref[scrubber];toggle=1">Turn On</a> <a class="red" href="?src=\ref[src];scrub=\ref[scrubber];toggle=0">Turn Off</a></td>
|
||||
</tr>"}
|
||||
|
||||
dat += {"
|
||||
</table><br>
|
||||
<i>[zone]</i>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse("[dat]", "window=miningshuttle;size=400x400")
|
||||
status = ""
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["scrubbers"])
|
||||
toggle_scrubbers()
|
||||
usr << "\blue Area scrubbers turned [scrubber_state?"on":"off"]"
|
||||
|
||||
proc/toggle_scrubbers()
|
||||
if( (ishuman(usr)||issilicon(usr)) && !usr.stat && !usr.restrained() )
|
||||
scrubber_state = !scrubber_state
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
if (A.master)
|
||||
A = A.master
|
||||
for( var/obj/machinery/portable_atmospherics/scrubber/stationary/SCRUBBER in world )
|
||||
var/turf/T2 = get_turf(SCRUBBER)
|
||||
if ( T2 && T2.loc)
|
||||
var/area/A2 = T2.loc
|
||||
if ( istype(A2) && A2.master && A2.master == A )
|
||||
SCRUBBER.on = scrubber_state
|
||||
SCRUBBER.update_icon()
|
||||
|
||||
if(scrubber_state)
|
||||
icon_state = "area_atmos2"
|
||||
else
|
||||
icon_state = "area_atmos"
|
||||
if(href_list["scan"])
|
||||
scanscrubbers()
|
||||
else if(href_list["toggle"])
|
||||
var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber = locate(href_list["scrub"])
|
||||
|
||||
if(!validscrubber(scrubber))
|
||||
spawn(20)
|
||||
status = "ERROR: Couldn't connect to scrubber! (timeout)"
|
||||
connectedscrubbers -= scrubber
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
scrubber.on = text2num(href_list["toggle"])
|
||||
scrubber.update_icon()
|
||||
|
||||
proc/validscrubber( var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
proc/scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
|
||||
var/found = 0
|
||||
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in range(range, src.loc))
|
||||
if(istype(scrubber))
|
||||
found = 1
|
||||
connectedscrubbers += scrubber
|
||||
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -69,3 +148,54 @@
|
||||
A.icon_state = "4"
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/machinery/computer/area_atmos/area
|
||||
zone = "This computer is working in a wired network limited to this area."
|
||||
|
||||
validscrubber( var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber as obj )
|
||||
if(!isobj(scrubber))
|
||||
return 0
|
||||
|
||||
/*
|
||||
wow this is stupid, someone help me
|
||||
*/
|
||||
var/turf/T_src = get_turf(src)
|
||||
if(!T_src.loc) return 0
|
||||
var/area/A_src = T_src.loc
|
||||
if (A_src.master)
|
||||
A_src = A_src.master
|
||||
|
||||
var/turf/T_scrub = get_turf(scrubber)
|
||||
if(!T_scrub.loc) return 0
|
||||
var/area/A_scrub = T_scrub.loc
|
||||
if (A_scrub.master)
|
||||
A_scrub = A_scrub.master
|
||||
|
||||
if(A_scrub != A_src)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
scanscrubbers()
|
||||
connectedscrubbers = new()
|
||||
|
||||
var/found = 0
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
if (A.master)
|
||||
A = A.master
|
||||
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in world )
|
||||
var/turf/T2 = get_turf(scrubber)
|
||||
if(T2 && T2.loc)
|
||||
var/area/A2 = T2.loc
|
||||
if(istype(A2) && A2.master && A2.master == A )
|
||||
connectedscrubbers += scrubber
|
||||
found = 1
|
||||
|
||||
|
||||
if(!found)
|
||||
status = "ERROR: No scrubber found!"
|
||||
|
||||
src.updateUsrDialog()
|
||||
@@ -9,7 +9,7 @@
|
||||
var/direction_out = 0 //0 = siphoning, 1 = releasing
|
||||
var/target_pressure = 100
|
||||
|
||||
volume = 2500
|
||||
volume = 1000
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/update_icon()
|
||||
src.overlays = 0
|
||||
|
||||
@@ -10,13 +10,22 @@
|
||||
|
||||
volume = 750
|
||||
|
||||
stationary
|
||||
name = "Stationary Air Scrubber"
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge
|
||||
name = "Huge Air Scrubber"
|
||||
icon_state = "scrubber:0"
|
||||
anchored = 1
|
||||
volume = 30000
|
||||
volume = 50000
|
||||
volume_rate = 5000
|
||||
|
||||
var/global/gid = 1
|
||||
var/id = 0
|
||||
New()
|
||||
..()
|
||||
id = gid
|
||||
gid++
|
||||
|
||||
name = "[name] (ID [id])"
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
usr << "\blue You can't directly interact with this machine. Use the area atmos computer."
|
||||
|
||||
@@ -29,8 +38,30 @@
|
||||
icon_state = "scrubber:0"
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(on)
|
||||
user << "\blue Turn it off first!"
|
||||
return
|
||||
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You [anchored ? "wrench" : "unwrench"] \the [src]."
|
||||
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/stationary
|
||||
name = "Stationary Air Scrubber"
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue The bolts are too tight for you to unscrew!"
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/update_icon()
|
||||
src.overlays = 0
|
||||
|
||||
|
||||
@@ -296,3 +296,23 @@
|
||||
return 1
|
||||
busy = 0
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/machinery/camera/autoname
|
||||
var/number = 0 //camera number in area
|
||||
|
||||
//This camera type automatically sets it's name to whatever the area that it's in is called.
|
||||
/obj/machinery/camera/autoname/New()
|
||||
..()
|
||||
spawn(10)
|
||||
number = 1
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
for(var/obj/machinery/camera/autoname/C in world)
|
||||
if(C == src) continue
|
||||
var/area/CA = get_area(C)
|
||||
if(CA.type == A.type)
|
||||
if(C.number)
|
||||
number = max(number, C.number+1)
|
||||
c_tag = "[A.name] #[number]"
|
||||
@@ -23,9 +23,12 @@
|
||||
for(var/mob/living/M in mob_list)
|
||||
// Easy checks first.
|
||||
// Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
|
||||
if(M.loc.z == 2)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(M.loc.z > 6)
|
||||
if(T.z == 2)
|
||||
continue
|
||||
if(T.z > 6)
|
||||
continue
|
||||
if(M == usr)
|
||||
continue
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
src.interact(usr)
|
||||
|
||||
/obj/machinery/camera/proc/interact(mob/living/user as mob)
|
||||
if(!panel_open || isAI(user))
|
||||
if(!panel_open)
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/machinery/camera/Topic(href, href_list)
|
||||
..()
|
||||
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
|
||||
if (in_range(src, usr) && istype(src.loc, /turf))
|
||||
usr.machine = src
|
||||
if (href_list["wires"])
|
||||
var/t1 = text2num(href_list["wires"])
|
||||
|
||||
@@ -67,6 +67,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
name = "Airlock"
|
||||
icon = 'icons/obj/doors/Doorint.dmi'
|
||||
icon_state = "door_closed"
|
||||
power_channel = ENVIRON
|
||||
|
||||
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
var/hackProof = 0 // if 1, this door can't be hacked by the AI
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
icon_state = "door_open"
|
||||
opacity = 0
|
||||
density = 0
|
||||
power_channel = ENVIRON
|
||||
var/blocked = 0
|
||||
var/nextstate = null
|
||||
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
power_change()
|
||||
if(powered(ENVIRON))
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Shutters"
|
||||
icon = 'icons/obj/doors/rapid_pdoor.dmi'
|
||||
icon_state = "shutter1"
|
||||
power_channel = ENVIRON
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/New()
|
||||
..()
|
||||
|
||||
@@ -152,6 +152,7 @@ obj/machinery/embedded_controller/radio/access_controller
|
||||
|
||||
name = "Access Console"
|
||||
density = 0
|
||||
power_channel = ENVIRON
|
||||
|
||||
frequency = 1449
|
||||
|
||||
|
||||
@@ -209,6 +209,7 @@ obj/machinery/embedded_controller/radio/airlock_controller
|
||||
density = 0
|
||||
|
||||
frequency = 1449
|
||||
power_channel = ENVIRON
|
||||
|
||||
// Setup parameters only
|
||||
var/id_tag
|
||||
|
||||
@@ -17,6 +17,9 @@ Buildable meters
|
||||
#define PIPE_INSULATED_BENT 12
|
||||
#define PIPE_GAS_FILTER 13
|
||||
#define PIPE_GAS_MIXER 14
|
||||
#define PIPE_PASSIVE_GATE 15
|
||||
#define PIPE_VOLUME_PUMP 16
|
||||
#define PIPE_HEAT_EXCHANGE 17
|
||||
|
||||
/obj/item/pipe
|
||||
name = "pipe"
|
||||
@@ -66,6 +69,12 @@ Buildable meters
|
||||
src.pipe_type = PIPE_GAS_MIXER
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_scrubber))
|
||||
src.pipe_type = PIPE_SCRUBBER
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/binary/passive_gate))
|
||||
src.pipe_type = PIPE_PASSIVE_GATE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/binary/volume_pump))
|
||||
src.pipe_type = PIPE_VOLUME_PUMP
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger))
|
||||
src.pipe_type = PIPE_HEAT_EXCHANGE
|
||||
else
|
||||
src.pipe_type = pipe_type
|
||||
src.dir = dir
|
||||
@@ -93,6 +102,9 @@ Buildable meters
|
||||
"bent insulated pipe", \
|
||||
"gas filter", \
|
||||
"gas mixer", \
|
||||
"passive gate", \
|
||||
"volume pump", \
|
||||
"heat exchanger", \
|
||||
)
|
||||
name = nlist[pipe_type+1] + " fitting"
|
||||
var/list/islist = list( \
|
||||
@@ -111,6 +123,9 @@ Buildable meters
|
||||
"insulated", \
|
||||
"filter", \
|
||||
"mixer", \
|
||||
"passivegate", \
|
||||
"volumepump", \
|
||||
"heunary", \
|
||||
)
|
||||
icon_state = islist[pipe_type + 1]
|
||||
|
||||
@@ -164,12 +179,14 @@ Buildable meters
|
||||
PIPE_HE_STRAIGHT, \
|
||||
PIPE_JUNCTION ,\
|
||||
PIPE_PUMP ,\
|
||||
PIPE_VOLUME_PUMP ,\
|
||||
PIPE_PASSIVE_GATE ,\
|
||||
PIPE_MVALVE \
|
||||
)
|
||||
return dir|flip
|
||||
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT)
|
||||
return dir //dir|acw
|
||||
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER)
|
||||
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
|
||||
return dir
|
||||
if(PIPE_MANIFOLD)
|
||||
return flip|cw|acw
|
||||
@@ -451,6 +468,54 @@ Buildable meters
|
||||
P.node2.initialize()
|
||||
P.node2.build_network()
|
||||
|
||||
if(PIPE_PASSIVE_GATE) //passive gate
|
||||
var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc)
|
||||
P.dir = dir
|
||||
P.initialize_directions = pipe_dir
|
||||
if (pipename)
|
||||
P.name = pipename
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
P.build_network()
|
||||
if (P.node1)
|
||||
P.node1.initialize()
|
||||
P.node1.build_network()
|
||||
if (P.node2)
|
||||
P.node2.initialize()
|
||||
P.node2.build_network()
|
||||
|
||||
if(PIPE_VOLUME_PUMP) //volume pump
|
||||
var/obj/machinery/atmospherics/binary/volume_pump/P = new(src.loc)
|
||||
P.dir = dir
|
||||
P.initialize_directions = pipe_dir
|
||||
if (pipename)
|
||||
P.name = pipename
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
P.build_network()
|
||||
if (P.node1)
|
||||
P.node1.initialize()
|
||||
P.node1.build_network()
|
||||
if (P.node2)
|
||||
P.node2.initialize()
|
||||
P.node2.build_network()
|
||||
|
||||
if(PIPE_HEAT_EXCHANGE) // heat exchanger
|
||||
var/obj/machinery/atmospherics/unary/heat_exchanger/C = new( src.loc )
|
||||
C.dir = dir
|
||||
C.initialize_directions = pipe_dir
|
||||
if (pipename)
|
||||
C.name = pipename
|
||||
var/turf/T = C.loc
|
||||
C.level = T.intact ? 2 : 1
|
||||
C.initialize()
|
||||
C.build_network()
|
||||
if (C.node)
|
||||
C.node.initialize()
|
||||
C.node.build_network()
|
||||
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] fastens the [src].", \
|
||||
@@ -502,3 +567,6 @@ Buildable meters
|
||||
#undef PIPE_INSULATED_BENT
|
||||
#undef PIPE_GAS_FILTER
|
||||
#undef PIPE_GAS_MIXER
|
||||
#undef PIPE_PASSIVE_GATE
|
||||
#undef PIPE_VOLUME_PUMP
|
||||
#undef PIPE_OUTLET_INJECT
|
||||
@@ -23,6 +23,8 @@
|
||||
<A href='?src=\ref[src];make=4;dir=1'>Connector</A><BR>
|
||||
<A href='?src=\ref[src];make=7;dir=1'>Unary Vent</A><BR>
|
||||
<A href='?src=\ref[src];make=9;dir=1'>Gas Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=15;dir=1'>Passive Gate</A><BR>
|
||||
<A href='?src=\ref[src];make=16;dir=1'>Volume Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=10;dir=1'>Scrubber</A><BR>
|
||||
<A href='?src=\ref[src];makemeter=1'>Meter</A><BR>
|
||||
<A href='?src=\ref[src];make=13;dir=1'>Gas Filter</A><BR>
|
||||
@@ -31,6 +33,7 @@
|
||||
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=6;dir=1'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];make=9;dir=17'>Heat Exchanger</A><BR>
|
||||
<b>Insulated pipes:</b><BR>
|
||||
<A href='?src=\ref[src];make=11;dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=12;dir=5'>Bent Pipe</A><BR>
|
||||
@@ -138,17 +141,14 @@ Nah
|
||||
return
|
||||
|
||||
var/dat = {"<b>Disposal Pipes</b><br><br>
|
||||
<A href='?src=\ref[src];ptype=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];ptype=1'>Bent Pipe</A><BR><BR>
|
||||
|
||||
<A href='?src=\ref[src];ptype=2'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];ptype=4'>Y-Junction</A><BR>
|
||||
<A href='?src=\ref[src];ptype=9'>Sorting Junction</A><BR><BR>
|
||||
|
||||
<A href='?src=\ref[src];ptype=5'>Trunk</A><BR>
|
||||
<A href='?src=\ref[src];ptype=6;density=1'>Bin</A><BR>
|
||||
<A href='?src=\ref[src];ptype=7;density=1'>Outlet</A><BR>
|
||||
<A href='?src=\ref[src];ptype=8;density=1'>Chute</A><BR>
|
||||
<A href='?src=\ref[src];dmake=0'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];dmake=1'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];dmake=2'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];dmake=3'>Y-Junction</A><BR>
|
||||
<A href='?src=\ref[src];dmake=4'>Trunk</A><BR>
|
||||
<A href='?src=\ref[src];dmake=5'>Bin</A><BR>
|
||||
<A href='?src=\ref[src];dmake=6'>Outlet</A><BR>
|
||||
<A href='?src=\ref[src];dmake=7'>Chute</A><BR>
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>[src]</TITLE></HEAD><TT>[dat]</TT>", "window=pipedispenser")
|
||||
@@ -162,20 +162,33 @@ Nah
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["ptype"])
|
||||
if(href_list["dmake"])
|
||||
if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=pipedispenser")
|
||||
return
|
||||
if(!wait)
|
||||
var/p_type = text2num(href_list["dmake"])
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
|
||||
var/p_type = text2num(href_list["ptype"])
|
||||
C.ptype = p_type
|
||||
|
||||
if(href_list["density"])
|
||||
var/p_density = text2num(href_list["density"])
|
||||
C.density = p_density
|
||||
|
||||
switch(p_type)
|
||||
if(0)
|
||||
C.ptype = 0
|
||||
if(1)
|
||||
C.ptype = 1
|
||||
if(2)
|
||||
C.ptype = 2
|
||||
if(3)
|
||||
C.ptype = 4
|
||||
if(4)
|
||||
C.ptype = 5
|
||||
if(5)
|
||||
C.ptype = 6
|
||||
C.density = 1
|
||||
if(6)
|
||||
C.ptype = 7
|
||||
C.density = 1
|
||||
if(7)
|
||||
C.ptype = 8
|
||||
C.density = 1
|
||||
C.add_fingerprint(usr)
|
||||
C.update()
|
||||
wait = 1
|
||||
|
||||
@@ -11,6 +11,8 @@ obj/machinery/recharger
|
||||
var/obj/item/weapon/charging = null
|
||||
|
||||
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
if(istype(user,/mob/living/silicon))
|
||||
return
|
||||
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton))
|
||||
if(charging)
|
||||
return
|
||||
|
||||
@@ -393,8 +393,9 @@
|
||||
return
|
||||
var/area/thearea = pick(theareas)
|
||||
var/list/L = list()
|
||||
var/turf/pos = get_turf(src)
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density)
|
||||
if(!T.density && pos.z == T.z)
|
||||
var/clear = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
|
||||
@@ -400,17 +400,11 @@
|
||||
/obj/machinery/mecha_part_fabricator/proc/process_queue()
|
||||
var/obj/item/part = listgetindex(src.queue, 1)
|
||||
if(!part)
|
||||
if(remove_from_queue(1))
|
||||
remove_from_queue(1)
|
||||
return process_queue()
|
||||
else
|
||||
// Most likely means we have an empty queue, so stop processing
|
||||
return 0
|
||||
if(!(part.vars.Find("construction_time")) || !(part.vars.Find("construction_cost")))//If it shouldn't be printed
|
||||
if(remove_from_queue(1))//Take it out of the quene
|
||||
remove_from_queue(1)//Take it out of the quene
|
||||
return process_queue()//Then reprocess it
|
||||
else
|
||||
// Most likely means we have an empty queue, so stop processing
|
||||
return 0
|
||||
temp = null
|
||||
while(part)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
|
||||
@@ -170,20 +170,26 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 15
|
||||
var/obj/effect/alien/weeds/node/linked_node = null
|
||||
|
||||
node
|
||||
/obj/effect/alien/weeds/node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
luminosity = NODERANGE
|
||||
|
||||
/obj/effect/alien/weeds/New()
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..(src.loc, src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/New(pos, node)
|
||||
..()
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
spawn(rand(150,300))
|
||||
spawn(rand(50, 150))
|
||||
if(src)
|
||||
Life()
|
||||
return
|
||||
@@ -215,8 +221,8 @@ Alien plants should do something if theres a lot of poison
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
|
||||
continue
|
||||
if(!linked_node)
|
||||
return
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
@@ -225,7 +231,7 @@ Alien plants should do something if theres a lot of poison
|
||||
if(O.density)
|
||||
continue direction_loop
|
||||
|
||||
new /obj/effect/alien/weeds(T)
|
||||
new /obj/effect/alien/weeds(T, linked_node)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
@@ -370,10 +376,10 @@ Alien plants should do something if theres a lot of poison
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst() //drops and kills the hugger if any is remaining
|
||||
proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
|
||||
if(child)
|
||||
if(kill && istype(child))
|
||||
loc.contents += child
|
||||
child.Die()
|
||||
|
||||
@@ -381,6 +387,7 @@ Alien plants should do something if theres a lot of poison
|
||||
status = BURST
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
@@ -388,7 +395,6 @@ Alien plants should do something if theres a lot of poison
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
@@ -417,3 +423,21 @@ Alien plants should do something if theres a lot of poison
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(status == GROWN && iscarbon(AM) && !isalien(AM))
|
||||
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.stat == CONSCIOUS && C.has_disease(/datum/disease/alien_embryo))
|
||||
return
|
||||
|
||||
status = BURST
|
||||
flick("egg_opening", src) //Play animation
|
||||
var/turf/pos = get_turf(src)
|
||||
spawn(18) // Wait until the animation finishes
|
||||
Burst(0)
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
child.loc = pos
|
||||
if(AM && in_range(AM, pos))
|
||||
child.Attach(AM)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
|
||||
@@ -209,6 +209,11 @@
|
||||
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/cutewitch/New()
|
||||
new /obj/item/clothing/under/sundress(src.loc)
|
||||
new /obj/item/clothing/head/witchwig(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/fakewizard/New()
|
||||
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
|
||||
new /obj/item/clothing/head/wizard/fake(src.loc)
|
||||
|
||||
@@ -160,6 +160,15 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/kiddieplaque
|
||||
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child is holding a crayon and writing some code in his diary with it. The child is smiling evilly."
|
||||
name = "Credits plaque for AI developers."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "kiddieplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/atmosplaque
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
name = "FEA Atmospherics Division"
|
||||
|
||||
@@ -550,7 +550,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, t, lock_code))
|
||||
if(src.hidden_uplink && hidden_uplink.check_trigger(U, lowertext(t), lowertext(lock_code)))
|
||||
U << "The PDA softly beeps."
|
||||
U << browse(null, "window=pda")
|
||||
else
|
||||
@@ -837,8 +837,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
C.loc = src
|
||||
user << "<span class='notice'>You insert [C] into [src].</span>"
|
||||
cartridge = C
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
if(C:radio)
|
||||
C:radio.hostpda = src
|
||||
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
|
||||
/obj/item/device/paicard/Topic(href, href_list)
|
||||
|
||||
if(!usr || usr.stat)
|
||||
return
|
||||
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
|
||||
@@ -81,140 +81,3 @@
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/security(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Chemical things
|
||||
***********************************************************************/
|
||||
|
||||
//Moved to modules/chemistry
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
RCD
|
||||
***********************************************************************/
|
||||
/obj/item/borg/rcd
|
||||
name = "robotic rapid-construction-device"
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rcd"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 5.0
|
||||
w_class = 3.0
|
||||
// datum/effect/effect/system/spark_spread/spark_system
|
||||
var/working = 0
|
||||
var/mode = 1
|
||||
var/disabled = 0
|
||||
|
||||
/*
|
||||
New()
|
||||
src.spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
return
|
||||
*/
|
||||
|
||||
proc/activate()
|
||||
// spark_system.set_up(5, 0, src)
|
||||
// src.spark_system.start()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if(mode == 1)
|
||||
mode = 2
|
||||
user << "Changed mode to 'Airlock'"
|
||||
// src.spark_system.start()
|
||||
return
|
||||
if(mode == 2)
|
||||
mode = 3
|
||||
user << "Changed mode to 'Deconstruct'"
|
||||
// src.spark_system.start()
|
||||
return
|
||||
if(mode == 3)
|
||||
mode = 1
|
||||
user << "Changed mode to 'Floor & Walls'"
|
||||
// src.spark_system.start()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user as mob)
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))//No RCDs on the shuttles -Sieve
|
||||
disabled = 1
|
||||
else
|
||||
disabled = 0
|
||||
if(!isrobot(user)|| disabled == 1) return
|
||||
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock))) return
|
||||
|
||||
var/mob/living/silicon/robot/R = user
|
||||
var/obj/item/weapon/cell/cell = R.cell
|
||||
if(!cell) return
|
||||
|
||||
if(istype(A, /turf))
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(istype(A, /turf/space))
|
||||
if(!cell.use(30)) return
|
||||
user << "Building Floor..."
|
||||
activate()
|
||||
A:ReplaceWithPlating()
|
||||
return
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(!cell.use(90)) return
|
||||
user << "Building Wall (3)..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
activate()
|
||||
A:ReplaceWithWall()
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(!cell.use(300)) return
|
||||
user << "Building Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
activate()
|
||||
if(locate(/obj/machinery/door) in get_turf(src)) return
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
|
||||
T.autoclose = 1
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
if(!cell.use(150)) return
|
||||
user << "Deconstructing Wall..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 40))
|
||||
activate()
|
||||
A:ReplaceWithPlating()
|
||||
return
|
||||
|
||||
if(istype(A, /turf/simulated/wall/r_wall)) //by order of muskets -pete
|
||||
return
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
user << "Deconstructing Floor..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
activate()
|
||||
A:ReplaceWithSpace()
|
||||
return
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
user << "Deconstructing Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
del(A)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -50,21 +50,6 @@
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = H.get_organ("head")
|
||||
|
||||
// If we're targetting arms or legs, also heal the respective hand/foot
|
||||
if(affecting.name in list("l_arm","r_arm","l_leg","r_leg"))
|
||||
var/datum/organ/external/child
|
||||
if(affecting.name == "l_arm")
|
||||
child = H.get_organ("l_hand")
|
||||
else if(affecting.name == "r_arm")
|
||||
child = H.get_organ("r_hand")
|
||||
else if(affecting.name == "r_leg")
|
||||
child = H.get_organ("r_foot")
|
||||
else if(affecting.name == "l_leg")
|
||||
child = H.get_organ("l_foot")
|
||||
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn) || child.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Contains:
|
||||
* Grass
|
||||
* Wood
|
||||
* Carpet
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -36,3 +37,19 @@
|
||||
throw_range = 20
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
max_amount = 60
|
||||
|
||||
/*
|
||||
* Carpets
|
||||
*/
|
||||
/obj/item/stack/tile/carpet
|
||||
name = "carpet"
|
||||
singular_name = "carpet"
|
||||
desc = "A piece of carpet. It is the same size as a floor tile"
|
||||
icon_state = "tile-carpet"
|
||||
w_class = 3.0
|
||||
force = 1.0
|
||||
throwforce = 1.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
max_amount = 60
|
||||
@@ -24,6 +24,7 @@ RCD
|
||||
var/matter = 0
|
||||
var/working = 0
|
||||
var/mode = 1
|
||||
var/canRwall = 0
|
||||
var/disabled = 0
|
||||
|
||||
|
||||
@@ -35,7 +36,7 @@ RCD
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((matter + 10) > 30)
|
||||
@@ -50,110 +51,136 @@ RCD
|
||||
return
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
attack_self(mob/user)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
user << "<span class='notice'>Changed mode to 'Airlock'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(2)
|
||||
mode = 3
|
||||
user << "<span class='notice'>Changed mode to 'Deconstruct'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(3)
|
||||
mode = 1
|
||||
user << "<span class='notice'>Changed mode to 'Floor & Walls'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user as mob)
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))//Nanotrasen Matter Jammer TM -Sieve
|
||||
disabled = 1
|
||||
else
|
||||
disabled = 0
|
||||
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
|
||||
return
|
||||
|
||||
if(istype(A, /turf) && mode == 1)
|
||||
if(istype(A, /turf/space) && matter >= 1)
|
||||
if(!disabled && matter >= 1)
|
||||
proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user)
|
||||
if(disabled && !isrobot(user))
|
||||
return 0
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
|
||||
return 0
|
||||
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
|
||||
return 0
|
||||
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(istype(A, /turf/space))
|
||||
if(useResource(1, user))
|
||||
user << "Building Floor..."
|
||||
activate()
|
||||
A:ReplaceWithPlating()
|
||||
matter--
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 3)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(3, user))
|
||||
user << "Building Wall ..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(!disabled && matter >= 3)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
if(!useResource(3, user)) return 0
|
||||
activate()
|
||||
A:ReplaceWithWall()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
matter -= 3
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 2 && matter >= 10)
|
||||
user << "Building Airlock (10)..."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(10, user))
|
||||
user << "Building Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!disabled && matter >= 10)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
if(locate(/obj/machinery/door) in get_turf(src)) return
|
||||
if(!useResource(10, user)) return 0
|
||||
activate()
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
|
||||
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
T.autoclose = 1
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
matter -= 10
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
else if(mode == 3 && (istype(A, /turf) || istype(A, /obj/machinery/door/airlock) ) )
|
||||
if(istype(A, /turf/simulated/wall) && !istype(A, /turf/simulated/wall/r_wall) && matter >= 4)
|
||||
user << "Deconstructing Wall (4)..."
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
if(3)
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
|
||||
return 0
|
||||
if(checkResource(5, user))
|
||||
user << "Deconstructing Wall..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 40))
|
||||
if(!disabled && matter >= 4)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
if(!useResource(5, user)) return 0
|
||||
activate()
|
||||
A:ReplaceWithPlating()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
matter -= 4
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /turf/simulated/wall/r_wall))
|
||||
return
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 5)
|
||||
user << "Deconstructing Floor (5)..."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(5, user))
|
||||
user << "Deconstructing Floor..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!disabled && matter >= 5)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
if(!useResource(5, user)) return 0
|
||||
activate()
|
||||
A:ReplaceWithSpace()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
matter -= 5
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
if(istype(A, /obj/machinery/door/airlock) && matter >= 10)
|
||||
user << "Deconstructing Airlock (10)..."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
if(checkResource(10, user))
|
||||
user << "Deconstructing Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!disabled && matter >= 10)
|
||||
spark_system.set_up(5, 0, src)
|
||||
src.spark_system.start()
|
||||
if(!useResource(10, user)) return 0
|
||||
activate()
|
||||
del(A)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
matter -= 10
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
else
|
||||
user << "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin."
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
|
||||
if(matter < amount)
|
||||
return 0
|
||||
matter -= amount
|
||||
desc = "A RCD. It currently holds [matter]/30 matter-units."
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
|
||||
return matter >= amount
|
||||
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
|
||||
if(!isrobot(user))
|
||||
return 0
|
||||
return user:cell:use(amount * 30)
|
||||
|
||||
/obj/item/weapon/rcd/borg/checkResource(var/amount, var/mob/user)
|
||||
if(!isrobot(user))
|
||||
return 0
|
||||
return user:cell:charge >= (amount * 30)
|
||||
|
||||
/obj/item/weapon/rcd/borg/New()
|
||||
..()
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
canRwall = 1
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
animate_movement = 2
|
||||
var/throwforce = 1
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/sharp = 0 // whether this object cuts
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(istype(O, /obj/screen) || istype(O, /obj/hud)) //fix for HUD elements making their way into the world -Pete
|
||||
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
|
||||
return
|
||||
if(O.loc == user)
|
||||
return
|
||||
|
||||
@@ -1,8 +1,28 @@
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
anchored = 1
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
|
||||
/obj/structure/falsewall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/Del()
|
||||
|
||||
var/temploc = src.loc
|
||||
|
||||
spawn(10)
|
||||
for(var/turf/simulated/wall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falsewall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falserwall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/gold
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag"
|
||||
@@ -63,6 +83,33 @@
|
||||
anchored = 1
|
||||
var/mineral = "metal"
|
||||
|
||||
/obj/structure/falserwall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/relativewall()
|
||||
|
||||
if(!density)
|
||||
icon_state = "[mineral]fwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falserwall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "[mineral][junction]"
|
||||
return
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user as mob)
|
||||
if(density)
|
||||
// Open wall
|
||||
@@ -92,6 +139,7 @@
|
||||
icon_state = "[mineral]fwall_open"
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(density)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
var/turf/T = get_turf(src)
|
||||
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
|
||||
@@ -113,8 +161,10 @@
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You can't reach, close it first!"
|
||||
|
||||
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
|
||||
var/turf/T = get_turf(src)
|
||||
if(!mineral)
|
||||
T.ReplaceWithWall()
|
||||
@@ -189,8 +239,32 @@
|
||||
SetOpacity(1)
|
||||
relativewall()
|
||||
|
||||
/obj/structure/falserwall/relativewall()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!density)
|
||||
icon_state = "frwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falserwall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "rwall[junction]"
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
var/turf/T = get_turf(src)
|
||||
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
var/obj/item/stack/sheet/S = W
|
||||
switch(S.type)
|
||||
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
S.use(2)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
//For those other infidels who uses this datum
|
||||
//VIOLINSSS
|
||||
var/list/lines
|
||||
var/list/lines = new()
|
||||
|
||||
var/tempo = 5
|
||||
|
||||
@@ -245,10 +245,54 @@
|
||||
soundlist["Cb9"] = 'sound/piano/Cb9.ogg'
|
||||
soundlist["Cn9"] = 'sound/piano/Cn9.ogg'
|
||||
|
||||
proc/statusmsg( var/txt as text )
|
||||
proc/statusmsg( var/txt )
|
||||
status = txt
|
||||
updateUsrDialog()
|
||||
|
||||
proc/unbayify( var/text )
|
||||
var/list/partlist = dd_text2list(text, ",")
|
||||
|
||||
var/i
|
||||
for(i=1, i<=partlist.len, i++)
|
||||
var/part = partlist[i]
|
||||
var/list/x = dd_text2list(part, "/")
|
||||
|
||||
var/tone = ""
|
||||
var/tempo = "1"
|
||||
if(x.len >= 1)
|
||||
tone = x[1]
|
||||
|
||||
if(x.len == 1)
|
||||
//If there's only the tone set, move it to tempo side instead
|
||||
//It has to be null, otherwise it means it starts with a number, which is something stupid.
|
||||
if(!isnull(text2num(copytext(tone, 1, 2))))
|
||||
//Sets tempo to whatever number we found in there (text2num removes other symbols)
|
||||
tone = ""
|
||||
tempo = "[text2num(tone)]"
|
||||
|
||||
if(x.len == 2)
|
||||
tempo = x[2]
|
||||
|
||||
//Can't divide by zero, what did they think?
|
||||
if(tempo=="0")
|
||||
tempo = "1"
|
||||
|
||||
//Removes /infinity, /Infini, whatever this means
|
||||
if(findtext(lowertext(tempo), "inf"))
|
||||
tempo = "1"
|
||||
|
||||
//If both tone and tempo is set, and its numbers on both sides, leftside is invalid and gets set to ""
|
||||
//It has to be null, otherwise it means it starts with a number, which is something stupid.
|
||||
if(!isnull(text2num(copytext(tone, 1, 2))))
|
||||
//Sets tempo to whatever number we found in there (text2num removes other symbols)
|
||||
tempo = ""
|
||||
|
||||
partlist[i] = "[tone]/[tempo]"
|
||||
|
||||
text = dd_list2text(partlist, ",")
|
||||
|
||||
return text
|
||||
|
||||
proc/playsong()
|
||||
if(currentsong.compilesuccess == 0)
|
||||
playing = 0
|
||||
@@ -288,6 +332,7 @@
|
||||
|
||||
var/strippedsourcestring = dd_replacetext(currentsong.sourcestring, "\n", "")
|
||||
|
||||
strippedsourcestring = unbayify(strippedsourcestring)
|
||||
|
||||
for(var/part in dd_text2list(strippedsourcestring, ","))
|
||||
var/list/x = dd_text2list(part, "/")
|
||||
@@ -297,9 +342,10 @@
|
||||
var/tempodiv = 1
|
||||
if(xlen==2)
|
||||
tempodiv = text2num(x[2])
|
||||
if(tempodiv == 0)
|
||||
statusmsg( "Compile Error: Can't divide by 0!\nAt Part:'[part]' Tone:" )
|
||||
return
|
||||
if(tempodiv <= 0)
|
||||
//statusmsg( "Compile Error: Can't divide by 0!\nAt Part:'[part]' Tone:" )
|
||||
//return
|
||||
tempodiv = 1
|
||||
else if(xlen>2)
|
||||
statusmsg( "Compile Error: Tempo Syntax Error!\nAt Part:'[part]' Tone:" )
|
||||
return
|
||||
@@ -368,7 +414,7 @@
|
||||
compilestring += "x" + finaltone + "<22>"
|
||||
|
||||
//y indicates its a sleep
|
||||
compilestring += "y[round((currentsong.tempo / tempodiv)*100)/100]<5D>"
|
||||
compilestring += "y[round((currentsong.tempo / tempodiv)*10000)/10000]<5D>"
|
||||
|
||||
currentsong.compiledstring = compilestring
|
||||
currentsong.compilesuccess = 1
|
||||
@@ -467,12 +513,14 @@
|
||||
if(showeditor)
|
||||
dat += {"
|
||||
Tempo:
|
||||
<a href='?src=\ref[src];tempo=-3'>-</a><a href='?src=\ref[src];tempo=-2'>-</a><a href='?src=\ref[src];tempo=-1'>-</a>
|
||||
<a href='?src=\ref[src];bpminc=-50'>+</a><a href='?src=\ref[src];bpminc=-20'>-</a><a href='?src=\ref[src];bpminc=-5'>-</a><a href='?src=\ref[src];bpminc=-1'>-</a>
|
||||
[calctempo] BPM
|
||||
<a href='?src=\ref[src];tempo=1'>+</a><a href='?src=\ref[src];tempo=2'>+</a><a href='?src=\ref[src];tempo=3'>+</a><br>
|
||||
<a href='?src=\ref[src];bpminc=1'>+</a><a href='?src=\ref[src];bpminc=5'>+</a><a href='?src=\ref[src];bpminc=20'>+</a><a href='?src=\ref[src];bpminc=50'>+</a><br>
|
||||
<a href='?src=\ref[src];compile=1'>Compile</a>
|
||||
<a href='?src=\ref[src];edit=1'>Edit</a>
|
||||
<div bgcolor="#888888" style="padding-left:5px; margin-top:5px; background-color:#888888"><pre>[currentsong.sourcestring]</pre></div>"}
|
||||
<div bgcolor="#888888" style="padding-left:5px; margin-top:5px; background-color:#888888"><pre>[currentsong.sourcestring]</pre></div>
|
||||
<a href='?src=\ref[src];import=1'>Import</a><br>
|
||||
<a href='?src=\ref[src];export=1'>Export</a>"}
|
||||
dat+={"
|
||||
</div>
|
||||
<div bgcolor="#AAAAAA" class="content">"}
|
||||
@@ -498,12 +546,17 @@
|
||||
defined by 'tempo / x': <i>C,G/2,E/4</i><br>
|
||||
Combined, an example is: <i>E-Eb4/4,/2,G#/8,B/8,E3-E4/4</i><br>
|
||||
<br>
|
||||
Baystation /0 tempo or /infinity tempo does not error, but the compiler ignores them.<br>
|
||||
<br>
|
||||
A song may only contain up to 4000 letters.<br>
|
||||
If you're playing a small piece over and over, remember to put a pause at the end for it to sound properly.<br<
|
||||
If you're playing a small piece over and over, remember to put a pause at the end for it to sound properly.<br>
|
||||
<br>
|
||||
Note: Due to limitations in the engine, some tones doesn't exist. These are:<br>
|
||||
Cb1<br>
|
||||
All tones in the ninth octave <b>except Cb9 and Cn9</b>
|
||||
All tones in the ninth octave <b>except Cb9 and Cn9</b><br>
|
||||
<br>
|
||||
Import/Export are there to import/export old-piano code, including baystation piano code.<br>
|
||||
The Import feature isn't completly finished because of lack of knowledge, but it atleast makes the code compile.
|
||||
"}
|
||||
dat+={"
|
||||
</div>
|
||||
@@ -542,9 +595,51 @@
|
||||
|
||||
else if(href_list["name"])
|
||||
var/input = html_encode(input(usr, "", "Rename", currentsong.name) as text|null)
|
||||
if(isnull(input)) return
|
||||
|
||||
currentsong.name = copytext(input,1,30)
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["export"])
|
||||
var/output = dd_replacetext(currentsong.sourcestring, "\n", "")
|
||||
|
||||
var/list/sourcelist = dd_text2list(output, ",")
|
||||
|
||||
var/list/outputlist = new()
|
||||
|
||||
if(sourcelist.len == 0)
|
||||
return
|
||||
|
||||
var/nextadd = sourcelist[1]
|
||||
sourcelist.Cut(1,1)
|
||||
|
||||
var/runmainloop = 1
|
||||
while(runmainloop)
|
||||
var/outstr = ""
|
||||
while(lentext(outstr + nextadd) < 50)
|
||||
outstr += nextadd + ","
|
||||
|
||||
if(sourcelist.len == 0)
|
||||
runmainloop = 0
|
||||
break
|
||||
|
||||
//Pop one
|
||||
nextadd = sourcelist[1]
|
||||
sourcelist.Cut(1,2)
|
||||
|
||||
//Remove last comma
|
||||
outstr = copytext(outstr, 1, lentext(outstr))
|
||||
|
||||
//Add to output
|
||||
outputlist.Add(outstr)
|
||||
|
||||
var/curbpm = round((10/currentsong.tempo)*60)
|
||||
outputlist.Insert(1, "BPM: [curbpm]")
|
||||
|
||||
output = dd_list2text(outputlist, "\n")
|
||||
|
||||
input(usr, "", "Exported Code", output) as message|null
|
||||
|
||||
else if(href_list["savesong"])
|
||||
|
||||
//Check if the song already exists in the internal
|
||||
@@ -564,7 +659,7 @@
|
||||
updateUsrDialog()
|
||||
|
||||
if(playing)
|
||||
if(href_list["newsong"]||href_list["setsong"]||href_list["tempo"]||href_list["compile"]||href_list["edit"]||href_list["repeat"])
|
||||
if(href_list["newsong"]||href_list["setsong"]||href_list["tempo"]||href_list["compile"]||href_list["edit"]||href_list["repeat"]||href_list["import"])
|
||||
statusmsg("Playback Error: Stop the song first!")
|
||||
else
|
||||
if(href_list["newsong"])
|
||||
@@ -585,12 +680,39 @@
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["tempo"])
|
||||
var/tempoinc = text2num(href_list["tempo"])
|
||||
else if(href_list["import"])
|
||||
var/input = html_encode(input(usr, "", "Import") as message|null)
|
||||
if(isnull(input)) return
|
||||
|
||||
currentsong.tempo += tempoinc*-1
|
||||
if(currentsong.tempo<1)
|
||||
currentsong.tempo = 1
|
||||
var/list/inputlist = dd_text2list(input, "\n")
|
||||
|
||||
if(copytext(inputlist[1], 1, 4) == "BPM")
|
||||
var/newbpm = text2num(copytext(input,5,lentext(inputlist[1])+1))
|
||||
|
||||
if(newbpm > 0 && newbpm <= 600)
|
||||
currentsong.tempo = 10/(newbpm/60)
|
||||
|
||||
//Remove the BPM shit
|
||||
inputlist.Cut(1,2)
|
||||
|
||||
|
||||
|
||||
//Put it back together with commas
|
||||
input = dd_list2text(inputlist, ",\n")
|
||||
|
||||
//Remove last comma
|
||||
//input = copytext(input, 1, lentext(input))
|
||||
|
||||
currentsong.sourcestring = input
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["bpminc"])
|
||||
var/bpminc = text2num(href_list["bpminc"])
|
||||
|
||||
currentsong.tempo = 10/(((10/currentsong.tempo)*60 + bpminc)/60)
|
||||
if(currentsong.tempo<0.05)
|
||||
currentsong.tempo = 0.05
|
||||
currentsong.compilesuccess = 0
|
||||
|
||||
updateUsrDialog()
|
||||
@@ -604,6 +726,7 @@
|
||||
else if(href_list["edit"])
|
||||
|
||||
var/input = html_encode(input(usr, "", "Edit", currentsong.sourcestring) as message|null)
|
||||
if(isnull(input)) return
|
||||
|
||||
input = dd_replacetext(input, " ", "")
|
||||
input = dd_replacetext(input, "\t", "")
|
||||
@@ -619,7 +742,11 @@
|
||||
|
||||
else if(href_list["repeat"])
|
||||
|
||||
var/input = round(input(usr, "", "Repeat", "How many times do you want to repeat? (max 10)") as num|null)
|
||||
var/input = input(usr, "", "Repeat", "How many times do you want to repeat? (max 10)") as num|null
|
||||
if(isnull(input)) return
|
||||
|
||||
input = round(input)
|
||||
|
||||
if(input < 1)
|
||||
input = 1
|
||||
else if(input > 10)
|
||||
|
||||
@@ -91,14 +91,6 @@
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/structure/falserwall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/*/turf/simulated/shuttle/wall/New()
|
||||
|
||||
spawn(20) //testing if this will make /obj/machinery/shuttle and /door count - It does, it stays.
|
||||
@@ -129,21 +121,6 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/Del()
|
||||
|
||||
var/temploc = src.loc
|
||||
|
||||
spawn(10)
|
||||
for(var/turf/simulated/wall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falsewall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
|
||||
for(var/obj/structure/falserwall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
..()
|
||||
|
||||
/*/turf/simulated/shuttle/wall/Del()
|
||||
|
||||
var/temploc = src.loc
|
||||
@@ -175,49 +152,3 @@
|
||||
var/turf/simulated/wall/wall = src
|
||||
wall.icon_state = "[wall.walltype][junction]"
|
||||
return
|
||||
|
||||
/obj/structure/falsewall/relativewall()
|
||||
|
||||
if(!density)
|
||||
icon_state = "[mineral]fwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falserwall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "[mineral][junction]"
|
||||
return
|
||||
|
||||
/obj/structure/falserwall/relativewall()
|
||||
|
||||
if(!density)
|
||||
icon_state = "frwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falserwall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.mineral == W.mineral)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "rwall[junction]"
|
||||
return
|
||||
|
||||
@@ -49,6 +49,11 @@ var/list/mechtoys = list(
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if (istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
else if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/carbon/metroid)) //If your not laying down, or a small creature, no pass.
|
||||
@@ -297,7 +302,18 @@ var/list/mechtoys = list(
|
||||
if(SP.access)
|
||||
A:req_access = list()
|
||||
A:req_access += text2num(SP.access)
|
||||
for(var/typepath in SP.contains)
|
||||
|
||||
var/list/contains
|
||||
if(istype(SP,/datum/supply_packs/randomised))
|
||||
var/datum/supply_packs/randomised/SPR = SP
|
||||
contains = list()
|
||||
if(SPR.contains.len)
|
||||
for(var/j=1,j<=SPR.num_contained,j++)
|
||||
contains += pick(SPR.contains)
|
||||
else
|
||||
contains = SP.contains
|
||||
|
||||
for(var/typepath in contains)
|
||||
if(!typepath) continue
|
||||
var/atom/B2 = new typepath(A)
|
||||
if(SP.amount && B2:amount) B2:amount = SP.amount
|
||||
@@ -385,7 +401,7 @@ var/list/mechtoys = list(
|
||||
var/timeout = world.time + 600
|
||||
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
|
||||
if(world.time > timeout) return
|
||||
if(!reason) reason = "*None Provided*"
|
||||
if(!reason) return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
@@ -558,7 +574,7 @@ var/list/mechtoys = list(
|
||||
var/timeout = world.time + 600
|
||||
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
|
||||
if(world.time > timeout) return
|
||||
if(!reason) reason = "*None Provided*"
|
||||
if(!reason) return
|
||||
|
||||
var/idname = "*None Provided*"
|
||||
var/idrank = "*None Provided*"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
floor_tile = new/obj/item/stack/tile/grass
|
||||
|
||||
New()
|
||||
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
|
||||
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
|
||||
icon_state = "grass[pick("1","2","3","4")]"
|
||||
..()
|
||||
spawn(4)
|
||||
@@ -32,3 +32,21 @@
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
|
||||
/turf/simulated/floor/carpet
|
||||
name = "Carpet"
|
||||
icon_state = "carpet"
|
||||
floor_tile = new/obj/item/stack/tile/carpet
|
||||
|
||||
New()
|
||||
floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well.
|
||||
if(!icon_state)
|
||||
icon_state = "carpet"
|
||||
..()
|
||||
spawn(4)
|
||||
if(src)
|
||||
update_icon()
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
@@ -7,7 +7,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
"asteroid","asteroid_dug",
|
||||
"asteroid0","asteroid1","asteroid2","asteroid3","asteroid4",
|
||||
"asteroid5","asteroid6","asteroid7","asteroid8","asteroid9","asteroid10","asteroid11","asteroid12",
|
||||
"burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b", "wood", "wood-broken")
|
||||
"burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b", "wood", "wood-broken", "carpet", "carpetcorner", "carpetside", "carpet")
|
||||
|
||||
var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug")
|
||||
var/list/wood_icons = list("wood","wood-broken")
|
||||
@@ -74,13 +74,13 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
turf/simulated/floor/proc/update_icon()
|
||||
if(lava)
|
||||
return
|
||||
if(is_plasteel_floor())
|
||||
else if(is_plasteel_floor())
|
||||
if(!broken && !burnt)
|
||||
icon_state = icon_regular_floor
|
||||
if(is_plating())
|
||||
else if(is_plating())
|
||||
if(!broken && !burnt)
|
||||
icon_state = icon_plating //Because asteroids are 'platings' too.
|
||||
if(is_light_floor())
|
||||
else if(is_light_floor())
|
||||
var/obj/item/stack/tile/light/T = floor_tile
|
||||
if(T.on)
|
||||
switch(T.state)
|
||||
@@ -100,11 +100,54 @@ turf/simulated/floor/proc/update_icon()
|
||||
else
|
||||
SetLuminosity(0)
|
||||
icon_state = "light_off"
|
||||
if(is_grass_floor())
|
||||
else if(is_grass_floor())
|
||||
if(!broken && !burnt)
|
||||
if(!(icon_state in list("grass1","grass2","grass3","grass4")))
|
||||
icon_state = "grass[pick("1","2","3","4")]"
|
||||
if(is_wood_floor())
|
||||
else if(is_carpet_floor())
|
||||
if(!broken && !burnt)
|
||||
if(icon_state != "carpetsymbol")
|
||||
var/connectdir = 0
|
||||
for(var/direction in cardinal)
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
if(FF.is_carpet_floor())
|
||||
connectdir |= direction
|
||||
|
||||
//Check the diagonal connections for corners, where you have, for example, connections both north and east. In this case it checks for a north-east connection to determine whether to add a corner marker or not.
|
||||
var/diagonalconnect = 0 //1 = NE; 2 = SE; 4 = NW; 8 = SW
|
||||
|
||||
//Northeast
|
||||
if(connectdir & NORTH && connectdir & EAST)
|
||||
if(istype(get_step(src,NORTHEAST),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,NORTHEAST)
|
||||
if(FF.is_carpet_floor())
|
||||
diagonalconnect |= 1
|
||||
|
||||
//Southeast
|
||||
if(connectdir & SOUTH && connectdir & EAST)
|
||||
if(istype(get_step(src,SOUTHEAST),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,SOUTHEAST)
|
||||
if(FF.is_carpet_floor())
|
||||
diagonalconnect |= 2
|
||||
|
||||
//Northwest
|
||||
if(connectdir & NORTH && connectdir & WEST)
|
||||
if(istype(get_step(src,NORTHWEST),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,NORTHWEST)
|
||||
if(FF.is_carpet_floor())
|
||||
diagonalconnect |= 4
|
||||
|
||||
//Southwest
|
||||
if(connectdir & SOUTH && connectdir & WEST)
|
||||
if(istype(get_step(src,SOUTHWEST),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,SOUTHWEST)
|
||||
if(FF.is_carpet_floor())
|
||||
diagonalconnect |= 8
|
||||
|
||||
icon_state = "carpet[connectdir]-[diagonalconnect]"
|
||||
|
||||
else if(is_wood_floor())
|
||||
if(!broken && !burnt)
|
||||
if( !(icon_state in wood_icons) )
|
||||
icon_state = "wood"
|
||||
@@ -189,6 +232,12 @@ turf/simulated/floor/proc/update_icon()
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_carpet_floor()
|
||||
if(istype(floor_tile,/obj/item/stack/tile/carpet))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/turf/simulated/floor/is_plating()
|
||||
if(!floor_tile)
|
||||
return 1
|
||||
@@ -211,6 +260,9 @@ turf/simulated/floor/proc/update_icon()
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
broken = 1
|
||||
else if(is_carpet_floor())
|
||||
src.icon_state = "carpet-broken"
|
||||
broken = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
broken = 1
|
||||
@@ -231,6 +283,9 @@ turf/simulated/floor/proc/update_icon()
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
burnt = 1
|
||||
else if(is_carpet_floor())
|
||||
src.icon_state = "carpet-broken"
|
||||
burnt = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
burnt = 1
|
||||
@@ -245,6 +300,13 @@ turf/simulated/floor/proc/update_icon()
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
else if(is_carpet_floor())
|
||||
spawn(5)
|
||||
if(src)
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding get updated properly
|
||||
|
||||
if(!floor_tile) return
|
||||
del(floor_tile)
|
||||
@@ -340,6 +402,24 @@ turf/simulated/floor/proc/update_icon()
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
//This proc will make a turf into a carpet floor. Fun eh? Insert the carpet tile to be used as the argument
|
||||
//If no argument is given a new one will be made.
|
||||
/turf/simulated/floor/proc/make_carpet_floor(var/obj/item/stack/tile/carpet/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/carpet))
|
||||
floor_tile = T
|
||||
update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_tile = new/obj/item/stack/tile/carpet
|
||||
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if(!C || !user)
|
||||
@@ -417,6 +497,11 @@ turf/simulated/floor/proc/update_icon()
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding gets updated properly
|
||||
else if(istype(T,/obj/item/stack/tile/carpet))
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
if(istype(get_step(src,direction),/turf/simulated/floor))
|
||||
var/turf/simulated/floor/FF = get_step(src,direction)
|
||||
FF.update_icon() //so siding gets updated properly
|
||||
T.use(1)
|
||||
update_icon()
|
||||
levelupdate()
|
||||
|
||||
@@ -172,6 +172,8 @@
|
||||
return 0
|
||||
/turf/proc/is_wood_floor()
|
||||
return 0
|
||||
/turf/proc/is_carpet_floor()
|
||||
return 0
|
||||
/turf/proc/return_siding_icon_state() //used for grass floors, which have siding.
|
||||
return 0
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ var/global/obj/effect/datacore/data_core = null
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
var/global/obj/effect/overlay/slmaster = null
|
||||
|
||||
//obj/hud/main_hud1 = null
|
||||
|
||||
var/global/list/machines = list()
|
||||
var/global/list/processing_objects = list()
|
||||
|
||||
@@ -486,10 +486,10 @@
|
||||
if(holder && mob)
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
usr << "\red <b>You are now visible to other players.</b>"
|
||||
mob << "\red <b>Invisimin off. Invisibility reset.</b>"
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
usr << "\blue <b>You are now invisible to other players.</b>"
|
||||
mob << "\blue <b>Invisimin on. You are now as invisible as a ghost.</b>"
|
||||
|
||||
|
||||
/client/proc/player_panel()
|
||||
|
||||
@@ -197,11 +197,11 @@ var/list/admin_datums = list()
|
||||
if("polyparrot")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob)
|
||||
if("constructarmoured")
|
||||
M.change_mob_type( /mob/living/simple_animal/constructarmoured , null, null, delmob)
|
||||
M.change_mob_type( /mob/living/simple_animal/construct/armoured , null, null, delmob)
|
||||
if("constructbuilder")
|
||||
M.change_mob_type( /mob/living/simple_animal/constructbuilder , null, null, delmob)
|
||||
M.change_mob_type( /mob/living/simple_animal/construct/builder , null, null, delmob)
|
||||
if("constructwraith")
|
||||
M.change_mob_type( /mob/living/simple_animal/constructwraith , null, null, delmob)
|
||||
M.change_mob_type( /mob/living/simple_animal/construct/wraith , null, null, delmob)
|
||||
if("shade")
|
||||
M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob)
|
||||
|
||||
|
||||
@@ -441,6 +441,93 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
message_admins("[key_name_admin(src)] has turned the experimental radio system [GLOBAL_RADIO_TYPE ? "on" : "off"].", 0)
|
||||
feedback_add_details("admin_verb","SRM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_areatest()
|
||||
set category = "Mapping"
|
||||
set name = "Test areas"
|
||||
|
||||
var/list/areas_all = list()
|
||||
var/list/areas_with_APC = list()
|
||||
var/list/areas_with_air_alarm = list()
|
||||
var/list/areas_with_RC = list()
|
||||
var/list/areas_with_light = list()
|
||||
var/list/areas_with_LS = list()
|
||||
var/list/areas_with_intercom = list()
|
||||
var/list/areas_with_camera = list()
|
||||
|
||||
for(var/area/A in world)
|
||||
if(!(A.type in areas_all))
|
||||
areas_all.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in world)
|
||||
var/area/A = get_area(APC)
|
||||
if(!(A.type in areas_with_APC))
|
||||
areas_with_APC.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/alarm/alarm in world)
|
||||
var/area/A = get_area(alarm)
|
||||
if(!(A.type in areas_with_air_alarm))
|
||||
areas_with_air_alarm.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/requests_console/RC in world)
|
||||
var/area/A = get_area(RC)
|
||||
if(!(A.type in areas_with_RC))
|
||||
areas_with_RC.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/light/L in world)
|
||||
var/area/A = get_area(L)
|
||||
if(!(A.type in areas_with_light))
|
||||
areas_with_light.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/light_switch/LS in world)
|
||||
var/area/A = get_area(LS)
|
||||
if(!(A.type in areas_with_LS))
|
||||
areas_with_LS.Add(A.type)
|
||||
|
||||
for(var/obj/item/device/radio/intercom/I in world)
|
||||
var/area/A = get_area(I)
|
||||
if(!(A.type in areas_with_intercom))
|
||||
areas_with_intercom.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/camera/C in world)
|
||||
var/area/A = get_area(C)
|
||||
if(!(A.type in areas_with_camera))
|
||||
areas_with_camera.Add(A.type)
|
||||
|
||||
var/list/areas_without_APC = areas_all - areas_with_APC
|
||||
var/list/areas_without_air_alarm = areas_all - areas_with_air_alarm
|
||||
var/list/areas_without_RC = areas_all - areas_with_RC
|
||||
var/list/areas_without_light = areas_all - areas_with_light
|
||||
var/list/areas_without_LS = areas_all - areas_with_LS
|
||||
var/list/areas_without_intercom = areas_all - areas_with_intercom
|
||||
var/list/areas_without_camera = areas_all - areas_with_camera
|
||||
|
||||
world << "<b>AREAS WITHOUT AN APC:</b>"
|
||||
for(var/areatype in areas_without_APC)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT AN AIR ALARM:</b>"
|
||||
for(var/areatype in areas_without_air_alarm)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>"
|
||||
for(var/areatype in areas_without_RC)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY LIGHTS:</b>"
|
||||
for(var/areatype in areas_without_light)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT A LIGHT SWITCH:</b>"
|
||||
for(var/areatype in areas_without_LS)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY INTERCOMS:</b>"
|
||||
for(var/areatype in areas_without_intercom)
|
||||
world << "* [areatype]"
|
||||
|
||||
world << "<b>AREAS WITHOUT ANY CAMERAS:</b>"
|
||||
for(var/areatype in areas_without_camera)
|
||||
world << "* [areatype]"
|
||||
|
||||
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list)
|
||||
set category = "Fun"
|
||||
|
||||
@@ -144,6 +144,7 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/cmd_admin_grantfullaccess
|
||||
src.verbs += /client/proc/kaboom
|
||||
src.verbs += /client/proc/splash
|
||||
src.verbs += /client/proc/cmd_admin_areatest
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
81
code/modules/awaymissions/corpse.dm
Normal file
81
code/modules/awaymissions/corpse.dm
Normal file
@@ -0,0 +1,81 @@
|
||||
//If someone can do this in a neater way, be my guest-Kor
|
||||
|
||||
//To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now).
|
||||
|
||||
/obj/effect/landmark/corpse
|
||||
|
||||
var/mobname = "Uknown" //Names the mob, obviously
|
||||
var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse.
|
||||
var/corpsesuit = null
|
||||
var/corpseshoes = null
|
||||
var/corpsegloves = null
|
||||
var/corpseradio = null
|
||||
var/corpseglasses = null
|
||||
var/corpsemask = null
|
||||
var/corpsehelmet = null
|
||||
var/corpsebelt = null
|
||||
var/corpsepocket1 = null
|
||||
var/corpsepocket2 = null
|
||||
var/corpseback = null
|
||||
var/corpseid = 0 //Just set to 1 if you want them to have an ID
|
||||
var/corpseidjob = null // Needs to be in quotes, such as "Clown" or "Chef." This just determines what the ID reads as, not their access
|
||||
var/corpseidaccess = null //This is for access. See access.dm for which jobs give what access. Again, put in quotes. Use "Captain" if you want it to be all access.
|
||||
var/corpseidicon = null //For setting it to be a gold, silver, centcomm etc ID
|
||||
|
||||
|
||||
/obj/effect/landmark/corpse/New() //Creates a mob and checks for gear in each slot before attempting to equip it.
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
|
||||
M.real_name = src.mobname
|
||||
M.stat = 2 //Kills the new mob
|
||||
if(src.corpseuniform)
|
||||
M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform)
|
||||
if(src.corpsesuit)
|
||||
M.equip_to_slot_or_del(new src.corpsesuit(M), slot_wear_suit)
|
||||
if(src.corpseshoes)
|
||||
M.equip_to_slot_or_del(new src.corpseshoes(M), slot_shoes)
|
||||
if(src.corpsegloves)
|
||||
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
|
||||
if(src.corpseradio)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
|
||||
if(src.corpseglasses)
|
||||
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
|
||||
if(src.corpsemask)
|
||||
M.equip_to_slot_or_del(new src.corpsemask(M), slot_wear_mask)
|
||||
if(src.corpsehelmet)
|
||||
M.equip_to_slot_or_del(new src.corpsehelmet(M), slot_head)
|
||||
if(src.corpsebelt)
|
||||
M.equip_to_slot_or_del(new src.corpsebelt(M), slot_belt)
|
||||
if(src.corpsepocket1)
|
||||
M.equip_to_slot_or_del(new src.corpsepocket1(M), slot_r_store)
|
||||
if(src.corpsepocket2)
|
||||
M.equip_to_slot_or_del(new src.corpsepocket2(M), slot_l_store)
|
||||
if(src.corpseback)
|
||||
M.equip_to_slot_or_del(new src.corpseback(M), slot_back)
|
||||
if(src.corpseid == 1)
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
if(src.corpseidicon)
|
||||
W.icon_state = corpseidicon
|
||||
if(src.corpseidaccess)
|
||||
W.access = get_access(corpseidaccess)
|
||||
if(corpseidjob)
|
||||
W.assignment = corpseidjob
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
del(src)
|
||||
|
||||
|
||||
//An example.
|
||||
/obj/effect/landmark/corpse/clown
|
||||
mobname = "Giggles"
|
||||
corpseuniform = /obj/item/clothing/under/rank/clown
|
||||
corpseshoes = /obj/item/clothing/shoes/clown_shoes
|
||||
corpseradio = /obj/item/device/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/clown_hat
|
||||
corpsepocket1 = /obj/item/weapon/bikehorn
|
||||
corpseback = /obj/item/weapon/storage/backpack/clown
|
||||
corpseid = 1
|
||||
corpseidjob = "Clown"
|
||||
corpseidaccess = "Clown"
|
||||
|
||||
// I'll work on making a list of corpses people request for maps, or that I think will be commonly used. Syndicate operatives for example.
|
||||
@@ -7,7 +7,6 @@
|
||||
var/seeprayers = 0
|
||||
|
||||
var/muted = 0
|
||||
|
||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ BLIND // can't see anything
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/verb/removetie()
|
||||
set name = "Remove Tie"
|
||||
set name = "Remove Accessory"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!istype(usr, /mob/living)) return
|
||||
|
||||
@@ -53,14 +53,12 @@
|
||||
|
||||
/obj/item/clothing/head/syndicatefake
|
||||
name = "red space-helmet replica"
|
||||
desc = "It's a very convincing replica."
|
||||
icon_state = "syndicate"
|
||||
item_state = "syndicate"
|
||||
desc = "A plastic replica of a syndicate agent's space helmet, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
|
||||
/obj/item/clothing/head/cueball
|
||||
name = "cueball helmet"
|
||||
desc = "A large, featureless white orb mean to be worn on your head. How do you even see out of this thing?"
|
||||
@@ -151,48 +149,4 @@
|
||||
desc = "Gentleman, elite aboard!"
|
||||
icon_state = "bowler"
|
||||
item_state = "bowler"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
//stylish new hats
|
||||
|
||||
/obj/item/clothing/head/bowlerhat
|
||||
name = "bowler hat"
|
||||
icon_state = "bowler_hat"
|
||||
item_state = "bowler_hat"
|
||||
desc = "For the gentleman of distinction."
|
||||
flags = FPRINT|TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/beaverhat
|
||||
name = "beaver hat"
|
||||
icon_state = "beaver_hat"
|
||||
item_state = "beaver_hat"
|
||||
desc = "Soft felt makes this hat both comfortable and elegant."
|
||||
flags = FPRINT|TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/boaterhat
|
||||
name = "boater hat"
|
||||
icon_state = "boater_hat"
|
||||
item_state = "boater_hat"
|
||||
desc = "The ultimate in summer fashion."
|
||||
flags = FPRINT|TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/fedora
|
||||
name = "\improper fedora"
|
||||
icon_state = "fedora"
|
||||
item_state = "fedora"
|
||||
desc = "A sharp, stylish hat."
|
||||
flags = FPRINT|TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/feathertrilby
|
||||
name = "\improper feather trilby"
|
||||
icon_state = "feather_trilby"
|
||||
item_state = "feather_trilby"
|
||||
desc = "A sharp, stylish hat with a feather."
|
||||
flags = FPRINT|TABLEPASS
|
||||
|
||||
/obj/item/clothing/head/fez
|
||||
name = "\improper fez"
|
||||
icon_state = "fez"
|
||||
item_state = "fez"
|
||||
desc = "You should wear a fez. Fezzes are cool."
|
||||
flags = FPRINT|TABLEPASS
|
||||
flags = FPRINT | TABLEPASS//stylish new hats/obj/item/clothing/head/bowlerhat name = "bowler hat" icon_state = "bowler_hat" item_state = "bowler_hat" desc = "For the gentleman of distinction." flags = FPRINT|TABLEPASS/obj/item/clothing/head/beaverhat name = "beaver hat" icon_state = "beaver_hat" item_state = "beaver_hat" desc = "Soft felt makes this hat both comfortable and elegant." flags = FPRINT|TABLEPASS/obj/item/clothing/head/boaterhat name = "boater hat" icon_state = "boater_hat" item_state = "boater_hat" desc = "The ultimate in summer fashion." flags = FPRINT|TABLEPASS/obj/item/clothing/head/fedora name = "\improper fedora" icon_state = "fedora" item_state = "fedora" desc = "A sharp, stylish hat." flags = FPRINT|TABLEPASS/obj/item/clothing/head/feathertrilby name = "\improper feather trilby" icon_state = "feather_trilby" item_state = "feather_trilby" desc = "A sharp, stylish hat with a feather." flags = FPRINT|TABLEPASS/obj/item/clothing/head/fez name = "\improper fez" icon_state = "fez" item_state = "fez" desc = "You should wear a fez. Fezzes are cool." flags = FPRINT|TABLEPASS/obj/item/clothing/head/witchwig name = "witch costume wig" desc = "Eeeee~heheheheheheh!" icon_state = "witch" item_state = "witch" flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
@@ -86,19 +86,4 @@
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
|
||||
|
||||
//Security rig
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
icon_state = "rig0-security"
|
||||
color = "security"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
name = "security hardsuit"
|
||||
desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards"
|
||||
icon_state = "rig-security"
|
||||
item_state = "rig-security"
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, /obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton)
|
||||
//Security rig/obj/item/clothing/head/helmet/space/rig/security name = "security hardsuit helmet" icon_state = "rig0-security" color = "security" armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)/obj/item/clothing/suit/space/rig/security name = "security hardsuit" desc = "A suit specially designed for security to offer minor protection from environmental hazards, and greater protection from human hazards" icon_state = "rig-security" item_state = "rig-security" slowdown = 1 armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) allowed = list(/obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, /obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton)//Wizard Rig/obj/item/clothing/head/helmet/space/rig/wizard name = "gem-encrusted hardsuit helmet" icon_state = "rig0-wiz" item_state = "wiz_helm" color = "wiz" unacidable = 1 //No longer shall our kind be foiled by lone chemists with spray bottles! armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)/obj/item/clothing/suit/space/rig/wizard icon_state = "rig-wiz" name = "gem-encrusted hardsuit" item_state = "wiz_hardsuit" slowdown = 1 w_class = 3 unacidable = 1 armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60) allowed = list(/obj/item/weapon/teleportation_scroll,/obj/item/weapon/tank/emergency_oxygen)
|
||||
@@ -230,72 +230,4 @@
|
||||
icon_state = "gladiator"
|
||||
item_state = "gladiator"
|
||||
color = "gladiator"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
|
||||
//
|
||||
|
||||
|
||||
//wedding stuff
|
||||
/obj/item/clothing/under/wedding/bride_orange
|
||||
name = "orange wedding dress"
|
||||
desc = "A big and puffy orange dress."
|
||||
icon_state = "bride_orange"
|
||||
item_state = "creamsuit"
|
||||
color = "bride_orange"
|
||||
flags_inv = HIDESHOES
|
||||
|
||||
/obj/item/clothing/under/wedding/suit_white
|
||||
name = "white suit"
|
||||
desc = "A fabulous white suit with orange shirt."
|
||||
icon_state = "white_suit"
|
||||
item_state = "creamsuit"
|
||||
color = "white_suit"
|
||||
|
||||
/obj/item/clothing/under/wedding/bridesmaid
|
||||
name = "yellow dress"
|
||||
desc = "A big and puffy orange dress."
|
||||
icon_state = "bridesmaid"
|
||||
item_state = "creamsuit"
|
||||
color = "bridesmaid"
|
||||
|
||||
/obj/item/clothing/under/wedding/firedress
|
||||
name = "flaming hot black dress"
|
||||
desc = "A small black dress with blue flames print on it."
|
||||
icon_state = "dress_fire"
|
||||
item_state = "creamsuit"
|
||||
color = "dress_fire"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_orange
|
||||
name = "orange dress"
|
||||
icon_state = "d_orange"
|
||||
color = "d_orange"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_green
|
||||
name = "green dress"
|
||||
icon_state = "d_green"
|
||||
color = "d_green"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_purple
|
||||
name = "purple dress"
|
||||
icon_state = "d_purple"
|
||||
color = "d_purple"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_red
|
||||
name = "red dress"
|
||||
icon_state = "d_red"
|
||||
color = "d_red"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_blue
|
||||
name = "blue dress"
|
||||
icon_state = "d_blue"
|
||||
color = "d_blue"
|
||||
|
||||
/obj/item/clothing/under/wedding/officer_blue
|
||||
name = "blue officer dress"
|
||||
icon_state = "officer_blue"
|
||||
color = "officer_blue"
|
||||
|
||||
/obj/item/clothing/under/wedding/dress_vampire
|
||||
name = "vampire dress"
|
||||
icon_state = "d_vampire"
|
||||
color = "d_vampire"
|
||||
//wedding stuff/obj/item/clothing/under/wedding/bride_orange name = "orange wedding dress" desc = "A big and puffy orange dress." icon_state = "bride_orange" item_state = "creamsuit" color = "bride_orange" flags_inv = HIDESHOES/obj/item/clothing/under/wedding/suit_white name = "white suit" desc = "A fabulous white suit with orange shirt." icon_state = "white_suit" item_state = "creamsuit" color = "white_suit"/obj/item/clothing/under/wedding/bridesmaid name = "yellow dress" desc = "A big and puffy orange dress." icon_state = "bridesmaid" item_state = "creamsuit" color = "bridesmaid"/obj/item/clothing/under/wedding/firedress name = "flaming hot black dress" desc = "A small black dress with blue flames print on it." icon_state = "dress_fire" item_state = "creamsuit" color = "dress_fire"/obj/item/clothing/under/wedding/dress_orange name = "orange dress" icon_state = "d_orange" color = "d_orange"/obj/item/clothing/under/wedding/dress_green name = "green dress" icon_state = "d_green" color = "d_green"/obj/item/clothing/under/wedding/dress_purple name = "purple dress" icon_state = "d_purple" color = "d_purple"/obj/item/clothing/under/wedding/dress_red name = "red dress" icon_state = "d_red" color = "d_red"/obj/item/clothing/under/wedding/dress_blue name = "blue dress" icon_state = "d_blue" color = "d_blue"/obj/item/clothing/under/wedding/officer_blue name = "blue officer dress" icon_state = "officer_blue" color = "officer_blue"/obj/item/clothing/under/wedding/dress_vampire name = "vampire dress" icon_state = "d_vampire" color = "d_vampire"/obj/item/clothing/under/sundress name = "sundress" desc = "Makes you want to frolic in a field of daisies." icon_state = "sundress" item_state = "sundress" color = "sundress" body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "" //no inhands
|
||||
color = "bluetie"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_ICLOTHING | SLOT_HEAD
|
||||
slot_flags = 0
|
||||
w_class = 2.0
|
||||
|
||||
/obj/item/clothing/tie/blue
|
||||
@@ -63,3 +63,52 @@
|
||||
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].")
|
||||
return
|
||||
return ..(M,user)
|
||||
|
||||
|
||||
//Medals
|
||||
/obj/item/clothing/tie/medal
|
||||
name = "bronze medal"
|
||||
desc = "A bronze medal."
|
||||
icon_state = "bronze"
|
||||
color = "bronze"
|
||||
|
||||
/obj/item/clothing/tie/medal/conduct
|
||||
name = "distinguished conduct medal"
|
||||
desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew."
|
||||
|
||||
/obj/item/clothing/tie/medal/bronze_heart
|
||||
name = "bronze heart medal"
|
||||
desc = "A bronze heart-shaped medal awarded for sacrifice. It is often awarded posthumously or for severe injury in the line of duty."
|
||||
icon_state = "bronze_heart"
|
||||
|
||||
/obj/item/clothing/tie/medal/nobel_science
|
||||
name = "nobel sciences award"
|
||||
desc = "A bronze medal which represents significant contributions to the field of science or engineering."
|
||||
|
||||
/obj/item/clothing/tie/medal/silver
|
||||
name = "silver medal"
|
||||
desc = "A silver medal."
|
||||
icon_state = "silver"
|
||||
color = "silver"
|
||||
|
||||
/obj/item/clothing/tie/medal/silver/valor
|
||||
name = "medal of valor"
|
||||
desc = "A silver medal awarded for acts of exceptional valor."
|
||||
|
||||
/obj/item/clothing/tie/medal/silver/security
|
||||
name = "robust security award"
|
||||
desc = "An award for distinguished combat and sacrifice in defence of Nanotrasen's commercial interests. Often awarded to security staff."
|
||||
|
||||
/obj/item/clothing/tie/medal/gold
|
||||
name = "gold medal"
|
||||
desc = "A prestigious golden medal."
|
||||
icon_state = "gold"
|
||||
color = "gold"
|
||||
|
||||
/obj/item/clothing/tie/medal/gold/captain
|
||||
name = "medal of captaincy"
|
||||
desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew."
|
||||
|
||||
/obj/item/clothing/tie/medal/gold/heroism
|
||||
name = "medal of exceptional heroism"
|
||||
desc = "An extremely rare golden medal awarded only by CentComm. To recieve such a medal is the highest honor and as such, very few exist. This medal is almost never awarded to anybody but commanders."
|
||||
@@ -1,3 +1,3 @@
|
||||
|
||||
/obj/hud/proc/ghost_hud()
|
||||
/datum/hud/proc/ghost_hud()
|
||||
return
|
||||
@@ -9,6 +9,7 @@
|
||||
canmove = 0
|
||||
blinded = 0
|
||||
anchored = 1 // don't get pushed around
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
var/can_reenter_corpse
|
||||
var/datum/hud/living/carbon/hud = null // hud
|
||||
var/bootime = 0
|
||||
@@ -17,7 +18,6 @@
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
see_in_dark = 100
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
|
||||
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
|
||||
|
||||
/mob/living/carbon/alien
|
||||
name = "alien"
|
||||
voice_name = "alien"
|
||||
@@ -20,10 +24,24 @@
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 5
|
||||
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
|
||||
var/heat_protection = 0.5
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
||||
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
|
||||
..(amount * 1.5)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/adjustBruteLoss(amount) // Strong against melee weapons
|
||||
..(amount * 0.5)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/proc/getPlasma()
|
||||
return storedPlasma
|
||||
|
||||
@@ -33,16 +51,101 @@
|
||||
/mob/living/carbon/alien/New()
|
||||
..()
|
||||
|
||||
for(var/obj/item/clothing/mask/facehugger/facehugger in world)
|
||||
if(facehugger.stat == CONSCIOUS)
|
||||
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = facehugger, icon_state = "facehugger_active")
|
||||
activeIndicator.override = 1
|
||||
if(client)
|
||||
client.images += activeIndicator
|
||||
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= maxHealth)
|
||||
adjustToxLoss(plasma_rate)
|
||||
else
|
||||
adjustBruteLoss(-heal_rate)
|
||||
adjustFireLoss(-heal_rate)
|
||||
adjustOxyLoss(-heal_rate)
|
||||
|
||||
if(!environment)
|
||||
return
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
else if(istype(get_turf(src), /turf/space))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Fire protection: [heat_protection] - Location: [loc] - src: [src]"
|
||||
|
||||
// Aliens are now weak to fire.
|
||||
|
||||
//After then, it reacts to the surrounding atmosphere based on your thermal protection
|
||||
if(loc_temp > bodytemperature)
|
||||
//Place is hotter than we are
|
||||
var/thermal_protection = heat_protection //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.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
else
|
||||
bodytemperature += 1 * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
// bodytemperature -= max((loc_temp - bodytemperature / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > 360.15)
|
||||
//Body temperature is too hot.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
switch(bodytemperature)
|
||||
if(360 to 400)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(400 to 1000)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(1000 to INFINITY)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
||||
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || prob(50))
|
||||
switch(getFireLoss())
|
||||
if(1 to 50)
|
||||
adjustFireLoss(-1)
|
||||
if(51 to 100)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
// Aliens love radiation nom nom nom
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
|
||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
||||
return has_fine_manipulation
|
||||
|
||||
/mob/living/carbon/alien/Process_Spaceslipping()
|
||||
return 0 // Don't slip in space.
|
||||
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
@@ -59,7 +162,7 @@ Des: Gives the client of the alien an image on each infected mob.
|
||||
----------------------------------------*/
|
||||
/mob/living/carbon/alien/proc/AddInfectionImages()
|
||||
if (client)
|
||||
for (var/mob/living/carbon/C in world)
|
||||
for (var/mob/living/carbon/C in mob_list)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
client.images += I
|
||||
@@ -77,3 +180,6 @@ Des: Removes all infected images from the alien.
|
||||
del(I)
|
||||
return
|
||||
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -30,6 +30,7 @@ Doesn't work on other aliens/AI.*/
|
||||
new /obj/effect/alien/weeds/node(loc)
|
||||
return
|
||||
|
||||
/*
|
||||
/mob/living/carbon/alien/humanoid/verb/ActivateHuggers()
|
||||
set name = "Activate facehuggers (5)"
|
||||
set desc = "Makes all nearby facehuggers activate"
|
||||
@@ -41,7 +42,7 @@ Doesn't work on other aliens/AI.*/
|
||||
F.GoActive()
|
||||
emote("roar")
|
||||
return
|
||||
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview())
|
||||
set name = "Whisper (10)"
|
||||
set desc = "Whisper to someone"
|
||||
|
||||
@@ -14,17 +14,20 @@
|
||||
src.name = text("alien drone ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
//verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
|
||||
add_to_mob_list(src)
|
||||
//Drones use the same base as generic humanoids.
|
||||
//Drone verbs
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/verb/evolve() // -- TLE
|
||||
set name = "Evolve (500)"
|
||||
set desc = "Produce an interal egg sac capable of spawning children"
|
||||
set desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(500))
|
||||
// Queen check
|
||||
var/mob/living/carbon/alien/humanoid/queen/Q = locate(/mob/living/carbon/alien/humanoid/queen) in living_mob_list
|
||||
if(!Q)
|
||||
adjustToxLoss(-500)
|
||||
src << "\green You begin to evolve!"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
@@ -33,4 +36,6 @@
|
||||
new_xeno.UI = UI
|
||||
mind.transfer_to(new_xeno)
|
||||
del(src)
|
||||
else
|
||||
src << "<span class='notice'>We already have an alive queen.</span>"
|
||||
return
|
||||
@@ -1,42 +1,12 @@
|
||||
/obj/hud/proc/alien_hud()
|
||||
/datum/hud/proc/alien_hud()
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.g_dither.name = "Mask"
|
||||
src.g_dither.icon_state = "dither12g"
|
||||
src.g_dither.layer = 18
|
||||
src.g_dither.mouse_opacity = 0
|
||||
|
||||
src.alien_view = new src.h_type(src)
|
||||
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.alien_view.name = "Alien"
|
||||
src.alien_view.icon_state = "alien"
|
||||
src.alien_view.layer = 18
|
||||
src.alien_view.mouse_opacity = 0
|
||||
|
||||
src.blurry = new src.h_type( src )
|
||||
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
|
||||
src.druggy = new src.h_type( src )
|
||||
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.druggy.name = "Druggy"
|
||||
src.druggy.icon_state = "druggy"
|
||||
src.druggy.layer = 17
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -46,46 +16,7 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
using = new src.h_type( src )
|
||||
using.name = "help"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "help" ? "help_small_active" : "help_small")
|
||||
using.screen_loc = ui_help_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "disarm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "disarm" ? "disarm_small_active" : "disarm_small")
|
||||
using.screen_loc = ui_disarm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "grab"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "grab" ? "grab_small_active" : "grab_small")
|
||||
using.screen_loc = ui_grab_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "harm"
|
||||
using.icon = 'screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm_small_active" : "harm_small")
|
||||
using.screen_loc = ui_harm_small
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -95,50 +26,7 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Lower hud bar
|
||||
using.dir = EAST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Corner Button
|
||||
using.dir = NORTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = WEST
|
||||
using.screen_loc = ui_iarrowleft
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowright"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
@@ -146,11 +34,9 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
|
||||
|
||||
//equippable shit
|
||||
//suit
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -160,7 +46,7 @@
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -173,7 +59,7 @@
|
||||
inv_box.slot_id = slot_r_hand
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.dir = EAST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -186,7 +72,7 @@
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
|
||||
using = new /obj/screen/inventory( src )
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -195,7 +81,7 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen/inventory( src )
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.dir = SOUTH
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -205,7 +91,7 @@
|
||||
src.adding += using
|
||||
|
||||
//pocket 1
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
@@ -215,7 +101,7 @@
|
||||
src.adding += inv_box
|
||||
|
||||
//pocket 2
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
@@ -225,7 +111,7 @@
|
||||
src.adding += inv_box
|
||||
|
||||
//head
|
||||
inv_box = new /obj/screen/inventory( src )
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hair"
|
||||
@@ -236,7 +122,7 @@
|
||||
//end of equippable shit
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "resist"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
@@ -245,114 +131,57 @@
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.throw_icon = new /obj/screen(null)
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_alien_oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin = new /obj/screen()
|
||||
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_alien_toxin
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_alien_fire
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash = new /obj/screen()
|
||||
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
/*
|
||||
mymob.hands = new /obj/screen( null )
|
||||
mymob.hands.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.hands.icon_state = "hand"
|
||||
mymob.hands.name = "hand"
|
||||
mymob.hands.screen_loc = ui_hand
|
||||
mymob.hands.dir = NORTH
|
||||
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
mymob.sleep.name = "sleep"
|
||||
mymob.sleep.screen_loc = ui_sleep
|
||||
|
||||
mymob.rest = new /obj/screen( null )
|
||||
mymob.rest.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
*/
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
@@ -74,6 +74,12 @@
|
||||
if (client.statpanel == "Status")
|
||||
stat(null, "Plasma Stored: [getPlasma()]")
|
||||
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
|
||||
|
||||
/mob/living/carbon/alien/humanoid/emp_act(severity)
|
||||
@@ -427,7 +433,7 @@
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH
|
||||
damage += 14
|
||||
spawn(0)
|
||||
Paralyse(5)
|
||||
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
oxygen_alert = 0
|
||||
toxins_alert = 0
|
||||
fire_alert = 0
|
||||
|
||||
var/temperature_alert = 0
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if (stat != DEAD) //still breathing
|
||||
|
||||
//First, resolve location and get a breath
|
||||
@@ -49,7 +51,7 @@
|
||||
//handle_virus_updates() There is no disease that affects aliens
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment()
|
||||
handle_environment(environment)
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
@@ -90,60 +92,6 @@
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || prob(50))
|
||||
switch(getFireLoss())
|
||||
if(1 to 50)
|
||||
adjustFireLoss(-1)
|
||||
if(51 to 100)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
if ((HULK in mutations) && health <= 25)
|
||||
mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
|
||||
|
||||
proc/breathe()
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
@@ -257,18 +205,6 @@
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= maxHealth)
|
||||
adjustToxLoss(plasma_rate)
|
||||
|
||||
else
|
||||
adjustBruteLoss(-heal_rate)
|
||||
adjustFireLoss(-heal_rate)
|
||||
adjustOxyLoss(-heal_rate)
|
||||
|
||||
|
||||
|
||||
proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
@@ -456,9 +392,6 @@
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
@@ -486,9 +419,7 @@
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -497,13 +428,13 @@
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
health = 250
|
||||
icon_state = "alienq_s"
|
||||
nopush = 1
|
||||
heal_rate = 5
|
||||
heal_rate = 10 // Let's regenerate more than our average underling.
|
||||
plasma_rate = 20
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +1,12 @@
|
||||
|
||||
|
||||
/obj/hud/proc/larva_hud()
|
||||
/datum/hud/proc/larva_hud()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
src.vimpaired = list( )
|
||||
src.darkMask = list( )
|
||||
|
||||
src.g_dither = new src.h_type( src )
|
||||
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.g_dither.name = "Mask"
|
||||
src.g_dither.icon_state = "dither12g"
|
||||
src.g_dither.layer = 18
|
||||
src.g_dither.mouse_opacity = 0
|
||||
|
||||
src.alien_view = new src.h_type(src)
|
||||
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.alien_view.name = "Alien"
|
||||
src.alien_view.icon_state = "alien"
|
||||
src.alien_view.layer = 18
|
||||
src.alien_view.mouse_opacity = 0
|
||||
|
||||
src.blurry = new src.h_type( src )
|
||||
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.blurry.name = "Blurry"
|
||||
src.blurry.icon_state = "blurry"
|
||||
src.blurry.layer = 17
|
||||
src.blurry.mouse_opacity = 0
|
||||
|
||||
src.druggy = new src.h_type( src )
|
||||
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
src.druggy.name = "Druggy"
|
||||
src.druggy.icon_state = "druggy"
|
||||
src.druggy.layer = 17
|
||||
src.druggy.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -47,7 +16,7 @@
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -57,155 +26,53 @@
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
/*
|
||||
using = new src.h_type(src) //Right hud bar
|
||||
using.dir = SOUTH
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Lower hud bar
|
||||
using.dir = EAST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type(src) //Corner Button
|
||||
using.dir = NORTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.screen_loc = "EAST+1,SOUTH-1"
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
/*
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowleft"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = WEST
|
||||
using.screen_loc = ui_iarrowleft
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "arrowright"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "s_arrow"
|
||||
using.dir = EAST
|
||||
using.screen_loc = ui_iarrowright
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = "resist"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "1,1 to 5,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "5,1 to 10,5"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "6,11 to 10,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
using = new src.h_type( src )
|
||||
using.name = null
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "dither50"
|
||||
using.screen_loc = "11,1 to 15,15"
|
||||
using.layer = 17
|
||||
using.mouse_opacity = 0
|
||||
src.vimpaired += using
|
||||
|
||||
mymob.oxygen = new /obj/screen( null )
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_alien_oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin = new /obj/screen()
|
||||
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_alien_toxin
|
||||
|
||||
|
||||
mymob.fire = new /obj/screen( null )
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_alien_fire
|
||||
|
||||
|
||||
mymob.healths = new /obj/screen( null )
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen( null )
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
|
||||
mymob.flash = new /obj/screen( null )
|
||||
mymob.flash = new /obj/screen()
|
||||
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
/*
|
||||
mymob.sleep = new /obj/screen( null )
|
||||
mymob.sleep.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.sleep.icon_state = "sleep0"
|
||||
mymob.sleep.name = "sleep"
|
||||
mymob.sleep.screen_loc = ui_sleep
|
||||
|
||||
mymob.rest = new /obj/screen( null )
|
||||
mymob.rest.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.rest.icon_state = "rest0"
|
||||
mymob.rest.name = "rest"
|
||||
mymob.rest.screen_loc = ui_rest
|
||||
*/
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.overlays = null
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
|
||||
var/temperature_alert = 0
|
||||
|
||||
@@ -16,8 +13,13 @@
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/enviroment = loc.return_air()
|
||||
if (stat != DEAD) //still breathing
|
||||
|
||||
// GROW!
|
||||
if(amount_grown < max_grown)
|
||||
amount_grown++
|
||||
|
||||
//First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
@@ -43,7 +45,7 @@
|
||||
//handle_virus_updates() There is no disease that affects larva
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment()
|
||||
handle_environment(enviroment)
|
||||
|
||||
//stuff in the stomach
|
||||
//handle_stomach()
|
||||
@@ -61,43 +63,6 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
proc/handle_mutations_and_radiation()
|
||||
|
||||
//grow!! but not if metroid or dead
|
||||
if(stat != DEAD && amount_grown < max_grown)
|
||||
amount_grown++
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
proc/breathe()
|
||||
|
||||
@@ -212,18 +177,6 @@
|
||||
|
||||
return 1
|
||||
|
||||
proc/handle_environment()
|
||||
|
||||
//If there are alien weeds on the ground then heal if needed or give some toxins
|
||||
if(locate(/obj/effect/alien/weeds) in loc)
|
||||
if(health >= 25)
|
||||
adjustToxLoss(5)
|
||||
else
|
||||
adjustBruteLoss(-5)
|
||||
adjustFireLoss(-5)
|
||||
|
||||
return
|
||||
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
@@ -285,7 +238,7 @@
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
AdjustParalysis(-2)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
@@ -353,9 +306,6 @@
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
@@ -384,9 +334,7 @@
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -395,13 +343,13 @@
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
|
||||
@@ -16,7 +16,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
|
||||
|
||||
var/stat = UNCONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
var/sterile = 0
|
||||
|
||||
@@ -24,7 +24,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
|
||||
var/attached = 0
|
||||
|
||||
attack_paw(user as mob) //can be picked up by aliens
|
||||
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
||||
if(isalien(user))
|
||||
attack_hand(user)
|
||||
return
|
||||
@@ -32,7 +32,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
..()
|
||||
return
|
||||
|
||||
attack_hand(user as mob)
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
if(stat == CONSCIOUS && !isalien(user))
|
||||
Attach(user)
|
||||
return
|
||||
@@ -40,18 +40,18 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
..()
|
||||
return
|
||||
|
||||
attack(mob/living/M as mob, mob/user as mob)
|
||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
||||
..()
|
||||
user.drop_from_inventory(src)
|
||||
Attach(M)
|
||||
|
||||
New()
|
||||
/obj/item/clothing/mask/facehugger/New()
|
||||
if(aliens_allowed)
|
||||
..()
|
||||
else
|
||||
del(src)
|
||||
|
||||
examine()
|
||||
/obj/item/clothing/mask/facehugger/examine()
|
||||
..()
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
@@ -62,37 +62,37 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
usr << "\red \b It looks like the proboscis has been removed."
|
||||
return
|
||||
|
||||
attackby()
|
||||
/obj/item/clothing/mask/facehugger/attackby()
|
||||
Die()
|
||||
return
|
||||
|
||||
bullet_act()
|
||||
/obj/item/clothing/mask/facehugger/bullet_act()
|
||||
Die()
|
||||
return
|
||||
|
||||
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
Die()
|
||||
return
|
||||
|
||||
equipped(mob/M)
|
||||
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
||||
Attach(M)
|
||||
|
||||
HasEntered(atom/target)
|
||||
/obj/item/clothing/mask/facehugger/HasEntered(atom/target)
|
||||
Attach(target)
|
||||
return
|
||||
|
||||
dropped()
|
||||
/obj/item/clothing/mask/facehugger/dropped()
|
||||
..()
|
||||
GoActive()
|
||||
return
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||
Attach(hit_atom)
|
||||
return
|
||||
|
||||
proc/Attach(M as mob)
|
||||
if(!isliving(M) || isalien(M))
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
if(!iscarbon(M) || isalien(M))
|
||||
return
|
||||
if(attached)
|
||||
return
|
||||
@@ -106,12 +106,6 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
if(stat != CONSCIOUS) return
|
||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
|
||||
if(issilicon(L))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red \b [src] smashes against [L]'s frame!", 1)
|
||||
Die()
|
||||
return
|
||||
|
||||
var/mob/living/carbon/target = L
|
||||
|
||||
for(var/mob/O in viewers(target, null))
|
||||
@@ -148,7 +142,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
|
||||
return
|
||||
|
||||
proc/Impregnate(mob/living/carbon/target as mob)
|
||||
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/carbon/target as mob)
|
||||
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
|
||||
return
|
||||
|
||||
@@ -168,7 +162,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
target.update_inv_wear_mask()
|
||||
return
|
||||
|
||||
proc/GoActive()
|
||||
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
||||
if(stat == DEAD || stat == CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -185,7 +179,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
|
||||
return
|
||||
|
||||
proc/GoIdle()
|
||||
/obj/item/clothing/mask/facehugger/proc/GoIdle()
|
||||
if(stat == DEAD || stat == UNCONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -195,7 +189,7 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
|
||||
return
|
||||
|
||||
proc/Die()
|
||||
/obj/item/clothing/mask/facehugger/proc/Die()
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
@@ -209,50 +203,6 @@ var/const/MAX_ACTIVE_TIME = 600
|
||||
|
||||
return
|
||||
|
||||
/* proc/RemoveActiveIndicators() //removes the "active" facehugger indicator from all aliens in the world for this hugger
|
||||
for(var/mob/living/carbon/alien/alien in world)
|
||||
if(alien.client)
|
||||
for(var/image/image in alien.client.images)
|
||||
if(image.icon_state == "facehugger_active" && image.loc == src)
|
||||
del(image)
|
||||
|
||||
return */
|
||||
|
||||
/obj/item/clothing/mask/facehugger/angry
|
||||
stat = CONSCIOUS
|
||||
|
||||
/obj/item/clothing/mask/facehugger/angry/HasProximity(atom/movable/AM as mob|obj)
|
||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(istype(AM , /mob/living/))
|
||||
Attach(AM)
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/clothing/mask/facehugger/angry/New()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/angry/process()
|
||||
if(!src || src.stat == (DEAD))
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/C in range(1,src))
|
||||
Attach(C)
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/C in range(5,src))
|
||||
if(isInSight(C,src))
|
||||
step_to(src,C,0)
|
||||
spawn(5)
|
||||
if(C in range(1,src))
|
||||
Attach(C)
|
||||
return
|
||||
|
||||
step_rand(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/angry/Attach(var/mob/M as mob)
|
||||
|
||||
..(M)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,24 +1,8 @@
|
||||
/obj/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
/datum/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
blurry = new h_type( src )
|
||||
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
blurry.name = "Blurry"
|
||||
blurry.icon = ui_style
|
||||
blurry.icon_state = "blurry"
|
||||
blurry.layer = 17
|
||||
blurry.mouse_opacity = 0
|
||||
|
||||
druggy = new h_type( src )
|
||||
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
druggy.name = "Druggy"
|
||||
druggy.icon = ui_style
|
||||
druggy.icon_state = "druggy"
|
||||
druggy.layer = 17
|
||||
druggy.mouse_opacity = 0
|
||||
|
||||
mymob.blind = new /obj/screen( null )
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
|
||||
@@ -221,9 +221,6 @@
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
@@ -246,9 +243,7 @@
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
@@ -257,13 +252,13 @@
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
|
||||
@@ -10,8 +10,3 @@
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
|
||||
|
||||
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
|
||||
|
||||
// total amount of wounds on mob, used to spread out healing and the like over all wounds
|
||||
var/number_wounds = 0
|
||||
@@ -67,6 +67,21 @@
|
||||
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/proc/makeSkeleton()
|
||||
if(SKELETON in src.mutations) return
|
||||
|
||||
if(f_style)
|
||||
f_style = "Shaved"
|
||||
if(h_style)
|
||||
h_style = "Bald"
|
||||
update_hair(0)
|
||||
|
||||
mutations.Add(SKELETON)
|
||||
status_flags |= DISFIGURED
|
||||
update_body(0)
|
||||
update_mutantrace()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
if(HUSK in mutations) return
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user