Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs

# Conflicts:
#	code/game/objects/items.dm
#	code/modules/power/cable.dm
#	icons/mob/inhands/items_lefthand.dmi
#	icons/mob/inhands/items_righthand.dmi
#	icons/obj/lighting.dmi
#	paradise.dme
This commit is contained in:
Mark van Alphen
2019-04-30 19:26:17 +02:00
153 changed files with 1935 additions and 1105 deletions
+4 -5
View File
@@ -397,13 +397,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(usr, "Not when you're not dead!")
return
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(30)
usr.verbs += /mob/dead/observer/proc/dead_tele
var/area/A = input("Area to jump to", "BOOYEA") as null|anything in ghostteleportlocs
var/area/thearea = ghostteleportlocs[A]
if(!thearea) return
if(!thearea)
return
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
@@ -411,6 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!L || !L.len)
to_chat(usr, "<span class='warning'>No area available.</span>")
return
usr.forceMove(pick(L))
following = null
@@ -38,6 +38,7 @@
regenerate_icons() // Make sure the inventory updates
handle_ghosted()
handle_ssd()
/mob/living/carbon/human/proc/handle_ghosted()
if(player_ghosted > 0 && stat == CONSCIOUS && job && !restrained())
@@ -48,6 +49,22 @@
if(player_ghosted % 150 == 0)
force_cryo_human(src)
/mob/living/carbon/human/proc/handle_ssd()
if(player_logged > 0 && stat != DEAD && job)
player_logged++
if(istype(loc, /obj/machinery/cryopod))
return
if(config.auto_cryo_ssd_mins && (player_logged >= (config.auto_cryo_ssd_mins * 30)) && player_logged % 30 == 0)
var/turf/T = get_turf(src)
if(!is_station_level(T.z))
return
var/area/A = get_area(src)
if(cryo_ssd(src))
var/obj/effect/portal/P = new /obj/effect/portal(T, null, null, 40)
P.name = "NT SSD Teleportation Portal"
if(A.fast_despawn)
force_cryo_human(src)
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
..()
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
+6
View File
@@ -42,3 +42,9 @@
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
QDEL_IN(animation, 15)
/mob/living/silicon/death(gibbed)
. = ..()
if(!gibbed)
if(death_sound)
playsound(get_turf(src), death_sound, 200, 1)
@@ -28,7 +28,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(candidate)
if(!istype(candidate))
message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate is not a pAI)")
message_admins("Warning: possible href exploit by [key_name_admin(usr)] (paiController/Topic, candidate is not a pAI)")
log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate is not a pAI)")
return
@@ -55,7 +55,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
pai_candidates -= candidate
usr << browse(null, "window=findPai")
return
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
@@ -71,8 +71,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(candidate)
if(candidate.key && usr.key && candidate.key != usr.key)
message_admins("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr are different mobs)")
message_admins("Warning: possible href exploit by [key_name_admin(usr)] (paiController/Topic, candidate and usr have different keys)")
log_debug("Warning: possible href exploit by [key_name(usr)] (paiController/Topic, candidate and usr have different keys)")
return
if(href_list["new"])
@@ -248,9 +248,9 @@
death()
/mob/living/silicon/robot/drone/proc/full_law_reset()
clear_supplied_laws()
clear_inherent_laws()
clear_ion_laws()
clear_supplied_laws(TRUE)
clear_inherent_laws(TRUE)
clear_ion_laws(TRUE)
laws = new /datum/ai_laws/drone
//Reboot procs.
@@ -19,6 +19,7 @@
var/speak_exclamation = "declares"
var/speak_query = "queries"
var/pose //Yes, now AIs can pose too.
var/death_sound = 'sound/voice/borg_deathsound.ogg'
//var/sensor_mode = 0 //Determines the current HUD.
@@ -210,23 +210,29 @@ var/robot_arm = /obj/item/robot_parts/l_arm
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
var/created_name = "Floorbot"
var/toolbox = /obj/item/storage/toolbox/mechanical
var/toolbox_color = "" //Blank for blue, r for red, y for yellow, etc.
/obj/item/toolbox_tiles_sensor
/obj/item/toolbox_tiles/sensor
desc = "It's a toolbox with tiles sticking out the top and a sensor attached"
name = "tiles, toolbox and sensor arrangement"
icon = 'icons/obj/aibots.dmi'
icon_state = "toolbox_tiles_sensor"
force = 3
throwforce = 10
throw_speed = 2
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
var/created_name = "Floorbot"
/obj/item/storage/toolbox/mechanical/attackby(obj/item/stack/tile/plasteel/T, mob/user, params)
/obj/item/storage/toolbox/attackby(obj/item/stack/tile/plasteel/T, mob/user, params)
var/list/allowed_toolbox = list(/obj/item/storage/toolbox/emergency, //which toolboxes can be made into floorbots
/obj/item/storage/toolbox/electrical,
/obj/item/storage/toolbox/mechanical,
/obj/item/storage/toolbox/green,
/obj/item/storage/toolbox/syndicate,
/obj/item/storage/toolbox/fakesyndi)
if(!istype(T, /obj/item/stack/tile/plasteel))
..()
return
if(!is_type_in_list(src, allowed_toolbox))
return
if(type == /obj/item/storage/toolbox/green/memetic)
return
if(contents.len >= 1)
to_chat(user, "<span class='warning'>They won't fit in, as there is already stuff inside.</span>")
return
@@ -234,6 +240,23 @@ var/robot_arm = /obj/item/robot_parts/l_arm
if(user.s_active)
user.s_active.close(user)
var/obj/item/toolbox_tiles/B = new /obj/item/toolbox_tiles
B.toolbox = type
switch(B.toolbox)
if(/obj/item/storage/toolbox/mechanical/old)
B.toolbox_color = "ob"
if(/obj/item/storage/toolbox/emergency)
B.toolbox_color = "r"
if(/obj/item/storage/toolbox/emergency/old)
B.toolbox_color = "or"
if(/obj/item/storage/toolbox/electrical)
B.toolbox_color = "y"
if(/obj/item/storage/toolbox/green)
B.toolbox_color = "g"
if(/obj/item/storage/toolbox/syndicate)
B.toolbox_color = "s"
if(/obj/item/storage/toolbox/fakesyndi)
B.toolbox_color = "s"
B.icon_state = "[B.toolbox_color]toolbox_tiles"
user.put_in_hands(B)
to_chat(user, "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>")
user.unEquip(src, 1)
@@ -246,8 +269,10 @@ var/robot_arm = /obj/item/robot_parts/l_arm
..()
if(isprox(W))
qdel(W)
var/obj/item/toolbox_tiles_sensor/B = new /obj/item/toolbox_tiles_sensor()
var/obj/item/toolbox_tiles/sensor/B = new /obj/item/toolbox_tiles/sensor()
B.created_name = created_name
B.toolbox_color = src.toolbox_color
B.icon_state = "[B.toolbox_color]toolbox_tiles_sensor"
user.put_in_hands(B)
to_chat(user, "<span class='notice'>You add the sensor to the toolbox and tiles.</span>")
user.unEquip(src, 1)
@@ -263,12 +288,11 @@ var/robot_arm = /obj/item/robot_parts/l_arm
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
/obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params)
/obj/item/toolbox_tiles/sensor/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/robot_parts/l_arm) || istype(W, /obj/item/robot_parts/r_arm))
qdel(W)
var/turf/T = get_turf(user.loc)
var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T)
var/mob/living/simple_animal/bot/floorbot/A = new(drop_location(), toolbox_color)
A.name = created_name
A.robot_arm = W.type
to_chat(user, "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>")
@@ -287,10 +311,9 @@ var/robot_arm = /obj/item/robot_parts/l_arm
//Medbot Assembly
/obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params)
if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm))
return ..()
return ..()
else
robot_arm = I.type
//Making a medibot!
if(contents.len)
@@ -298,7 +321,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm
return
var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly(loc, med_bot_skin)
A.req_one_access = req_one_access
A.syndicate_aligned = syndicate_aligned
A.treatment_oxy = treatment_oxy
@@ -492,7 +515,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm
//General Griefsky
else if((istype(I, /obj/item/wrench)) && (build_step == 3))
else if((istype(I, /obj/item/wrench)) && (build_step == 3))
var/obj/item/griefsky_assembly/A = new /obj/item/griefsky_assembly
user.put_in_hands(A)
to_chat(user, "<span class='notice'>You adjust the arm slots for extra weapons!.</span>")
@@ -516,12 +539,12 @@ var/robot_arm = /obj/item/robot_parts/l_arm
build_step++
to_chat(user, "<span class='notice'>You add an energy sword to [src]!.</span>")
qdel(I)
else if((istype(I, /obj/item/melee/energy/sword)) && (build_step == 3))
if(!user.unEquip(I))
return
to_chat(user, "<span class='notice'>You complete General Griefsky!.</span>")
var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky
var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky
S.forceMove(get_turf(src))
qdel(I)
qdel(src)
@@ -537,7 +560,7 @@ var/robot_arm = /obj/item/robot_parts/l_arm
if(!user.unEquip(I))
return
to_chat(user, "<span class='notice'>You complete Genewul Giftskee!.</span>")
var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy
var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy
S.forceMove(get_turf(src))
qdel(I)
qdel(src)
@@ -5,7 +5,7 @@
icon = 'icons/obj/aibots.dmi'
icon_state = "floorbot0"
density = 0
anchored = 0
anchored = FALSE
health = 25
maxHealth = 25
@@ -32,6 +32,7 @@
var/max_targets = 50
var/turf/target
var/oldloc = null
var/toolbox_color = ""
#define HULL_BREACH 1
#define BRIDGE_MODE 2
@@ -40,12 +41,16 @@
#define REPLACE_TILE 5
#define TILE_EMAG 6
/mob/living/simple_animal/bot/floorbot/New()
/mob/living/simple_animal/bot/floorbot/New(mapload, new_toolbox_color)
..()
toolbox_color = new_toolbox_color
update_icon()
var/datum/job/engineer/J = new/datum/job/engineer
access_card.access += J.get_access()
prev_access = access_card.access
if(toolbox_color == "s")
health = 50
maxHealth = 50
/mob/living/simple_animal/bot/floorbot/bot_reset()
..()
@@ -53,7 +58,7 @@
oldloc = null
ignore_list = list()
nagged = 0
anchored = 0
anchored = FALSE
update_icon()
/mob/living/simple_animal/bot/floorbot/set_custom_texts()
@@ -235,7 +240,7 @@
repair(target)
else if(emagged == 2 && istype(target,/turf/simulated/floor))
var/turf/simulated/floor/F = target
anchored = 1
anchored = TRUE
mode = BOT_REPAIRING
if(prob(90))
F.break_tile_to_plating()
@@ -244,7 +249,7 @@
audible_message("<span class='danger'>[src] makes an excited booping sound.</span>")
spawn(50)
amount ++
anchored = 0
anchored = FALSE
mode = BOT_IDLE
target = null
path = list()
@@ -272,11 +277,11 @@
if(HULL_BREACH) //The most common job, patching breaches in the station's hull.
if(is_hull_breach(scan_target)) //Ensure that the targeted space turf is actually part of the station, and not random space.
result = scan_target
anchored = 1 //Prevent the floorbot being blown off-course while trying to reach a hull breach.
anchored = TRUE //Prevent the floorbot being blown off-course while trying to reach a hull breach.
if(BRIDGE_MODE) //Only space turfs in our chosen direction are considered.
if(get_dir(src, scan_target) == targetdirection)
result = scan_target
anchored = 1
anchored = TRUE
if(REPLACE_TILE)
F = scan_target
if(istype(F, /turf/simulated/floor/plating)) //The floor must not already have a tile.
@@ -306,9 +311,10 @@
mode = BOT_IDLE
target = null
return
anchored = 1
icon_state = "floorbot-c"
anchored = TRUE
icon_state = "[toolbox_color]floorbot-c"
if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is
icon_state = "[toolbox_color]floorbot-c"
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
mode = BOT_REPAIRING
spawn(50)
@@ -320,11 +326,12 @@
mode = BOT_IDLE
amount -= 1
update_icon()
anchored = 0
anchored = FALSE
target = null
else
var/turf/simulated/floor/F = target_turf
mode = BOT_REPAIRING
icon_state = "[toolbox_color]floorbot-c"
visible_message("<span class='notice'>[src] begins repairing the floor.</span>")
spawn(50)
if(mode == BOT_REPAIRING)
@@ -334,7 +341,7 @@
mode = BOT_IDLE
amount -= 1
update_icon()
anchored = 0
anchored = FALSE
target = null
/mob/living/simple_animal/bot/floorbot/proc/eattile(obj/item/stack/tile/plasteel/T)
@@ -380,9 +387,9 @@
/mob/living/simple_animal/bot/floorbot/update_icon()
if(amount > 0)
icon_state = "floorbot[on]"
icon_state = "[toolbox_color]floorbot[on]"
else
icon_state = "floorbot[on]e"
icon_state = "[toolbox_color]floorbot[on]e"
/mob/living/simple_animal/bot/floorbot/explode()
on = 0
+2 -2
View File
@@ -19,10 +19,10 @@
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
if(matches)
if(M.client)
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=[usr.UID()];priv_msg=[src.UID()]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=[usr.UID()];priv_msg=[M.UID()]'>[key_name_admin(M)]</A>.</font>", 1)
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=[usr.UID()];priv_msg=[src.client.UID()]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=[usr.UID()];priv_msg=[M.client.UID()]'>[key_name_admin(M)]</A>.</font>", 1)
log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].")
else
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=[usr.UID()];priv_msg=[src.UID()]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=[usr.UID()];priv_msg=[src.client.UID()]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).")
/mob/Login()
+9 -4
View File
@@ -901,13 +901,18 @@ var/list/slot_equipment_priority = list( \
/mob/MouseDrop(mob/M as mob)
..()
if(M != usr) return
if(isliving(M)) // Ewww
if(isliving(M))
var/mob/living/L = M
if(L.mob_size <= MOB_SIZE_SMALL)
return // Stops pAI drones and small mobs (borers, parrots, crabs) from stripping people. --DZD
if(!M.can_strip) return
if(usr == src) return
if(!Adjacent(usr)) return
if(!M.can_strip)
return
if(usr == src)
return
if(!Adjacent(usr))
return
if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src))
return
show_inv(usr)
/mob/proc/can_use_hands()