mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into space_transition_runtime_fix
This commit is contained in:
@@ -1416,7 +1416,8 @@
|
||||
|
||||
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!", 1)
|
||||
log_admin("[key_name(usr)] AIized [key_name(H)]")
|
||||
H.AIize()
|
||||
var/mob/living/silicon/ai/ai_character = H.AIize()
|
||||
ai_character.moveToAILandmark()
|
||||
|
||||
|
||||
else if(href_list["makemask"])
|
||||
|
||||
@@ -416,6 +416,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
call(/datum/game_mode/proc/add_law_zero)(new_character)
|
||||
if("AI")
|
||||
new_character = new_character.AIize()
|
||||
var/mob/living/silicon/ai/ai_character = new_character
|
||||
ai_character.moveToAILandmark()
|
||||
if(new_character.mind.special_role=="traitor")
|
||||
call(/datum/game_mode/proc/add_law_zero)(new_character)
|
||||
//Add aliens.
|
||||
|
||||
@@ -181,7 +181,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
|
||||
/**
|
||||
* Fill a given tile with its area/turf/objects/mobs
|
||||
* Variable model is one full map line (e.g /turf/unsimulated/wall{icon_state = "rock"},/area/mine/explored)
|
||||
* Variable model is one full map line (e.g /turf/unsimulated/wall{icon_state = "rock"},/area/mine/dangerous/explored)
|
||||
*
|
||||
* WORKING :
|
||||
*
|
||||
@@ -202,7 +202,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
same construction as those contained in a .dmm file, and instantiates them.
|
||||
*/
|
||||
|
||||
var/list/members //will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/explored)
|
||||
var/list/members //will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/dangerous/explored)
|
||||
var/list/members_attributes //will contain lists filled with corresponding variables, if any (in our example : list(icon_state = "rock") and list())
|
||||
var/list/cached = modelCache[model]
|
||||
var/index
|
||||
@@ -223,7 +223,7 @@ var/global/dmm_suite/preloader/_preloader = new
|
||||
var/dpos
|
||||
|
||||
do
|
||||
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/explored)
|
||||
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/dangerous/explored)
|
||||
dpos = find_next_delimiter_position(model, old_position, ",", "{", "}") //find next delimiter (comma here) that's not within {...}
|
||||
|
||||
var/full_def = trim_text(copytext(model, old_position, dpos)) //full definition, e.g : /obj/foo/bar{variables=derp}
|
||||
|
||||
@@ -295,7 +295,8 @@
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
chatOutput.start()
|
||||
spawn() // Goonchat does some non-instant checks in start()
|
||||
chatOutput.start()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
||||
|
||||
@@ -779,6 +779,17 @@
|
||||
Post_Consume(mob/living/M)
|
||||
M.reagents.add_reagent("omnizine", 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak
|
||||
name = "Lightly Warm Donk-pocket"
|
||||
desc = "The food of choice for the seasoned traitor. This one is lukewarm."
|
||||
icon_state = "donkpocket"
|
||||
filling_color = "#DEDEAB"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 4)
|
||||
reagents.add_reagent("weak_omnizine", 3)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket
|
||||
name = "Donk-pocket"
|
||||
desc = "This donk-pocket is emitting a small amount of heat."
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
/obj/machinery/smartfridge/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(loc)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
|
||||
@@ -207,7 +209,8 @@
|
||||
power_change()
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
|
||||
if(panel_open)
|
||||
|
||||
@@ -250,11 +250,11 @@
|
||||
var/no_los
|
||||
var/turf/last_turf = origin_turf
|
||||
for(var/turf/target_turf in getline(origin_turf,neighbor))
|
||||
if(!last_turf.Enter(target_turf) || target_turf.density)
|
||||
if(!last_turf.Enter(thrown,target_turf) || target_turf.density)
|
||||
no_los = 1
|
||||
break
|
||||
last_turf = target_turf
|
||||
if(!no_los && !origin_turf.Enter(neighbor))
|
||||
if(!no_los && !origin_turf.Enter(thrown, neighbor))
|
||||
no_los = 1
|
||||
if(no_los)
|
||||
closed_turfs |= neighbor
|
||||
|
||||
@@ -693,6 +693,8 @@
|
||||
qdel(src)
|
||||
|
||||
/**********************Mining drone**********************/
|
||||
#define MINEDRONE_COLLECT 1
|
||||
#define MINEDRONE_ATTACK 2
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone
|
||||
name = "nanotrasen minebot"
|
||||
@@ -701,7 +703,6 @@
|
||||
icon_state = "mining_drone"
|
||||
icon_living = "mining_drone"
|
||||
status_flags = CANSTUN|CANWEAKEN|CANPUSH
|
||||
stop_automated_movement_when_pulled = 1
|
||||
mouse_opacity = 1
|
||||
faction = list("neutral")
|
||||
a_intent = I_HARM
|
||||
@@ -718,6 +719,7 @@
|
||||
melee_damage_upper = 15
|
||||
environment_smash = 0
|
||||
check_friendly_fire = 1
|
||||
stop_automated_movement_when_pulled = 1
|
||||
attacktext = "drills"
|
||||
attack_sound = 'sound/weapons/circsawhit.ogg'
|
||||
ranged = 1
|
||||
@@ -730,18 +732,43 @@
|
||||
wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver,
|
||||
/obj/item/weapon/ore/plasma, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/iron,
|
||||
/obj/item/weapon/ore/bananium, /obj/item/weapon/ore/tranquillite, /obj/item/weapon/ore/glass)
|
||||
healable = 0
|
||||
var/mode = MINEDRONE_COLLECT
|
||||
var/light_on = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
var/datum/action/innate/minedrone/toggle_light/toggle_light_action
|
||||
var/datum/action/innate/minedrone/toggle_meson_vision/toggle_meson_vision_action
|
||||
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action
|
||||
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/New()
|
||||
..()
|
||||
toggle_light_action = new()
|
||||
toggle_light_action.Grant(src)
|
||||
toggle_meson_vision_action = new()
|
||||
toggle_meson_vision_action.Grant(src)
|
||||
toggle_mode_action = new()
|
||||
toggle_mode_action.Grant(src)
|
||||
dump_ore_action = new()
|
||||
dump_ore_action.Grant(src)
|
||||
|
||||
SetCollectBehavior()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/sentience_act()
|
||||
AIStatus = AI_OFF
|
||||
check_friendly_fire = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.welding && !stat)
|
||||
if(FindTarget())//if the bot has anything to shoot at, to prevent combat repair cheesing
|
||||
if(AIStatus != AI_OFF && AIStatus != AI_IDLE)
|
||||
to_chat(user, "<span class='info'>[src] is moving around too much to repair!</span>")
|
||||
return
|
||||
if(maxHealth == health)
|
||||
to_chat(user, "<span class='info'>[src] is at full integrity.</span>")
|
||||
else
|
||||
adjustHealth(-10)//actually repairs the bot, not damages it
|
||||
adjustBruteLoss(-10)
|
||||
to_chat(user, "<span class='info'>You repair some of the armor on [src].</span>")
|
||||
return
|
||||
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner))
|
||||
@@ -754,27 +781,23 @@
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
|
||||
DropOre()
|
||||
DropOre(0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/New()
|
||||
..()
|
||||
SetCollectBehavior()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M)
|
||||
if(M.a_intent == I_HELP)
|
||||
switch(search_objects)
|
||||
if(0)
|
||||
SetCollectBehavior()
|
||||
toggle_mode()
|
||||
switch(mode)
|
||||
if(MINEDRONE_COLLECT)
|
||||
to_chat(M, "<span class='info'>[src] has been set to search and store loose ore.</span>")
|
||||
if(2)
|
||||
SetOffenseBehavior()
|
||||
if(MINEDRONE_ATTACK)
|
||||
to_chat(M, "<span class='info'>[src] has been set to attack hostile wildlife.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/SetCollectBehavior()
|
||||
mode = MINEDRONE_COLLECT
|
||||
idle_vision_range = 9
|
||||
search_objects = 2
|
||||
wander = 1
|
||||
@@ -782,8 +805,10 @@
|
||||
minimum_distance = 1
|
||||
retreat_distance = null
|
||||
icon_state = "mining_drone"
|
||||
to_chat(src, "<span class='info'>You are set to collect mode. You can now collect loose ore.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/SetOffenseBehavior()
|
||||
mode = MINEDRONE_ATTACK
|
||||
idle_vision_range = 7
|
||||
search_objects = 0
|
||||
wander = 0
|
||||
@@ -791,9 +816,10 @@
|
||||
retreat_distance = 1
|
||||
minimum_distance = 2
|
||||
icon_state = "mining_drone_offense"
|
||||
to_chat(src, "<span class='info'>You are set to attack mode. You can now attack from range.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/AttackingTarget()
|
||||
if(istype(target, /obj/item/weapon/ore))
|
||||
if(istype(target, /obj/item/weapon/ore) && mode == MINEDRONE_COLLECT)
|
||||
CollectOre()
|
||||
return
|
||||
..()
|
||||
@@ -808,18 +834,84 @@
|
||||
O.forceMove(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre()
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1)
|
||||
if(!contents.len)
|
||||
if(message)
|
||||
to_chat(src, "<span class='notice'>You attempt to dump your stored ore, but you have none.</span>")
|
||||
return
|
||||
if(message)
|
||||
to_chat(src, "<span class='notice'>You dump your stored ore.</span>")
|
||||
for(var/obj/item/weapon/ore/O in contents)
|
||||
contents -= O
|
||||
O.forceMove(loc)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustHealth()
|
||||
if(search_objects)
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustHealth(amount)
|
||||
if(mode != MINEDRONE_ATTACK && amount > 0)
|
||||
SetOffenseBehavior()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/toggle_mode()
|
||||
switch(mode)
|
||||
if(MINEDRONE_COLLECT)
|
||||
SetOffenseBehavior()
|
||||
if(MINEDRONE_ATTACK)
|
||||
SetCollectBehavior()
|
||||
else //This should never happen.
|
||||
mode = MINEDRONE_COLLECT
|
||||
SetCollectBehavior()
|
||||
|
||||
//Actions for sentient minebots
|
||||
|
||||
/datum/action/innate/minedrone
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
background_icon_state = "bg_default"
|
||||
|
||||
/datum/action/innate/minedrone/toggle_light
|
||||
name = "Toggle Light"
|
||||
button_icon_state = "mech_lights_off"
|
||||
|
||||
/datum/action/innate/minedrone/toggle_light/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
|
||||
if(user.light_on)
|
||||
user.set_light(0)
|
||||
else
|
||||
user.set_light(6)
|
||||
user.light_on = !user.light_on
|
||||
to_chat(user, "<span class='notice'>You toggle your light [user.light_on ? "on" : "off"].</span>")
|
||||
|
||||
/datum/action/innate/minedrone/toggle_meson_vision
|
||||
name = "Toggle Meson Vision"
|
||||
button_icon_state = "meson"
|
||||
|
||||
/datum/action/innate/minedrone/toggle_meson_vision/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
|
||||
if(user.sight & SEE_TURFS)
|
||||
user.sight &= ~SEE_TURFS
|
||||
user.see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
user.sight |= SEE_TURFS
|
||||
user.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
to_chat(user, "<span class='notice'>You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].</span>")
|
||||
|
||||
/datum/action/innate/minedrone/toggle_mode
|
||||
name = "Toggle Mode"
|
||||
button_icon_state = "mech_cycle_equip_off"
|
||||
|
||||
/datum/action/innate/minedrone/toggle_mode/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
user.toggle_mode()
|
||||
|
||||
/datum/action/innate/minedrone/dump_ore
|
||||
name = "Dump Ore"
|
||||
button_icon_state = "mech_eject"
|
||||
|
||||
/datum/action/innate/minedrone/dump_ore/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
user.DropOre()
|
||||
|
||||
|
||||
/**********************Minebot Upgrades**********************/
|
||||
@@ -832,8 +924,8 @@
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
|
||||
if(!istype(M))
|
||||
/obj/item/device/mine_bot_ugprade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
|
||||
if(!istype(M) || !proximity)
|
||||
return
|
||||
upgrade_bot(M, user)
|
||||
|
||||
@@ -881,6 +973,10 @@
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
sentience_type = SENTIENCE_MINEBOT
|
||||
origin_tech = "programming=6"
|
||||
|
||||
#undef MINEDRONE_COLLECT
|
||||
#undef MINEDRONE_ATTACK
|
||||
|
||||
/**********************Mining drone kit**********************/
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
|
||||
/area/mine/explored
|
||||
/area/mine/dangerous/explored
|
||||
name = "Mine"
|
||||
icon_state = "explored"
|
||||
music = null
|
||||
@@ -15,7 +15,7 @@
|
||||
power_light = 0
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
/area/mine/unexplored
|
||||
/area/mine/dangerous/unexplored
|
||||
name = "Mine"
|
||||
icon_state = "unexplored"
|
||||
music = null
|
||||
|
||||
@@ -263,6 +263,198 @@
|
||||
icon_state = "mobcap[colorindex]"
|
||||
update_icon()
|
||||
|
||||
/*****************************Survival Pod********************************/
|
||||
|
||||
|
||||
/area/survivalpod
|
||||
name = "\improper Emergency Shelter"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
has_gravity = 1
|
||||
|
||||
/obj/item/weapon/survivalcapsule
|
||||
name = "bluespace shelter capsule"
|
||||
desc = "An emergency shelter stored within a pocket of bluespace."
|
||||
icon_state = "capsule"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
w_class = 1
|
||||
origin_tech = "engineering=3;bluespace=3"
|
||||
var/template_id = "shelter_alpha"
|
||||
var/datum/map_template/shelter/template
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/weapon/survivalcapsule/proc/get_template()
|
||||
if(template)
|
||||
return
|
||||
template = shelter_templates[template_id]
|
||||
if(!template)
|
||||
log_runtime("Shelter template ([template_id]) not found!", src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/survivalcapsule/examine(mob/user)
|
||||
. = ..()
|
||||
get_template()
|
||||
to_chat(user, "This capsule has the [template.name] stored.")
|
||||
to_chat(user, template.description)
|
||||
|
||||
/obj/item/weapon/survivalcapsule/attack_self()
|
||||
// Can't grab when capsule is New() because templates aren't loaded then
|
||||
get_template()
|
||||
if(used == FALSE)
|
||||
loc.visible_message("<span class='warning'>[src] begins to shake. Stand back!</span>")
|
||||
used = TRUE
|
||||
sleep(50)
|
||||
var/turf/deploy_location = get_turf(src)
|
||||
var/status = template.check_deploy(deploy_location)
|
||||
switch(status)
|
||||
if(SHELTER_DEPLOY_BAD_AREA)
|
||||
loc.visible_message("<span class='warning'>[src] will not function in this area.</span>")
|
||||
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
|
||||
var/width = template.width
|
||||
var/height = template.height
|
||||
loc.visible_message("<span class='warning'>[src] doesn't have room to deploy! You need to clear a [width]x[height] area!</span>")
|
||||
|
||||
if(status != SHELTER_DEPLOY_ALLOWED)
|
||||
used = FALSE
|
||||
return
|
||||
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
var/turf/T = deploy_location
|
||||
if(!is_mining_level(T.z))//only report capsules away from the mining/lavaland level
|
||||
message_admins("[key_name_admin(usr)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) activated a bluespace capsule away from the mining level! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]")
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
new /obj/effect/effect/harmless_smoke(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
//Pod turfs and objects
|
||||
|
||||
|
||||
//Floors
|
||||
/turf/simulated/floor/pod
|
||||
name = "pod floor"
|
||||
icon_state = "podfloor"
|
||||
icon_regular_floor = "podfloor"
|
||||
floor_tile = /obj/item/stack/tile/pod
|
||||
|
||||
//Walls
|
||||
/turf/simulated/wall/survival
|
||||
name = "pod wall"
|
||||
desc = "An easily-compressable wall used for temporary shelter."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "smooth"
|
||||
walltype = "shuttle"
|
||||
smooth = SMOOTH_MORE // To Do: Add in Diagnaol Smooth Support
|
||||
canSmoothWith = list(/turf/simulated/wall/survival, /obj/machinery/door/airlock/survival_pod)
|
||||
|
||||
//Door
|
||||
/obj/machinery/door/airlock/survival_pod
|
||||
name = "Airlock"
|
||||
icon = 'icons/obj/doors/survival.dmi'
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_pod
|
||||
opacity = 0
|
||||
glass = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_pod
|
||||
base_icon_state = "survival_pod"
|
||||
glass_type = "/survival_pod"
|
||||
|
||||
//Table
|
||||
/obj/structure/table/survival_pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "table"
|
||||
smooth = SMOOTH_FALSE
|
||||
|
||||
//Sleeper
|
||||
/obj/machinery/sleeper/survival_pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "sleeper-open"
|
||||
density = 0
|
||||
|
||||
/obj/machinery/sleeper/survival_pod/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/sleeper/survival(null)
|
||||
var/obj/item/weapon/stock_parts/matter_bin/B = new(null)
|
||||
B.rating = initial_bin_rating
|
||||
component_parts += B
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
RefreshParts()
|
||||
|
||||
//Computer
|
||||
/obj/item/device/gps/computer
|
||||
name = "pod computer"
|
||||
icon_state = "pod_computer"
|
||||
icon = 'icons/obj/lavaland/pod_computer.dmi'
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_y = -32
|
||||
|
||||
/obj/item/device/gps/computer/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the gps.</span>", \
|
||||
"<span class='notice'>You start to disassemble the gps...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 20, target = src))
|
||||
new /obj/item/device/gps(loc)
|
||||
qdel(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/gps/computer/attack_hand(mob/user)
|
||||
attack_self(user)
|
||||
|
||||
//Bed
|
||||
/obj/structure/stool/bed/pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "bed"
|
||||
|
||||
//Survival Storage Unit
|
||||
/obj/machinery/smartfridge/survival_pod
|
||||
name = "survival pod storage"
|
||||
desc = "A heated storage unit."
|
||||
icon_state = "donkvendor"
|
||||
icon = 'icons/obj/lavaland/donkvendor.dmi'
|
||||
icon_on = "donkvendor"
|
||||
icon_off = "donkvendor"
|
||||
light_range = 8
|
||||
max_n_of_items = 10
|
||||
pixel_y = -4
|
||||
|
||||
/obj/item/weapon/circuitboard/smartfridge/survival
|
||||
name = "circuit board (Smartfridge Survival)"
|
||||
build_path = /obj/machinery/smartfridge/survival_pod
|
||||
|
||||
/obj/item/weapon/circuitboard/smartfridge/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
|
||||
if(istype(O, /obj/item))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smartfridge/survival(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/loaded/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak/W = new(src)
|
||||
load(W)
|
||||
if(prob(50))
|
||||
var/obj/item/weapon/storage/pill_bottle/dice/D = new(src)
|
||||
load(D)
|
||||
else
|
||||
var/obj/item/device/guitar/G = new(src)
|
||||
load(G)
|
||||
|
||||
//Fans
|
||||
/obj/structure/fans
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
@@ -307,4 +499,36 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/fans/CanAtmosPass(turf/T)
|
||||
return !arbitraryatmosblockingvar
|
||||
return !arbitraryatmosblockingvar
|
||||
|
||||
//Signs
|
||||
/obj/structure/sign/mining
|
||||
name = "nanotrasen mining corps sign"
|
||||
desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "ntpod"
|
||||
|
||||
/obj/structure/sign/mining/survival
|
||||
name = "shelter sign"
|
||||
desc = "A high visibility sign designating a safe shelter."
|
||||
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
||||
icon_state = "survival"
|
||||
|
||||
//Fluff
|
||||
/obj/structure/tubes
|
||||
icon_state = "tubes"
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
name = "tubes"
|
||||
anchored = 1
|
||||
layer = MOB_LAYER - 0.2
|
||||
density = 0
|
||||
|
||||
/obj/structure/tubes/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles [src].</span>", \
|
||||
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 20, target = src))
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return ..()
|
||||
@@ -624,7 +624,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/cave/proc/SpawnFloor(var/turf/T)
|
||||
for(var/turf/S in range(2,T))
|
||||
if(istype(S, /turf/space) || istype(S.loc, /area/mine/explored))
|
||||
if(istype(S, /turf/space) || istype(S.loc, /area/mine/dangerous/explored))
|
||||
sanity = 0
|
||||
break
|
||||
if(!sanity)
|
||||
@@ -637,7 +637,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/cave/proc/SpawnMonster(var/turf/T)
|
||||
if(prob(30))
|
||||
if(istype(loc, /area/mine/explored))
|
||||
if(istype(loc, /area/mine/dangerous/explored))
|
||||
return
|
||||
for(var/atom/A in range(15,T))//Lowers chance of mob clumps
|
||||
if(istype(A, /mob/living/simple_animal/hostile/asteroid))
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/datum/map_template/shelter
|
||||
var/shelter_id
|
||||
var/description
|
||||
var/blacklisted_turfs
|
||||
var/whitelisted_turfs
|
||||
var/banned_areas
|
||||
|
||||
/datum/map_template/shelter/New()
|
||||
. = ..()
|
||||
blacklisted_turfs = typecacheof(list(/turf/simulated/wall, /turf/simulated/mineral, /turf/simulated/shuttle/wall))
|
||||
whitelisted_turfs = list()
|
||||
banned_areas = typecacheof(/area/shuttle)
|
||||
|
||||
/datum/map_template/shelter/proc/check_deploy(turf/deploy_location)
|
||||
var/affected = get_affected_turfs(deploy_location, centered=TRUE)
|
||||
for(var/turf/T in affected)
|
||||
var/area/A = get_area(T)
|
||||
if(is_type_in_typecache(A, banned_areas))
|
||||
return SHELTER_DEPLOY_BAD_AREA
|
||||
|
||||
var/banned = is_type_in_typecache(T, blacklisted_turfs)
|
||||
var/permitted = is_type_in_typecache(T, whitelisted_turfs)
|
||||
if(banned && !permitted)
|
||||
return SHELTER_DEPLOY_BAD_TURFS
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density && O.anchored)
|
||||
return SHELTER_DEPLOY_ANCHORED_OBJECTS
|
||||
return SHELTER_DEPLOY_ALLOWED
|
||||
|
||||
/datum/map_template/shelter/alpha
|
||||
name = "Shelter Alpha"
|
||||
shelter_id = "shelter_alpha"
|
||||
description = "A cosy self-contained pressurized shelter, with \
|
||||
built-in navigation, entertainment, medical facilities and a \
|
||||
sleeping area! Order now, and we'll throw in a TINY FAN, \
|
||||
absolutely free!"
|
||||
mappath = "_maps/map_files/templates/shelter_1.dmm"
|
||||
|
||||
/datum/map_template/shelter/alpha/New()
|
||||
. = ..()
|
||||
whitelisted_turfs = typecacheof(/turf/simulated/mineral)
|
||||
@@ -37,4 +37,42 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode
|
||||
current_mode.possible_traitors.Remove(src)
|
||||
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
// TODO: Move away from the insane name-based landmark system
|
||||
/mob/living/silicon/ai/proc/moveToAILandmark()
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if(sloc.name != "AI")
|
||||
continue
|
||||
if(locate(/mob/living) in sloc.loc)
|
||||
continue
|
||||
loc_landmark = sloc
|
||||
if(!loc_landmark)
|
||||
for(var/obj/effect/landmark/tripai in landmarks_list)
|
||||
if(tripai.name == "tripai")
|
||||
if(locate(/mob/living) in tripai.loc)
|
||||
continue
|
||||
loc_landmark = tripai
|
||||
if(!loc_landmark)
|
||||
to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.")
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if(sloc.name == "AI")
|
||||
loc_landmark = sloc
|
||||
|
||||
forceMove(loc_landmark.loc)
|
||||
|
||||
// Before calling this, make sure an empty core exists, or this will no-op
|
||||
/mob/living/silicon/ai/proc/moveToEmptyCore()
|
||||
if(!empty_playable_ai_cores.len)
|
||||
log_debug("moveToEmptyCore called without any available cores")
|
||||
return
|
||||
|
||||
// IsJobAvailable for AI checks that there is an empty core available in this list
|
||||
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
|
||||
empty_playable_ai_cores -= C
|
||||
|
||||
forceMove(C.loc)
|
||||
|
||||
|
||||
qdel(C)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
while(!istype(M, /mob/living))
|
||||
if(!M || !M.loc || count > 6)
|
||||
//For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
|
||||
to_chat(src, "You are not being carried by anyone!")
|
||||
to_chat(P, "You are not being carried by anyone!")
|
||||
return 0
|
||||
M = M.loc
|
||||
count++
|
||||
@@ -705,7 +705,7 @@
|
||||
while(!isliving(held))
|
||||
if(!held || !held.loc || count > 6)
|
||||
//For a runtime where M ends up in nullspace (similar to bluespace but less colourful)
|
||||
to_chat(src, "You are not being carried by anyone!")
|
||||
to_chat(user, "You are not being carried by anyone!")
|
||||
return 0
|
||||
held = held.loc
|
||||
count++
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
faction = list("mining")
|
||||
weather_immunities = list("lava","ash")
|
||||
environment_smash = 2
|
||||
minbodytemp = 0
|
||||
heat_damage_per_tick = 20
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isSSD(mob/M)
|
||||
return istype(M) && M.player_logged
|
||||
proc/isLivingSSD(mob/M)
|
||||
return istype(M) && M.player_logged && M.stat != DEAD
|
||||
|
||||
proc/isAntag(A)
|
||||
if(istype(A, /mob/living/carbon))
|
||||
|
||||
@@ -296,18 +296,13 @@
|
||||
// AIs don't need a spawnpoint, they must spawn at an empty core
|
||||
if(character.mind.assigned_role == "AI")
|
||||
|
||||
character = character.AIize(move=0) // AIize the character, but don't move them yet
|
||||
var/mob/living/silicon/ai/ai_character = character.AIize() // AIize the character, but don't move them yet
|
||||
|
||||
// IsJobAvailable for AI checks that there is an empty core available in this list
|
||||
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
|
||||
empty_playable_ai_cores -= C
|
||||
ai_character.moveToEmptyCore()
|
||||
AnnounceCyborg(ai_character, rank, "has been downloaded to the empty core in \the [get_area(ai_character)]")
|
||||
|
||||
character.loc = C.loc
|
||||
|
||||
AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [get_area(character)]")
|
||||
ticker.mode.latespawn(character)
|
||||
|
||||
qdel(C)
|
||||
ticker.mode.latespawn(ai_character)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -7,14 +7,6 @@
|
||||
spawning = 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/AIize(move=1) // 'move' argument needs defining here too because BYOND is dumb
|
||||
if(notransform)
|
||||
return
|
||||
for(var/t in organs)
|
||||
qdel(t)
|
||||
|
||||
return ..(move)
|
||||
|
||||
/mob/living/carbon/AIize()
|
||||
if(notransform)
|
||||
return
|
||||
@@ -40,34 +32,12 @@
|
||||
else
|
||||
O.key = key
|
||||
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if(sloc.name != "AI")
|
||||
continue
|
||||
if(locate(/mob/living) in sloc.loc)
|
||||
continue
|
||||
loc_landmark = sloc
|
||||
if(!loc_landmark)
|
||||
for(var/obj/effect/landmark/tripai in landmarks_list)
|
||||
if(tripai.name == "tripai")
|
||||
if(locate(/mob/living) in tripai.loc)
|
||||
continue
|
||||
loc_landmark = tripai
|
||||
if(!loc_landmark)
|
||||
to_chat(O, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.")
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if(sloc.name == "AI")
|
||||
loc_landmark = sloc
|
||||
|
||||
O.loc = loc_landmark.loc
|
||||
|
||||
O.on_mob_init()
|
||||
|
||||
O.add_ai_verbs()
|
||||
|
||||
O.rename_self("AI",1)
|
||||
spawn
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
return O
|
||||
|
||||
/mob/living/carbon/human/make_into_mask(var/should_gib = 0)
|
||||
|
||||
@@ -1007,4 +1007,55 @@
|
||||
M.adjustToxLoss(-5*REM)
|
||||
M.adjustBrainLoss(-15*REM)
|
||||
M.adjustCloneLoss(-3*REM)
|
||||
..()
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/omnizine_diluted
|
||||
name = "Diluted Omnizine"
|
||||
id = "weak_omnizine"
|
||||
description = "Slowly heals all damage types. A far weaker substitute than actual omnizine."
|
||||
reagent_state = LIQUID
|
||||
color = "#DCDCDC"
|
||||
overdose_threshold = 30
|
||||
metabolization_rate = 0.1
|
||||
|
||||
/datum/reagent/omnizine_diluted/on_mob_life(mob/living/M)
|
||||
M.adjustToxLoss(-0.5*REM)
|
||||
M.adjustOxyLoss(-0.5*REM)
|
||||
M.adjustBruteLoss(-0.5*REM)
|
||||
M.adjustFireLoss(-0.5*REM)
|
||||
..()
|
||||
|
||||
/datum/reagent/omnizine_diluted/overdose_process(mob/living/M, severity)
|
||||
var/effect = ..()
|
||||
if(severity == 1) //lesser
|
||||
M.stuttering += 1
|
||||
if(effect <= 1)
|
||||
M.visible_message("<span class='warning'>[M] suddenly cluches their gut!</span>")
|
||||
M.emote("scream")
|
||||
M.Stun(4)
|
||||
M.Weaken(4)
|
||||
else if(effect <= 3)
|
||||
M.visible_message("<span class='warning'>[M] completely spaces out for a moment.</span>")
|
||||
M.confused += 15
|
||||
else if(effect <= 5)
|
||||
M.visible_message("<span class='warning'>[M] stumbles and staggers.</span>")
|
||||
M.Dizzy(5)
|
||||
M.Weaken(3)
|
||||
else if(effect <= 7)
|
||||
M.visible_message("<span class='warning'>[M] shakes uncontrollably.</span>")
|
||||
M.Jitter(30)
|
||||
else if(severity == 2) // greater
|
||||
if(effect <= 2)
|
||||
M.visible_message("<span class='warning'>[M] suddenly cluches their gut!</span>")
|
||||
M.emote("scream")
|
||||
M.Stun(7)
|
||||
M.Weaken(7)
|
||||
else if(effect <= 5)
|
||||
M.visible_message("<span class='warning'>[M] jerks bolt upright, then collapses!</span>")
|
||||
M.Paralyse(5)
|
||||
M.Weaken(4)
|
||||
else if(effect <= 8)
|
||||
M.visible_message("<span class='warning'>[M] stumbles and staggers.</span>")
|
||||
M.Dizzy(5)
|
||||
M.Weaken(3)
|
||||
@@ -279,7 +279,7 @@
|
||||
dwidth = 1
|
||||
width = 3
|
||||
height = 4
|
||||
var/target_area = /area/mine/unexplored
|
||||
var/target_area = /area/mine/dangerous/unexplored
|
||||
|
||||
/obj/docking_port/stationary/random/initialize()
|
||||
..()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
var/list/default_map_traits = MAP_TRANSITION_CONFIG
|
||||
/proc/check_level_trait(z, trait)
|
||||
if(z == 0)
|
||||
if(!z)
|
||||
return 0 // If you're nowhere, you have no traits
|
||||
var/list/trait_list
|
||||
if(space_manager.initialized)
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
affected.status &= ~ORGAN_SPLINTED
|
||||
affected.perma_injury = 0
|
||||
surgery.can_cancel = 1
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && !(affected.status & ORGAN_ROBOT) && affected.encased && affected.open >= 2
|
||||
if(!affected)
|
||||
return 0
|
||||
if(affected.status & ORGAN_ROBOT)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/datum/surgery_step/open_encased/saw
|
||||
@@ -26,12 +30,6 @@
|
||||
|
||||
time = 54
|
||||
|
||||
/datum/surgery_step/open_encased/saw/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2
|
||||
|
||||
/datum/surgery_step/open_encased/saw/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
@@ -52,8 +50,6 @@
|
||||
user.visible_message("<span class='notice'> [user] has cut [target]'s [affected.encased] open with \the [tool].</span>", \
|
||||
"<span class='notice'> You have cut [target]'s [affected.encased] open with \the [tool].</span>")
|
||||
affected.open = 2.5
|
||||
// crossin' the rubicon
|
||||
surgery.can_cancel = 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
@@ -81,12 +77,6 @@
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/open_encased/retract/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2.5
|
||||
|
||||
/datum/surgery_step/open_encased/retract/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
@@ -138,13 +128,6 @@
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/open_encased/close/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 3
|
||||
|
||||
/datum/surgery_step/open_encased/close/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
@@ -195,13 +178,6 @@
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/open_encased/mend/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected && affected.open == 2.5
|
||||
|
||||
/datum/surgery_step/open_encased/mend/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
@@ -225,6 +201,5 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
affected.open = 2
|
||||
surgery.can_cancel = 1
|
||||
|
||||
return 1
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
can_infect = 1
|
||||
|
||||
/datum/surgery_step/generic/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(target_zone == "eyes") //there are specific steps for eye surgery
|
||||
return 0
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -41,10 +39,6 @@
|
||||
|
||||
time = 16
|
||||
|
||||
/datum/surgery_step/generic/cut_open/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open == 0 && target_zone != "mouth"
|
||||
|
||||
/datum/surgery_step/generic/cut_open/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \
|
||||
@@ -175,10 +169,6 @@
|
||||
|
||||
time = 24
|
||||
|
||||
/datum/surgery_step/generic/cauterize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && affected.open && target_zone != "mouth"
|
||||
|
||||
/datum/surgery_step/generic/cauterize/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
name = "Cavity Implant/Removal"
|
||||
steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,
|
||||
/datum/surgery_step/open_encased/retract, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/open_encased/close,/datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize)
|
||||
can_cancel = 0
|
||||
possible_locs = list("chest","head")
|
||||
|
||||
|
||||
|
||||
@@ -69,13 +69,14 @@
|
||||
if(parent && parent.children)
|
||||
parent.children -= src
|
||||
|
||||
if(owner)
|
||||
owner.organs_by_name[limb_name] = null
|
||||
|
||||
if(internal_organs)
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
internal_organs -= O
|
||||
O.remove(owner,special = 1)
|
||||
qdel(O)
|
||||
|
||||
if(owner)
|
||||
owner.organs_by_name[limb_name] = null
|
||||
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/C in children)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
parent = H.get_organ(check_zone(parent_organ))
|
||||
if(!istype(parent))
|
||||
log_to_dd("[src] attempted to insert into a [parent], but [parent] wasn't an organ! Area: [get_area(M)]")
|
||||
log_debug("[src] attempted to insert into a [parent_organ], but [parent_organ] wasn't an organ! [atom_loc_line(M)]")
|
||||
else
|
||||
parent.internal_organs |= src
|
||||
//M.internal_organs_by_name[src] |= src(H,1)
|
||||
@@ -52,6 +52,8 @@
|
||||
// Returns the removed object, which is usually just itself
|
||||
// However, you MUST set the object's positiion yourself when you call this!
|
||||
/obj/item/organ/internal/remove(mob/living/carbon/M, special = 0)
|
||||
if(!owner)
|
||||
log_debug("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]")
|
||||
owner = null
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
@@ -63,7 +65,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/parent = H.get_organ(check_zone(parent_organ))
|
||||
if(!istype(parent))
|
||||
log_to_dd("[src] attempted to remove from a [parent], but [parent] didn't exist! Area: [get_area(M)], Mob: [M]")
|
||||
log_debug("[src] attempted to remove from a [parent_organ], but [parent_organ] didn't exist! [atom_loc_line(M)]")
|
||||
else
|
||||
parent.internal_organs -= src
|
||||
|
||||
|
||||
@@ -180,10 +180,6 @@
|
||||
stored_mmi.forceMove(get_turf(src))
|
||||
stored_mmi = null
|
||||
..()
|
||||
|
||||
var/mob/living/holder_mob = loc
|
||||
if(istype(holder_mob))
|
||||
holder_mob.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi()
|
||||
|
||||
@@ -68,7 +68,10 @@
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open_enough_for_surgery()
|
||||
if(affected)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -108,12 +108,15 @@
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if(target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
return affected && affected.open == 2 && (affected.status & ORGAN_DEAD)
|
||||
if(!affected)
|
||||
return 0
|
||||
|
||||
if(!(affected.status & ORGAN_DEAD))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -164,11 +167,10 @@
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if(target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
if(!(affected.status & ORGAN_DEAD))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -181,7 +183,7 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
if(!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
|
||||
@@ -83,7 +83,9 @@
|
||||
/datum/surgery_step/robotics/external/unscrew_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 0 && target_zone != "mouth"
|
||||
if(!affected)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/external/unscrew_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -117,7 +119,9 @@
|
||||
/datum/surgery_step/robotics/external/open_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open == 1
|
||||
if(!affected)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/external/open_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -151,7 +155,9 @@
|
||||
/datum/surgery_step/robotics/external/close_hatch/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && affected.open
|
||||
if(!affected)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/robotics/external/close_hatch/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -200,9 +206,6 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(!affected)
|
||||
return -1
|
||||
if(affected.open != 2)
|
||||
to_chat(user, "<span class='warning'>The [affected] needs to be open to be operated on!</span>")
|
||||
return -1
|
||||
|
||||
if(implement_type in implements_heal_burn)
|
||||
current_type = "burn"
|
||||
@@ -335,7 +338,7 @@
|
||||
var/obj/item/device/mmi/M = tool
|
||||
|
||||
|
||||
if(!(affected && affected.open_enough_for_surgery()))
|
||||
if(!affected)
|
||||
return -1
|
||||
|
||||
if(!istype(M))
|
||||
@@ -369,8 +372,6 @@
|
||||
var/list/organs = target.get_organs_zone(target_zone)
|
||||
if(!(affected && (affected.status & ORGAN_ROBOT)))
|
||||
return -1
|
||||
if(!affected.open_enough_for_surgery())
|
||||
return -1
|
||||
if(!organs.len)
|
||||
to_chat(user, "<span class='notice'>There is no removeable organs in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user