mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] Lets vehicle abilties actually be removed (#16485)
* Lets vehicle abilties actually be removed (#70151) Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com> * Lets vehicle abilties actually be removed Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: TiviPlus <572233640+TiviPlus@ users.noreply.com> Co-authored-by: Tastyfish <crazychris32@gmail.com>
This commit is contained in:
co-authored by
TiviPlus
TiviPlus
Tastyfish
parent
4c2e6f0199
commit
a9caade05e
@@ -38,10 +38,22 @@
|
||||
for(var/i in occupants)
|
||||
grant_passenger_actions(i) //refresh
|
||||
|
||||
/**
|
||||
* ## destroy_passenger_action_type
|
||||
*
|
||||
* Removes this action type from all occupants and stops autogranting it
|
||||
* args:
|
||||
* * actiontype: typepath of the action you want to remove from occupants and the autogrant list.
|
||||
*/
|
||||
/obj/vehicle/proc/destroy_passenger_action_type(actiontype)
|
||||
autogrant_actions_passenger -= actiontype
|
||||
for(var/i in occupants)
|
||||
remove_action_type_from_mob(actiontype, i)
|
||||
|
||||
/**
|
||||
* ## initialize_controller_action_type
|
||||
*
|
||||
* Gives any passenger that enters the mech this action... IF they have the correct vehicle control flag.
|
||||
* Gives any passenger that enters the vehicle this action... IF they have the correct vehicle control flag.
|
||||
* This is used so passengers cannot press buttons only drivers should have, for example.
|
||||
* args:
|
||||
* * actiontype: typepath of the action you want to give occupants.
|
||||
@@ -52,6 +64,19 @@
|
||||
for(var/i in occupants)
|
||||
grant_controller_actions(i) //refresh
|
||||
|
||||
/**
|
||||
* ## destroy_controller_action_type
|
||||
*
|
||||
* As the name implies, removes the actiontype from autogrant and removes it from all occupants
|
||||
* args:
|
||||
* * actiontype: typepath of the action you want to remove from occupants and autogrant.
|
||||
*/
|
||||
/obj/vehicle/proc/destroy_controller_action_type(actiontype, control_flag)
|
||||
autogrant_actions_controller["[control_flag]"] -= actiontype
|
||||
UNSETEMPTY(autogrant_actions_controller["[control_flag]"])
|
||||
for(var/i in occupants)
|
||||
remove_action_type_from_mob(actiontype, i)
|
||||
|
||||
/**
|
||||
* ## grant_action_type_to_mob
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user