From 9676fa0e5676d03642b8ecfe9b06b82d3fbb1583 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sat, 13 Jul 2024 21:27:47 +0200 Subject: [PATCH 1/5] eh --- code/game/objects/items/explosives/plastic.dm | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index 58cbca9a5ab3..d39240733257 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -21,7 +21,7 @@ var/atom/plant_target = null //which atom the plstique explosive is planted on var/overlay_image = "plastic-explosive2" var/image/overlay - var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container) + var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container,/obj/structure/machinery/colony_floodlight) antigrief_protection = TRUE //Should it be checked by antigrief? var/req_skill = SKILL_ENGINEER @@ -173,16 +173,9 @@ update_icon() /obj/item/explosive/plastic/proc/can_place(mob/user, atom/target) - if(istype(target, /obj/structure/ladder) || istype(target, /obj/item) || istype(target, /turf/open) || istype(target, /obj/structure/barricade) || istype(target, /obj/structure/closet/crate)) - return FALSE - - if(istype(target, /obj/structure/closet)) - var/obj/structure/closet/C = target - if(C.opened) - return FALSE - //vehicle interior stuff checks - if(istype(target, /obj/vehicle/multitile)) + if(!is_type_in_list(target, breachable))//only items on the list are allowed + to_chat(user, SPAN_WARNING("You cannot plant [name] on [target]!")) return FALSE //vehicle interior stuff checks @@ -190,11 +183,6 @@ to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src].")) return FALSE - if(istype(target, /obj/effect) || istype(target, /obj/structure/machinery)) - var/obj/O = target - if(O.unacidable) - return FALSE - if(istype(target, /turf/closed/wall)) var/turf/closed/wall/W = target if(W.hull) @@ -294,6 +282,9 @@ for(var/obj/structure/machinery/door/D in orange(1, target_turf)) D.ex_act(1000 * penetration, , cause_data) + for(var/obj/structure/machinery/colony_floodlight/colony_floodlight in orange(1, target_turf)) + colony_floodlight.Destroy() + handle_explosion(target_turf, dir, temp_cause) /obj/item/explosive/plastic/proc/handle_explosion(turf/target_turf, dir, cause_data) From 444b74cca5b6d542e63bfb809156daf0cb7ed21e Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 08:14:45 +0200 Subject: [PATCH 2/5] ehm --- code/game/objects/items/explosives/plastic.dm | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index d39240733257..fa763c311da1 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -21,7 +21,7 @@ var/atom/plant_target = null //which atom the plstique explosive is planted on var/overlay_image = "plastic-explosive2" var/image/overlay - var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container,/obj/structure/machinery/colony_floodlight) + var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container) antigrief_protection = TRUE //Should it be checked by antigrief? var/req_skill = SKILL_ENGINEER @@ -173,9 +173,16 @@ update_icon() /obj/item/explosive/plastic/proc/can_place(mob/user, atom/target) + if(istype(target, /obj/structure/ladder) || istype(target, /obj/item) || istype(target, /turf/open) || istype(target, /obj/structure/barricade) || istype(target, /obj/structure/closet/crate)) + return FALSE - if(!is_type_in_list(target, breachable))//only items on the list are allowed - to_chat(user, SPAN_WARNING("You cannot plant [name] on [target]!")) + if(istype(target, /obj/structure/closet)) + var/obj/structure/closet/C = target + if(C.opened) + return FALSE + + //vehicle interior stuff checks + if(istype(target, /obj/vehicle/multitile)) return FALSE //vehicle interior stuff checks @@ -183,6 +190,11 @@ to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src].")) return FALSE + if(istype(target, /obj/effect) || istype(target, /obj/structure/machinery)) + var/obj/O = target + if(O.unacidable) + return FALSE + if(istype(target, /turf/closed/wall)) var/turf/closed/wall/W = target if(W.hull) @@ -282,9 +294,6 @@ for(var/obj/structure/machinery/door/D in orange(1, target_turf)) D.ex_act(1000 * penetration, , cause_data) - for(var/obj/structure/machinery/colony_floodlight/colony_floodlight in orange(1, target_turf)) - colony_floodlight.Destroy() - handle_explosion(target_turf, dir, temp_cause) /obj/item/explosive/plastic/proc/handle_explosion(turf/target_turf, dir, cause_data) @@ -382,4 +391,3 @@ to_chat(user, SPAN_WARNING("You don't quite understand how the device works...")) return FALSE . = ..() - From 2a78285e6827fe1d1ae475ce796f718fc7884d13 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 09:26:50 +0200 Subject: [PATCH 3/5] ehm --- code/game/objects/items/explosives/plastic.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index fa763c311da1..58cbca9a5ab3 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -391,3 +391,4 @@ to_chat(user, SPAN_WARNING("You don't quite understand how the device works...")) return FALSE . = ..() + From 2cb6b76ab20fae6d74f556b68e1fae9ffe2664aa Mon Sep 17 00:00:00 2001 From: vincibrv Date: Thu, 8 Aug 2024 23:43:22 +0200 Subject: [PATCH 4/5] adds line to reqire two diferent users --- code/modules/security_levels/keycard_authentication.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 4b7cdd69a449..eaeda8ba6a0a 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -36,6 +36,9 @@ if(active == 1) //This is not the device that made the initial request. It is the device confirming the request. if(event_source) + if(event_source.event_triggered_by == usr) + to_chat(usr, "Your ID is rejected, as it is the one that triggered the event!") + return event_source.confirmed = 1 event_source.event_confirmed_by = usr else if(screen == 2) From ea363c368e53933898789feae74a96d173d1eba0 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 16 Aug 2024 19:30:30 +0200 Subject: [PATCH 5/5] ehm --- code/modules/security_levels/keycard_authentication.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index eaeda8ba6a0a..1a4881904801 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -36,11 +36,11 @@ if(active == 1) //This is not the device that made the initial request. It is the device confirming the request. if(event_source) - if(event_source.event_triggered_by == usr) - to_chat(usr, "Your ID is rejected, as it is the one that triggered the event!") + if(event_source.event_triggered_by == user) + user.visible_message(SPAN_DANGER("Your ID is rejected, as it is the one that triggered the event!")) return event_source.confirmed = 1 - event_source.event_confirmed_by = usr + event_source.event_confirmed_by = user else if(screen == 2) event_triggered_by = usr broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices