Merge remote-tracking branch 'upstream/dev' into 150722-TagPairs

Conflicts:
	code/modules/clothing/spacesuits/rig/rig.dm
This commit is contained in:
PsiOmega
2015-08-29 10:06:18 +02:00
148 changed files with 6540 additions and 5250 deletions
+5 -2
View File
@@ -105,7 +105,7 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
/client/proc/everyone_random,
/client/proc/everyone_random,
/client/proc/cinematic,
/datum/admins/proc/toggle_aliens,
/datum/admins/proc/toggle_space_ninja,
@@ -114,8 +114,11 @@ var/list/admin_verbs_fun = list(
/client/proc/make_sound,
/client/proc/toggle_random_events,
/client/proc/editappear,
/client/proc/roll_dices
/client/proc/roll_dices,
/datum/admins/proc/call_supply_drop,
/datum/admins/proc/call_drop_pod
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_fruit,
/datum/admins/proc/spawn_custom_item,
+2 -2
View File
@@ -7,7 +7,7 @@
msg = sanitize(msg)
if(!msg) return
log_admin("[key_name(src)] : [msg]")
log_admin("ADMIN: [key_name(src)] : [msg]")
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
@@ -29,7 +29,7 @@
if (!msg)
return
var/sender_name = src.key
var/sender_name = key_name(usr, 1)
if(check_rights(R_ADMIN, 0))
sender_name = "<span class='admin'>[sender_name]</span>"
for(var/client/C in admins)
+1 -1
View File
@@ -74,7 +74,7 @@
W.access = list()
if(corpseidjob)
W.assignment = corpseidjob
W.set_owner_info(M)
M.set_id_info(W)
M.equip_to_slot_or_del(W, slot_wear_id)
qdel(src)
+2 -2
View File
@@ -44,7 +44,7 @@
shoes = null
return 0
H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots.
shoes.loc = src
shoes.forceMove(src)
if(!..())
if(shoes) //Put the old shoes back on if the check fails.
@@ -63,7 +63,7 @@
var/mob/living/carbon/human/H = wearer
if(shoes)
if(!H.equip_to_slot_if_possible(shoes, slot_shoes))
shoes.loc = get_turf(src)
shoes.forceMove(get_turf(src))
src.shoes = null
wearer = null
@@ -23,7 +23,7 @@
usr << "Your module is not installed in a hardsuit."
return
module.holder.ui_interact(usr)
module.holder.ui_interact(usr, nano_state = contained_state)
/obj/item/rig_module/ai_container
@@ -46,9 +46,23 @@
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
var/obj/item/ai_verbs/verb_holder
/mob
var/get_rig_stats = 0
/obj/item/rig_module/ai_container/process()
if(integrated_ai && loc)
integrated_ai.SetupStat(loc.get_rig())
if(integrated_ai)
var/obj/item/weapon/rig/rig = get_rig()
if(rig && rig.ai_override_enabled)
integrated_ai.get_rig_stats = 1
else
integrated_ai.get_rig_stats = 0
/mob/living/Stat()
. = ..()
if(. && get_rig_stats)
var/obj/item/weapon/rig/rig = get_rig()
if(rig)
SetupStat(rig)
/obj/item/rig_module/ai_container/proc/update_verb_holder()
if(!verb_holder)
@@ -158,7 +172,10 @@
if(integrated_ai)
integrated_ai.ghostize()
qdel(integrated_ai)
if(ai_card) qdel(ai_card)
integrated_ai = null
if(ai_card)
qdel(ai_card)
ai_card = null
else if(user)
user.put_in_hands(ai_card)
else
@@ -168,7 +185,6 @@
update_verb_holder()
/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user)
if(!ai) return
// The ONLY THING all the different AI systems have in common is that they all store the mob inside an item.
@@ -227,21 +227,21 @@
return 0
/mob/living/carbon/human/Stat()
..()
. = ..()
if(istype(back,/obj/item/weapon/rig))
if(. && istype(back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/R = back
SetupStat(R)
/mob/proc/SetupStat(var/obj/item/weapon/rig/R)
if(src == usr && R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
if(R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
statpanel("Hardsuit Modules", "Suit charge", cell_status)
stat("Suit charge", cell_status)
for(var/obj/item/rig_module/module in R.installed_modules)
{
for(var/stat_rig_module/SRM in module.stat_modules)
if(SRM.CanUse())
statpanel("Hardsuit Modules",SRM.module.interface_name,SRM)
stat(SRM.module.interface_name,SRM)
}
/stat_rig_module
@@ -95,7 +95,7 @@
playsound(T, "sparks", 50, 1)
anim(T,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
/obj/item/rig_module/teleporter/engage(atom/target)
/obj/item/rig_module/teleporter/engage(var/atom/target, var/notify_ai)
if(!..()) return 0
+155 -35
View File
@@ -27,6 +27,8 @@
var/interface_path = "hardsuit.tmpl"
var/ai_interface_path = "hardsuit.tmpl"
var/interface_title = "Hardsuit Controller"
var/wearer_move_delay //Used for AI moving.
var/ai_controlled_move_delay = 10
// Keeps track of what this rig should spawn with.
var/suit_type = "hardsuit"
@@ -179,8 +181,8 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
@@ -268,9 +270,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
canremove = !seal_target
canremove = !seal_target
if(airtight)
update_component_sealed()
update_component_sealed()
update_icon(1)
return 0
@@ -289,9 +291,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(canremove)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
else
else
piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
update_icon(1)
/obj/item/weapon/rig/process()
@@ -302,7 +304,7 @@
if(istype(piece.loc, /mob/living))
M = piece.loc
M.drop_from_inventory(piece)
piece.loc = src
piece.forceMove(src)
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
if(!cell || cell.charge <= 0)
@@ -324,6 +326,8 @@
else
if(offline)
offline = 0
if(istype(wearer) && !wearer.wearing_rig)
wearer.wearing_rig = src
chest.slowdown = initial(slowdown)
if(offline)
@@ -381,8 +385,7 @@
cell.use(cost*10)
return 1
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/nano_state = inventory_state)
if(!user)
return
@@ -452,7 +455,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, data["ai"] ? contained_state : inventory_state)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -541,12 +544,10 @@
return 0
/obj/item/weapon/rig/proc/notify_ai(var/message)
if(!message || !installed_modules || !installed_modules.len)
return
for(var/obj/item/rig_module/module in installed_modules)
for(var/mob/living/silicon/ai/ai in module.contents)
if(ai && ai.client && !ai.stat)
ai << "[message]"
for(var/obj/item/rig_module/ai_container/module in installed_modules)
if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat)
module.integrated_ai << "[message]"
. = 1
/obj/item/weapon/rig/equipped(mob/living/carbon/human/M)
..()
@@ -557,12 +558,13 @@
if(M && M.back == src)
M.back = null
M.drop_from_inventory(src)
src.loc = get_turf(src)
src.forceMove(get_turf(src))
return
if(istype(M) && M.back == src)
M.visible_message("<font color='blue'><b>[M] struggles into \the [src].</b></font>", "<font color='blue'><b>You struggle into \the [src].</b></font>")
wearer = M
wearer.wearing_rig = src
update_icon()
/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode)
@@ -613,22 +615,21 @@
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1
holder.drop_from_inventory(use_obj)
use_obj.loc = get_turf(src)
use_obj.forceMove(get_turf(src))
use_obj.dropped()
use_obj.canremove = 0
use_obj.loc = src
use_obj.forceMove(src)
else if (deploy_mode != ONLY_RETRACT)
if(check_slot)
if(check_slot != use_obj)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
if(check_slot && check_slot == use_obj)
return
use_obj.forceMove(H)
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0, 1))
use_obj.forceMove(src)
if(check_slot)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
else
use_obj.loc = H
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
use_obj.loc = src
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></font>"
H << "<span class='notice'>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -674,6 +675,7 @@
..()
for(var/piece in list("helmet","gauntlets","chest","boots"))
toggle_piece(piece, user, ONLY_RETRACT)
wearer.wearing_rig = null
wearer = null
//Todo
@@ -755,15 +757,130 @@
return 1
return 0
/*/obj/item/weapon/rig/proc/forced_move(dir)
if(locked_down)
return 0
if(!control_overridden)
return
if(!wearer || wearer.back != src)
return 0
wearer.Move(null,dir)*/
/obj/item/weapon/rig/proc/ai_can_move_suit(var/mob/user, var/check_user_module = 0, var/check_for_ai = 0)
if(check_for_ai)
if(!(locate(/obj/item/rig_module/ai_container) in contents))
return 0
var/found_ai
for(var/obj/item/rig_module/ai_container/module in contents)
if(module.damage >= 2)
continue
if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat)
found_ai = 1
break
if(!found_ai)
return 0
if(check_user_module)
if(!user || !user.loc || !user.loc.loc)
return 0
var/obj/item/rig_module/ai_container/module = user.loc.loc
if(!istype(module) || module.damage >= 2)
user << "<span class='warning'>Your host module is unable to interface with the suit.</span>"
return 0
if(offline || !cell || !cell.charge || locked_down)
if(user) user << "<span class='warning'>Your host rig is unpowered and unresponsive.</span>"
return 0
if(!wearer || wearer.back != src)
if(user) user << "<span class='warning'>Your host rig is not being worn.</span>"
return 0
if(!wearer.stat && !control_overridden && !ai_override_enabled)
if(user) user << "<span class='warning'>You are locked out of the suit servo controller.</span>"
return 0
return 1
/obj/item/weapon/rig/proc/force_rest(var/mob/user)
if(!ai_can_move_suit(user, check_user_module = 1))
return
wearer.lay_down()
user << "<span class='notice'>\The [wearer] is now [wearer.resting ? "resting" : "getting up"].</span>"
/obj/item/weapon/rig/proc/forced_move(var/direction, var/mob/user)
// Why is all this shit in client/Move()? Who knows?
if(world.time < wearer_move_delay)
return
if(!wearer || !wearer.loc || !ai_can_move_suit(user, check_user_module = 1))
return
//This is sota the goto stop mobs from moving var
if(wearer.transforming || !wearer.canmove)
return
if(locate(/obj/effect/stop/, wearer.loc))
for(var/obj/effect/stop/S in wearer.loc)
if(S.victim == wearer)
return
if(!wearer.lastarea)
wearer.lastarea = get_area(wearer.loc)
if((istype(wearer.loc, /turf/space)) || (wearer.lastarea.has_gravity == 0))
if(!wearer.Process_Spacemove(0))
return 0
if(malfunctioning)
direction = pick(cardinal)
// Inside an object, tell it we moved.
if(isobj(wearer.loc) || ismob(wearer.loc))
var/atom/O = wearer.loc
return O.relaymove(wearer, direction)
if(isturf(wearer.loc))
if(wearer.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(wearer, 1))
if(M.pulling == wearer)
if(!M.restrained() && M.stat == 0 && M.canmove && wearer.Adjacent(M))
user << "<span class='notice'>Your host is restrained! They can't move!</span>"
return 0
else
M.stop_pulling()
if(wearer.pinned.len)
src << "<span class='notice'>Your host is pinned to a wall by [wearer.pinned[1]]</span>!"
return 0
// AIs are a bit slower than regular and ignore move intent.
wearer.last_move_intent = world.time + ai_controlled_move_delay
wearer_move_delay = world.time + ai_controlled_move_delay
var/tickcomp = 0
if(config.Tickcomp)
tickcomp = ((1/(world.tick_lag))*1.3) - 1.3
wearer_move_delay += tickcomp
if(istype(wearer.buckled, /obj/vehicle))
//manually set move_delay for vehicles so we don't inherit any mob movement penalties
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
wearer_move_delay = world.time + tickcomp
return wearer.buckled.relaymove(wearer, direction)
if(istype(wearer.machine, /obj/machinery))
if(wearer.machine.relaymove(wearer, direction))
return
if(wearer.pulledby || wearer.buckled) // Wheelchair driving!
if(istype(wearer.loc, /turf/space))
return // No wheelchair driving in space
if(istype(wearer.pulledby, /obj/structure/bed/chair/wheelchair))
return wearer.pulledby.relaymove(wearer, direction)
else if(istype(wearer.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(wearer.buckled))
var/obj/item/organ/external/l_hand = wearer.get_organ("l_hand")
var/obj/item/organ/external/r_hand = wearer.get_organ("r_hand")
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck!
wearer_move_delay += 2
return wearer.buckled.relaymove(wearer,direction)
cell.use(200) //Arbitrary, TODO
wearer.Move(get_step(get_turf(wearer),direction),direction)
// This returns the rig if you are contained inside one, but not if you are wearing it
/atom/proc/get_rig()
if(loc)
return loc.get_rig()
@@ -772,6 +889,9 @@
/obj/item/weapon/rig/get_rig()
return src
/mob/living/carbon/human/get_rig()
return back
#undef ONLY_DEPLOY
#undef ONLY_RETRACT
#undef SEAL_DELAY
@@ -19,7 +19,7 @@
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("Human", "Skrell", "Tajara", "Unathi")
species_restricted = list("exclude","Diona", "Xenomorph")
var/obj/machinery/camera/camera
var/list/camera_networks
@@ -64,7 +64,7 @@
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("Human", "Skrell", "Tajara", "Unathi")
species_restricted = list("exclude","Diona", "Xenomorph")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.
+10 -10
View File
@@ -112,7 +112,7 @@
if(istype(H))
if(helmet && H.head == helmet)
H.drop_from_inventory(helmet)
helmet.loc = src
helmet.forceMove(src)
if(boots)
boots.canremove = 1
@@ -120,11 +120,11 @@
if(istype(H))
if(boots && H.shoes == boots)
H.drop_from_inventory(boots)
boots.loc = src
boots.forceMove(src)
if(tank)
tank.canremove = 1
tank.loc = src
tank.forceMove(src)
/obj/item/clothing/suit/space/void/verb/toggle_helmet()
@@ -148,7 +148,7 @@
H << "<span class='notice'>You retract your suit helmet.</span>"
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.loc = src
helmet.forceMove(src)
else
if(H.head)
H << "<span class='danger'>You cannot deploy your helmet while wearing \the [H.head].</span>"
@@ -197,15 +197,15 @@
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
user << "You pop \the [tank] out of \the [src]'s storage compartment."
tank.loc = get_turf(src)
tank.forceMove(get_turf(src))
src.tank = null
else if(choice == helmet)
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.loc = get_turf(src)
helmet.forceMove(get_turf(src))
src.helmet = null
else if(choice == boots)
user << "You detatch \the [boots] from \the [src]'s boot mounts."
boots.loc = get_turf(src)
boots.forceMove(get_turf(src))
src.boots = null
else
user << "\The [src] does not have anything installed."
@@ -216,7 +216,7 @@
else
user << "You attach \the [W] to \the [src]'s helmet mount."
user.drop_item()
W.loc = src
W.forceMove(src)
src.helmet = W
return
else if(istype(W,/obj/item/clothing/shoes/magboots))
@@ -225,7 +225,7 @@
else
user << "You attach \the [W] to \the [src]'s boot mounts."
user.drop_item()
W.loc = src
W.forceMove(src)
boots = W
return
else if(istype(W,/obj/item/weapon/tank))
@@ -236,7 +236,7 @@
else
user << "You insert \the [W] into \the [src]'s storage compartment."
user.drop_item()
W.loc = src
W.forceMove(src)
tank = W
return
+1 -1
View File
@@ -160,7 +160,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 30, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, 0, list(ASSIGNMENT_MEDICAL = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Xenobiology Breach", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENCE = 100)),
)
+1 -1
View File
@@ -35,7 +35,7 @@ datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.stat != DEAD && G.is_client_active(5))
if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind))
var/turf/T = get_turf(G)
if(T.z in config.station_levels)
candidates += G
+1 -1
View File
@@ -126,7 +126,7 @@
/obj/machinery/portable_atmospherics/hydroponics/AltClick()
if(mechanical && !usr.stat && !usr.lying && Adjacent(usr))
close_lid(usr)
return
return 1
return ..()
/obj/machinery/portable_atmospherics/hydroponics/attack_ghost(var/mob/dead/observer/user)
+22
View File
@@ -326,6 +326,20 @@ var/list/name_to_material
icon_reinf = "reinf_over"
icon_colour = "#666666"
/material/diona
name = "biomass"
icon_colour = null
stack_type = null
integrity = 600
icon_base = "diona"
icon_reinf = "noreinf"
/material/diona/place_dismantled_product()
return
/material/diona/place_dismantled_girder(var/turf/target)
spawn_diona_nymph(target)
/material/steel/holographic
name = "holo" + DEFAULT_WALL_MATERIAL
display_name = DEFAULT_WALL_MATERIAL
@@ -346,6 +360,14 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list(DEFAULT_WALL_MATERIAL = 3750, "platinum" = 3750) //todo
/material/plasteel/titanium
name = "titanium"
stack_type = null
icon_base = "metal"
door_icon_base = "metal"
icon_colour = "#D1E6E3"
icon_reinf = "reinf_metal"
/material/glass
name = "glass"
stack_type = /obj/item/stack/material/glass
+6 -6
View File
@@ -74,7 +74,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
mind = body.mind //we don't transfer the mind but we keep a reference to it.
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
loc = T
forceMove(T)
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
@@ -293,7 +293,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
usr << "No area available."
usr.loc = pick(L)
usr.forceMove(pick(L))
following = null
/mob/dead/observer/verb/follow(input in getmobs())
@@ -320,7 +320,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
following = target
src << "<span class='notice'>Now following [target]</span>"
if(ismob(target))
loc = get_turf(target)
forceMove(get_turf(target))
var/mob/M = target
M.following_mobs += src
else
@@ -331,7 +331,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
break
// To stop the ghost flickering.
if(loc != T)
loc = T
forceMove(T)
sleep(15)
/mob/proc/update_following()
@@ -341,7 +341,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
following_mobs -= M
else
if(M.loc != .)
M.loc = .
M.forceMove(.)
/mob
var/list/following_mobs = list()
@@ -392,7 +392,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
src.loc = T
forceMove(T)
following = null
else
src << "This mob is not located in the game world."
@@ -40,7 +40,7 @@
cultnet.updateVisibility(src)
/datum/antagonist/add_antagonist(var/datum/mind/player)
..()
. = ..()
if(src == cult)
cultnet.updateVisibility(player.current, 0)
+7 -3
View File
@@ -216,11 +216,9 @@ var/list/slot_equipment_priority = list( \
update_inv_wear_mask(0)
return
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
/mob/proc/canUnEquip(obj/item/I)
if(!I) //If there's nothing to drop, the drop is automatically successful.
return 1
var/slot
for(var/s in slot_back to slot_tie) //kind of worries me
if(get_equipped_item(s) == I)
@@ -230,6 +228,12 @@ var/list/slot_equipment_priority = list( \
if(slot && !I.mob_can_unequip(src, slot))
return 0
return 1
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
if(!(force || canUnEquip(I)))
return
drop_from_inventory(I)
return 1
+4 -3
View File
@@ -107,11 +107,12 @@
space_chance = 10
/datum/language/machine/get_random_name()
var/new_name
if(prob(70))
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
new_name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
else
name = pick(ai_names)
return name
new_name = pick(ai_names)
return new_name
//Syllable Lists
/*
@@ -122,6 +122,13 @@
locked = 1
return
/obj/item/device/mmi/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(rig)
rig.forced_move(direction, user)
/obj/item/device/mmi/Destroy()
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
@@ -49,12 +49,12 @@
return 1
return ..()
/mob/living/carbon/brain/update_canmove()
if(in_contents_of(/obj/mecha))
if(in_contents_of(/obj/mecha) || istype(loc, /obj/item/device/mmi))
canmove = 1
use_me = 1 //If it can move, let it emote
else canmove = 0
use_me = 1
else
canmove = 0
return canmove
/mob/living/carbon/brain/binarycheck()
+3 -1
View File
@@ -136,8 +136,10 @@
return shock_damage
/mob/proc/swap_hand()
return
/mob/living/carbon/proc/swap_hand()
/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/weapon/material/twohanded))
@@ -61,11 +61,13 @@
if(!gibbed && species.death_sound)
playsound(loc, species.death_sound, 80, 1, 1)
if(ticker && ticker.mode)
sql_report_death(src)
ticker.mode.check_win()
if(wearing_rig)
wearing_rig.notify_ai("<span class='danger'>Warning: user death event. Mobility control passed to integrated intelligence system.</span>")
return ..(gibbed,species.death_message)
/mob/living/carbon/human/proc/ChangeToHusk()
@@ -266,7 +266,11 @@
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] [temp.get_wounds_desc()] on [T.his] [temp.name].</span><br>"
if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ])
var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ]
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.His] [parent.name].</span><br>"
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.His] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = "<span class='danger'>[T.His] [temp.name] is bleeding!</span><br>"
else
+13 -2
View File
@@ -7,6 +7,7 @@
var/list/hud_list[10]
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null)
@@ -207,7 +208,7 @@
/mob/living/carbon/human/show_inv(mob/user as mob)
if(user.incapacitated())
if(user.incapacitated() || !user.Adjacent(src))
return
var/obj/item/clothing/under/suit = null
@@ -1370,6 +1371,16 @@
handle_regular_hud_updates()
/mob/living/carbon/human/Check_Shoegrip()
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP)) //magboots + dense_object = no floating
if((shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating
return 1
return 0
/mob/living/carbon/human/can_stand_overridden()
if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1))
// Actually missing a leg will screw you up. Everything else can be compensated for.
for(var/limbcheck in list("l_leg","r_leg"))
var/obj/item/organ/affecting = get_organ(limbcheck)
if(!affecting)
return 0
return 1
return 0
@@ -32,7 +32,6 @@
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.take_damage(amount)
sponge.damage = min(max(sponge.damage, 0),(maxHealth*2))
brainloss = sponge.damage
else
brainloss = 200
@@ -145,6 +144,9 @@
/mob/living/carbon/human/Paralyse(amount)
if(HULK in mutations) return
// Notify our AI if they can now control the suit.
if(wearing_rig && !stat && paralysis < amount) //We are passing out right this second.
wearing_rig.notify_ai("<span class='danger'>Warning: user consciousness failure. Mobility control passed to integrated intelligence system.</span>")
..()
/mob/living/carbon/human/getCloneLoss()
+17 -30
View File
@@ -52,6 +52,10 @@
// update the current life tick, can be used to e.g. only do something every 4 ticks
life_tick++
// This is not an ideal place for this but it will do for now.
if(wearing_rig && wearing_rig.offline)
wearing_rig = null
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
if(in_stasis) loc:used++
@@ -933,13 +937,10 @@
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
Paralyse(3)
//UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > 50) || (health <= config.health_threshold_crit))
Paralyse(3)
if(hallucination)
if(hallucination >= 20)
if(prob(3))
@@ -951,47 +952,33 @@
spawn(rand(20,50))
client.dir = 1
if(hallucination)
if(hallucination >= 20)
if(prob(3))
fake_attack(src)
if(!handling_hal)
spawn handle_hallucinations() //The not boring kind!
if(client && prob(5))
client.dir = pick(2,4,8)
var/client/C = client
spawn(rand(20,50))
if(C)
C.dir = 1
hallucination = max(0, hallucination - 2)
else
for(var/atom/a in hallucinations)
qdel(a)
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
if(paralysis)
AdjustParalysis(-1)
if(paralysis || sleeping)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if(halloss > 0)
adjustHalLoss(-3)
adjustHalLoss(-3)
if(paralysis)
AdjustParalysis(-1)
else if(sleeping)
speech_problem_flag = 1
handle_dreams()
adjustHalLoss(-3)
if (mind)
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
if(client || sleeping > 3)
AdjustSleeping(-1)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if( prob(2) && health && !hal_crit )
spawn(0)
emote("snore")
+5 -4
View File
@@ -162,10 +162,11 @@
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1))
I.talk_into(src, message, verb, speaking)
I.add_fingerprint(src)
used_radios += I
if(!src.restrained())
for(var/obj/item/device/radio/intercom/I in view(1))
I.talk_into(src, message, null, verb, speaking)
I.add_fingerprint(src)
used_radios += I
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear
@@ -26,6 +26,7 @@
cold_level_3 = 0
eyes = "vox_eyes_s"
gluttonous = 2
breath_type = "nitrogen"
poison_type = "oxygen"
@@ -108,7 +108,7 @@
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/gluttonous // Can eat some mobs. 1 for monkeys, 2 for people.
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
var/rarity_value = 1 // Relative rarity/collector value for this species.
// Determines the organs that the species spawns with and
var/list/has_organ = list( // which required-organ checks are conducted.
@@ -155,6 +155,11 @@
for(var/u_type in unarmed_types)
unarmed_attacks += new u_type()
if(gluttonous)
if(!inherent_verbs)
inherent_verbs = list()
inherent_verbs |= /mob/living/carbon/human/proc/regurgitate
/datum/species/proc/get_station_variant()
return name
@@ -2,7 +2,6 @@
attack_verb = list("bit", "chomped on")
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 5
sharp = 1
edge = 1
@@ -11,7 +10,6 @@
attack_noun = list("tendril")
eye_attack_text = "a tendril"
eye_attack_text_victim = "a tendril"
damage = 5
/datum/unarmed_attack/claws
attack_verb = list("scratched", "clawed", "slashed")
@@ -20,7 +18,6 @@
eye_attack_text_victim = "sharp claws"
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
damage = 5
sharp = 1
edge = 1
@@ -57,18 +54,18 @@
/datum/unarmed_attack/claws/strong
attack_verb = list("slashed")
damage = 10
damage = 5
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("mauled")
damage = 15
damage = 8
shredding = 1
/datum/unarmed_attack/slime_glomp
attack_verb = list("glomped")
attack_noun = list("body")
damage = 0
damage = 2
/datum/unarmed_attack/slime_glomp/apply_effects()
//Todo, maybe have a chance of causing an electrical shock?
@@ -25,6 +25,8 @@
primitive_form = "Stok"
darksight = 3
gluttonous = 1
slowdown = 0.5
brute_mod = 0.8
num_alternate_languages = 2
secondary_langs = list("Sinta'unathi")
@@ -42,7 +44,7 @@
heat_level_2 = 480 //Default 400
heat_level_3 = 1100 //Default 1000
spawn_flags = CAN_JOIN | IS_WHITELISTED
spawn_flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
flesh_color = "#34AF10"
@@ -77,8 +79,10 @@
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
darksight = 8
slowdown = -1
brute_mod = 1.2
slowdown = -0.5
brute_mod = 1.15
burn_mod = 1.15
gluttonous = 1
num_alternate_languages = 2
secondary_langs = list("Siik'tajr")
@@ -90,7 +94,7 @@
cold_level_1 = 200 //Default 260
cold_level_2 = 140 //Default 200
cold_level_3 = 80 //Default 120
cold_level_3 = 80 //Default 120
heat_level_1 = 330 //Default 360
heat_level_2 = 380 //Default 400
@@ -11,7 +11,7 @@
has_fine_manipulation = 0
siemens_coefficient = 0
gluttonous = 2
gluttonous = 3
eyes = "blank_eyes"
@@ -3,7 +3,7 @@
if(!slot_to_strip || !istype(user))
return
if(user.incapacitated())
if(user.incapacitated() || !user.Adjacent(src))
user << browse(null, text("window=mob[src.name]"))
return
@@ -208,7 +208,7 @@ var/global/list/damage_icon_parts = list()
O.update_icon()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.get_bodytype()]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
+25 -4
View File
@@ -657,7 +657,27 @@ default behaviour is:
set category = "IC"
resting = !resting
src << "\blue You are now [resting ? "resting" : "getting up"]"
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>"
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(istype(carried_item, /obj/item/weapon/implant))
return 1
if(istype(carried_item, /obj/item/clothing/mask/facehugger))
return 1
return 0
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in internal_organs)
return 1
return ..()
/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in organs)
return 1
return ..()
/mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item)
return carried_item != held_item
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
if(stat)
@@ -721,9 +741,10 @@ default behaviour is:
if(!ignore_items)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
if(is_allowed_vent_crawl_item(carried_item))
continue
src << "<span class='warning'>You can't be carrying items or have items equipped when vent crawling!</span>"
return
if(isslime(src))
var/mob/living/carbon/slime/S = src
+12 -2
View File
@@ -81,7 +81,7 @@ var/list/ai_verbs_default = list(
var/datum/ai_icon/selected_sprite // The selected icon set
var/custom_sprite = 0 // Whether the selected icon is custom
var/carded
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default
@@ -370,7 +370,7 @@ var/list/ai_verbs_default = list(
if(emergency_message_cooldown)
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
return
var/input = input(usr, "Please choose a message to transmit to [boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to [boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input)
return
Centcomm_announce(input, usr)
@@ -684,5 +684,15 @@ var/list/ai_verbs_default = list(
icon_state = selected_sprite.alive_icon
set_light(1, 1, selected_sprite.alive_light)
// Pass lying down or getting up to our pet human, if we're in a rig.
/mob/living/silicon/ai/lay_down()
set name = "Rest"
set category = "IC"
resting = 0
var/obj/item/weapon/rig/rig = src.get_rig()
if(rig)
rig.force_rest(src)
#undef AI_CHECK_WIRELESS
#undef AI_CHECK_RADIO
+7 -6
View File
@@ -72,8 +72,6 @@
var/current_pda_messaging = null
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
canmove = 0
src.loc = paicard
card = paicard
sradio = new(src)
@@ -276,8 +274,6 @@
var/obj/item/device/pda/holder = card.loc
holder.pai = null
canmove = 1
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = src
src.forceMove(get_turf(card))
@@ -339,12 +335,16 @@
set name = "Rest"
set category = "IC"
// Pass lying down or getting up to our pet human, if we're in a rig.
if(istype(src.loc,/obj/item/device/paicard))
resting = 0
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.force_rest(src)
else
resting = !resting
icon_state = resting ? "[chassis]_rest" : "[chassis]"
src << "\blue You are now [resting ? "resting" : "getting up"]"
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>"
canmove = !resting
@@ -393,7 +393,8 @@
card.loc = get_turf(card)
src.forceMove(card)
card.forceMove(card.loc)
canmove = 0
canmove = 1
resting = 0
icon_state = "[chassis]"
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
@@ -87,6 +87,9 @@
/obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/no_use/loader //This is used to disallow building with metal.
name = "sheet loader"
desc = "A specialized loading device, designed to pick up and insert sheets of materials inside machines."
@@ -101,9 +104,6 @@
return wrapped.attack_self(user)
return ..()
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/verb/drop_item()
set name = "Drop Item"
@@ -130,6 +130,8 @@
force_holder = wrapped.force
wrapped.force = 0.0
wrapped.attack(M,user)
if(deleted(wrapped))
wrapped = null
return 1
return 0
@@ -5,4 +5,6 @@
winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
return
// Forces synths to select an icon relevant to their module
if(!icon_selected)
choose_icon(icon_selection_tries, module_sprites)
+28 -57
View File
@@ -24,8 +24,10 @@
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/icon_selected = 1 //If icon selection has been completed yet
var/icon_selection_tries = 0//Remaining attempts to select icon before a selection is forced
//Hud stuff
@@ -89,21 +91,6 @@
/mob/living/silicon/robot/proc/robot_checklaws
)
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
..()
/mob/living/silicon/robot/New(loc,var/unfinished = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
@@ -178,17 +165,6 @@
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
new /obj/item/weapon/robot_module/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/SetName(pickedName as text)
custom_name = pickedName
updatename()
@@ -241,10 +217,15 @@
..()
/mob/living/silicon/robot/proc/set_module_sprites(var/list/new_sprites)
module_sprites = new_sprites
module_sprites = new_sprites.Copy()
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[modtype]"
icontype = "Custom"
else
icontype = module_sprites[1]
icon_state = module_sprites[icontype]
updateicon()
return module_sprites
/mob/living/silicon/robot/proc/pick_module()
@@ -255,7 +236,7 @@
if((crisis && security_level == SEC_LEVEL_RED) || crisis_override) //Leaving this in until it's balanced appropriately.
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
modtype = input("Please, select a module!", "Robot", null, null) in modules
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
if(module)
return
@@ -268,8 +249,6 @@
hands.icon_state = lowertext(modtype)
feedback_inc("cyborg_[lowertext(modtype)]",1)
updatename()
set_module_sprites(module.sprites)
choose_icon(module_sprites.len + 1, module_sprites)
notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name)
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
@@ -688,7 +667,7 @@
/mob/living/silicon/robot/updateicon()
overlays.Cut()
if(stat == 0)
if(stat == CONSCIOUS)
overlays += "eyes-[module_sprites[icontype]]"
if(opened)
@@ -916,38 +895,30 @@
return
/mob/living/silicon/robot/proc/choose_icon(var/triesleft, var/list/module_sprites)
if(triesleft<1 || !module_sprites.len)
return
else
triesleft--
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
else if(module_sprites.len == 1)
icontype = module_sprites[1]
else
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
if(icontype)
icon_state = module_sprites[icontype]
else
if(!module_sprites.len)
src << "Something is badly wrong with the sprite selection. Harass a coder."
icon_state = module_sprites[1]
return
icon_selected = 0
src.icon_selection_tries = triesleft
if(module_sprites.len == 1 || !client)
if(!(icontype in module_sprites))
icontype = module_sprites[1]
else
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot", icontype, null) in module_sprites
icon_state = module_sprites[icontype]
updateicon()
if (triesleft >= 1)
if (module_sprites.len > 1 && triesleft >= 1 && client)
icon_selection_tries--
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
choose_icon(icon_selection_tries, module_sprites)
return
else
triesleft = 0
return
else
src << "Your icon has been set. You now require a module reset to change it."
icon_selected = 1
icon_selection_tries = 0
src << "Your icon has been set. You now require a module reset to change it."
/mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs
set name = "Set Sensor Augmentation"
@@ -105,13 +105,6 @@
desc = "A circuit grafted onto the bottom of an ID card. It is used to transmit access codes into other robot chassis, \
allowing you to lock and unlock other robots' panels."
/obj/item/weapon/card/id/robot/attack_self() //override so borgs can't flash their IDs.
return
/obj/item/weapon/card/id/robot/read()
usr << "The ID card does not appear to have any writing on it."
return
//A harvest item for serviceborgs.
/obj/item/weapon/robot_harvester
name = "auto harvester"
@@ -49,9 +49,13 @@ var/global/list/robot_modules = list(
if(R.radio)
R.radio.recalculateChannels()
/obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
R.module = null
R.set_module_sprites(sprites)
R.choose_icon(R.module_sprites.len + 1, R.module_sprites)
for(var/obj/item/I in modules)
I.canremove = 0
/obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
remove_camera_networks(R)
remove_languages(R)
remove_subsystems(R)
@@ -59,16 +63,17 @@ var/global/list/robot_modules = list(
if(R.radio)
R.radio.recalculateChannels()
qdel(src)
R.choose_icon(0, R.set_module_sprites(list("Default" = "robot")))
/obj/item/weapon/robot_module/Destroy()
qdel(modules)
qdel(synths)
for(var/module in modules)
qdel(module)
for(var/synth in synths)
qdel(synths)
modules.Cut()
synths.Cut()
qdel(emag)
qdel(jetpack)
modules = null
synths = null
emag = null
jetpack = null
return ..()
@@ -144,7 +149,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/standard/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -152,7 +156,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.emag = new /obj/item/weapon/melee/energy/sword(src)
return
..()
/obj/item/weapon/robot_module/medical
name = "medical robot module"
@@ -172,7 +176,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/medical/surgeon/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/surgeon(src)
@@ -204,7 +207,7 @@ var/global/list/robot_modules = list(
src.modules += N
src.modules += B
return
..()
/obj/item/weapon/robot_module/medical/surgeon/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
if(src.emag)
@@ -224,7 +227,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/medical/crisis/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
@@ -258,7 +260,7 @@ var/global/list/robot_modules = list(
src.modules += B
src.modules += S
return
..()
/obj/item/weapon/robot_module/medical/crisis/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
@@ -294,7 +296,6 @@ var/global/list/robot_modules = list(
no_slip = 1
/obj/item/weapon/robot_module/engineering/construction/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -328,8 +329,9 @@ var/global/list/robot_modules = list(
RG.synths = list(metal, glass)
src.modules += RG
/obj/item/weapon/robot_module/engineering/general/New()
..()
/obj/item/weapon/robot_module/engineering/general/New()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -382,7 +384,7 @@ var/global/list/robot_modules = list(
RG.synths = list(metal, glass)
src.modules += RG
return
..()
/obj/item/weapon/robot_module/security
name = "security robot module"
@@ -403,7 +405,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/security/general/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/hud/sec(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
@@ -411,7 +412,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src)
src.modules += new /obj/item/taperoll/police(src)
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
return
..()
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/flash/F = locate() in src.modules
@@ -442,7 +443,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/janitor/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/storage/bag/trash(src)
@@ -451,7 +451,7 @@ var/global/list/robot_modules = list(
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
src.emag.reagents.add_reagent("lube", 250)
src.emag.name = "Lube spray"
return
..()
/obj/item/weapon/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules
@@ -485,7 +485,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/clerical/butler/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/gripper/service(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
@@ -507,14 +506,14 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/tray/robotray(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/service(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
var/datum/reagents/R = new/datum/reagents(50)
src.emag.reagents = R
R.my_atom = src.emag
R.add_reagent("beer2", 50)
src.emag.name = "Mickey Finn's Special Brew"
return
..()
/obj/item/weapon/robot_module/clerical/general
name = "clerical robot module"
@@ -528,13 +527,13 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/clerical/general/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/pen/robopen(src)
src.modules += new /obj/item/weapon/form_printer(src)
src.modules += new /obj/item/weapon/gripper/paperwork(src)
src.modules += new /obj/item/weapon/hand_labeler(src)
src.emag = new /obj/item/weapon/stamp/denied(src)
..()
/obj/item/weapon/robot_module/general/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
@@ -556,7 +555,6 @@ var/global/list/robot_modules = list(
supported_upgrades = list(/obj/item/borg/upgrade/jetpack)
/obj/item/weapon/robot_module/miner/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -568,7 +566,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/mining_scanner(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
return
..()
/obj/item/weapon/robot_module/research
name = "research module"
@@ -579,7 +577,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/research/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/portable_destructive_analyzer(src)
src.modules += new /obj/item/weapon/gripper/research(src)
@@ -605,7 +602,7 @@ var/global/list/robot_modules = list(
N.synths = list(nanite)
src.modules += N
return
..()
/obj/item/weapon/robot_module/syndicate
name = "illegal robot module"
@@ -617,9 +614,12 @@ var/global/list/robot_modules = list(
LANGUAGE_SKRELLIAN = 0,
LANGUAGE_GUTTER = 1
)
sprites = list(
"Dread" = "securityrobot",
)
var/id
/obj/item/weapon/robot_module/syndicate/New(var/mob/living/silicon/robot/R)
..()
loc = R
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/energy/sword(src)
@@ -628,14 +628,21 @@ var/global/list/robot_modules = list(
var/jetpack = new/obj/item/weapon/tank/jetpack/carbondioxide(src)
src.modules += jetpack
R.internals = jetpack
return
id = R.idcard
src.modules += id
..()
/obj/item/weapon/robot_module/syndicate/Destroy()
src.modules -= id
id = null
return ..()
/obj/item/weapon/robot_module/security/combat
name = "combat robot module"
sprites = list("Combat Android" = "droid-combat")
/obj/item/weapon/robot_module/combat/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/gun/energy/laser/mounted(src)
@@ -643,7 +650,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/borg/combat/shield(src)
src.modules += new /obj/item/borg/combat/mobility(src)
src.emag = new /obj/item/weapon/gun/energy/lasercannon/mounted(src)
return
..()
/obj/item/weapon/robot_module/drone
name = "drone module"
@@ -651,7 +658,6 @@ var/global/list/robot_modules = list(
networks = list(NETWORK_ENGINEERING)
/obj/item/weapon/robot_module/drone/New()
..()
src.modules += new /obj/item/weapon/weldingtool(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -718,14 +724,16 @@ var/global/list/robot_modules = list(
P.synths = list(plastic)
src.modules += P
..()
/obj/item/weapon/robot_module/drone/construction
name = "construction drone module"
channels = list("Engineering" = 1)
languages = list()
/obj/item/weapon/robot_module/drone/construction/New()
..()
src.modules += new /obj/item/weapon/rcd/borg(src)
..()
/obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules
@@ -0,0 +1,28 @@
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
idcard_type = /obj/item/weapon/card/id/syndicate
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
..()
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
overlays.Cut()
init_id()
new /obj/item/weapon/robot_module/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
@@ -23,6 +23,10 @@
var/next_alarm_notice
var/list/datum/alarm/queued_alarms = new()
var/list/access_rights
var/obj/item/weapon/card/id/idcard
var/idcard_type = /obj/item/weapon/card/id/synthetic
#define SEC_HUD 1 //Security HUD mode
#define MED_HUD 2 //Medical HUD mode
@@ -30,6 +34,7 @@
silicon_mob_list |= src
..()
add_language("Galactic Common")
init_id()
init_subsystems()
/mob/living/silicon/Destroy()
@@ -38,6 +43,12 @@
AH.unregister(src)
..()
/mob/living/silicon/proc/init_id()
if(idcard)
return
idcard = new idcard_type(src)
set_id_info(idcard)
/mob/living/silicon/proc/SetName(pickedName as text)
real_name = pickedName
name = real_name
+42 -30
View File
@@ -649,7 +649,7 @@
/mob/Stat()
..()
. = (client && client.inactivity < 1200)
. = (is_client_active(10 MINUTES))
if(.)
if(statpanel("Status") && ticker && ticker.current_state != GAME_STATE_PREGAME)
@@ -692,40 +692,52 @@
if(transforming) return 0
return 1
// Not sure what to call this. Used to check if humans are wearing an AI-controlled exosuit and hence don't need to fall over yet.
/mob/proc/can_stand_overridden()
return 0
/mob/proc/cannot_stand()
return incapacitated() || restrained() || resting || sleeping || (status_flags & FAKEDEATH)
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/proc/update_canmove()
if(istype(buckled, /obj/vehicle))
var/obj/vehicle/V = buckled
if(stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
pixel_y = V.mob_offset_y - 5
else
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
canmove = 1
pixel_y = V.mob_offset_y
else if(buckled)
anchored = 1
canmove = 0
if(istype(buckled))
if(buckled.buckle_lying != -1)
lying = buckled.buckle_lying
if(buckled.buckle_movable)
anchored = 0
canmove = 1
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
else if(stunned)
canmove = 0
else if(captured)
anchored = 1
canmove = 0
lying = 0
else
if(!resting && cannot_stand() && can_stand_overridden())
lying = 0
canmove = 1
else
if(istype(buckled, /obj/vehicle))
var/obj/vehicle/V = buckled
if(cannot_stand())
lying = 1
canmove = 0
pixel_y = V.mob_offset_y - 5
else
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
canmove = 1
pixel_y = V.mob_offset_y
else if(buckled)
anchored = 1
canmove = 0
if(istype(buckled))
if(buckled.buckle_lying != -1)
lying = buckled.buckle_lying
if(buckled.buckle_movable)
anchored = 0
canmove = 1
else if(cannot_stand())
lying = 1
canmove = 0
else if(stunned)
canmove = 0
else if(captured)
anchored = 1
canmove = 0
lying = 0
else
lying = 0
canmove = 1
if(lying)
density = 0
+19 -5
View File
@@ -355,7 +355,7 @@
var/datum/unarmed_attack/attack = H.get_unarmed_attack(src, hit_zone)
if(!attack)
return
if(state < GRAB_NECK)
assailant << "<span class='warning'>You require a better grab to do this.</span>"
return
@@ -370,7 +370,7 @@
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [affecting.name]'s eyes using grab ([affecting.ckey])</font>")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had eyes attacked by [assailant.name]'s grab ([assailant.ckey])</font>")
msg_admin_attack("[key_name(assailant)] attacked [key_name(affecting)]'s eyes using a grab action.")
attack.handle_eye_attack(assailant, affecting)
else if(hit_zone != "head")
if(state < GRAB_NECK)
@@ -428,10 +428,24 @@
else
var/mob/living/carbon/human/H = user
if(istype(H) && H.species.gluttonous)
if(H.species.gluttonous == 2)
// Small animals (mice, lizards).
if(affecting.small)
can_eat = 2
else if(!ishuman(affecting) && !issmall(affecting) && (affecting.small || iscarbon(affecting)))
can_eat = 1
else
if(H.species.gluttonous == 2)
// Diona nymphs, alien larvae.
if(iscarbon(affecting) && !ishuman(affecting))
can_eat = 2
// Monkeys.
else if(issmall(affecting))
can_eat = 1
else if(H.species.gluttonous == 3)
// Full-sized humans.
if(ishuman(affecting) && !issmall(affecting))
can_eat = 1
// Literally everything else.
else
can_eat = 2
if(can_eat)
var/mob/living/carbon/attacker = user
+1 -1
View File
@@ -632,7 +632,7 @@ proc/is_blind(A)
return SAFE_PERP
//Agent cards lower threatlevel.
var/obj/item/weapon/card/id/id = GetIdCard(src)
var/obj/item/weapon/card/id/id = GetIdCard()
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
threatcount -= 2
// A proper CentCom id is hard currency.
-2
View File
@@ -233,7 +233,6 @@
if(Process_Grab()) return
if(!mob.canmove)
return
@@ -246,7 +245,6 @@
if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0))
if(!mob.Process_Spacemove(0)) return 0
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
var/atom/O = mob.loc
return O.relaymove(mob, direct)
+1 -1
View File
@@ -414,7 +414,7 @@
var/datum/species/chosen_species
if(client.prefs.species)
chosen_species = all_species[client.prefs.species]
use_species_name = all_species[chosen_species.get_station_variant()] //Only used by pariahs atm.
use_species_name = chosen_species.get_station_variant() //Only used by pariahs atm.
if(chosen_species && use_species_name)
// Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
+1 -1
View File
@@ -14,7 +14,7 @@
/mob/proc/shared_nano_interaction()
if (src.stat || !client)
return STATUS_CLOSE // no updates, close the interface
else if (restrained() || lying || stat || stunned || weakened)
else if (incapacitated())
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
-15
View File
@@ -30,21 +30,6 @@
return STATUS_INTERACTIVE // interactive (green visibility)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
/mob/living/silicon/robot/syndicate/default_can_use_topic(var/src_object)
. = ..()
if(. != STATUS_INTERACTIVE)
return
if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level
return STATUS_INTERACTIVE
if(istype(get_area(src), /area/syndicate_station)) // If elsewhere, they can interact with everything on the syndicate shuttle
return STATUS_INTERACTIVE
if(istype(src_object, /obj/machinery)) // Otherwise they can only interact with emagged machinery
var/obj/machinery/Machine = src_object
if(Machine.emagged)
return STATUS_INTERACTIVE
return STATUS_UPDATE
/mob/living/silicon/ai/default_can_use_topic(var/src_object)
. = shared_nano_interaction()
if(. != STATUS_INTERACTIVE)
+1 -1
View File
@@ -347,7 +347,7 @@ nanoui is used to open and update nano browser uis
template_data_json = list2json(templates)
var/list/send_data = get_send_data(initial_data)
var/initial_data_json = replacetext(list2json_usecache(send_data), "'", "&#39;")
var/initial_data_json = replacetext(replacetext(list2json_usecache(send_data), "&#34;", "&amp;#34;"), "'", "&#39;")
var/url_parameters_json = list2json(list("src" = "\ref[src]"))
+5 -3
View File
@@ -227,14 +227,15 @@ var/list/organ_cache = list()
W.damage += damage
W.time_inflicted = world.time
//Note: external organs have their own version of this proc
/obj/item/organ/proc/take_damage(amount, var/silent=0)
if(src.status & ORGAN_ROBOT)
src.damage += (amount * 0.8)
src.damage = between(0, src.damage + (amount * 0.8), max_damage)
else
src.damage += amount
src.damage = between(0, src.damage + amount, max_damage)
//only show this if the organ is not robotic
if(owner && parent_organ)
if(owner && parent_organ && amount > 0)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if(parent && !silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
@@ -344,6 +345,7 @@ var/list/organ_cache = list()
user.drop_from_inventory(src)
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
O.name = name
O.icon = icon
O.icon_state = icon_state
// Pass over the blood.
+5 -5
View File
@@ -1,5 +1,5 @@
/proc/spawn_diona_nymph_from_organ(var/obj/item/organ/organ)
if(!istype(organ))
/proc/spawn_diona_nymph(var/turf/target)
if(!istype(target))
return 0
//This is a terrible hack and I should be ashamed.
@@ -8,7 +8,7 @@
return 0
spawn(1) // So it has time to be thrown about by the gib() proc.
var/mob/living/carbon/alien/diona/D = new(get_turf(organ))
var/mob/living/carbon/alien/diona/D = new(target)
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
P.request_player(D, "A diona nymph has split off from its gestalt. ")
spawn(60)
@@ -144,7 +144,7 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
if(prob(50) && spawn_diona_nymph_from_organ(src))
if(prob(50) && spawn_diona_nymph(get_turf(src)))
qdel(src)
/obj/item/organ/diona/process()
@@ -185,7 +185,7 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
if(prob(50) && spawn_diona_nymph_from_organ(src))
if(prob(50) && spawn_diona_nymph(get_turf(src)))
qdel(src)
// These are different to the standard diona organs as they have a purpose in other
+1 -2
View File
@@ -112,8 +112,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
scan = I
authenticated = 0
+4
View File
@@ -166,6 +166,10 @@
desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb
/obj/machinery/light/small/emergency
brightness_range = 6
brightness_power = 2
brightness_color = "#da0205"
/obj/machinery/light/spot
name = "spotlight"
+172
View File
@@ -0,0 +1,172 @@
/turf/simulated/wall/diona/New(var/newloc)
..(newloc,"biomass")
/turf/simulated/wall/diona/attack_generic(var/mob/user, var/damage, var/attack_message)
if(istype(user, /mob/living/carbon/alien/diona))
if(can_open == WALL_OPENING)
return
can_open = WALL_CAN_OPEN
user.visible_message("<span class='alium'>\The [user] strokes its feelers against \the [src] and the biomass [density ? "moves aside" : "closes up"].</span>")
toggle_open(user)
sleep(15)
if(can_open == WALL_CAN_OPEN) can_open = 0
else
return ..(user, damage, attack_message)
/obj/structure/diona
icon = 'icons/obj/diona.dmi'
anchored = 1
density = 1
opacity = 0
layer = TURF_LAYER + 0.01
/obj/structure/diona/vines
name = "alien vines"
desc = "Thick, heavy vines of some sort."
icon_state = "vines3"
var/growth = 0
/obj/structure/diona/vines/proc/spread()
var/turf/origin = get_turf(src)
for(var/turf/T in range(src,2))
if(T.density || T == origin || istype(T, /turf/space))
continue
var/new_growth = 1
switch(get_dist(origin,T))
if(0)
new_growth = 3
if(1)
new_growth = 2
var/obj/structure/diona/vines/existing = locate() in T
if(!istype(existing)) existing = PoolOrNew(/obj/structure/diona/vines, T)
if(existing.growth < new_growth)
existing.growth = new_growth
existing.update_icon()
/obj/structure/diona/vines/update_icon()
icon_state = "vines[growth]"
/obj/structure/diona/bulb
name = "glow bulb"
desc = "A glowing bulb of some sort."
icon_state = "glowbulb"
/obj/structure/diona/bulb/New(var/newloc)
..()
set_light(3,3,"#557733")
/datum/random_map/automata/diona
iterations = 3
descriptor = "diona gestalt"
limit_x = 32
limit_y = 32
wall_type = /turf/simulated/wall/diona
floor_type = /turf/simulated/floor/diona
// This is disgusting.
/datum/random_map/automata/diona/proc/search_neighbors_for(var/search_val, var/x, var/y)
var/current_cell = get_map_cell(x-1,y-1)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x-1,y)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x-1,y+1)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x,y-1)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x,y+1)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x+1,y-1)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x+1,y)
if(current_cell && map[current_cell] == search_val) return 1
current_cell = get_map_cell(x+1,y+1)
if(current_cell && map[current_cell] == search_val) return 1
return 0
/datum/random_map/automata/diona/cleanup()
// Hollow out the interior spaces.
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!current_cell) continue
if(map[current_cell] == WALL_CHAR)
if(!search_neighbors_for(FLOOR_CHAR,x,y) && !search_neighbors_for(DOOR_CHAR,x,y) && !(x == 1 || y == 1 || x == limit_x || y == limit_y))
map[current_cell] = EMPTY_CHAR
// Prune exposed floor turfs away from the edges.
var/changed = 1
while(changed)
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
changed = 0
var/current_cell = get_map_cell(x,y)
if(!current_cell) continue
if(map[current_cell] == EMPTY_CHAR)
if((search_neighbors_for(FLOOR_CHAR,x,y)) || (x == 1 || y == 1 || x == limit_x || y == limit_y))
map[current_cell] = FLOOR_CHAR
changed = 1
// Count and track the floors.
var/list/floor_turfs = list()
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!current_cell) continue
if(map[current_cell] == EMPTY_CHAR)
floor_turfs |= current_cell
// Add vine decals.
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!current_cell || map[current_cell] != EMPTY_CHAR) continue
if(search_neighbors_for(WALL_CHAR,x,y))
map[current_cell] = DOOR_CHAR
// Add bulbs and doona nymphs.
if(floor_turfs.len)
var/bulb_count = rand(round(floor_turfs.len/10),round(floor_turfs.len/8))
while(floor_turfs.len && bulb_count)
var/cell = pick(floor_turfs)
floor_turfs -= cell
map[cell] = ARTIFACT_CHAR
bulb_count--
if(floor_turfs.len)
var/nymph_count = rand(round(floor_turfs.len/10),round(floor_turfs.len/8))
while(floor_turfs.len && nymph_count)
var/cell = pick(floor_turfs)
floor_turfs -= cell
map[cell] = MONSTER_CHAR
nymph_count--
return
/datum/random_map/automata/diona/get_appropriate_path(var/value)
switch(value)
if(EMPTY_CHAR, DOOR_CHAR, MONSTER_CHAR, ARTIFACT_CHAR)
return floor_type
if(WALL_CHAR)
return wall_type
/datum/random_map/automata/diona/get_additional_spawns(var/value, var/turf/T)
if(value != FLOOR_CHAR)
for(var/thing in T)
if(istype(thing, /atom))
var/atom/A = thing
if(A.simulated)
continue
qdel(thing)
switch(value)
if(ARTIFACT_CHAR)
PoolOrNew(/obj/structure/diona/bulb,T)
if(MONSTER_CHAR)
spawn_diona_nymph(T)
if(DOOR_CHAR)
var/obj/structure/diona/vines/V = PoolOrNew(/obj/structure/diona/vines,T)
V.growth = 3
V.update_icon()
spawn(1)
V.spread()
+2 -2
View File
@@ -7,7 +7,7 @@
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
continue
if(x == 1 || y == 1 || x == limit_x || y == limit_y)
map[current_cell] = WALL_CHAR
@@ -19,7 +19,7 @@
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
continue
if(!(x == 1 || y == 1 || x == limit_x || y == limit_y))
continue
+195
View File
@@ -0,0 +1,195 @@
var/global/list/datum/supply_drop_loot/supply_drop
/proc/supply_drop_random_loot_types()
if(!supply_drop)
supply_drop = init_subtypes(/datum/supply_drop_loot)
supply_drop = dd_sortedObjectList(supply_drop)
return supply_drop
/datum/supply_drop_loot
var/name = ""
var/container = null
var/list/contents = null
/datum/supply_drop_loot/proc/contents()
return contents
/datum/supply_drop_loot/proc/drop(turf/T)
var/C = container ? new container(T) : T
for(var/content in contents())
new content(C)
/datum/supply_drop_loot/dd_SortValue()
return name
/datum/supply_drop_loot/supermatter
name = "Supermatter"
/datum/supply_drop_loot/supermatter/New()
..()
contents = list(/obj/machinery/power/supermatter)
/datum/supply_drop_loot/lasers
name = "Lasers"
container = /obj/structure/largecrate
/datum/supply_drop_loot/lasers/New()
..()
contents = list(
/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/laser,
/obj/item/weapon/gun/energy/sniperrifle,
/obj/item/weapon/gun/energy/ionrifle)
/datum/supply_drop_loot/ballistics
name = "Ballistics"
container = /obj/structure/largecrate
/datum/supply_drop_loot/ballistics/New()
..()
contents = list(
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/gun/projectile/automatic/wt550,
/obj/item/weapon/gun/projectile/automatic/z8)
/datum/supply_drop_loot/ballistics
name = "Ballistics"
container = /obj/structure/largecrate
/datum/supply_drop_loot/ballistics/New()
..()
contents = list(
/obj/item/weapon/gun/projectile/sec,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/gun/projectile/automatic/wt550,
/obj/item/weapon/gun/projectile/automatic/z8)
/datum/supply_drop_loot/seeds
name = "Seeds"
container = /obj/structure/closet/crate
/datum/supply_drop_loot/seeds/New()
..()
contents = list(
/obj/item/seeds/chiliseed,
/obj/item/seeds/berryseed,
/obj/item/seeds/cornseed,
/obj/item/seeds/eggplantseed,
/obj/item/seeds/tomatoseed,
/obj/item/seeds/appleseed,
/obj/item/seeds/soyaseed,
/obj/item/seeds/wheatseed,
/obj/item/seeds/carrotseed,
/obj/item/seeds/lemonseed,
/obj/item/seeds/orangeseed,
/obj/item/seeds/grassseed,
/obj/item/seeds/sunflowerseed,
/obj/item/seeds/chantermycelium,
/obj/item/seeds/potatoseed,
/obj/item/seeds/sugarcaneseed)
/datum/supply_drop_loot/food
name = "Food"
container = /obj/structure/largecrate
/datum/supply_drop_loot/food/New()
..()
contents = list(
/obj/item/weapon/reagent_containers/food/condiment/flour,
/obj/item/weapon/reagent_containers/food/condiment/flour,
/obj/item/weapon/reagent_containers/food/condiment/flour,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/storage/fancy/egg_box,
/obj/item/weapon/reagent_containers/food/snacks/tofu,
/obj/item/weapon/reagent_containers/food/snacks/tofu,
/obj/item/weapon/reagent_containers/food/snacks/meat,
/obj/item/weapon/reagent_containers/food/snacks/meat)
/datum/supply_drop_loot/armour
name = "Armour"
container = /obj/structure/largecrate
/datum/supply_drop_loot/armour/New()
..()
contents = list(
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/head/helmet/riot,
/obj/item/clothing/suit/armor/riot,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/storage/vest/heavy,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/bulletproof)
/datum/supply_drop_loot/materials
name = "Materials"
container = /obj/structure/largecrate
/datum/supply_drop_loot/materials/New()
..()
contents = list(
/obj/item/stack/material/steel,
/obj/item/stack/material/steel,
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
/obj/item/stack/material/glass,
/obj/item/stack/material/wood,
/obj/item/stack/material/plastic,
/obj/item/stack/material/glass/reinforced,
/obj/item/stack/material/plasteel)
/datum/supply_drop_loot/medical
name = "Medical"
container = /obj/structure/closet/crate/medical
/datum/supply_drop_loot/medical/New()
..()
contents = list(
/obj/item/weapon/storage/firstaid/regular,
/obj/item/weapon/storage/firstaid/fire,
/obj/item/weapon/storage/firstaid/toxin,
/obj/item/weapon/storage/firstaid/o2,
/obj/item/weapon/storage/firstaid/adv,
/obj/item/weapon/reagent_containers/glass/bottle/antitoxin,
/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline,
/obj/item/weapon/reagent_containers/glass/bottle/stoxin,
/obj/item/weapon/storage/box/syringes,
/obj/item/weapon/storage/box/autoinjectors)
/datum/supply_drop_loot/power
name = "Power"
container = /obj/structure/largecrate
/datum/supply_drop_loot/power/New()
..()
contents = list(
/obj/item/stack/material/steel,
/obj/item/stack/material/steel,
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
/obj/item/stack/material/glass,
/obj/item/stack/material/wood,
/obj/item/stack/material/plastic,
/obj/item/stack/material/glass/reinforced,
/obj/item/stack/material/plasteel)
/datum/supply_drop_loot/hydroponics
name = "Hydroponics"
container = /obj/structure/largecrate
/datum/supply_drop_loot/hydroponics/New()
..()
contents = list(
/obj/machinery/portable_atmospherics/hydroponics,
/obj/machinery/portable_atmospherics/hydroponics,
/obj/machinery/portable_atmospherics/hydroponics)
/datum/supply_drop_loot/power
name = "Power"
container = /obj/structure/largecrate
/datum/supply_drop_loot/power/New()
..()
contents = list(
/obj/machinery/power/port_gen/pacman,
/obj/machinery/power/port_gen/pacman/super,
/obj/machinery/power/port_gen/pacman/mrs)
/datum/supply_drop_loot/power/contents()
return list(pick(contents))
+227
View File
@@ -0,0 +1,227 @@
#define SD_FLOOR_TILE 0
#define SD_WALL_TILE 1
#define SD_DOOR_TILE 2
#define SD_EMPTY_TILE 3
#define SD_SUPPLY_TILE 7
/datum/random_map/droppod
descriptor = "drop pod"
initial_wall_cell = 0
limit_x = 3
limit_y = 3
preserve_map = 0
wall_type = /turf/simulated/wall/titanium
floor_type = /turf/simulated/floor/reinforced
var/list/supplied_drop_types = list()
var/door_type = /obj/structure/droppod_door
var/drop_type = /mob/living/simple_animal/parrot
var/auto_open_doors
var/placement_explosion_dev = 1
var/placement_explosion_heavy = 2
var/placement_explosion_light = 6
var/placement_explosion_flash = 4
/datum/random_map/droppod/New(var/seed, var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce, var/supplied_drop, var/list/supplied_drops, var/automated)
if(supplied_drop)
drop_type = supplied_drop
else if(islist(supplied_drops) && supplied_drops.len)
supplied_drop_types = supplied_drops
drop_type = "custom"
if(automated)
auto_open_doors = 1
//Make sure there is a clear midpoint.
if(limit_x % 2 == 0) limit_x++
if(limit_y % 2 == 0) limit_y++
..()
/datum/random_map/droppod/generate_map()
// No point calculating these 200 times.
var/x_midpoint = n_ceil(limit_x / 2)
var/y_midpoint = n_ceil(limit_y / 2)
// Draw walls/floors/doors.
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!current_cell)
continue
var/on_x_bound = (x == 1 || x == limit_x)
var/on_y_bound = (y == 1 || y == limit_x)
var/draw_corners = (limit_x < 5 && limit_y < 5)
if(on_x_bound || on_y_bound)
// Draw access points in midpoint of each wall.
if(x == x_midpoint || y == y_midpoint)
map[current_cell] = SD_DOOR_TILE
// Draw the actual walls.
else if(draw_corners || (!on_x_bound || !on_y_bound))
map[current_cell] = SD_WALL_TILE
//Don't draw the far corners on large pods.
else
map[current_cell] = SD_EMPTY_TILE
else
// Fill in the corners.
if((x == 2 || x == (limit_x-1)) && (y == 2 || y == (limit_y-1)))
map[current_cell] = SD_WALL_TILE
// Fill in EVERYTHING ELSE.
else
map[current_cell] = SD_FLOOR_TILE
// Draw the drop contents.
var/current_cell = get_map_cell(x_midpoint,y_midpoint)
if(current_cell)
map[current_cell] = SD_SUPPLY_TILE
return 1
/datum/random_map/droppod/apply_to_map()
if(placement_explosion_dev || placement_explosion_heavy || placement_explosion_light || placement_explosion_flash)
var/turf/T = locate((origin_x + n_ceil(limit_x / 2)-1), (origin_y + n_ceil(limit_y / 2)-1), origin_z)
if(istype(T))
explosion(T, placement_explosion_dev, placement_explosion_heavy, placement_explosion_light, placement_explosion_flash)
sleep(15) // Let the explosion finish proccing before we ChangeTurf(), otherwise it might destroy our spawned objects.
return ..()
/datum/random_map/droppod/get_appropriate_path(var/value)
if(value == SD_FLOOR_TILE || value == SD_SUPPLY_TILE)
return floor_type
else if(value == SD_WALL_TILE)
return wall_type
else if(value == SD_DOOR_TILE )
return wall_type
return null
// Pods are circular. Get the direction this object is facing from the center of the pod.
/datum/random_map/droppod/get_spawn_dir(var/x, var/y)
var/x_midpoint = n_ceil(limit_x / 2)
var/y_midpoint = n_ceil(limit_y / 2)
if(x == x_midpoint && y == y_midpoint)
return null
var/turf/target = locate(origin_x+x-1, origin_y+y-1, origin_z)
var/turf/middle = locate(origin_x+x_midpoint-1, origin_y+y_midpoint-1, origin_z)
if(!istype(target) || !istype(middle))
return null
return get_dir(middle, target)
/datum/random_map/droppod/get_additional_spawns(var/value, var/turf/T, var/spawn_dir)
// Splatter anything under us that survived the explosion.
if(value != SD_EMPTY_TILE && T.contents.len)
for(var/atom/movable/AM in T)
if(AM.simulated && !istype(AM, /mob/dead))
qdel(AM)
// Also spawn doors and loot.
if(value == SD_DOOR_TILE)
var/obj/structure/S = new door_type(T, auto_open_doors)
S.set_dir(spawn_dir)
else if(value == SD_SUPPLY_TILE)
get_spawned_drop(T)
/datum/random_map/droppod/proc/get_spawned_drop(var/turf/T)
var/obj/structure/bed/chair/C = new(T)
C.set_light(3, l_color = "#CC0000")
var/mob/living/drop
// This proc expects a list of mobs to be passed to the spawner.
// Use the supply pod if you don't want to drop mobs.
// Mobs will not double up; if you want multiple mobs, you
// will need multiple drop tiles.
if(islist(supplied_drop_types) && supplied_drop_types.len)
while(supplied_drop_types.len)
drop = pick(supplied_drop_types)
supplied_drop_types -= drop
if(istype(drop))
drop.tag = null
if(drop.buckled)
drop.buckled = null
drop.forceMove(T)
else if(ispath(drop_type))
drop = new drop_type(T)
if(istype(drop))
if(drop.buckled)
drop.buckled = null
drop.forceMove(T)
/datum/admins/proc/call_drop_pod()
set category = "Fun"
set desc = "Call an immediate drop pod on your location."
set name = "Call Drop Pod"
if(!check_rights(R_FUN)) return
var/client/selected_player
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
var/spawn_path = input("Select a mob type.", "Drop Pod Selection", null) as null|anything in typesof(/mob/living)-/mob/living
if(!spawn_path)
return
if(alert("Do you wish the mob to have a player?",,"No","Yes") == "No")
var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
for(var/i=0;i<spawn_count;i++)
var/mob/living/M = new spawn_path()
M.tag = "awaiting drop"
spawned_mobs |= M
else
var/list/candidates = list()
for(var/client/player in clients)
if(player.mob && istype(player.mob, /mob/dead/observer))
candidates |= player
if(!candidates.len)
usr << "There are no candidates for a drop pod launch."
return
// Get a player and a mob type.
selected_player = input("Select a player.", "Drop Pod Selection", null) as null|anything in candidates
if(!selected_player)
return
// Spawn the mob in nullspace for now.
spawned_mob = new spawn_path()
spawned_mob.tag = "awaiting drop"
// Equip them, if they are human and it is desirable.
if(istype(spawned_mob, /mob/living/carbon/human))
var/antag_type = input("Select an equipment template to use or cancel for nude.", null) as null|anything in all_antag_types
if(antag_type)
var/datum/antagonist/A = all_antag_types[antag_type]
A.equip(spawned_mob)
if(alert("Are you SURE you wish to deploy this drop pod? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes") == "No")
if(spawned_mob)
qdel(spawned_mob)
if(spawned_mobs.len)
for(var/mob/living/M in spawned_mobs)
spawned_mobs -= M
M.tag = null
qdel(M)
spawned_mobs.Cut()
return
// Chuck them into the pod.
var/automatic_pod
if(spawned_mob && selected_player)
if(selected_player.mob.mind)
selected_player.mob.mind.transfer_to(spawned_mob)
else
spawned_mob.ckey = selected_player.mob.ckey
spawned_mobs = list(spawned_mob)
message_admins("[key_name(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing \the [spawned_mob] ([spawned_mob.key]) at ([usr.x],[usr.y],[usr.z])")
else if(spawned_mobs.len)
automatic_pod = 1
message_admins("[key_name(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
log_admin("[key_name(usr)] dropped a pod containing [spawned_mobs.len] [spawned_mobs[1]] at ([usr.x],[usr.y],[usr.z])")
else
return
new /datum/random_map/droppod(null, usr.x-1, usr.y-1, usr.z, supplied_drops = spawned_mobs, automated = automatic_pod)
@@ -0,0 +1,80 @@
/obj/structure/droppod_door
name = "pod door"
desc = "A drop pod door. Opens rapidly using explosive bolts."
icon = 'icons/obj/structures.dmi'
icon_state = "droppod_door_closed"
anchored = 1
density = 1
opacity = 1
layer = TURF_LAYER + 0.1
var/deploying
var/deployed
/obj/structure/droppod_door/New(var/newloc, var/autoopen)
..(newloc)
if(autoopen)
spawn(100)
deploy()
/obj/structure/droppod_door/attack_ai(var/mob/user)
if(!user.Adjacent(src))
return
attack_hand(user)
/obj/structure/droppod_door/attack_generic(var/mob/user)
attack_hand(user)
/obj/structure/droppod_door/attack_hand(var/mob/user)
if(deploying) return
user << "<span class='danger'>You prime the explosive bolts. Better get clear!</span>"
sleep(30)
deploy()
/obj/structure/droppod_door/proc/deploy()
if(deployed)
return
deployed = 1
visible_message("<span class='danger'>The explosive bolts on \the [src] detonate, throwing it open!</span>")
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5)
// This is shit but it will do for the sake of testing.
for(var/obj/structure/droppod_door/D in range(5,src))
if(D.deployed)
continue
D.deploy()
// Overwrite turfs.
var/turf/origin = get_turf(src)
origin.ChangeTurf(/turf/simulated/floor/reinforced)
origin.set_light(0) // Forcing updates
var/turf/T = get_step(origin, src.dir)
T.ChangeTurf(/turf/simulated/floor/reinforced)
T.set_light(0) // Forcing updates
// Destroy turf contents.
for(var/obj/O in origin)
if(!O.simulated)
continue
qdel(O) //crunch
for(var/obj/O in T)
if(!O.simulated)
continue
qdel(O) //crunch
// Hurl the mobs away.
for(var/mob/living/M in T)
M.throw_at(get_edge_target_turf(T,src.dir),rand(0,3),50)
for(var/mob/living/M in origin)
M.throw_at(get_edge_target_turf(origin,src.dir),rand(0,3),50)
// Create a decorative ramp bottom and flatten out our current ramp.
density = 0
opacity = 0
icon_state = "ramptop"
var/obj/structure/droppod_door/door_bottom = new(T)
door_bottom.deployed = 1
door_bottom.density = 0
door_bottom.opacity = 0
door_bottom.dir = src.dir
door_bottom.icon_state = "rampbottom"
+93
View File
@@ -0,0 +1,93 @@
/datum/random_map/droppod/supply
descriptor = "supply drop"
limit_x = 5
limit_y = 5
placement_explosion_light = 7
placement_explosion_flash = 5
// UNLIKE THE DROP POD, this map deals ENTIRELY with strings and types.
// Drop type is a string representing a mode rather than an atom or path.
// supplied_drop_types is a list of types to spawn in the pod.
/datum/random_map/droppod/supply/get_spawned_drop(var/turf/T)
if(!drop_type) drop_type = pick(supply_drop_random_loot_types())
if(drop_type == "custom")
if(supplied_drop_types.len)
var/obj/structure/largecrate/C = locate() in T
for(var/drop_type in supplied_drop_types)
var/atom/movable/A = new drop_type(T)
if(!istype(A, /mob))
if(!C) C = new(T)
C.contents |= A
return
else
drop_type = pick(supply_drop_random_loot_types())
if(istype(drop_type, /datum/supply_drop_loot))
var/datum/supply_drop_loot/SDL = drop_type
SDL.drop(T)
else
error("Unhandled drop type: [drop_type]")
/datum/admins/proc/call_supply_drop()
set category = "Fun"
set desc = "Call an immediate supply drop on your location."
set name = "Call Supply Drop"
if(!check_rights(R_FUN)) return
var/chosen_loot_type
var/list/chosen_loot_types
var/choice = alert("Do you wish to supply a custom loot list?",,"No","Yes")
if(choice == "Yes")
chosen_loot_types = list()
choice = alert("Do you wish to add mobs?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/mob/living)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add structures or machines?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj) - typesof(/obj/item)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add any non-weapon items?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item) - typesof(/obj/item/weapon)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add weapons?",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/obj/item/weapon)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
choice = alert("Do you wish to add ABSOLUTELY ANYTHING ELSE? (you really shouldn't need to)",,"No","Yes")
if(choice == "Yes")
while(1)
var/adding_loot_type = input("Select a new loot path. Cancel to finish.", "Loot Selection", null) as null|anything in typesof(/atom/movable)
if(!adding_loot_type)
break
chosen_loot_types |= adding_loot_type
else
choice = alert("Do you wish to specify a loot type?",,"No","Yes")
if(choice == "Yes")
chosen_loot_type = input("Select a loot type.", "Loot Selection", null) as null|anything in supply_drop_random_loot_types()
choice = alert("Are you SURE you wish to deploy this supply drop? It will cause a sizable explosion and gib anyone underneath it.",,"No","Yes")
if(choice == "No")
return
log_admin("[key_name(usr)] dropped supplies at ([usr.x],[usr.y],[usr.z])")
new /datum/random_map/droppod/supply(null, usr.x-2, usr.y-2, usr.z, supplied_drops = chosen_loot_types, supplied_drop = chosen_loot_type)
+2 -2
View File
@@ -38,8 +38,8 @@
/datum/random_map/noise/ore/apply_to_turf(var/x,var/y)
var/tx = (origin_x+(x-1))*chunk_size
var/ty = (origin_y+(y-1))*chunk_size
var/tx = ((origin_x-1)+x)*chunk_size
var/ty = ((origin_y-1)+y)*chunk_size
for(var/i=0,i<chunk_size,i++)
for(var/j=0,j<chunk_size,j++)
+24 -20
View File
@@ -17,6 +17,7 @@ var/global/list/map_count = list()
var/limit_x = 128 // Default x size.
var/limit_y = 128 // Default y size.
var/auto_apply = 1
var/preserve_map = 1
// Turf paths.
var/wall_type = /turf/simulated/wall
@@ -38,12 +39,10 @@ var/global/list/map_count = list()
else
map_count[descriptor]++
name = "[descriptor] #[map_count[descriptor]]"
random_maps[name] = src
if(preserve_map) random_maps[name] = src
// Get origins for applying the map later.
origin_x = (!isnull(tx) ? tx : 1)
origin_y = (!isnull(ty) ? ty : 1)
origin_z = (!isnull(tz) ? tz : 1)
set_origins(tx, ty, tz)
if(tlx) limit_x = tlx
if(tly) limit_y = tly
@@ -69,6 +68,8 @@ var/global/list/map_count = list()
if(!do_not_announce) admin_notice("<span class='danger'>[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map.</span>", R_DEBUG)
/datum/random_map/proc/get_map_cell(var/x,var/y)
if(!islist(map))
set_map_size()
var/cell = ((y-1)*limit_x)+x
if((cell < 1) || (cell > map.len))
return null
@@ -103,16 +104,11 @@ var/global/list/map_count = list()
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(within_bounds(current_cell))
if(current_cell)
dat += get_map_char(map[current_cell])
dat += "<br>"
user << "[dat]+------+</code>"
/datum/random_map/proc/within_bounds(var/val)
if(!islist(map))
set_map_size()
return (val>0) && (val<=map.len)
/datum/random_map/proc/set_map_size()
map = list()
map.len = limit_x * limit_y
@@ -148,29 +144,37 @@ var/global/list/map_count = list()
/datum/random_map/proc/check_map_sanity()
return 1
/datum/random_map/proc/apply_to_map(var/tx, var/ty, var/tz)
if(!tx) tx = isnull(origin_x) ? 1 : origin_x
if(!ty) ty = isnull(origin_y) ? 1 : origin_y
if(!tz) tz = isnull(origin_z) ? 1 : origin_z
/datum/random_map/proc/set_origins(var/tx, var/ty, var/tz)
origin_x = tx ? tx : 1
origin_y = ty ? ty : 1
origin_z = tz ? tz : 1
/datum/random_map/proc/apply_to_map()
if(!origin_x) origin_x = 1
if(!origin_y) origin_y = 1
if(!origin_z) origin_z = 1
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
if(!priority_process) sleep(-1)
apply_to_turf((tx-1)+x,(ty-1)+y,tz)
apply_to_turf(x,y)
/datum/random_map/proc/apply_to_turf(var/x,var/y,var/z)
/datum/random_map/proc/apply_to_turf(var/x,var/y)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
return 0
var/turf/T = locate(x,y,z)
var/turf/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z)
if(!T || (target_turf_type && !istype(T,target_turf_type)))
return 0
var/newpath = get_appropriate_path(map[current_cell])
if(newpath)
T.ChangeTurf(newpath)
get_additional_spawns(map[current_cell],T)
get_additional_spawns(map[current_cell],T,get_spawn_dir(x, y))
return T
/datum/random_map/proc/get_spawn_dir()
return 0
/datum/random_map/proc/get_appropriate_path(var/value)
switch(value)
if(FLOOR_CHAR)
@@ -193,7 +197,7 @@ var/global/list/map_count = list()
for(var/x = 1, x <= limit_x, x++)
for(var/y = 1, y <= limit_y, y++)
var/current_cell = get_map_cell(x,y)
if(!within_bounds(current_cell))
if(!current_cell)
continue
if(tx+x > target_map.limit_x)
continue
+2 -1
View File
@@ -75,7 +75,8 @@
tz = !isnull(tz) ? tz : T.z
message_admins("[key_name_admin(usr)] has applied [M.name] at x[tx],y[ty],z[tz].")
log_admin("[key_name(usr)] has applied [M.name] at x[tx],y[ty],z[tz].")
M.apply_to_map(tx,ty,tz)
M.set_origins(tx,ty,tz)
M.apply_to_map()
/client/proc/overlay_random_map()
set category = "Debug"
+6 -11
View File
@@ -729,17 +729,13 @@
if (usr.stat != 0)
return
if (holdingitems && holdingitems.len == 0)
if (!holdingitems || holdingitems.len == 0)
return
for(var/obj/item/O in holdingitems)
O.loc = src.loc
holdingitems -= O
holdingitems = list()
/obj/machinery/reagentgrinder/proc/remove_object(var/obj/item/O)
holdingitems -= O
qdel(O)
holdingitems.Cut()
/obj/machinery/reagentgrinder/proc/grind()
@@ -762,10 +758,6 @@
// Process.
for (var/obj/item/O in holdingitems)
if(!O || !istype(O))
holdingitems -= null
continue
var/remaining_volume = beaker.reagents.maximum_volume - beaker.reagents.total_volume
if(remaining_volume <= 0)
break
@@ -776,13 +768,16 @@
var/amount_to_take = max(0,min(stack.amount,round(remaining_volume/REAGENTS_PER_SHEET)))
if(amount_to_take)
stack.use(amount_to_take)
if(deleted(stack))
holdingitems -= stack
beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET))
continue
if(O.reagents)
O.reagents.trans_to(beaker, min(O.reagents.total_volume, remaining_volume))
if(O.reagents.total_volume == 0)
remove_object(O)
holdingitems -= O
qdel(O)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
@@ -144,7 +144,7 @@
/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(M.bodytemperature < 170)
M.adjustCloneLoss(-30 * removed)
M.adjustOxyLoss(-3 * removed)
M.adjustOxyLoss(-30 * removed)
M.heal_organ_damage(30 * removed, 30 * removed)
M.adjustToxLoss(-30 * removed)
+14 -7
View File
@@ -307,7 +307,7 @@
if(material)
for(var/i = 1 to 4)
I = image(icon, "[material.icon_base]_[connections[i]]", dir = 1<<(i-1))
I.color = material.icon_colour
if(material.icon_colour) I.color = material.icon_colour
I.alpha = 255 * material.opacity
overlays += I
@@ -415,9 +415,16 @@
connections = dirs_to_corner_states(connection_dirs)
#define CORNER_NONE 0
#define CORNER_CLOCKWISE 1
#define CORNER_COUNTERCLOCKWISE 1
#define CORNER_DIAGONAL 2
#define CORNER_COUNTERCLOCKWISE 4
#define CORNER_CLOCKWISE 4
/*
turn() is weird:
turn(icon, angle) turns icon by angle degrees clockwise
turn(matrix, angle) turns matrix by angle degrees clockwise
turn(dir, angle) turns dir by angle degrees counter-clockwise
*/
/proc/dirs_to_corner_states(list/dirs)
if(!istype(dirs)) return
@@ -430,14 +437,14 @@
if(dir in dirs)
. |= CORNER_DIAGONAL
if(turn(dir,45) in dirs)
. |= CORNER_CLOCKWISE
if(turn(dir,-45) in dirs)
. |= CORNER_COUNTERCLOCKWISE
if(turn(dir,-45) in dirs)
. |= CORNER_CLOCKWISE
ret[i] = "[.]"
return ret
#undef CORNER_NONE
#undef CORNER_EASTWEST
#undef CORNER_COUNTERCLOCKWISE
#undef CORNER_DIAGONAL
#undef CORNER_NORTHSOUTH
#undef CORNER_CLOCKWISE
+4 -4
View File
@@ -97,15 +97,15 @@
/datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer)
for(var/g in sharer.gas)
var/our_heatcap = heat_capacity()
var/share_heatcap = sharer.heat_capacity()
for(var/g in gas|sharer.gas)
var/comb = gas[g] + sharer.gas[g]
comb /= volume + sharer.volume
gas[g] = comb * volume
sharer.gas[g] = comb * sharer.volume
var/our_heatcap = heat_capacity()
var/share_heatcap = sharer.heat_capacity()
if(our_heatcap + share_heatcap)
temperature = ((temperature * our_heatcap) + (sharer.temperature * share_heatcap)) / (our_heatcap + share_heatcap)
sharer.temperature = temperature